Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for negative gamma-correction levels #1121

Merged
merged 8 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/crispy.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//

Check notice on line 1 in src/crispy.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

Run clang-format on src/crispy.c

File src/crispy.c does not conform to Custom style guidelines. (lines 27)
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005-2014 Simon Howard
// Copyright(C) 2014-2017 Fabian Greffrath
Expand All @@ -24,6 +24,7 @@
static crispy_t crispy_s = {
0,
.extautomap = 1,
.gamma = 10, // default level is "OFF" for intermediate gamma levels
.hires = 1,
.smoothscaling = 1,
.soundfix = 1,
Expand Down
1 change: 1 addition & 0 deletions src/crispy.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//

Check notice on line 1 in src/crispy.h

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

Run clang-format on src/crispy.h

File src/crispy.h does not conform to Custom style guidelines. (lines 64)
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005-2014 Simon Howard
// Copyright(C) 2014-2017 Fabian Greffrath
Expand Down Expand Up @@ -61,6 +61,7 @@
int freeaim;
int freelook;
int freelook_hh;
int gamma;
int hires;
int jump;
int leveltime;
Expand Down
9 changes: 9 additions & 0 deletions src/doom/d_englsh.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//

Check notice on line 1 in src/doom/d_englsh.h

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

Run clang-format on src/doom/d_englsh.h

File src/doom/d_englsh.h does not conform to Custom style guidelines. (lines 73, 74, 75, 76, 77, 78, 79, 80, 81)
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005-2014 Simon Howard
//
Expand Down Expand Up @@ -70,6 +70,15 @@
#define GAMMALVL3 "Gamma correction level 3"
#define GAMMALVL4 "Gamma correction level 4"
// [crispy] intermediate gamma levels
#define GAMMALVL050 "Gamma correction level -4"
#define GAMMALVL055 "Gamma correction level -3.6"
#define GAMMALVL060 "Gamma correction level -3.2"
#define GAMMALVL065 "Gamma correction level -2.8"
#define GAMMALVL070 "Gamma correction level -2.4"
#define GAMMALVL075 "Gamma correction level -2.0"
#define GAMMALVL080 "Gamma correction level -1.6"
#define GAMMALVL085 "Gamma correction level -1.2"
#define GAMMALVL090 "Gamma correction level -0.8"
#define GAMMALVL05 "Gamma correction level 0.5"
#define GAMMALVL15 "Gamma correction level 1.5"
#define GAMMALVL25 "Gamma correction level 2.5"
Expand Down
1 change: 1 addition & 0 deletions src/doom/d_main.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//

Check notice on line 1 in src/doom/d_main.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

Run clang-format on src/doom/d_main.c

File src/doom/d_main.c does not conform to Custom style guidelines. (lines 459)
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005-2014 Simon Howard
//
Expand Down Expand Up @@ -456,6 +456,7 @@
M_BindIntVariable("crispy_fpslimit", &crispy->fpslimit);
M_BindIntVariable("crispy_freeaim", &crispy->freeaim);
M_BindIntVariable("crispy_freelook", &crispy->freelook);
M_BindIntVariable("crispy_gamma", &crispy->gamma);
M_BindIntVariable("crispy_hires", &crispy->hires);
M_BindIntVariable("crispy_jump", &crispy->jump);
M_BindIntVariable("crispy_leveltime", &crispy->leveltime);
Expand Down
21 changes: 15 additions & 6 deletions src/doom/m_menu.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//

Check notice on line 1 in src/doom/m_menu.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

Run clang-format on src/doom/m_menu.c

File src/doom/m_menu.c does not conform to Custom style guidelines. (lines 104, 106, 107, 108, 109, 111, 112, 113, 114, 2726, 2727, 2728, 2729)
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005-2014 Simon Howard
//
Expand Down Expand Up @@ -101,8 +101,17 @@
void (*messageRoutine)(int response);

// [crispy] intermediate gamma levels
char gammamsg[5+4][26+2] =
{
char gammamsg[5+13][26+2] =

Check warning on line 104 in src/doom/m_menu.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

/src/doom/m_menu.c:104:6 [cppcoreguidelines-avoid-non-const-global-variables]

variable 'gammamsg' is non-const and globally accessible, consider making it const
{
GAMMALVL050,
GAMMALVL055,
GAMMALVL060,
GAMMALVL065,
GAMMALVL070,
GAMMALVL075,
GAMMALVL080,
GAMMALVL085,
GAMMALVL090,
GAMMALVL0,
GAMMALVL05,
GAMMALVL1,
Expand Down Expand Up @@ -2714,10 +2723,10 @@
}
else if (key == key_menu_gamma) // gamma toggle
{
usegamma++;
if (usegamma > 4+4) // [crispy] intermediate gamma levels
usegamma = 0;
players[consoleplayer].message = DEH_String(gammamsg[usegamma]);
crispy->gamma++;
if (crispy->gamma > 4+13) // [crispy] intermediate gamma levels

Check warning on line 2727 in src/doom/m_menu.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

/src/doom/m_menu.c:2727:31 [readability-braces-around-statements]

statement should be inside braces
crispy->gamma = 0;
players[consoleplayer].message = DEH_String(gammamsg[crispy->gamma]);
#ifndef CRISPY_TRUECOLOR
I_SetPalette (W_CacheLumpName (DEH_String("PLAYPAL"),PU_CACHE));
#else
Expand Down
22 changes: 9 additions & 13 deletions src/doom/r_data.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//

Check notice on line 1 in src/doom/r_data.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

Run clang-format on src/doom/r_data.c

File src/doom/r_data.c does not conform to Custom style guidelines. (lines 1191, 1192, 1193, 1206, 1219, 1220, 1221, 1299)
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005-2014 Simon Howard
//
Expand Down Expand Up @@ -1173,12 +1173,6 @@
int c, i, j = 0;
byte r, g, b;

// [crispy] intermediate gamma levels
if (!gamma2table)
{
I_SetGammaTable();
}

playpal = W_CacheLumpName("PLAYPAL", PU_STATIC);

if (!colormaps)
Expand All @@ -1194,9 +1188,9 @@

for (i = 0; i < 256; i++)
{
r = gamma2table[usegamma][playpal[3 * i + 0]] * (1. - scale) + gamma2table[usegamma][0] * scale;
g = gamma2table[usegamma][playpal[3 * i + 1]] * (1. - scale) + gamma2table[usegamma][0] * scale;
b = gamma2table[usegamma][playpal[3 * i + 2]] * (1. - scale) + gamma2table[usegamma][0] * scale;
r = gamma2table[crispy->gamma][playpal[3 * i + 0]] * (1. - scale) + gamma2table[crispy->gamma][0] * scale;
g = gamma2table[crispy->gamma][playpal[3 * i + 1]] * (1. - scale) + gamma2table[crispy->gamma][0] * scale;
b = gamma2table[crispy->gamma][playpal[3 * i + 2]] * (1. - scale) + gamma2table[crispy->gamma][0] * scale;

colormaps[j++] = 0xff000000 | (r << 16) | (g << 8) | b;
}
Expand All @@ -1209,7 +1203,7 @@
(byte) (0.299 * playpal[3 * i + 0] +
0.587 * playpal[3 * i + 1] +
0.114 * playpal[3 * i + 2]);
r = g = b = gamma2table[usegamma][gray];
r = g = b = gamma2table[crispy->gamma][gray];

colormaps[j++] = 0xff000000 | (r << 16) | (g << 8) | b;
}
Expand All @@ -1222,9 +1216,9 @@
{
for (i = 0; i < 256; i++)
{
r = gamma2table[usegamma][playpal[3 * colormap[c * 256 + i] + 0]] & ~3;
g = gamma2table[usegamma][playpal[3 * colormap[c * 256 + i] + 1]] & ~3;
b = gamma2table[usegamma][playpal[3 * colormap[c * 256 + i] + 2]] & ~3;
r = gamma2table[crispy->gamma][playpal[3 * colormap[c * 256 + i] + 0]] & ~3;
g = gamma2table[crispy->gamma][playpal[3 * colormap[c * 256 + i] + 1]] & ~3;
b = gamma2table[crispy->gamma][playpal[3 * colormap[c * 256 + i] + 2]] & ~3;

colormaps[j++] = 0xff000000 | (r << 16) | (g << 8) | b;
}
Expand Down Expand Up @@ -1301,6 +1295,8 @@
printf (".");
R_InitSpriteLumps ();
printf (".");
// [crispy] Initialize and generate gamma-correction levels.
I_SetGammaTable ();
R_InitColormaps ();
#ifndef CRISPY_TRUECOLOR
R_InitTranMap(); // [crispy] prints a mark itself
Expand Down
1 change: 1 addition & 0 deletions src/heretic/d_main.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//

Check notice on line 1 in src/heretic/d_main.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

Run clang-format on src/heretic/d_main.c

File src/heretic/d_main.c does not conform to Custom style guidelines. (lines 873)
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 1993-2008 Raven Software
// Copyright(C) 2005-2014 Simon Howard
Expand Down Expand Up @@ -870,6 +870,7 @@
M_BindIntVariable("crispy_defaultskill", &crispy->defaultskill);
M_BindIntVariable("crispy_fpslimit", &crispy->fpslimit);
M_BindIntVariable("crispy_freelook", &crispy->freelook_hh);
M_BindIntVariable("crispy_gamma", &crispy->gamma);
M_BindIntVariable("crispy_leveltime", &crispy->leveltime);
M_BindIntVariable("crispy_mouselook", &crispy->mouselook);
M_BindIntVariable("crispy_playercoords", &crispy->playercoords);
Expand Down
20 changes: 20 additions & 0 deletions src/heretic/dstrings.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//

Check notice on line 1 in src/heretic/dstrings.h

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

Run clang-format on src/heretic/dstrings.h

File src/heretic/dstrings.h does not conform to Custom style guidelines. (lines 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142)
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 1993-2008 Raven Software
// Copyright(C) 2005-2014 Simon Howard
Expand Down Expand Up @@ -121,6 +121,26 @@
#define TXT_HOMDETECTON "HOM DETECTION ON"
#define TXT_HOMDETECTOFF "HOM DETECTION OFF"

// [crispy] gamma correction messages
#define TXT_GAMMA_LEVEL_050 "GAMMA CORRECTION LEVEL -4"
#define TXT_GAMMA_LEVEL_055 "GAMMA CORRECTION LEVEL -3.6"
#define TXT_GAMMA_LEVEL_060 "GAMMA CORRECTION LEVEL -3.2"
#define TXT_GAMMA_LEVEL_065 "GAMMA CORRECTION LEVEL -2.8"
#define TXT_GAMMA_LEVEL_070 "GAMMA CORRECTION LEVEL -2.4"
#define TXT_GAMMA_LEVEL_075 "GAMMA CORRECTION LEVEL -2.0"
#define TXT_GAMMA_LEVEL_080 "GAMMA CORRECTION LEVEL -1.6"
#define TXT_GAMMA_LEVEL_085 "GAMMA CORRECTION LEVEL -1.2"
#define TXT_GAMMA_LEVEL_090 "GAMMA CORRECTION LEVEL -0.8"
#define TXT_GAMMA_LEVEL_OFF "GAMMA CORRECTION OFF"
#define TXT_GAMMA_LEVEL_05 "GAMMA CORRECTION LEVEL 0.5"
#define TXT_GAMMA_LEVEL_1 "GAMMA CORRECTION LEVEL 1"
#define TXT_GAMMA_LEVEL_15 "GAMMA CORRECTION LEVEL 1.5"
#define TXT_GAMMA_LEVEL_2 "GAMMA CORRECTION LEVEL 2"
#define TXT_GAMMA_LEVEL_25 "GAMMA CORRECTION LEVEL 2.5"
#define TXT_GAMMA_LEVEL_3 "GAMMA CORRECTION LEVEL 3"
#define TXT_GAMMA_LEVEL_35 "GAMMA CORRECTION LEVEL 3.5"
#define TXT_GAMMA_LEVEL_4 "GAMMA CORRECTION LEVEL 4"

//---------------------------------------------------------------------------
//
// P_doors.c
Expand Down
30 changes: 27 additions & 3 deletions src/heretic/mn_menu.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//

Check notice on line 1 in src/heretic/mn_menu.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

Run clang-format on src/heretic/mn_menu.c

File src/heretic/mn_menu.c does not conform to Custom style guidelines. (lines 501, 502, 504, 505, 507, 508, 510, 511, 513, 514, 516, 517, 518, 2053, 2066)
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 1993-2008 Raven Software
// Copyright(C) 2005-2014 Simon Howard
Expand Down Expand Up @@ -496,6 +496,28 @@
&Crispness2Menu,
};

// [crispy] gamma correction messages
static const char *GammaText[] = {

Check warning on line 500 in src/heretic/mn_menu.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

/src/heretic/mn_menu.c:500:20 [cppcoreguidelines-avoid-non-const-global-variables]

variable 'GammaText' is non-const and globally accessible, consider making it const
TXT_GAMMA_LEVEL_050,
TXT_GAMMA_LEVEL_055,
TXT_GAMMA_LEVEL_060,
TXT_GAMMA_LEVEL_065,
TXT_GAMMA_LEVEL_070,
TXT_GAMMA_LEVEL_075,
TXT_GAMMA_LEVEL_080,
TXT_GAMMA_LEVEL_085,
TXT_GAMMA_LEVEL_090,
TXT_GAMMA_LEVEL_OFF,
TXT_GAMMA_LEVEL_05,
TXT_GAMMA_LEVEL_1,
TXT_GAMMA_LEVEL_15,
TXT_GAMMA_LEVEL_2,
TXT_GAMMA_LEVEL_25,
TXT_GAMMA_LEVEL_3,
TXT_GAMMA_LEVEL_35,
TXT_GAMMA_LEVEL_4
};

// [crispy] reload current level / go to next level
// adapted from prboom-plus/src/e6y.c:369-449
static int G_ReloadLevel(void)
Expand Down Expand Up @@ -2027,10 +2049,10 @@
}
else if (key == key_menu_gamma) // F11 (gamma correction)
{
usegamma++;
if (usegamma > 4+4) // [crispy] intermediate gamma levels
crispy->gamma++;
if (crispy->gamma > 4+13) // [crispy] intermediate gamma levels
{
usegamma = 0;
crispy->gamma = 0;
}
#ifndef CRISPY_TRUECOLOR
I_SetPalette((byte *) W_CacheLumpName("PLAYPAL", PU_CACHE));
Expand All @@ -2040,6 +2062,8 @@
BorderNeedRefresh = true;
SB_state = -1;
#endif
// [crispy] print gamma correction message
P_SetMessage(&players[consoleplayer], GammaText[crispy->gamma], false);
return true;
}
// [crispy] those two can be considered as shortcuts for the ENGAGE cheat
Expand Down
32 changes: 14 additions & 18 deletions src/heretic/r_data.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//

Check notice on line 1 in src/heretic/r_data.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

Run clang-format on src/heretic/r_data.c

File src/heretic/r_data.c does not conform to Custom style guidelines. (lines 553, 554, 555, 567, 568, 569, 579, 580, 581, 625, 626, 627)
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 1993-2008 Raven Software
// Copyright(C) 2005-2014 Simon Howard
Expand Down Expand Up @@ -535,12 +535,6 @@
int c, i, j = 0;
byte r, g, b;

// [crispy] intermediate gamma levels
if (!gamma2table)
{
I_SetGammaTable();
}

playpal = W_CacheLumpName("PLAYPAL", PU_STATIC);

if (!colormaps)
Expand All @@ -556,9 +550,9 @@

for (i = 0; i < 256; i++)
{
r = gamma2table[usegamma][playpal[3 * i + 0]] * (1. - scale) + gamma2table[usegamma][0] * scale;
g = gamma2table[usegamma][playpal[3 * i + 1]] * (1. - scale) + gamma2table[usegamma][0] * scale;
b = gamma2table[usegamma][playpal[3 * i + 2]] * (1. - scale) + gamma2table[usegamma][0] * scale;
r = gamma2table[crispy->gamma][playpal[3 * i + 0]] * (1. - scale) + gamma2table[crispy->gamma][0] * scale;
g = gamma2table[crispy->gamma][playpal[3 * i + 1]] * (1. - scale) + gamma2table[crispy->gamma][0] * scale;
b = gamma2table[crispy->gamma][playpal[3 * i + 2]] * (1. - scale) + gamma2table[crispy->gamma][0] * scale;

colormaps[j++] = 0xff000000 | (r << 16) | (g << 8) | b;
}
Expand All @@ -570,9 +564,9 @@
{
for (i = 0; i < 256; i++)
{
r = gamma2table[usegamma][playpal[3 * colormap[c * 256 + i] + 0]] & ~3;
g = gamma2table[usegamma][playpal[3 * colormap[c * 256 + i] + 1]] & ~3;
b = gamma2table[usegamma][playpal[3 * colormap[c * 256 + i] + 2]] & ~3;
r = gamma2table[crispy->gamma][playpal[3 * colormap[c * 256 + i] + 0]] & ~3;
g = gamma2table[crispy->gamma][playpal[3 * colormap[c * 256 + i] + 1]] & ~3;
b = gamma2table[crispy->gamma][playpal[3 * colormap[c * 256 + i] + 2]] & ~3;

colormaps[j++] = 0xff000000 | (r << 16) | (g << 8) | b;
}
Expand All @@ -582,9 +576,9 @@
// [crispy] Invulnerability (c == COLORMAPS), generated from COLORMAP lump
for (i = 0; i < 256; i++)
{
r = gamma2table[usegamma][playpal[3 * colormap[c * 256 + i] + 0]] & ~3;
g = gamma2table[usegamma][playpal[3 * colormap[c * 256 + i] + 1]] & ~3;
b = gamma2table[usegamma][playpal[3 * colormap[c * 256 + i] + 2]] & ~3;
r = gamma2table[crispy->gamma][playpal[3 * colormap[c * 256 + i] + 0]] & ~3;
g = gamma2table[crispy->gamma][playpal[3 * colormap[c * 256 + i] + 1]] & ~3;
b = gamma2table[crispy->gamma][playpal[3 * colormap[c * 256 + i] + 2]] & ~3;

colormaps[j++] = 0xff000000 | (r << 16) | (g << 8) | b;
}
Expand Down Expand Up @@ -628,9 +622,9 @@

for (i = 0; i < 256; i++)
{
r = gamma2table[usegamma][palette[3 * i + 0]] + gamma2table[usegamma][0];
g = gamma2table[usegamma][palette[3 * i + 1]] + gamma2table[usegamma][0];
b = gamma2table[usegamma][palette[3 * i + 2]] + gamma2table[usegamma][0];
r = gamma2table[crispy->gamma][palette[3 * i + 0]] + gamma2table[crispy->gamma][0];
g = gamma2table[crispy->gamma][palette[3 * i + 1]] + gamma2table[crispy->gamma][0];
b = gamma2table[crispy->gamma][palette[3 * i + 2]] + gamma2table[crispy->gamma][0];

colormaps[j++] = 0xff000000 | (r << 16) | (g << 8) | b;
}
Expand Down Expand Up @@ -668,6 +662,8 @@
R_InitSpriteLumps();
IncThermo();
printf (".");
// [crispy] Initialize and generate gamma-correction levels.
I_SetGammaTable();
R_InitColormaps();
}

Expand Down
1 change: 1 addition & 0 deletions src/hexen/h2_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ void D_BindVariables(void)
M_BindIntVariable("crispy_defaultskill", &crispy->defaultskill);
M_BindIntVariable("crispy_fpslimit", &crispy->fpslimit);
M_BindIntVariable("crispy_freelook", &crispy->freelook_hh);
M_BindIntVariable("crispy_gamma", &crispy->gamma);
M_BindIntVariable("crispy_hires", &crispy->hires);
M_BindIntVariable("crispy_mouselook", &crispy->mouselook);
M_BindIntVariable("crispy_playercoords", &crispy->playercoords);
Expand Down
17 changes: 13 additions & 4 deletions src/hexen/mn_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,15 @@ static Menu_t *Menus[] = {

// [crispy] intermediate gamma levels
static const char *GammaText[] = {
TXT_GAMMA_LEVEL_050,
TXT_GAMMA_LEVEL_055,
TXT_GAMMA_LEVEL_060,
TXT_GAMMA_LEVEL_065,
TXT_GAMMA_LEVEL_070,
TXT_GAMMA_LEVEL_075,
TXT_GAMMA_LEVEL_080,
TXT_GAMMA_LEVEL_085,
TXT_GAMMA_LEVEL_090,
TXT_GAMMA_LEVEL_OFF,
TXT_GAMMA_LEVEL_05,
TXT_GAMMA_LEVEL_1,
Expand Down Expand Up @@ -2038,13 +2047,13 @@ boolean MN_Responder(event_t * event)
}
else if (key == key_menu_gamma) // F11 (gamma correction)
{
usegamma++;
if (usegamma > 4+4) // [crispy] intermediate gamma levels
crispy->gamma++;
if (crispy->gamma > 4+13) // [crispy] intermediate gamma levels
{
usegamma = 0;
crispy->gamma = 0;
}
SB_PaletteFlash(true); // force change
P_SetMessage(&players[consoleplayer], GammaText[usegamma],
P_SetMessage(&players[consoleplayer], GammaText[crispy->gamma],
false);
return true;
}
Expand Down
2 changes: 2 additions & 0 deletions src/hexen/r_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ void R_InitData(void)
R_InitTextures();
R_InitFlats();
R_InitSpriteLumps();
// [crispy] Initialize and generate gamma-correction levels.
I_SetGammaTable();
R_InitColormaps();
}

Expand Down
9 changes: 9 additions & 0 deletions src/hexen/textdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@
#define TXT_GAMMA_LEVEL_3 "GAMMA CORRECTION LEVEL 3"
#define TXT_GAMMA_LEVEL_4 "GAMMA CORRECTION LEVEL 4"
// [crispy] intermediate gamma levels
#define TXT_GAMMA_LEVEL_050 "GAMMA CORRECTION LEVEL -4"
#define TXT_GAMMA_LEVEL_055 "GAMMA CORRECTION LEVEL -3.6"
#define TXT_GAMMA_LEVEL_060 "GAMMA CORRECTION LEVEL -3.2"
#define TXT_GAMMA_LEVEL_065 "GAMMA CORRECTION LEVEL -2.8"
#define TXT_GAMMA_LEVEL_070 "GAMMA CORRECTION LEVEL -2.4"
#define TXT_GAMMA_LEVEL_075 "GAMMA CORRECTION LEVEL -2.0"
#define TXT_GAMMA_LEVEL_080 "GAMMA CORRECTION LEVEL -1.6"
#define TXT_GAMMA_LEVEL_085 "GAMMA CORRECTION LEVEL -1.2"
#define TXT_GAMMA_LEVEL_090 "GAMMA CORRECTION LEVEL -0.8"
#define TXT_GAMMA_LEVEL_05 "GAMMA CORRECTION LEVEL 0.5"
#define TXT_GAMMA_LEVEL_15 "GAMMA CORRECTION LEVEL 1.5"
#define TXT_GAMMA_LEVEL_25 "GAMMA CORRECTION LEVEL 2.5"
Expand Down
Loading
Loading