From cd76096c031d9a0b600d496145fc51296b282758 Mon Sep 17 00:00:00 2001 From: qndel Date: Wed, 18 Sep 2019 01:03:12 +0200 Subject: [PATCH] [hellfire] gmenu_draw bin exact (#1668) --- Source/gmenu.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Source/gmenu.cpp b/Source/gmenu.cpp index ef18e9b20..5b7decfad 100644 --- a/Source/gmenu.cpp +++ b/Source/gmenu.cpp @@ -6,7 +6,8 @@ BYTE *PentSpin_cel; TMenuItem *sgpCurrItem; BYTE *BigTGold_cel; #ifdef HELLFIRE -BYTE byte_68446C; +int LogoAnim_tick; +BYTE LogoAnim_frame; #endif int PentSpin_tick; BYTE PentSpin_frame; @@ -76,7 +77,7 @@ void gmenu_init_menu() { PentSpin_frame = 1; #ifdef HELLFIRE - byte_68446C = 1; + LogoAnim_frame = 1; #endif sgpCurrentMenu = 0; sgpCurrItem = 0; @@ -160,7 +161,19 @@ void gmenu_draw() if (sgpCurrentMenu) { if (dword_63447C) dword_63447C(sgpCurrentMenu); + +#ifdef HELLFIRE + ticks = GetTickCount(); + if ((int)(ticks - LogoAnim_tick) > 25) { + LogoAnim_frame++; + if (LogoAnim_frame > 16) + LogoAnim_frame = 1; + LogoAnim_tick = ticks; + } + CelDecodeOnly((SCREEN_WIDTH - 430) / 2 + SCREEN_X, 102 + SCREEN_Y, sgpLogo, LogoAnim_frame, 430); +#else CelDecodeOnly((SCREEN_WIDTH - 296) / 2 + SCREEN_X, 102 + SCREEN_Y, sgpLogo, 1, 296); +#endif y = 160 + SCREEN_Y; i = sgpCurrentMenu; if (sgpCurrentMenu->fnMenu) { @@ -171,7 +184,9 @@ void gmenu_draw() } } +#ifndef HELLFIRE ticks = GetTickCount(); +#endif if ((int)(ticks - PentSpin_tick) > 25) { PentSpin_frame++; if (PentSpin_frame == 9)