diff options
| author | SatoMew <SatoMew@users.noreply.github.com> | 2023-07-15 23:36:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-15 18:36:59 -0400 |
| commit | f46db37d508f0111ad44ad062ed3d83ba3282d1d (patch) | |
| tree | 170af31852384f5a207918decf05e45a837d95d1 /engine/debug/debug_menu.asm | |
| parent | Add macros, constants, and labels for map scripts and text (#367) (diff) | |
| download | pokeyellow-f46db37d508f0111ad44ad062ed3d83ba3282d1d.tar.gz pokeyellow-f46db37d508f0111ad44ad062ed3d83ba3282d1d.tar.xz pokeyellow-f46db37d508f0111ad44ad062ed3d83ba3282d1d.zip | |
Thoroughly document debug code (#410)
Diffstat (limited to '')
| -rw-r--r-- | engine/debug/debug_menu.asm | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/engine/debug/debug_menu.asm b/engine/debug/debug_menu.asm index 907acb8a..fbf136fe 100644 --- a/engine/debug/debug_menu.asm +++ b/engine/debug/debug_menu.asm @@ -56,7 +56,7 @@ IF DEF(_DEBUG) ; DEBUG ld hl, wd732 - set 1, [hl] + set BIT_DEBUG_MODE, [hl] jp StartNewGameDebug DebugBattlePlayerName: @@ -72,18 +72,23 @@ ELSE ret ENDC -TestBattle: +TestBattle: ; unreferenced except in _DEBUG .loop call GBPalNormal - ; Don't mess around - ; with obedience. + ; Don't mess around with obedience. ld a, 1 << BIT_EARTHBADGE ld [wObtainedBadges], a ld hl, wFlags_D733 set BIT_TEST_BATTLE, [hl] + ; wNumBagItems and wBagItems are not initialized here, + ; and their garbage values happen to act as if EXP_ALL + ; is in the bag at the end of the test battle. + ; pokeyellow fixes this by initializing them with a + ; list of items. + ; Reset the party. ld hl, wPartyCount xor a @@ -91,8 +96,7 @@ TestBattle: dec a ld [hl], a - ; Give the player a - ; level 20 Rhydon. + ; Give the player a level 20 Rhydon. ld a, RHYDON ld [wcf91], a ld a, 20 @@ -102,15 +106,14 @@ TestBattle: ld [wCurMap], a call AddPartyMon - ; Fight against a - ; level 20 Rhydon. + ; Fight against a level 20 Rhydon. ld a, RHYDON ld [wCurOpponent], a predef InitOpponent - ; When the battle ends, - ; do it all again. + ; When the battle ends, do it all again. + ; There are some graphical quirks in SGB mode. ld a, 1 ld [wUpdateSpritesEnabled], a ldh [hAutoBGTransferEnabled], a |
