diff --git a/Source/debug.cpp b/Source/debug.cpp index 9139765bb..2e574a242 100644 --- a/Source/debug.cpp +++ b/Source/debug.cpp @@ -9,7 +9,6 @@ void LoadDebugGFX() if (visiondebug) pSquareCel = LoadFileInMem("Data\\Square.CEL", 0); } -// 525720: using guessed type int visiondebug; void FreeDebugGFX() { @@ -18,8 +17,7 @@ void FreeDebugGFX() void CheckDungeonClear() { - int i; - int j; + int i, j; for (j = 0; j < MAXDUNY; j++) { for (i = 0; i < MAXDUNX; i++) { @@ -37,8 +35,7 @@ void CheckDungeonClear() #ifdef _DEBUG void GiveGoldCheat() { - int i; // esi - int ni; // ebp + int i, ni; for (i = 0; i < 40; i++) { if (!plr[myplr].InvGrid[i]) { @@ -55,7 +52,7 @@ void GiveGoldCheat() void StoresCheat() { - int i; // eax + int i; numpremium = 0; @@ -72,8 +69,8 @@ void StoresCheat() void TakeGoldCheat() { - int i; // esi - char ig; // cl + int i; + char ig; for (i = 0; i < 40; i++) { ig = plr[myplr].InvGrid[i]; @@ -133,9 +130,9 @@ void SetAllSpellsCheat() SetSpellLevelCheat(SPL_BONESPIRIT, 1); } -void PrintDebugPlayer(BOOLEAN bNextPlayer) +void PrintDebugPlayer(BOOL bNextPlayer) { - char dstr[128]; // [esp+Ch] [ebp-80h] + char dstr[128]; if (bNextPlayer) dbgplr = ((_BYTE)dbgplr + 1) & 3; @@ -159,19 +156,21 @@ void PrintDebugPlayer(BOOLEAN bNextPlayer) void PrintDebugQuest() { - char dstr[128]; // [esp+0h] [ebp-80h] + char dstr[128]; sprintf(dstr, "Quest %i : Active = %i, Var1 = %i", dbgqst, quests[dbgqst]._qactive, quests[dbgqst]._qvar1); NetSendCmdString(1 << myplr, dstr); - if (++dbgqst == MAXQUESTS) + + dbgqst++; + if (dbgqst == MAXQUESTS) dbgqst = 0; } void PrintDebugMonster(int m) { - BOOLEAN bActive; // ecx - int i; // eax - char dstr[128]; // [esp+Ch] [ebp-80h] + BOOL bActive; + int i; + char dstr[128]; sprintf(dstr, "Monster %i = %s", m, monster[m].mName); NetSendCmdString(1 << myplr, dstr); @@ -195,26 +194,25 @@ void PrintDebugMonster(int m) void GetDebugMonster() { - int v0; // ecx - int v1; // eax - - v0 = pcursmonst; - if (pcursmonst == -1) { - v1 = dMonster[cursmx][cursmy]; - if (v1) { - v0 = v1 - 1; - if (v1 <= 0) - v0 = -1 - v1; + int mi1, mi2; + + mi1 = pcursmonst; + if (mi1 == -1) { + mi2 = dMonster[cursmx][cursmy]; + if (mi2) { + mi1 = mi2 - 1; + if (mi2 <= 0) + mi1 = -1 - mi2; } else { - v0 = dbgmon; + mi1 = dbgmon; } } - PrintDebugMonster(v0); + PrintDebugMonster(mi1); } void NextDebugMonster() { - char dstr[128]; // [esp+0h] [ebp-80h] + char dstr[128]; if (dbgmon++ == MAXMONSTERS) dbgmon = 0; diff --git a/Source/debug.h b/Source/debug.h index 970558fd4..de4401ba5 100644 --- a/Source/debug.h +++ b/Source/debug.h @@ -16,7 +16,7 @@ void TakeGoldCheat(); void MaxSpellsCheat(); void SetSpellLevelCheat(char spl, int spllvl); void SetAllSpellsCheat(); -void PrintDebugPlayer(BOOLEAN bNextPlayer); +void PrintDebugPlayer(BOOL bNextPlayer); void PrintDebugQuest(); void PrintDebugMonster(int m); void GetDebugMonster(); diff --git a/Source/diablo.cpp b/Source/diablo.cpp index bd42dd964..a30f7c671 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -1490,10 +1490,10 @@ void PressChar(int vkey) } break; case 'D': - PrintDebugPlayer(1); + PrintDebugPlayer(TRUE); break; case 'd': - PrintDebugPlayer(0); + PrintDebugPlayer(FALSE); break; case 'e': if(debug_mode_key_d) {