From b253648c5aed6ac4b8b8d488f2cc17a2cc253717 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Tue, 9 Apr 2019 20:32:07 +0200 Subject: [PATCH] Clean up diablo_color_cyc_logic and palette_get_colour_cycling (#868) --- Source/diablo.cpp | 8 ++++---- Source/palette.cpp | 4 ++-- Source/palette.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 198dbee28..9eb86785f 100644 --- a/Source/diablo.cpp +++ b/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(); diff --git a/Source/palette.cpp b/Source/palette.cpp index 58df35d47..bcf4e68ab 100644 --- a/Source/palette.cpp +++ b/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; } diff --git a/Source/palette.h b/Source/palette.h index d8e6e62d3..0306627c3 100644 --- a/Source/palette.h +++ b/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 */