Browse Source

Clean up diablo_color_cyc_logic and palette_get_colour_cycling (#868)

pull/88/head
Anders Jenbo 7 years ago committed by GitHub
parent
commit
b253648c5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      Source/diablo.cpp
  2. 4
      Source/palette.cpp
  3. 4
      Source/palette.h

8
Source/diablo.cpp

@ -1908,11 +1908,11 @@ void timeout_cursor(BOOL bTimeout)
void diablo_color_cyc_logic()
{
DWORD v0; // eax
DWORD tc;
v0 = GetTickCount();
if (v0 - color_cycle_timer >= 0x32) {
color_cycle_timer = v0;
tc = GetTickCount();
if (tc - color_cycle_timer >= 0x32) {
color_cycle_timer = tc;
if (palette_get_colour_cycling()) {
if (leveltype == DTYPE_HELL) {
lighting_color_cycling();

4
Source/palette.cpp

@ -280,12 +280,12 @@ void palette_update_quest_palette(int n)
palette_update();
}
BOOLEAN palette_get_colour_cycling()
BOOL palette_get_colour_cycling()
{
return color_cycling_enabled;
}
void palette_set_color_cycling(BOOLEAN enabled)
void palette_set_color_cycling(BOOL enabled)
{
color_cycling_enabled = enabled;
}

4
Source/palette.h

@ -25,8 +25,8 @@ void PaletteFadeIn(int fr);
void PaletteFadeOut(int fr);
void palette_update_caves();
void palette_update_quest_palette(int n);
BOOLEAN palette_get_colour_cycling();
void palette_set_color_cycling(BOOLEAN enabled);
BOOL palette_get_colour_cycling();
void palette_set_color_cycling(BOOL enabled);
/* rdata */

Loading…
Cancel
Save