MCPcopy Create free account
hub / github.com/diasurgical/devilution / gmenu_draw

Function gmenu_draw

Source/gmenu.cpp:147–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147void gmenu_draw()
148{
149 int y;
150 TMenuItem *i;
151 DWORD ticks;
152
153 if (sgpCurrentMenu) {
154 if (dword_63447C)
155 dword_63447C(sgpCurrentMenu);
156 CelDraw((SCREEN_WIDTH - 296) / 2 + SCREEN_X, 102 + SCREEN_Y, sgpLogo, 1, 296);
157 y = 160 + SCREEN_Y;
158 i = sgpCurrentMenu;
159 if (sgpCurrentMenu->fnMenu) {
160 while (i->fnMenu) {
161 gmenu_draw_menu_item(i, y);
162 i++;
163 y += 45;
164 }
165 }
166
167 ticks = SDL_GetTicks();
168 if ((int)(ticks - PentSpin_tick) > 50) { // BUGFIX: thould be 50ms (Fixed)
169 PentSpin_frame++;
170 if (PentSpin_frame == 9)
171 PentSpin_frame = 1;
172 PentSpin_tick = ticks;
173 }
174 }
175}
176
177void gmenu_draw_menu_item(TMenuItem *pItem, int y)
178{

Callers 1

DrawViewFunction · 0.85

Calls 2

CelDrawFunction · 0.85
gmenu_draw_menu_itemFunction · 0.85

Tested by

no test coverage detected