mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Residual damage, battle text labels, pic predefs.
This commit is contained in:
parent
dbe4c7ab67
commit
bc3a21193d
@ -956,7 +956,7 @@ BattleAnimCmd_DC: ; cc5dc (33:45dc)
|
||||
ld hl, BattleMonDVs ; $c632
|
||||
predef GetUnownLetter
|
||||
ld de, $8000
|
||||
predef Function51077
|
||||
predef GetFrontpic
|
||||
jr .done
|
||||
|
||||
.player
|
||||
@ -965,7 +965,7 @@ BattleAnimCmd_DC: ; cc5dc (33:45dc)
|
||||
ld hl, EnemyMonDVs ; $d20c
|
||||
predef GetUnownLetter
|
||||
ld de, $8000
|
||||
predef Function5116c
|
||||
predef GetBackpic
|
||||
|
||||
.done
|
||||
pop af
|
||||
@ -1192,14 +1192,14 @@ BattleAnimCmd_E6: ; cc776 (33:4776)
|
||||
ld hl, BattleMonDVs ; $c632
|
||||
predef GetUnownLetter
|
||||
ld de, $9000
|
||||
predef Function51077
|
||||
predef GetFrontpic
|
||||
jr .done
|
||||
|
||||
.player
|
||||
ld hl, EnemyMonDVs ; $d20c
|
||||
predef GetUnownLetter
|
||||
ld de, $9310
|
||||
predef Function5116c
|
||||
predef GetBackpic
|
||||
|
||||
.done
|
||||
pop af
|
||||
|
170
battle/core.asm
170
battle/core.asm
@ -307,7 +307,7 @@ Function3c1d6: ; 3c1d6
|
||||
; 3c23c
|
||||
|
||||
Function3c23c: ; 3c23c
|
||||
call Function3c710
|
||||
call HasPlayerFainted
|
||||
jr nz, .asm_3c24a
|
||||
call Function3d14e
|
||||
ld a, [BattleEnded]
|
||||
@ -315,7 +315,7 @@ Function3c23c: ; 3c23c
|
||||
jr nz, .asm_3c25a
|
||||
|
||||
.asm_3c24a
|
||||
call Function3c70b
|
||||
call HasEnemyFainted
|
||||
jr nz, .asm_3c258
|
||||
call Function3cd55
|
||||
ld a, [BattleEnded]
|
||||
@ -332,7 +332,7 @@ Function3c23c: ; 3c23c
|
||||
; 3c25c
|
||||
|
||||
Function3c25c: ; 3c25c
|
||||
call Function3c70b
|
||||
call HasEnemyFainted
|
||||
jr nz, .asm_3c26a
|
||||
call Function3cd55
|
||||
ld a, [BattleEnded]
|
||||
@ -340,7 +340,7 @@ Function3c25c: ; 3c25c
|
||||
jr nz, .asm_3c27a
|
||||
|
||||
.asm_3c26a
|
||||
call Function3c710
|
||||
call HasPlayerFainted
|
||||
jr nz, .asm_3c278
|
||||
call Function3d14e
|
||||
ld a, [BattleEnded]
|
||||
@ -947,14 +947,14 @@ Function3c5fe: ; 3c5fe
|
||||
ld a, [$d232]
|
||||
and a
|
||||
ret nz
|
||||
call Function3c710
|
||||
call HasPlayerFainted
|
||||
jp z, Function3d14e
|
||||
call Function3c70b
|
||||
call HasEnemyFainted
|
||||
jp z, Function3cd55
|
||||
|
||||
.asm_3c62f
|
||||
call SetEnemyTurn
|
||||
call Function3c716
|
||||
call ResidualDamage
|
||||
jp z, Function3cd55
|
||||
call RefreshBattleHuds
|
||||
call Function3c6cf
|
||||
@ -963,12 +963,12 @@ Function3c5fe: ; 3c5fe
|
||||
ld a, [$d232]
|
||||
and a
|
||||
ret nz
|
||||
call Function3c70b
|
||||
call HasEnemyFainted
|
||||
jp z, Function3cd55
|
||||
call Function3c710
|
||||
call HasPlayerFainted
|
||||
jp z, Function3d14e
|
||||
call SetPlayerTurn
|
||||
call Function3c716
|
||||
call ResidualDamage
|
||||
jp z, Function3d14e
|
||||
call RefreshBattleHuds
|
||||
xor a
|
||||
@ -989,13 +989,13 @@ Function3c664: ; 3c664
|
||||
ret nz
|
||||
call Function3d2e0
|
||||
ret c
|
||||
call Function3c70b
|
||||
call HasEnemyFainted
|
||||
jp z, Function3cd55
|
||||
call Function3c710
|
||||
call HasPlayerFainted
|
||||
jp z, Function3d14e
|
||||
push bc
|
||||
call SetPlayerTurn
|
||||
call Function3c716
|
||||
call ResidualDamage
|
||||
pop bc
|
||||
jp z, Function3d14e
|
||||
push bc
|
||||
@ -1011,14 +1011,14 @@ Function3c664: ; 3c664
|
||||
ld a, [$d232]
|
||||
and a
|
||||
ret nz
|
||||
call Function3c710
|
||||
call HasPlayerFainted
|
||||
jp z, Function3d14e
|
||||
call Function3c70b
|
||||
call HasEnemyFainted
|
||||
jp z, Function3cd55
|
||||
|
||||
.asm_3c6be
|
||||
call SetEnemyTurn
|
||||
call Function3c716
|
||||
call ResidualDamage
|
||||
jp z, Function3cd55
|
||||
call RefreshBattleHuds
|
||||
xor a
|
||||
@ -1058,15 +1058,15 @@ Function3c6fe: ; 3c6fe
|
||||
ret
|
||||
; 3c706
|
||||
|
||||
Function3c706: ; 3c706
|
||||
HasUserFainted: ; 3c706
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, Function3c710
|
||||
Function3c70b: ; 3c70b
|
||||
jr z, HasPlayerFainted
|
||||
HasEnemyFainted: ; 3c70b
|
||||
ld hl, EnemyMonHP
|
||||
jr Function3c713
|
||||
|
||||
Function3c710: ; 3c710
|
||||
HasPlayerFainted: ; 3c710
|
||||
ld hl, BattleMonHP
|
||||
|
||||
Function3c713: ; 3c713
|
||||
@ -1075,22 +1075,26 @@ Function3c713: ; 3c713
|
||||
ret
|
||||
; 3c716
|
||||
|
||||
Function3c716: ; 3c716
|
||||
call Function3c706
|
||||
ResidualDamage: ; 3c716
|
||||
; Return z if the user fainted before
|
||||
; or as a result of residual damage.
|
||||
; For Sandstorm damage, see HandleWeather.
|
||||
|
||||
call HasUserFainted
|
||||
ret z
|
||||
|
||||
ld a, BATTLE_VARS_STATUS
|
||||
call GetBattleVar
|
||||
and 1 << PSN | 1 << BRN
|
||||
jr z, .asm_3c768
|
||||
jr z, .did_psn_brn
|
||||
|
||||
ld hl, BattleText_0x807e2
|
||||
ld hl, HurtByPoisonText
|
||||
ld de, ANIM_PSN
|
||||
and 1 << BRN
|
||||
jr z, .asm_3c733
|
||||
ld hl, BattleText_0x807f8
|
||||
jr z, .got_anim
|
||||
ld hl, HurtByBurnText
|
||||
ld de, ANIM_BRN
|
||||
.asm_3c733
|
||||
.got_anim
|
||||
|
||||
push de
|
||||
call StdBattleTextBox
|
||||
@ -1110,26 +1114,25 @@ Function3c716: ; 3c716
|
||||
ld a, BATTLE_VARS_SUBSTATUS5
|
||||
call GetBattleVar
|
||||
bit SUBSTATUS_TOXIC, a
|
||||
jr z, .asm_3c765
|
||||
|
||||
jr z, .did_toxic
|
||||
call GetSixteenthMaxHP
|
||||
ld a, [de]
|
||||
inc a
|
||||
ld [de], a
|
||||
ld hl, 0
|
||||
.asm_3c75f
|
||||
.add
|
||||
add hl, bc
|
||||
dec a
|
||||
jr nz, .asm_3c75f
|
||||
jr nz, .add
|
||||
ld b, h
|
||||
ld c, l
|
||||
.did_toxic
|
||||
|
||||
.asm_3c765
|
||||
call Function3cc3f
|
||||
.did_psn_brn
|
||||
|
||||
.asm_3c768
|
||||
call Function3c706
|
||||
jp z, .asm_3c7f7
|
||||
call HasUserFainted
|
||||
jp z, .fainted
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS4
|
||||
call GetBattleVarAddr
|
||||
@ -1151,30 +1154,29 @@ Function3c716: ; 3c716
|
||||
ld a, $1
|
||||
ld [hBGMapMode], a
|
||||
call Function3ccef
|
||||
ld hl, BattleText_0x8080e
|
||||
ld hl, LeechSeedSapsText
|
||||
call StdBattleTextBox
|
||||
|
||||
.asm_3c7a1
|
||||
call Function3c706
|
||||
jr z, .asm_3c7f7
|
||||
|
||||
call HasUserFainted
|
||||
jr z, .fainted
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1
|
||||
call GetBattleVarAddr
|
||||
bit SUBSTATUS_NIGHTMARE, [hl]
|
||||
jr z, .asm_3c7c5
|
||||
|
||||
xor a
|
||||
ld [$cfca], a
|
||||
ld de, ANIM_IN_NIGHTMARE
|
||||
call Function3ee0f
|
||||
call GetQuarterMaxHP
|
||||
call Function3cc3f
|
||||
ld hl, BattleText_0x80822
|
||||
ld hl, HasANightmareText
|
||||
call StdBattleTextBox
|
||||
|
||||
.asm_3c7c5
|
||||
call Function3c706
|
||||
jr z, .asm_3c7f7
|
||||
|
||||
call HasUserFainted
|
||||
jr z, .fainted
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1
|
||||
call GetBattleVarAddr
|
||||
@ -1187,7 +1189,7 @@ Function3c716: ; 3c716
|
||||
call Function3ee0f
|
||||
call GetQuarterMaxHP
|
||||
call Function3cc3f
|
||||
ld hl, BattleText_0x80836
|
||||
ld hl, HurtByCurseText
|
||||
call StdBattleTextBox
|
||||
|
||||
.asm_3c7e9
|
||||
@ -1202,7 +1204,7 @@ Function3c716: ; 3c716
|
||||
or [hl]
|
||||
ret nz
|
||||
|
||||
.asm_3c7f7
|
||||
.fainted
|
||||
call RefreshBattleHuds
|
||||
ld c, 20
|
||||
call DelayFrames
|
||||
@ -1239,7 +1241,7 @@ Function3c801: ; 3c801
|
||||
ld a, [hl]
|
||||
ld [$d265], a
|
||||
push af
|
||||
ld hl, BattleText_0x80864
|
||||
ld hl, PerishCountText
|
||||
call StdBattleTextBox
|
||||
pop af
|
||||
ret nz
|
||||
@ -1826,7 +1828,7 @@ HandleWeather: ; 3cb9e
|
||||
call GetEighthMaxHP
|
||||
call Function3cc3f
|
||||
|
||||
ld hl, BattleText_0x8084d
|
||||
ld hl, SandstormHitsText
|
||||
jp StdBattleTextBox
|
||||
|
||||
.ended
|
||||
@ -2034,20 +2036,20 @@ Function3ccef: ; 3ccef
|
||||
ld hl, BattleMonMaxHP
|
||||
.ok
|
||||
ld a, [hli]
|
||||
ld [Buffer2], a
|
||||
ld [Buffer1 + 1], a
|
||||
ld a, [hld]
|
||||
ld [Buffer1], a
|
||||
ld [Buffer1 + 0], a
|
||||
dec hl
|
||||
ld a, [hl]
|
||||
ld [$d1ec], a
|
||||
ld [Buffer1 + 2], a
|
||||
add c
|
||||
ld [hld], a
|
||||
ld [$d1ee], a
|
||||
ld [Buffer1 + 4], a
|
||||
ld a, [hl]
|
||||
ld [$d1ed], a
|
||||
ld [Buffer1 + 3], a
|
||||
adc b
|
||||
ld [hli], a
|
||||
ld [$d1ef], a
|
||||
ld [Buffer1 + 5], a
|
||||
|
||||
ld a, [Buffer1]
|
||||
ld c, a
|
||||
@ -2060,10 +2062,10 @@ Function3ccef: ; 3ccef
|
||||
jr c, .asm_3cd2d
|
||||
ld a, b
|
||||
ld [hli], a
|
||||
ld [$d1ef], a
|
||||
ld [Buffer1 + 5], a
|
||||
ld a, c
|
||||
ld [hl], a
|
||||
ld [$d1ee], a
|
||||
ld [Buffer1 + 4], a
|
||||
.asm_3cd2d
|
||||
|
||||
call SwitchTurnCore
|
||||
@ -2076,17 +2078,15 @@ Function3cd36: ; 3cd36
|
||||
jp UpdateBattleHuds
|
||||
; 3cd3c
|
||||
|
||||
|
||||
Function3cd3c: ; 3cd3c
|
||||
hlcoord 10, 9
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
ld a, 1
|
||||
jr z, .asm_3cd4a
|
||||
jr z, .ok
|
||||
hlcoord 2, 2
|
||||
xor a
|
||||
|
||||
.asm_3cd4a
|
||||
.ok
|
||||
push bc
|
||||
ld [$d10a], a
|
||||
predef Functionc6e0
|
||||
@ -3128,14 +3128,14 @@ LostBattle: ; 3d38e
|
||||
and $c0
|
||||
add 2
|
||||
ld [$d0ee], a
|
||||
jr .asm_3d412
|
||||
jr .text
|
||||
|
||||
.asm_3d40a
|
||||
ld hl, LostAgainstText
|
||||
call IsMobileBattle
|
||||
jr z, .asm_3d417
|
||||
|
||||
.asm_3d412
|
||||
.text
|
||||
call StdBattleTextBox
|
||||
|
||||
.end
|
||||
@ -3293,7 +3293,6 @@ Function3d4e1: ; 3d4e1
|
||||
call Function3d533
|
||||
jr c, .asm_3d4f1
|
||||
call Function3d599
|
||||
|
||||
.asm_3d4f1
|
||||
call Function3d6ca
|
||||
call Function3d74b
|
||||
@ -3318,7 +3317,6 @@ Function3d517: ; 3d517
|
||||
call Function3d533
|
||||
jr c, .asm_3d522
|
||||
call Function3d599
|
||||
|
||||
.asm_3d522
|
||||
call Function3d6ca
|
||||
ld a, 1
|
||||
@ -3332,6 +3330,7 @@ Function3d533: ; 3d533
|
||||
ld a, [InLinkBattle]
|
||||
and a
|
||||
jr z, .asm_3d541
|
||||
|
||||
ld a, [wBattleAction]
|
||||
sub NUM_MOVES
|
||||
ld b, a
|
||||
@ -3383,7 +3382,7 @@ Function3d581: ; 3d581
|
||||
ld a, [CurBattleMon]
|
||||
ld c, a
|
||||
ld hl, $c664
|
||||
ld b, $1
|
||||
ld b, SET_FLAG
|
||||
push bc
|
||||
predef FlagPredef
|
||||
pop bc
|
||||
@ -3434,13 +3433,13 @@ Function3d5d7: ; 3d5d7
|
||||
ld a, b
|
||||
call GetPartyLocation
|
||||
pop bc
|
||||
ld e, $5
|
||||
.asm_3d5e2
|
||||
ld e, NUM_MOVES + 1
|
||||
.loop
|
||||
dec e
|
||||
jr z, .asm_3d617
|
||||
jr z, .done
|
||||
ld a, [hli]
|
||||
and a
|
||||
jr z, .asm_3d617
|
||||
jr z, .done
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
@ -3457,13 +3456,12 @@ Function3d5d7: ; 3d5d7
|
||||
pop de
|
||||
pop hl
|
||||
ld a, [$d265]
|
||||
cp $b
|
||||
jr c, .asm_3d5e2
|
||||
cp 10 + 1 ; 1.0 + 0.1
|
||||
jr c, .loop
|
||||
ld hl, Buffer1
|
||||
set 0, [hl]
|
||||
ret
|
||||
|
||||
.asm_3d617
|
||||
.done
|
||||
ret
|
||||
; 3d618
|
||||
|
||||
@ -3590,7 +3588,7 @@ Function3d6ca: ; 3d6ca
|
||||
inc a
|
||||
ld hl, OTPartyCount
|
||||
ld c, a
|
||||
ld b, $0
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld [TempEnemyMonSpecies], a
|
||||
@ -3606,7 +3604,6 @@ Function3d6ca: ; 3d6ca
|
||||
predef GetUnownLetter
|
||||
ld a, [UnownLetter]
|
||||
ld [$def4], a
|
||||
|
||||
.asm_3d708
|
||||
ld hl, EnemyMonHP
|
||||
ld a, [hli]
|
||||
@ -3693,7 +3690,7 @@ Function3d7a0: ; 3d7a0
|
||||
call Function1c07
|
||||
call ClearSprites
|
||||
hlcoord 1, 0
|
||||
ld bc, $040a
|
||||
lb bc, 4, 10
|
||||
call ClearBox
|
||||
call WaitBGMap
|
||||
jp Function3ee27
|
||||
@ -3711,24 +3708,26 @@ Function3d7c7: ; 3d7c7
|
||||
ld [CurPartySpecies], a
|
||||
ld [CurSpecies], a
|
||||
call GetBaseData
|
||||
ld a, $1
|
||||
ld a, OTPARTYMON
|
||||
ld [MonType], a
|
||||
predef Function5084a
|
||||
call Function3f47c
|
||||
|
||||
xor a
|
||||
ld [$cfca], a
|
||||
ld [$c689], a
|
||||
call SetEnemyTurn
|
||||
ld de, ANIM_SEND_OUT_MON
|
||||
call Function3ee17
|
||||
|
||||
call Function3da79
|
||||
jr nc, .asm_3d800
|
||||
ld a, $1
|
||||
ld a, 1 ; shiny anim
|
||||
ld [$c689], a
|
||||
ld de, ANIM_SEND_OUT_MON
|
||||
call Function3ee17
|
||||
|
||||
.asm_3d800
|
||||
|
||||
ld bc, TempMonSpecies
|
||||
callba Function4e53f
|
||||
jr c, .asm_3d82c
|
||||
@ -6817,7 +6816,7 @@ Function3ebd8: ; 3ebd8
|
||||
ld a, [OtherTrainerClass]
|
||||
ld [TrainerClass], a
|
||||
ld de, VTiles2
|
||||
callab Function5120d
|
||||
callab GetTrainerPic
|
||||
hlcoord 19, 0
|
||||
ld c, $0
|
||||
.asm_3ebf3
|
||||
@ -8308,7 +8307,7 @@ Function3f447: ; 3f447
|
||||
ld hl, BattleMonDVs
|
||||
predef GetUnownLetter
|
||||
ld de, $9310
|
||||
predef Function5116c
|
||||
predef GetBackpic
|
||||
pop af
|
||||
ld [CurPartySpecies], a
|
||||
ret
|
||||
@ -8331,11 +8330,13 @@ Function3f47c: ; 3f47c
|
||||
bit SUBSTATUS_SUBSTITUTE, a
|
||||
ld hl, BattleAnimCmd_DD
|
||||
jr nz, Function3f4b4
|
||||
|
||||
Function3f486: ; 3f486
|
||||
ld a, [$c6fa]
|
||||
and a
|
||||
ld hl, BattleAnimCmd_E2
|
||||
jr nz, Function3f4b4
|
||||
|
||||
ld a, [CurPartySpecies]
|
||||
push af
|
||||
ld a, [EnemyMonSpecies]
|
||||
@ -8451,7 +8452,7 @@ Function3f568: ; 3f568
|
||||
ld a, $6
|
||||
ld [rSVBK], a
|
||||
ld hl, $d000
|
||||
ld bc, VBlank5
|
||||
ld bc, $400
|
||||
ld a, $2
|
||||
call ByteFill
|
||||
ld a, [rVBK]
|
||||
@ -8485,7 +8486,7 @@ Function3f594: ; 3f594
|
||||
.ok
|
||||
|
||||
ld de, VTiles2
|
||||
callab Function5120d
|
||||
callab GetTrainerPic
|
||||
xor a
|
||||
ld [$ffad], a
|
||||
dec a
|
||||
@ -8547,7 +8548,6 @@ Function3f607: ; 3f607
|
||||
jr nz, .asm_3f648
|
||||
ld a, [UnownLetter]
|
||||
ld [$def4], a
|
||||
|
||||
.asm_3f648
|
||||
ld de, VTiles2
|
||||
predef Function5108b
|
||||
@ -9332,7 +9332,7 @@ Function3fbd6: ; 3fbd6
|
||||
ld a, $6
|
||||
ld [rSVBK], a
|
||||
ld hl, $d000
|
||||
ld bc, VBlank5
|
||||
ld bc, $400
|
||||
ld a, $7f
|
||||
call ByteFill
|
||||
ld de, $d000
|
||||
|
@ -1536,7 +1536,7 @@ Function347d3: ; 347d3
|
||||
ld b, [hl]
|
||||
inc hl
|
||||
ld c, [hl]
|
||||
ld a, $a
|
||||
ld a, 10 ; 1.0
|
||||
ld [$d265], a
|
||||
ld hl, TypeMatchup
|
||||
.asm_347e7
|
||||
|
2
home.asm
2
home.asm
@ -1699,7 +1699,7 @@ Function378b:: ; 378b
|
||||
jr c, .asm_37ad
|
||||
push hl
|
||||
ld de, VTiles2
|
||||
predef Function51077
|
||||
predef GetFrontpic
|
||||
pop hl
|
||||
xor a
|
||||
ld [$ffad], a
|
||||
|
223
main.asm
223
main.asm
@ -4672,7 +4672,7 @@ Function6182: ; 6182
|
||||
|
||||
Function619c: ; 619c
|
||||
ld de, VTiles2
|
||||
callba Function5120d
|
||||
callba GetTrainerPic
|
||||
xor a
|
||||
ld [$ffad], a
|
||||
hlcoord 6, 4
|
||||
@ -7814,10 +7814,10 @@ PredefPointers:: ; 856b
|
||||
add_predef Predef39
|
||||
add_predef Functionfd1d0
|
||||
add_predef PartyMonItemName
|
||||
add_predef Function51077
|
||||
add_predef Function5116c
|
||||
add_predef GetFrontpic
|
||||
add_predef GetBackpic
|
||||
add_predef Function5108b
|
||||
add_predef Function5120d
|
||||
add_predef GetTrainerPic
|
||||
add_predef DecompressPredef ; $40
|
||||
add_predef Function347d3
|
||||
add_predef Functionfb908
|
||||
@ -29600,7 +29600,7 @@ Function16cc8: ; 16cc8
|
||||
xor a
|
||||
ld [$c2c6], a
|
||||
ld de, VTiles2
|
||||
predef Function51077
|
||||
predef GetFrontpic
|
||||
call Function16cff
|
||||
hlcoord 1, 6
|
||||
xor a
|
||||
@ -30394,7 +30394,7 @@ Function17224: ; 17224 (5:7224)
|
||||
ld hl, BattleMonDVs
|
||||
predef GetUnownLetter
|
||||
pop de
|
||||
predef_jump Function51077
|
||||
predef_jump GetFrontpic
|
||||
|
||||
; known jump sources: 172c2 (5:72c2)
|
||||
Function1723c: ; 1723c (5:723c)
|
||||
@ -31882,7 +31882,7 @@ Function244e3:: ; 244e3
|
||||
ld [CurSpecies], a
|
||||
call GetBaseData
|
||||
ld de, VTiles1
|
||||
predef Function51077
|
||||
predef GetFrontpic
|
||||
ld a, [$cf82]
|
||||
inc a
|
||||
ld b, a
|
||||
@ -39075,7 +39075,7 @@ Function29491: ; 29491
|
||||
ld [CurSpecies], a
|
||||
call GetBaseData
|
||||
pop de
|
||||
predef Function51077
|
||||
predef GetFrontpic
|
||||
ret
|
||||
; 294a9
|
||||
|
||||
@ -46440,7 +46440,7 @@ Function4143b: ; 4143b
|
||||
ld [CurPartySpecies], a
|
||||
call GetBaseData
|
||||
ld de, VTiles2
|
||||
predef Function51077
|
||||
predef GetFrontpic
|
||||
ret
|
||||
|
||||
.asm_4145b
|
||||
@ -46601,7 +46601,7 @@ Function41a58: ; 41a58 (10:5a58)
|
||||
ld [CurPartySpecies], a ; $d108
|
||||
call GetBaseData
|
||||
ld de, $9000
|
||||
predef Function51077
|
||||
predef GetFrontpic
|
||||
pop af
|
||||
ld [UnownLetter], a ; $d234
|
||||
ret
|
||||
@ -46631,7 +46631,7 @@ Function41a7f: ; 41a7f
|
||||
call WaitBGMap
|
||||
call GetBaseData
|
||||
ld de, VTiles2
|
||||
predef Function51077
|
||||
predef GetFrontpic
|
||||
ld a, $4
|
||||
call Function41423
|
||||
ld a, [CurPartySpecies]
|
||||
@ -60679,14 +60679,14 @@ GetUnownLetter: ; 51040
|
||||
; 51077
|
||||
|
||||
|
||||
Function51077: ; 51077
|
||||
GetFrontpic: ; 51077
|
||||
ld a, [CurPartySpecies]
|
||||
ld [CurSpecies], a
|
||||
call IsAPokemon
|
||||
ret c
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
call Function510a5
|
||||
call _GetFrontpic
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
@ -60701,33 +60701,33 @@ Function5108b: ; 5108b
|
||||
push af
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
call Function510a5
|
||||
call _GetFrontpic
|
||||
call Function51103
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
; 510a5
|
||||
|
||||
Function510a5: ; 510a5
|
||||
_GetFrontpic: ; 510a5
|
||||
push de
|
||||
call GetBaseData
|
||||
ld a, [BasePicSize]
|
||||
and $f
|
||||
ld b, a
|
||||
push bc
|
||||
call Function510d7
|
||||
call GetFrontpicPointer
|
||||
ld a, $6
|
||||
ld [rSVBK], a
|
||||
ld a, b
|
||||
ld de, $d800
|
||||
call FarDecompress
|
||||
pop bc
|
||||
ld hl, Unkn1Pals
|
||||
ld hl, $d000
|
||||
ld de, $d800
|
||||
call Function512ab
|
||||
pop hl
|
||||
push hl
|
||||
ld de, Unkn1Pals
|
||||
ld de, $d000
|
||||
ld c, 7 * 7
|
||||
ld a, [hROMBank]
|
||||
ld b, a
|
||||
@ -60736,28 +60736,28 @@ Function510a5: ; 510a5
|
||||
ret
|
||||
; 510d7
|
||||
|
||||
Function510d7: ; 510d7
|
||||
GetFrontpicPointer: ; 510d7
|
||||
GLOBAL PicPointers, UnownPicPointers
|
||||
|
||||
ld a, [CurPartySpecies]
|
||||
cp UNOWN
|
||||
jr z, .asm_510e5
|
||||
jr z, .unown
|
||||
ld a, [CurPartySpecies]
|
||||
ld d, BANK(PicPointers)
|
||||
jr .asm_510ea
|
||||
jr .ok
|
||||
|
||||
.asm_510e5
|
||||
.unown
|
||||
ld a, [UnownLetter]
|
||||
ld d, BANK(UnownPicPointers)
|
||||
|
||||
.asm_510ea
|
||||
ld hl, Function50000
|
||||
.ok
|
||||
ld hl, PicPointers ; UnownPicPointers
|
||||
dec a
|
||||
ld bc, $0006
|
||||
ld bc, 6
|
||||
call AddNTimes
|
||||
ld a, d
|
||||
call GetFarByte
|
||||
call Function511c5
|
||||
call FixPicBank
|
||||
push af
|
||||
inc hl
|
||||
ld a, d
|
||||
@ -60770,13 +60770,13 @@ Function51103: ; 51103
|
||||
ld a, $1
|
||||
ld [rVBK], a
|
||||
push hl
|
||||
ld de, Unkn1Pals
|
||||
ld c, $31
|
||||
ld de, $d000
|
||||
ld c, 7 * 7
|
||||
ld a, [hROMBank]
|
||||
ld b, a
|
||||
call Get2bpp
|
||||
pop hl
|
||||
ld de, $0310
|
||||
ld de, 7 * 7 * $10
|
||||
add hl, de
|
||||
push hl
|
||||
ld a, $1
|
||||
@ -60784,24 +60784,24 @@ Function51103: ; 51103
|
||||
call GetFarWRAMByte
|
||||
pop hl
|
||||
and $f
|
||||
ld de, $d990
|
||||
ld de, $d800 + 5 * 5 * $10
|
||||
ld c, 5 * 5
|
||||
cp 5
|
||||
jr z, .asm_5113b
|
||||
ld de, $da40
|
||||
ld de, $d800 + 6 * 6 * $10
|
||||
ld c, 6 * 6
|
||||
cp 6
|
||||
jr z, .asm_5113b
|
||||
ld de, $db10
|
||||
ld de, $d800 + 7 * 7 * $10
|
||||
ld c, 7 * 7
|
||||
|
||||
.asm_5113b
|
||||
|
||||
push hl
|
||||
push bc
|
||||
call Function5114f
|
||||
pop bc
|
||||
pop hl
|
||||
ld de, Unkn1Pals
|
||||
ld de, $d000
|
||||
ld a, [hROMBank]
|
||||
ld b, a
|
||||
call Get2bpp
|
||||
@ -60832,10 +60832,11 @@ Function5114f: ; 5114f
|
||||
ret
|
||||
; 5116c
|
||||
|
||||
Function5116c: ; 5116c
|
||||
GetBackpic: ; 5116c
|
||||
ld a, [CurPartySpecies]
|
||||
call IsAPokemon
|
||||
ret c
|
||||
|
||||
ld a, [CurPartySpecies]
|
||||
ld b, a
|
||||
ld a, [UnownLetter]
|
||||
@ -60853,31 +60854,30 @@ Function5116c: ; 5116c
|
||||
ld a, b
|
||||
ld d, BANK(PicPointers)
|
||||
cp UNOWN
|
||||
jr nz, .asm_51190
|
||||
jr nz, .ok
|
||||
ld a, c
|
||||
ld d, BANK(UnownPicPointers)
|
||||
|
||||
.asm_51190
|
||||
.ok
|
||||
dec a
|
||||
ld bc, $0006
|
||||
ld bc, 6
|
||||
call AddNTimes
|
||||
ld bc, $0003
|
||||
ld bc, 3
|
||||
add hl, bc
|
||||
ld a, d
|
||||
call GetFarByte
|
||||
call Function511c5
|
||||
call FixPicBank
|
||||
push af
|
||||
inc hl
|
||||
ld a, d
|
||||
call GetFarHalfword
|
||||
ld de, Unkn1Pals
|
||||
ld de, $d000
|
||||
pop af
|
||||
call FarDecompress
|
||||
ld hl, Unkn1Pals
|
||||
ld c, $24
|
||||
ld hl, $d000
|
||||
ld c, 6 * 6
|
||||
call Function5127c
|
||||
pop hl
|
||||
ld de, Unkn1Pals
|
||||
ld de, $d000
|
||||
ld a, [hROMBank]
|
||||
ld b, a
|
||||
call Get2bpp
|
||||
@ -60887,10 +60887,11 @@ Function5116c: ; 5116c
|
||||
; 511c5
|
||||
|
||||
|
||||
Function511c5: ; 511c5
|
||||
FixPicBank: ; 511c5
|
||||
; This is a thing for some reason.
|
||||
push hl
|
||||
push bc
|
||||
sub $12
|
||||
sub PICS_1 - $36
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, Unknown_511d4
|
||||
@ -60902,10 +60903,53 @@ Function511c5: ; 511c5
|
||||
; 511d4
|
||||
|
||||
Unknown_511d4: ; 511d4
|
||||
INCBIN "baserom.gbc",$511d4,$5120d - $511d4
|
||||
db PICS_1
|
||||
db PICS_2
|
||||
db PICS_3
|
||||
db PICS_4
|
||||
db PICS_5
|
||||
db PICS_6
|
||||
db PICS_7
|
||||
db PICS_8
|
||||
db PICS_9
|
||||
db PICS_10
|
||||
db PICS_11
|
||||
db PICS_12
|
||||
db PICS_13
|
||||
db PICS_14
|
||||
db PICS_15
|
||||
db PICS_16
|
||||
db PICS_17
|
||||
db PICS_18
|
||||
db PICS_19
|
||||
db PICS_19 + 1
|
||||
db PICS_19 + 2
|
||||
db PICS_19 + 3
|
||||
db PICS_19 + 4
|
||||
db PICS_19 + 5
|
||||
|
||||
Function511ec: ; 511ec
|
||||
ld a, c
|
||||
push de
|
||||
ld hl, PicPointers
|
||||
dec a
|
||||
ld bc, 6
|
||||
call AddNTimes
|
||||
ld a, BANK(PicPointers)
|
||||
call GetFarByte
|
||||
call FixPicBank
|
||||
push af
|
||||
inc hl
|
||||
ld a, BANK(PicPointers)
|
||||
call GetFarHalfword
|
||||
pop af
|
||||
pop de
|
||||
call FarDecompress
|
||||
ret
|
||||
; 0x5120d
|
||||
|
||||
|
||||
Function5120d: ; 5120d
|
||||
GetTrainerPic: ; 5120d
|
||||
ld a, [TrainerClass]
|
||||
and a
|
||||
ret z
|
||||
@ -60914,29 +60958,29 @@ Function5120d: ; 5120d
|
||||
call WaitBGMap
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
ld hl, Function50000
|
||||
ld hl, TrainerPicPointers
|
||||
ld a, [TrainerClass]
|
||||
dec a
|
||||
ld bc, $0003
|
||||
ld bc, 3
|
||||
call AddNTimes
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $6
|
||||
ld [rSVBK], a
|
||||
push de
|
||||
ld a, $4a
|
||||
ld a, BANK(TrainerPicPointers)
|
||||
call GetFarByte
|
||||
call Function511c5
|
||||
call FixPicBank
|
||||
push af
|
||||
inc hl
|
||||
ld a, $4a
|
||||
ld a, BANK(TrainerPicPointers)
|
||||
call GetFarHalfword
|
||||
pop af
|
||||
ld de, $d000
|
||||
call FarDecompress
|
||||
pop hl
|
||||
ld de, $d000
|
||||
ld c, $31
|
||||
ld c, 7 * 7
|
||||
ld a, [hROMBank]
|
||||
ld b, a
|
||||
call Get2bpp
|
||||
@ -60983,13 +61027,13 @@ Function5127c: ; 5127c
|
||||
and a
|
||||
jr z, .asm_512a8
|
||||
ld a, c
|
||||
cp $31
|
||||
ld de, $0310
|
||||
cp 7 * 7
|
||||
ld de, 7 * 7 * $10
|
||||
jr z, .asm_51296
|
||||
cp $24
|
||||
ld de, $0240
|
||||
cp 6 * 6
|
||||
ld de, 6 * 6 * $10
|
||||
jr z, .asm_51296
|
||||
ld de, $0190
|
||||
ld de, 5 * 5 * $10
|
||||
|
||||
.asm_51296
|
||||
ld a, [hl]
|
||||
@ -61015,54 +61059,53 @@ Function5127c: ; 5127c
|
||||
|
||||
Function512ab: ; 512ab
|
||||
ld a, b
|
||||
cp $6
|
||||
jr z, .asm_512bd
|
||||
cp $5
|
||||
jr z, .asm_512d2
|
||||
.asm_512b4
|
||||
cp 6
|
||||
jr z, .six
|
||||
cp 5
|
||||
jr z, .five
|
||||
|
||||
.seven
|
||||
ld c, $70
|
||||
call Function512f2
|
||||
dec b
|
||||
jr nz, .asm_512b4
|
||||
jr nz, .seven
|
||||
ret
|
||||
|
||||
.asm_512bd
|
||||
.six
|
||||
ld c, $70
|
||||
xor a
|
||||
call Function512ed
|
||||
call .Fill
|
||||
.asm_512c3
|
||||
ld c, $10
|
||||
xor a
|
||||
call Function512ed
|
||||
call .Fill
|
||||
ld c, $60
|
||||
call Function512f2
|
||||
dec b
|
||||
jr nz, .asm_512c3
|
||||
ret
|
||||
|
||||
.asm_512d2
|
||||
.five
|
||||
ld c, $70
|
||||
xor a
|
||||
call Function512ed
|
||||
call .Fill
|
||||
.asm_512d8
|
||||
ld c, $20
|
||||
xor a
|
||||
call Function512ed
|
||||
call .Fill
|
||||
ld c, $50
|
||||
call Function512f2
|
||||
dec b
|
||||
jr nz, .asm_512d8
|
||||
ld c, $70
|
||||
xor a
|
||||
call Function512ed
|
||||
call .Fill
|
||||
ret
|
||||
; 512ed
|
||||
|
||||
Function512ed: ; 512ed
|
||||
.asm_512ed
|
||||
.Fill
|
||||
ld [hli], a
|
||||
dec c
|
||||
jr nz, .asm_512ed
|
||||
jr nz, .Fill
|
||||
ret
|
||||
; 512f2
|
||||
|
||||
@ -61085,22 +61128,10 @@ Function512f2: ; 512f2
|
||||
inc de
|
||||
ld b, a
|
||||
xor a
|
||||
rept 8
|
||||
rr b
|
||||
rla
|
||||
rr b
|
||||
rla
|
||||
rr b
|
||||
rla
|
||||
rr b
|
||||
rla
|
||||
rr b
|
||||
rla
|
||||
rr b
|
||||
rla
|
||||
rr b
|
||||
rla
|
||||
rr b
|
||||
rla
|
||||
endr
|
||||
ld [hli], a
|
||||
dec c
|
||||
jr nz, .asm_51300
|
||||
@ -62761,7 +62792,7 @@ Function81adb: ; 81adb
|
||||
hlcoord 12, 3
|
||||
call Function378b
|
||||
ld de, $9310
|
||||
predef Function5116c
|
||||
predef GetBackpic
|
||||
ld a, $31
|
||||
ld [$ffad], a
|
||||
hlcoord 2, 4
|
||||
@ -62792,7 +62823,7 @@ Function81adb: ; 81adb
|
||||
hlcoord 4, 1
|
||||
call PlaceString
|
||||
ld de, VTiles2
|
||||
callab Function5120d
|
||||
callab GetTrainerPic
|
||||
xor a
|
||||
ld [TempEnemyMonSpecies], a
|
||||
ld [$ffad], a
|
||||
@ -65666,7 +65697,7 @@ Function865b5: ; 865b5
|
||||
ld a, $7f
|
||||
call ByteFill
|
||||
ld de, $9310
|
||||
predef Function5116c
|
||||
predef GetBackpic
|
||||
ld a, $31
|
||||
ld [$ffad], a
|
||||
hlcoord 6, 6
|
||||
@ -67975,7 +68006,7 @@ Function897af: ; 897af
|
||||
xor a
|
||||
ld [CurPartySpecies], a
|
||||
ld de, $9370
|
||||
callba Function5120d
|
||||
callba GetTrainerPic
|
||||
pop bc
|
||||
ret
|
||||
; 897d5
|
||||
@ -94834,7 +94865,7 @@ PCMonInfo: ; e2ac6 (38:6ac6)
|
||||
predef GetUnownLetter
|
||||
call GetBaseData
|
||||
ld de, $9000
|
||||
predef Function51077
|
||||
predef GetFrontpic
|
||||
xor a
|
||||
ld [$cb32], a
|
||||
ld a, [CurPartySpecies]
|
||||
|
@ -60,43 +60,43 @@ BattleText_0x807cf: ; 0x807cf
|
||||
prompt
|
||||
; 0x807e2
|
||||
|
||||
BattleText_0x807e2: ; 0x807e2
|
||||
HurtByPoisonText: ; 0x807e2
|
||||
text $5a
|
||||
line "is hurt by poison!"
|
||||
prompt
|
||||
; 0x807f8
|
||||
|
||||
BattleText_0x807f8: ; 0x807f8
|
||||
HurtByBurnText: ; 0x807f8
|
||||
text $5a, "'s"
|
||||
line "hurt by its burn!"
|
||||
prompt
|
||||
; 0x8080e
|
||||
|
||||
BattleText_0x8080e: ; 0x8080e
|
||||
LeechSeedSapsText: ; 0x8080e
|
||||
text "LEECH SEED saps"
|
||||
line $5a, "!"
|
||||
prompt
|
||||
; 0x80822
|
||||
|
||||
BattleText_0x80822: ; 0x80822
|
||||
HasANightmareText: ; 0x80822
|
||||
text $5a
|
||||
line "has a NIGHTMARE!"
|
||||
prompt
|
||||
; 0x80836
|
||||
|
||||
BattleText_0x80836: ; 0x80836
|
||||
HurtByCurseText: ; 0x80836
|
||||
text $5a, "'s"
|
||||
line "hurt by the CURSE!"
|
||||
prompt
|
||||
; 0x8084d
|
||||
|
||||
BattleText_0x8084d: ; 0x8084d
|
||||
SandstormHitsText: ; 0x8084d
|
||||
text "The SANDSTORM hits"
|
||||
line $5a, "!"
|
||||
prompt
|
||||
; 0x80864
|
||||
|
||||
BattleText_0x80864: ; 0x80864
|
||||
PerishCountText: ; 0x80864
|
||||
text $5a, "'s"
|
||||
line "PERISH count is @"
|
||||
deciram $d265, $11
|
||||
|
Loading…
Reference in New Issue
Block a user