Browse Source

Clean-up S_ScrollSBuy [binary exact] (#654)

pull/39/head
JustAnotherGuid 7 years ago committed by Anders Jenbo
parent
commit
32f5b3f685
  1. 51
      Source/stores.cpp

51
Source/stores.cpp

@ -577,35 +577,36 @@ void __cdecl S_StartSmith()
void __fastcall S_ScrollSBuy(int idx) void __fastcall S_ScrollSBuy(int idx)
{ {
int v1; // esi int y;
int v2; // edi char clr;
char *v3; // esi
char *v4; // eax
int iclr; // [esp+Ch] [ebp-4h]
v1 = idx;
v2 = 5;
ClearSText(5, 21); ClearSText(5, 21);
v3 = &smithitem[v1]._iMagical;
stextup = 5; stextup = 5;
do {
if (*((_DWORD *)v3 - 13) != -1) { for (y = 5; y < 20; y += 4) {
_LOBYTE(iclr) = COL_WHITE; if (smithitem[idx]._itype != -1) {
if (*v3) clr = COL_WHITE;
_LOBYTE(iclr) = COL_BLUE; if (smithitem[idx]._iMagical) {
if (!*((_DWORD *)v3 + 74)) clr = COL_BLUE;
_LOBYTE(iclr) = COL_RED; }
v4 = v3 + 65;
if (!*v3) if (!smithitem[idx]._iStatFlag) {
v4 = v3 + 1; clr = COL_RED;
AddSText(20, v2, 0, v4, iclr, 1); }
AddSTextVal(v2, *((_DWORD *)v3 + 35));
PrintStoreItem((ItemStruct *)(v3 - 60), v2 + 1, iclr); if (smithitem[idx]._iMagical) {
stextdown = v2; AddSText(20, y, 0, smithitem[idx]._iIName, clr, 1);
v3 += 368; } else {
AddSText(20, y, 0, smithitem[idx]._iName, clr, 1);
}
AddSTextVal(y, smithitem[idx]._iIvalue);
PrintStoreItem(&smithitem[idx], y + 1, clr);
stextdown = y;
idx++;
} }
v2 += 4; }
} while (v2 < 20);
if (!stext[stextsel]._ssel && stextsel != 22) if (!stext[stextsel]._ssel && stextsel != 22)
stextsel = stextdown; stextsel = stextdown;
} }

Loading…
Cancel
Save