Browse Source

[hellfire] gmenu_draw_menu_item bin exact

pull/876/head
qndel 7 years ago committed by Anders Jenbo
parent
commit
fb91842136
  1. 12
      Source/gmenu.cpp

12
Source/gmenu.cpp

@ -183,18 +183,28 @@ void gmenu_draw()
void gmenu_draw_menu_item(TMenuItem *pItem, int y)
{
DWORD x, w, nSteps, step, pos, t;
DWORD w, x, nSteps, step, pos, t;
#ifndef HELLFIRE
t = y - 2;
#endif
w = gmenu_get_lfont(pItem);
if (pItem->dwFlags & GMENU_SLIDER) {
x = 16 + w / 2 + SCREEN_X;
#ifdef HELLFIRE
CelDecodeOnly(x, y - 10, optbar_cel, 1, 287);
#else
CelDecodeOnly(x, t - 8, optbar_cel, 1, 287);
#endif
step = pItem->dwFlags & 0xFFF;
nSteps = (pItem->dwFlags & 0xFFF000) >> 12;
if (nSteps < 2)
nSteps = 2;
pos = step * 256 / nSteps;
#ifdef HELLFIRE
gmenu_clear_buffer(x + 2, y - 12, pos + 13, 28);
#else
gmenu_clear_buffer(x + 2, t - 10, pos + 13, 28);
#endif
CelDecodeOnly(x + 2 + pos, y - 12, option_cel, 1, 27);
}
x = SCREEN_WIDTH / 2 - w / 2 + SCREEN_X;

Loading…
Cancel
Save