mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
Fix trainer sprite loading
Moved Yujirou to the end of the file and made the bank switching code more efficient, was swamp code before.
This commit is contained in:
parent
bd23dfa61e
commit
fc597000fb
|
@ -27,7 +27,6 @@ ENDM
|
||||||
trainer_const BIKER ; $0A
|
trainer_const BIKER ; $0A
|
||||||
trainer_const BURGLAR ; $0B
|
trainer_const BURGLAR ; $0B
|
||||||
trainer_const ENGINEER ; $0C
|
trainer_const ENGINEER ; $0C
|
||||||
trainer_const YUJIROU ; $0D, was unused juggler
|
|
||||||
trainer_const FISHER ; $0E
|
trainer_const FISHER ; $0E
|
||||||
trainer_const SWIMMER ; $0F
|
trainer_const SWIMMER ; $0F
|
||||||
trainer_const CUE_BALL ; $10
|
trainer_const CUE_BALL ; $10
|
||||||
|
@ -62,4 +61,5 @@ ENDM
|
||||||
trainer_const CHANNELER ; $2D
|
trainer_const CHANNELER ; $2D
|
||||||
trainer_const AGATHA ; $2E
|
trainer_const AGATHA ; $2E
|
||||||
trainer_const LANCE ; $2F
|
trainer_const LANCE ; $2F
|
||||||
|
trainer_const YUJIROU ; $0D, was unused juggler, also not 0D but I can't be bothered to change everything
|
||||||
DEF NUM_TRAINERS EQU const_value - 1
|
DEF NUM_TRAINERS EQU const_value - 1
|
||||||
|
|
|
@ -11,7 +11,6 @@ TrainerNames::
|
||||||
db "BIKER@"
|
db "BIKER@"
|
||||||
db "BURGLAR@"
|
db "BURGLAR@"
|
||||||
db "ENGINEER@"
|
db "ENGINEER@"
|
||||||
db "YUJIROU@"
|
|
||||||
db "FISHERMAN@"
|
db "FISHERMAN@"
|
||||||
db "SWIMMER@"
|
db "SWIMMER@"
|
||||||
db "CUE BALL@"
|
db "CUE BALL@"
|
||||||
|
@ -46,3 +45,4 @@ TrainerNames::
|
||||||
db "CHANNELER@"
|
db "CHANNELER@"
|
||||||
db "AGATHA@"
|
db "AGATHA@"
|
||||||
db "LANCE@"
|
db "LANCE@"
|
||||||
|
db "YUJIROU@"
|
||||||
|
|
|
@ -11,7 +11,6 @@ TrainerDataPointers:
|
||||||
dw BikerData
|
dw BikerData
|
||||||
dw BurglarData
|
dw BurglarData
|
||||||
dw EngineerData
|
dw EngineerData
|
||||||
dw YujirouData ; was unused juggler
|
|
||||||
dw FisherData
|
dw FisherData
|
||||||
dw SwimmerData
|
dw SwimmerData
|
||||||
dw CueBallData
|
dw CueBallData
|
||||||
|
@ -46,6 +45,7 @@ TrainerDataPointers:
|
||||||
dw ChannelerData
|
dw ChannelerData
|
||||||
dw AgathaData
|
dw AgathaData
|
||||||
dw LanceData
|
dw LanceData
|
||||||
|
dw YujirouData ; was unused juggler
|
||||||
|
|
||||||
; if first byte != $FF, then
|
; if first byte != $FF, then
|
||||||
; first byte is level (of all pokemon on this team)
|
; first byte is level (of all pokemon on this team)
|
||||||
|
@ -322,11 +322,6 @@ EngineerData:
|
||||||
db 21, MAGNEMITE, 0
|
db 21, MAGNEMITE, 0
|
||||||
db 18, MAGNEMITE, MAGNEMITE, MAGNETITE, 0
|
db 18, MAGNEMITE, MAGNEMITE, MAGNETITE, 0
|
||||||
|
|
||||||
YujirouData: ; was unused juggler
|
|
||||||
db $FF, 7, KONYA, 7, RATTATA, 10, LICKITUNG, 0
|
|
||||||
; post-game rematch team (currently unused)
|
|
||||||
db $FF, 66, PERSIAN, 67, TAUROS, 67, MADAAMU, 66, BLISSEY, 67, SNORLAX, 70, LICKILICKY, 0
|
|
||||||
|
|
||||||
FisherData:
|
FisherData:
|
||||||
; SS Anne 2F Rooms
|
; SS Anne 2F Rooms
|
||||||
db 17, GOLDEEN, TENTACOOL, GOLDEEN, 0
|
db 17, GOLDEEN, TENTACOOL, GOLDEEN, 0
|
||||||
|
@ -858,3 +853,8 @@ LanceData:
|
||||||
db $FF, 58, CROCKY, 57, KINGDRA, 57, AERODACTYL, 59, CHARIZARD, 59, CRYITHAN, 62, DRAGONITE, 0
|
db $FF, 58, CROCKY, 57, KINGDRA, 57, AERODACTYL, 59, CHARIZARD, 59, CRYITHAN, 62, DRAGONITE, 0
|
||||||
; post-game rematch team (currently unused)
|
; post-game rematch team (currently unused)
|
||||||
; db $FF, 78, CROCKY, 77, KINGDRA, 77, AERODACTYL, 79, EXEGGUTOR_A, 79, CRYITHAN, 82, DRAGONITE, 0
|
; db $FF, 78, CROCKY, 77, KINGDRA, 77, AERODACTYL, 79, EXEGGUTOR_A, 79, CRYITHAN, 82, DRAGONITE, 0
|
||||||
|
|
||||||
|
YujirouData: ; was unused juggler
|
||||||
|
db $FF, 7, KONYA, 7, RATTATA, 10, LICKITUNG, 0
|
||||||
|
; post-game rematch team (currently unused)
|
||||||
|
db $FF, 66, PERSIAN, 67, TAUROS, 67, MADAAMU, 66, BLISSEY, 67, SNORLAX, 70, LICKILICKY, 0
|
||||||
|
|
|
@ -19,7 +19,6 @@ TrainerPicAndMoneyPointers::
|
||||||
pic_money BikerPic, 2000
|
pic_money BikerPic, 2000
|
||||||
pic_money BurglarPic, 9000
|
pic_money BurglarPic, 9000
|
||||||
pic_money EngineerPic, 5000
|
pic_money EngineerPic, 5000
|
||||||
pic_money YujirouPic, 9900 ; was unused juggler
|
|
||||||
pic_money FisherPic, 3500
|
pic_money FisherPic, 3500
|
||||||
pic_money SwimmerPic, 500
|
pic_money SwimmerPic, 500
|
||||||
pic_money CueBallPic, 2500
|
pic_money CueBallPic, 2500
|
||||||
|
@ -54,4 +53,5 @@ TrainerPicAndMoneyPointers::
|
||||||
pic_money ChannelerPic, 3000
|
pic_money ChannelerPic, 3000
|
||||||
pic_money AgathaPic, 9900
|
pic_money AgathaPic, 9900
|
||||||
pic_money LancePic, 9900
|
pic_money LancePic, 9900
|
||||||
|
pic_money YujirouPic, 9900 ; was unused juggler
|
||||||
assert_table_length NUM_TRAINERS
|
assert_table_length NUM_TRAINERS
|
||||||
|
|
|
@ -6954,11 +6954,9 @@ _LoadTrainerPic:
|
||||||
ld d, a ; de contains pointer to trainer pic
|
ld d, a ; de contains pointer to trainer pic
|
||||||
ld a, [wLinkState]
|
ld a, [wLinkState]
|
||||||
and a
|
and a
|
||||||
;ld a, BANK("Pics 6") ; this is where all the trainer pics are (not counting Red's)
|
jr nz, .useRed
|
||||||
;jr z, .loadSprite
|
|
||||||
jr nz, .useRed ; New Trainer Pic code, credit to Rangi's Red*/Blue* hack
|
|
||||||
ld a, [wTrainerClass]
|
ld a, [wTrainerClass]
|
||||||
cp YUJIROU ; first trainer class in "Pics 10"
|
cp YUJIROU ; first trainer class in "Pics 10" - Rangi's code to load more trainer pics
|
||||||
ld a, Bank("Pics 10")
|
ld a, Bank("Pics 10")
|
||||||
jr nc, .loadSprite
|
jr nc, .loadSprite
|
||||||
ld a, Bank("Pics 6")
|
ld a, Bank("Pics 6")
|
||||||
|
|
Loading…
Reference in a new issue