Browse Source

gmenu_draw bin exact

pull/109/head
qndel 7 years ago committed by Anders Jenbo
parent
commit
41767ae5ef
  1. 46
      Source/gmenu.cpp

46
Source/gmenu.cpp

@ -5,8 +5,8 @@ BOOLEAN mouseNavigation; // weak
void *PentSpin_cel; void *PentSpin_cel;
TMenuItem *sgpCurrItem; TMenuItem *sgpCurrItem;
void *BigTGold_cel; void *BigTGold_cel;
int dword_634474; // weak int PentSpin_tick; // weak
char byte_634478; // weak char PentSpin_frame; // weak
void(*dword_63447C)(TMenuItem *); void(*dword_63447C)(TMenuItem *);
TMenuItem *sgpCurrentMenu; // idb TMenuItem *sgpCurrentMenu; // idb
void *option_cel; void *option_cel;
@ -72,7 +72,7 @@ void FreeGMenu()
void gmenu_init_menu() void gmenu_init_menu()
{ {
byte_634478 = 1; PentSpin_frame = 1;
sgpCurrentMenu = 0; sgpCurrentMenu = 0;
sgpCurrItem = 0; sgpCurrItem = 0;
dword_63447C = 0; dword_63447C = 0;
@ -85,7 +85,7 @@ void gmenu_init_menu()
optbar_cel = LoadFileInMem("Data\\optbar.CEL", 0); optbar_cel = LoadFileInMem("Data\\optbar.CEL", 0);
} }
// 634464: using guessed type char mouseNavigation; // 634464: using guessed type char mouseNavigation;
// 634478: using guessed type char byte_634478; // 634478: using guessed type char PentSpin_frame;
// 63448C: using guessed type int sgCurrentMenuIdx; // 63448C: using guessed type int sgCurrentMenuIdx;
BOOL gmenu_exception() BOOL gmenu_exception()
@ -159,29 +159,33 @@ void gmenu_up_down(BOOL isDown)
void gmenu_draw() void gmenu_draw()
{ {
int v0; // edi int y;
TMenuItem *i; // esi TMenuItem *i;
DWORD v2; // eax DWORD ticks;
if (sgpCurrentMenu) { if (sgpCurrentMenu) {
if (dword_63447C) if (dword_63447C)
dword_63447C(sgpCurrentMenu); dword_63447C(sgpCurrentMenu);
CelDecodeOnly(236, 262, (BYTE *)sgpLogo, 1, 296); CelDecodeOnly(236, 262, (BYTE *)sgpLogo, 1, 296);
v0 = 320; y = 320;
for (i = sgpCurrentMenu; i->fnMenu; v0 += 45) { i = sgpCurrentMenu;
gmenu_draw_menu_item(i, v0); if (sgpCurrentMenu->fnMenu) {
++i; while (i->fnMenu) {
gmenu_draw_menu_item(i, y);
i++;
y += 45;
}
} }
v2 = GetTickCount();
if ((signed int)(v2 - dword_634474) > 25) { ticks = GetTickCount();
if (++byte_634478 == 9) if ((signed int)(ticks - PentSpin_tick) > 25) {
byte_634478 = 1; PentSpin_frame++;
dword_634474 = v2; if (PentSpin_frame == 9)
PentSpin_frame = 1;
PentSpin_tick = ticks;
} }
} }
} }
// 634474: using guessed type int dword_634474;
// 634478: using guessed type char byte_634478;
void gmenu_draw_menu_item(TMenuItem *pItem, int a2) void gmenu_draw_menu_item(TMenuItem *pItem, int a2)
{ {
@ -224,11 +228,11 @@ void gmenu_draw_menu_item(TMenuItem *pItem, int a2)
gmenu_print_text(384 - (v5 >> 1), v2, v3->pszStr); gmenu_print_text(384 - (v5 >> 1), v2, v3->pszStr);
if (v3 == sgpCurrItem) { if (v3 == sgpCurrItem) {
v13 = v2 + 1; v13 = v2 + 1;
CelDecodeOnly(v11 - 54, v13, (BYTE *)PentSpin_cel, (unsigned char)byte_634478, 48); CelDecodeOnly(v11 - 54, v13, (BYTE *)PentSpin_cel, (unsigned char)PentSpin_frame, 48);
CelDecodeOnly(v11 + v5 + 4, v13, (BYTE *)PentSpin_cel, (unsigned char)byte_634478, 48); CelDecodeOnly(v11 + v5 + 4, v13, (BYTE *)PentSpin_cel, (unsigned char)PentSpin_frame, 48);
} }
} }
// 634478: using guessed type char byte_634478; // 634478: using guessed type char PentSpin_frame;
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
void gmenu_clear_buffer(int x, int y, int width, int height) void gmenu_clear_buffer(int x, int y, int width, int height)

Loading…
Cancel
Save