diff options
author | YamaArashi <shadow962@live.com> | 2015-08-13 19:13:47 -0700 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2015-08-13 19:13:47 -0700 |
commit | f6d618090aa689540056a13fb74125d83879347f (patch) | |
tree | 11f57767007053ce77b889572d400a6dfb33d186 | |
parent | 0750db0d72227bb982c8db7c999521fc505aefc9 (diff) |
Named a test battle variable
-rw-r--r-- | constants/misc_constants.asm | 3 | ||||
-rwxr-xr-x | engine/battle/core.asm | 8 | ||||
-rw-r--r-- | engine/battle/init_battle_variables.asm | 4 | ||||
-rwxr-xr-x | wram.asm | 8 |
4 files changed, 16 insertions, 7 deletions
diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 5d940328..9fa50e9c 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -164,6 +164,9 @@ HP_BAR_GREEN EQU 0 HP_BAR_YELLOW EQU 1 HP_BAR_RED EQU 2 +; D733 flags +BIT_TEST_BATTLE EQU 0 + ; serial ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01 diff --git a/engine/battle/core.asm b/engine/battle/core.asm index e2a9e5a7..97ca5ab1 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -2634,7 +2634,7 @@ MoveSelectionMenu: ; 3d219 (f:5219) cp LINK_STATE_BATTLING jr z, .matchedkeyspicked ld a, [W_FLAGS_D733] - bit 0, a + bit BIT_TEST_BATTLE, a ld b, D_UP | D_DOWN | A_BUTTON | B_BUTTON | SELECT jr z, .matchedkeyspicked ld b, $ff @@ -2662,7 +2662,7 @@ SelectMenuItem: ; 3d2fe (f:52fe) jr .select .battleselect ld a, [W_FLAGS_D733] - bit 0, a + bit BIT_TEST_BATTLE, a jr nz, .select call PrintMenuItem ld a, [wMenuItemToSwap] @@ -6170,8 +6170,8 @@ GetCurrentMove: ; 3eabe (f:6abe) .player ld de, W_PLAYERMOVENUM ld a, [W_FLAGS_D733] - bit 0, a - ld a, [wccd9] + bit BIT_TEST_BATTLE, a + ld a, [wTestBattlePlayerSelectedMove] jr nz, .selected ld a, [wPlayerSelectedMove] .selected diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm index 071e5c67..6a4cd771 100644 --- a/engine/battle/init_battle_variables.asm +++ b/engine/battle/init_battle_variables.asm @@ -25,8 +25,8 @@ InitBattleVariables: ; 525af (14:65af) ld [hli], a dec b jr nz, .loop - inc a - ld [wccd9], a + inc a ; POUND + ld [wTestBattlePlayerSelectedMove], a ld a, [W_CURMAP] cp SAFARI_ZONE_EAST jr c, .notSafariBattle @@ -577,7 +577,12 @@ wPlayerSubstituteHP:: ; ccd7 wEnemySubstituteHP:: ; ccd8 ds 1 -wccd9:: ds 2 ; used in InitBattleVariablesLoop (written to after the loop is finished) +wTestBattlePlayerSelectedMove:: ; ccd9 +; The player's selected move during a test battle. +; InitBattleVariables sets it to the move Pound. + ds 1 + + ds 1 wMoveMenuType:: ; ccdb ; 0=regular, 1=mimic, 2=above message box (relearn, heal pp..) @@ -2951,6 +2956,7 @@ wd732:: ; d732 ds 1 W_FLAGS_D733:: ; d733 +; bit 0: running a test battle ; bit 4: use variable [W_CURMAPSCRIPT] instead of the provided index for next frame's map script (used to start battle when talking to trainers) ; bit 7: used fly out of battle ds 1 |