You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Rename _GetBattleVar -> GetBattleVarAddr.
Functions prefixed with _ imply they're private. The real purpose of this function is to use an address, rather than saving a few cycles on push/pop.
This commit is contained in:
@@ -66,7 +66,7 @@ BattleCommand54: ; 37588
|
||||
jr nz, .failed
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||
call _GetBattleVar
|
||||
call GetBattleVarAddr
|
||||
bit 1, [hl]
|
||||
jr nz, .failed
|
||||
|
||||
|
@@ -7,7 +7,7 @@ BattleCommand5a: ; 3766f
|
||||
ret c
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1
|
||||
call _GetBattleVar
|
||||
call GetBattleVarAddr
|
||||
set SUBSTATUS_ENDURE, [hl]
|
||||
|
||||
call AnimateCurrentMove
|
||||
|
@@ -9,7 +9,7 @@ BattleCommand57: ; 376a0
|
||||
jr nz, .failed
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||
call _GetBattleVar
|
||||
call GetBattleVarAddr
|
||||
bit SUBSTATUS_IDENTIFIED, [hl]
|
||||
jr nz, .failed
|
||||
|
||||
|
@@ -36,7 +36,7 @@ BattleCommand34: ; 37418
|
||||
|
||||
|
||||
ld a, BATTLE_VARS_MOVE
|
||||
call _GetBattleVar
|
||||
call GetBattleVarAddr
|
||||
ld [hl], b
|
||||
call UpdateMoveData
|
||||
jp ResetTurn
|
||||
|
@@ -4,7 +4,7 @@ BattleCommand1b: ; 373c9
|
||||
call Function372d8
|
||||
|
||||
ld a, BATTLE_VARS_MOVE
|
||||
call _GetBattleVar
|
||||
call GetBattleVarAddr
|
||||
|
||||
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
|
||||
call GetBattleVar
|
||||
@@ -28,7 +28,7 @@ BattleCommand1b: ; 373c9
|
||||
|
||||
push af
|
||||
ld a, BATTLE_VARS_MOVE_ANIM
|
||||
call _GetBattleVar
|
||||
call GetBattleVarAddr
|
||||
ld d, h
|
||||
ld e, l
|
||||
pop af
|
||||
|
@@ -14,14 +14,14 @@ BattleCommand52: ; 37536
|
||||
; Only works on a sleeping opponent.
|
||||
|
||||
ld a, BATTLE_VARS_STATUS_OPP
|
||||
call _GetBattleVar
|
||||
call GetBattleVarAddr
|
||||
and SLP
|
||||
jr z, .failed
|
||||
|
||||
; Bail if the opponent is already having a nightmare.
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||
call _GetBattleVar
|
||||
call GetBattleVarAddr
|
||||
bit SUBSTATUS_NIGHTMARE, [hl]
|
||||
jr nz, .failed
|
||||
|
||||
|
@@ -4,7 +4,7 @@ BattleCommand55: ; 37618
|
||||
ret c
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1
|
||||
call _GetBattleVar
|
||||
call GetBattleVarAddr
|
||||
set SUBSTATUS_PROTECT, [hl]
|
||||
|
||||
call AnimateCurrentMove
|
||||
|
@@ -50,7 +50,7 @@ BattleCommand5c: ; 37734
|
||||
jr z, .hit
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1
|
||||
call _GetBattleVar
|
||||
call GetBattleVarAddr
|
||||
res 6, [hl]
|
||||
ret
|
||||
|
||||
@@ -62,13 +62,13 @@ BattleCommand5c: ; 37734
|
||||
jr c, .asm_3776e
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1
|
||||
call _GetBattleVar
|
||||
call GetBattleVarAddr
|
||||
res 6, [hl]
|
||||
jr .asm_37775
|
||||
|
||||
.asm_3776e
|
||||
ld a, BATTLE_VARS_SUBSTATUS1
|
||||
call _GetBattleVar
|
||||
call GetBattleVarAddr
|
||||
set 6, [hl]
|
||||
|
||||
.asm_37775
|
||||
|
Reference in New Issue
Block a user