Implement debug stuff from 1.00 (#148)
This commit is contained in:
parent
0200a2abba
commit
0c233e45da
5 changed files with 59 additions and 1 deletions
|
|
@ -115,6 +115,38 @@ void __cdecl MaxSpellsCheat()
|
|||
}
|
||||
}
|
||||
|
||||
void __fastcall SetSpellLevelCheat(char spl, int spllvl)
|
||||
{
|
||||
*(_QWORD *)plr[myplr]._pMemSpells |= 1i64 << (spl - 1);
|
||||
plr[myplr]._pSplLvl[spl] = spllvl;
|
||||
}
|
||||
|
||||
void __cdecl SetAllSpellsCheat()
|
||||
{
|
||||
SetSpellLevelCheat(SPL_FIREBOLT, 8);
|
||||
SetSpellLevelCheat(SPL_CBOLT, 11);
|
||||
SetSpellLevelCheat(SPL_HBOLT, 10);
|
||||
SetSpellLevelCheat(SPL_HEAL, 7);
|
||||
SetSpellLevelCheat(SPL_HEALOTHER, 5);
|
||||
SetSpellLevelCheat(SPL_LIGHTNING, 9);
|
||||
SetSpellLevelCheat(SPL_FIREWALL, 5);
|
||||
SetSpellLevelCheat(SPL_TELEKINESIS, 3);
|
||||
SetSpellLevelCheat(SPL_TOWN, 3);
|
||||
SetSpellLevelCheat(SPL_FLASH, 3);
|
||||
SetSpellLevelCheat(SPL_RNDTELEPORT, 2);
|
||||
SetSpellLevelCheat(SPL_MANASHIELD, 2);
|
||||
SetSpellLevelCheat(SPL_WAVE, 4);
|
||||
SetSpellLevelCheat(SPL_FIREBALL, 3);
|
||||
SetSpellLevelCheat(SPL_STONE, 1);
|
||||
SetSpellLevelCheat(SPL_CHAIN, 1);
|
||||
SetSpellLevelCheat(SPL_GUARDIAN, 4);
|
||||
SetSpellLevelCheat(SPL_ELEMENT, 3);
|
||||
SetSpellLevelCheat(SPL_NOVA, 1);
|
||||
SetSpellLevelCheat(SPL_GOLEM, 2);
|
||||
SetSpellLevelCheat(SPL_FLARE, 1);
|
||||
SetSpellLevelCheat(SPL_BONESPIRIT, 1);
|
||||
}
|
||||
|
||||
void __fastcall PrintDebugPlayer(bool bNextPlayer)
|
||||
{
|
||||
char dstr[128]; // [esp+Ch] [ebp-80h]
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ void __cdecl GiveGoldCheat();
|
|||
void __cdecl StoresCheat();
|
||||
void __cdecl TakeGoldCheat();
|
||||
void __cdecl MaxSpellsCheat();
|
||||
void __fastcall SetSpellLevelCheat(char spl, int spllvl);
|
||||
void __cdecl SetAllSpellsCheat();
|
||||
void __fastcall PrintDebugPlayer(bool bNextPlayer);
|
||||
void __cdecl PrintDebugQuest();
|
||||
void __fastcall PrintDebugMonster(int m);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ int debug_mode_key_i;
|
|||
int dbgplr;
|
||||
int dbgqst;
|
||||
int dbgmon;
|
||||
int arrowdebug;
|
||||
int frameflag;
|
||||
int frameend;
|
||||
int framerate;
|
||||
|
|
@ -1713,6 +1714,28 @@ LABEL_27:
|
|||
zoomflag = zoomflag == 0;
|
||||
return;
|
||||
#ifdef _DEBUG
|
||||
case ')':
|
||||
case '0':
|
||||
if ( debug_mode_key_inverted_v )
|
||||
{
|
||||
if ( arrowdebug > 2 )
|
||||
arrowdebug = 0;
|
||||
if ( !arrowdebug )
|
||||
{
|
||||
plr[myplr]._pIFlags &= ~ISPL_FIRE_ARROWS;
|
||||
plr[myplr]._pIFlags &= ~ISPL_LIGHT_ARROWS;
|
||||
}
|
||||
if ( arrowdebug == 1 )
|
||||
plr[myplr]._pIFlags |= ISPL_FIRE_ARROWS;
|
||||
if ( arrowdebug == 2 )
|
||||
plr[myplr]._pIFlags |= ISPL_LIGHT_ARROWS;
|
||||
arrowdebug++;
|
||||
}
|
||||
return;
|
||||
case ':':
|
||||
if ( !currlevel && debug_mode_key_w )
|
||||
SetAllSpellsCheat();
|
||||
return;
|
||||
case '[':
|
||||
if ( !currlevel && debug_mode_key_w )
|
||||
TakeGoldCheat();
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ extern int debug_mode_key_i;
|
|||
extern int dbgplr;
|
||||
extern int dbgqst;
|
||||
extern int dbgmon;
|
||||
extern int arrowdebug;
|
||||
extern int frameflag;
|
||||
extern int frameend;
|
||||
extern int framerate;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ In-game hotkeys
|
|||
- `F2` -> display dungeon information [NOT YET IMPLEMENTED]
|
||||
- `F3` -> display number of items on the ground/cursor item
|
||||
- `F4` -> display quest status information
|
||||
- `0`/`)` -> cycle through active item flags [NOT YET IMPLEMENTED]
|
||||
- `0`/`)` -> cycle between regular/magic arrows
|
||||
- `8`/`*` -> level up character
|
||||
- `~` -> refresh vendor items (Griswold premium and Adria)
|
||||
- `]` -> all spells level 10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue