Browse Source

[hellfire] color_cycling_enabled

pull/876/head
Anders Jenbo 6 years ago
parent
commit
f8a6e05504
  1. 22
      Source/diablo.cpp
  2. 4
      Source/palette.cpp
  3. 4
      Source/palette.h

22
Source/diablo.cpp

@ -1985,13 +1985,21 @@ void diablo_color_cyc_logic()
tc = GetTickCount();
if (tc - color_cycle_timer >= 50) {
color_cycle_timer = tc;
if (palette_get_colour_cycling()) {
if (leveltype == DTYPE_HELL) {
lighting_color_cycling();
} else if (leveltype == DTYPE_CAVES) {
if (fullscreen)
palette_update_caves();
}
#ifndef HELLFIRE
if (!palette_get_colour_cycling())
return;
#endif
if (leveltype == DTYPE_HELL) {
lighting_color_cycling();
#ifdef HELLFIRE
} else if (currlevel >= 20) {
palette_update_crypt();
} else if (currlevel >= 16) {
palette_update_hive();
#endif
} else if (leveltype == DTYPE_CAVES) {
if (fullscreen)
palette_update_caves();
}
}
}

4
Source/palette.cpp

@ -9,7 +9,9 @@ int gdwPalEntries;
/* data */
int gamma_correction = 100;
#ifndef HELLFIRE
BOOL color_cycling_enabled = TRUE;
#endif
BOOLEAN sgbFadedIn = TRUE;
static void palette_update()
@ -388,12 +390,12 @@ void palette_update_quest_palette(int n)
}
#endif
#ifndef HELLFIRE
BOOL palette_get_colour_cycling()
{
return color_cycling_enabled;
}
#ifndef HELLFIRE
BOOL palette_set_color_cycling(BOOL enabled)
{
color_cycling_enabled = enabled;

4
Source/palette.h

@ -24,14 +24,18 @@ void palette_update_crypt();
void palette_update_hive();
#endif
void palette_update_quest_palette(int n);
#ifndef HELLFIRE
BOOL palette_get_colour_cycling();
BOOL palette_set_color_cycling(BOOL enabled);
#endif
/* rdata */
/* data */
extern int gamma_correction;
#ifndef HELLFIRE
extern BOOL color_cycling_enabled;
#endif
#endif /* __PALETTE_H__ */

Loading…
Cancel
Save