mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
fix labels for and rename GetBattleVarPair to GetBattleVar
This commit is contained in:
parent
946a213f09
commit
0ead58cdaa
File diff suppressed because it is too large
Load Diff
@ -66,7 +66,7 @@ BattleCommand54: ; 37588
|
|||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
bit 1, [hl]
|
bit 1, [hl]
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ BattleCommand5a: ; 3766f
|
|||||||
ret c
|
ret c
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1
|
ld a, BATTLE_VARS_SUBSTATUS1
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
set SUBSTATUS_ENDURE, [hl]
|
set SUBSTATUS_ENDURE, [hl]
|
||||||
|
|
||||||
call Function0x37e01
|
call Function0x37e01
|
||||||
|
@ -4,7 +4,7 @@ BattleCommand55: ; 37618
|
|||||||
ret c
|
ret c
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS1
|
ld a, BATTLE_VARS_SUBSTATUS1
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
set SUBSTATUS_PROTECT, [hl]
|
set SUBSTATUS_PROTECT, [hl]
|
||||||
|
|
||||||
call Function0x37e01
|
call Function0x37e01
|
||||||
@ -29,7 +29,7 @@ ProtectChance: ; 3762c
|
|||||||
; Can't have a substitute.
|
; Can't have a substitute.
|
||||||
|
|
||||||
ld a, BATTLE_VARS_SUBSTATUS4
|
ld a, BATTLE_VARS_SUBSTATUS4
|
||||||
call CleanGetBattleVarPair
|
call GetBattleVar
|
||||||
bit SUBSTATUS_SUBSTITUTE, a
|
bit SUBSTATUS_SUBSTITUTE, a
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ GetHiddenPower: ; fbced
|
|||||||
.GotType
|
.GotType
|
||||||
push af
|
push af
|
||||||
ld a, BATTLE_VARS_MOVE_TYPE
|
ld a, BATTLE_VARS_MOVE_TYPE
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
pop af
|
pop af
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
|
68
main.asm
68
main.asm
@ -2660,15 +2660,15 @@ UpdateBattleHuds: ; 39d4
|
|||||||
; 39e1
|
; 39e1
|
||||||
|
|
||||||
|
|
||||||
CleanGetBattleVarPair: ; 39e1
|
GetBattleVar: ; 39e1
|
||||||
; Preserves hl.
|
; Preserves hl.
|
||||||
push hl
|
push hl
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
; 39e7
|
; 39e7
|
||||||
|
|
||||||
GetBattleVarPair: ; 39e7
|
_GetBattleVar: ; 39e7
|
||||||
; Get variable from pair a, depending on whose turn it is.
|
; Get variable from pair a, depending on whose turn it is.
|
||||||
; There are 21 variable pairs.
|
; There are 21 variable pairs.
|
||||||
|
|
||||||
@ -37192,11 +37192,11 @@ Function3c27c: ; 3c27c
|
|||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld a, $2
|
ld a, $2
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
push af
|
push af
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ld a, $c
|
ld a, $c
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
push hl
|
push hl
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
@ -37815,18 +37815,18 @@ Function3c6de: ; 3c6de
|
|||||||
|
|
||||||
Function3c6ed: ; 3c6ed
|
Function3c6ed: ; 3c6ed
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
res 2, [hl]
|
res 2, [hl]
|
||||||
res 5, [hl]
|
res 5, [hl]
|
||||||
ld a, $9
|
ld a, $9
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
ret
|
ret
|
||||||
; 3c6fe
|
; 3c6fe
|
||||||
|
|
||||||
Function3c6fe: ; 3c6fe
|
Function3c6fe: ; 3c6fe
|
||||||
ld a, $4
|
ld a, $4
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
ret
|
ret
|
||||||
; 3c706
|
; 3c706
|
||||||
@ -37851,7 +37851,7 @@ Function3c716: ; 3c716
|
|||||||
call Function3c706
|
call Function3c706
|
||||||
ret z
|
ret z
|
||||||
ld a, $a
|
ld a, $a
|
||||||
call CleanGetBattleVarPair
|
call GetBattleVar
|
||||||
and $18
|
and $18
|
||||||
jr z, .asm_3c768
|
jr z, .asm_3c768
|
||||||
ld hl, $47e2
|
ld hl, $47e2
|
||||||
@ -37877,7 +37877,7 @@ Function3c716: ; 3c716
|
|||||||
|
|
||||||
.asm_3c74d
|
.asm_3c74d
|
||||||
ld a, $4
|
ld a, $4
|
||||||
call CleanGetBattleVarPair
|
call GetBattleVar
|
||||||
bit 0, a
|
bit 0, a
|
||||||
jr z, .asm_3c765
|
jr z, .asm_3c765
|
||||||
call Function3cc76
|
call Function3cc76
|
||||||
@ -37899,7 +37899,7 @@ Function3c716: ; 3c716
|
|||||||
call Function3c706
|
call Function3c706
|
||||||
jp z, $47f7
|
jp z, $47f7
|
||||||
ld a, $3
|
ld a, $3
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
bit 7, [hl]
|
bit 7, [hl]
|
||||||
jr z, .asm_3c7a1
|
jr z, .asm_3c7a1
|
||||||
call Function3c8e4
|
call Function3c8e4
|
||||||
@ -37907,7 +37907,7 @@ Function3c716: ; 3c716
|
|||||||
ld [$cfca], a
|
ld [$cfca], a
|
||||||
ld de, $0107
|
ld de, $0107
|
||||||
ld a, $7
|
ld a, $7
|
||||||
call CleanGetBattleVarPair
|
call GetBattleVar
|
||||||
and $60
|
and $60
|
||||||
call z, Function3ee0f
|
call z, Function3ee0f
|
||||||
call Function3c8e4
|
call Function3c8e4
|
||||||
@ -37923,7 +37923,7 @@ Function3c716: ; 3c716
|
|||||||
call Function3c706
|
call Function3c706
|
||||||
jr z, .asm_3c7f7
|
jr z, .asm_3c7f7
|
||||||
ld a, $0
|
ld a, $0
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
bit 0, [hl]
|
bit 0, [hl]
|
||||||
jr z, .asm_3c7c5
|
jr z, .asm_3c7c5
|
||||||
xor a
|
xor a
|
||||||
@ -37939,7 +37939,7 @@ Function3c716: ; 3c716
|
|||||||
call Function3c706
|
call Function3c706
|
||||||
jr z, .asm_3c7f7
|
jr z, .asm_3c7f7
|
||||||
ld a, $0
|
ld a, $0
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
bit 1, [hl]
|
bit 1, [hl]
|
||||||
jr z, .asm_3c7e9
|
jr z, .asm_3c7e9
|
||||||
xor a
|
xor a
|
||||||
@ -37992,7 +37992,7 @@ Function3c801: ; 3c801
|
|||||||
|
|
||||||
.asm_3c827
|
.asm_3c827
|
||||||
ld a, $0
|
ld a, $0
|
||||||
call CleanGetBattleVarPair
|
call GetBattleVar
|
||||||
bit 4, a
|
bit 4, a
|
||||||
ret z
|
ret z
|
||||||
dec [hl]
|
dec [hl]
|
||||||
@ -38004,7 +38004,7 @@ Function3c801: ; 3c801
|
|||||||
pop af
|
pop af
|
||||||
ret nz
|
ret nz
|
||||||
ld a, $0
|
ld a, $0
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
res 4, [hl]
|
res 4, [hl]
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
@ -38064,7 +38064,7 @@ Function3c874: ; 3c874
|
|||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld a, $3
|
ld a, $3
|
||||||
call CleanGetBattleVarPair
|
call GetBattleVar
|
||||||
bit 4, a
|
bit 4, a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
@ -38074,7 +38074,7 @@ Function3c874: ; 3c874
|
|||||||
dec [hl]
|
dec [hl]
|
||||||
jr z, .asm_3c8de
|
jr z, .asm_3c8de
|
||||||
ld a, $2
|
ld a, $2
|
||||||
call CleanGetBattleVarPair
|
call GetBattleVar
|
||||||
and $60
|
and $60
|
||||||
jr nz, .asm_3c8d3
|
jr nz, .asm_3c8d3
|
||||||
call Function3c8e4
|
call Function3c8e4
|
||||||
@ -38320,7 +38320,7 @@ Function3ca26: ; 3ca26
|
|||||||
ld hl, $48b6
|
ld hl, $48b6
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
ld a, $10
|
ld a, $10
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
push af
|
push af
|
||||||
ld a, $f8
|
ld a, $f8
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
@ -38335,7 +38335,7 @@ Function3ca26: ; 3ca26
|
|||||||
ld [CurDamage], a
|
ld [CurDamage], a
|
||||||
ld [$d257], a
|
ld [$d257], a
|
||||||
ld a, $10
|
ld a, $10
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
pop af
|
pop af
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call UpdateBattleMonInParty
|
call UpdateBattleMonInParty
|
||||||
@ -38539,7 +38539,7 @@ HandleWeather: ; 3cb9e
|
|||||||
|
|
||||||
.asm_3cbd0
|
.asm_3cbd0
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call CleanGetBattleVarPair
|
call GetBattleVar
|
||||||
bit SUBSTATUS_UNDERGROUND, a
|
bit SUBSTATUS_UNDERGROUND, a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@ -41087,7 +41087,7 @@ Function3dc5a: ; 3dc5a
|
|||||||
|
|
||||||
Function3dc5b: ; 3dc5b
|
Function3dc5b: ; 3dc5b
|
||||||
ld a, $10
|
ld a, $10
|
||||||
call CleanGetBattleVarPair
|
call GetBattleVar
|
||||||
ld b, a
|
ld b, a
|
||||||
call Function3c5ec
|
call Function3c5ec
|
||||||
ld a, b
|
ld a, b
|
||||||
@ -41107,7 +41107,7 @@ Function3dc5b: ; 3dc5b
|
|||||||
ld a, $d
|
ld a, $d
|
||||||
rst FarCall
|
rst FarCall
|
||||||
ld a, $10
|
ld a, $10
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
pop af
|
pop af
|
||||||
@ -41323,7 +41323,7 @@ Function3dde9: ; 3dde9
|
|||||||
dec hl
|
dec hl
|
||||||
ld b, [hl]
|
ld b, [hl]
|
||||||
ld a, $b
|
ld a, $b
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
and b
|
and b
|
||||||
ret z
|
ret z
|
||||||
xor a
|
xor a
|
||||||
@ -41332,18 +41332,18 @@ Function3dde9: ; 3dde9
|
|||||||
call UpdateOpponentInParty
|
call UpdateOpponentInParty
|
||||||
pop bc
|
pop bc
|
||||||
ld a, $9
|
ld a, $9
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
and [hl]
|
and [hl]
|
||||||
res 0, [hl]
|
res 0, [hl]
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
and [hl]
|
and [hl]
|
||||||
res 0, [hl]
|
res 0, [hl]
|
||||||
ld a, b
|
ld a, b
|
||||||
cp $7f
|
cp $7f
|
||||||
jr nz, .asm_3de26
|
jr nz, .asm_3de26
|
||||||
ld a, $7
|
ld a, $7
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
res 7, [hl]
|
res 7, [hl]
|
||||||
|
|
||||||
.asm_3de26
|
.asm_3de26
|
||||||
@ -41378,7 +41378,7 @@ Function3dde9: ; 3dde9
|
|||||||
|
|
||||||
Function3de51: ; 3de51
|
Function3de51: ; 3de51
|
||||||
ld a, $7
|
ld a, $7
|
||||||
call CleanGetBattleVarPair
|
call GetBattleVar
|
||||||
bit 7, a
|
bit 7, a
|
||||||
ret z
|
ret z
|
||||||
callab GetOpponentItem
|
callab GetOpponentItem
|
||||||
@ -41392,7 +41392,7 @@ Function3de51: ; 3de51
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [$d265], a
|
ld [$d265], a
|
||||||
ld a, $7
|
ld a, $7
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
res 7, [hl]
|
res 7, [hl]
|
||||||
call GetItemName
|
call GetItemName
|
||||||
call Function3ddc8
|
call Function3ddc8
|
||||||
@ -44057,7 +44057,7 @@ _BattleRandom: ; 3edd8
|
|||||||
|
|
||||||
Function3ee0f: ; 3ee0f
|
Function3ee0f: ; 3ee0f
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3
|
ld a, BATTLE_VARS_SUBSTATUS3
|
||||||
call CleanGetBattleVarPair
|
call GetBattleVar
|
||||||
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
|
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
|
||||||
ret nz
|
ret nz
|
||||||
; 3ee17
|
; 3ee17
|
||||||
@ -72689,7 +72689,7 @@ DoWeatherModifiers: ; fbda4
|
|||||||
ld de, .WeatherMoveModifiers
|
ld de, .WeatherMoveModifiers
|
||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE_EFFECT
|
ld a, BATTLE_VARS_MOVE_EFFECT
|
||||||
call CleanGetBattleVarPair
|
call GetBattleVar
|
||||||
ld c, a
|
ld c, a
|
||||||
|
|
||||||
.CheckWeatherMove
|
.CheckWeatherMove
|
||||||
@ -77584,17 +77584,17 @@ UsedMoveText: ; 105db9
|
|||||||
.start
|
.start
|
||||||
; get address for last move
|
; get address for last move
|
||||||
ld a, $13 ; last move
|
ld a, $13 ; last move
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
|
|
||||||
; get address for last counter move
|
; get address for last counter move
|
||||||
ld a, $11
|
ld a, $11
|
||||||
call GetBattleVarPair
|
call _GetBattleVar
|
||||||
|
|
||||||
; get move animation (id)
|
; get move animation (id)
|
||||||
ld a, $c ; move animation
|
ld a, $c ; move animation
|
||||||
call CleanGetBattleVarPair
|
call GetBattleVar
|
||||||
ld [$d265], a
|
ld [$d265], a
|
||||||
|
|
||||||
; check actor ????
|
; check actor ????
|
||||||
|
Loading…
x
Reference in New Issue
Block a user