Organize mobile/battle_tower_*.asm data and code

This commit is contained in:
Remy Oukaour 2018-01-06 18:53:30 -05:00
parent 9069a395db
commit bdd3a55333
14 changed files with 188 additions and 178 deletions

View File

@ -12,6 +12,7 @@ ENDM
; - TrainerEncounterMusic (see data/trainers/encounter_music.asm) ; - TrainerEncounterMusic (see data/trainers/encounter_music.asm)
; - TrainerPicPointers (see data/trainers/pic_pointers.asm) ; - TrainerPicPointers (see data/trainers/pic_pointers.asm)
; - TrainerPalettes (see data/trainers/palettes.asm) ; - TrainerPalettes (see data/trainers/palettes.asm)
; - BTTrainerClassSprites (see data/trainers/sprites.asm)
; - BTTrainerClassGenders (see data/trainers/genders.asm) ; - BTTrainerClassGenders (see data/trainers/genders.asm)
; trainer constants are Trainers indexes, for the sub-tables of TrainerGroups (see data/trainers/parties.asm) ; trainer constants are Trainers indexes, for the sub-tables of TrainerGroups (see data/trainers/parties.asm)
enum_start enum_start

View File

@ -0,0 +1,35 @@
Unknown_170470:
db $12
db $24
db $45
db $45
db $42
db $42
db $45
db $42
db $27
db $27
db $45
db $27
db $42
db $24
Unknown_17047e:
db $03, 4
db $05, 8
db $03, 5
db $0e, 6
db $03, 2
db $00, 0
db $39, 7
db $07, 4
db $00, 5
db $04, 7
db $01, 5
db $00, 0
db $0f, 5
db $14, 7
db $05, 5
db $11, 12
db $0c, 6
db $06, 4

View File

@ -1,3 +1,5 @@
; Used by GetMobileOTTrainerClass
MaleTrainers: ; 4e95d MaleTrainers: ; 4e95d
db BURGLAR db BURGLAR
db YOUNGSTER db YOUNGSTER

71
data/trainers/genders.asm Normal file
View File

@ -0,0 +1,71 @@
; Used by
BTTrainerClassGenders: ; 11f2f0
; entries correspond to trainer classes
db MALE ; FALKNER
db FEMALE ; WHITNEY
db FEMALE ; BUGSY
db MALE ; MORTY
db MALE ; PRYCE
db FEMALE ; JASMINE
db MALE ; CHUCK
db FEMALE ; CLAIR
db MALE ; RIVAL1
db MALE ; POKEMON_PROF
db FEMALE ; WILL
db MALE ; CAL
db MALE ; BRUNO
db FEMALE ; KAREN
db MALE ; KOGA
db MALE ; CHAMPION
db MALE ; BROCK
db FEMALE ; MISTY
db MALE ; LT_SURGE
db MALE ; SCIENTIST
db FEMALE ; ERIKA
db MALE ; YOUNGSTER
db MALE ; SCHOOLBOY
db MALE ; BIRD_KEEPER
db FEMALE ; LASS
db FEMALE ; JANINE
db MALE ; COOLTRAINERM
db FEMALE ; COOLTRAINERF
db FEMALE ; BEAUTY
db MALE ; POKEMANIAC
db MALE ; GRUNTM
db MALE ; GENTLEMAN
db FEMALE ; SKIER
db FEMALE ; TEACHER
db FEMALE ; SABRINA
db MALE ; BUG_CATCHER
db MALE ; FISHER
db MALE ; SWIMMERM
db FEMALE ; SWIMMERF
db MALE ; SAILOR
db MALE ; SUPER_NERD
db MALE ; RIVAL2
db MALE ; GUITARIST
db MALE ; HIKER
db MALE ; BIKER
db MALE ; BLAINE
db MALE ; BURGLAR
db MALE ; FIREBREATHER
db MALE ; JUGGLER
db MALE ; BLACKBELT_T
db MALE ; EXECUTIVEM
db MALE ; PSYCHIC_T
db FEMALE ; PICNICKER
db MALE ; CAMPER
db FEMALE ; EXECUTIVEF
db MALE ; SAGE
db FEMALE ; MEDIUM
db MALE ; BOARDER
db MALE ; POKEFANM
db FEMALE ; KIMONO_GIRL
db FEMALE ; TWINS
db FEMALE ; POKEFANF
db MALE ; RED
db MALE ; BLUE
db MALE ; OFFICER
db FEMALE ; GRUNTF
; 11f332

68
data/trainers/sprites.asm Normal file
View File

@ -0,0 +1,68 @@
BTTrainerClassSprites:
; entries correspond to trainer classes
db SPRITE_FALKNER
db SPRITE_WHITNEY
db SPRITE_BUGSY
db SPRITE_MORTY
db SPRITE_PRYCE
db SPRITE_JASMINE
db SPRITE_CHUCK
db SPRITE_CLAIR
db SPRITE_SILVER
db SPRITE_OAK
db SPRITE_WILL
db SPRITE_CHRIS
db SPRITE_BRUNO
db SPRITE_KAREN
db SPRITE_KOGA
db SPRITE_LANCE
db SPRITE_BROCK
db SPRITE_MISTY
db SPRITE_SURGE
db SPRITE_SCIENTIST
db SPRITE_ERIKA
db SPRITE_YOUNGSTER
db SPRITE_YOUNGSTER
db SPRITE_YOUNGSTER
db SPRITE_LASS
db SPRITE_JANINE
db SPRITE_COOLTRAINER_M
db SPRITE_COOLTRAINER_F
db SPRITE_BUENA
db SPRITE_SUPER_NERD
db SPRITE_ROCKET
db SPRITE_GENTLEMAN
db SPRITE_BUENA
db SPRITE_TEACHER
db SPRITE_SABRINA
db SPRITE_BUG_CATCHER
db SPRITE_FISHER
db SPRITE_SUPER_NERD
db SPRITE_COOLTRAINER_F
db SPRITE_SAILOR
db SPRITE_SUPER_NERD
db SPRITE_BLUE
db SPRITE_ROCKER
db SPRITE_POKEFAN_M
db SPRITE_BIKER
db SPRITE_BLAINE
db SPRITE_PHARMACIST
db SPRITE_FISHER
db SPRITE_SUPER_NERD
db SPRITE_BLACK_BELT
db SPRITE_ROCKET
db SPRITE_YOUNGSTER
db SPRITE_LASS
db SPRITE_YOUNGSTER
db SPRITE_ROCKET_GIRL
db SPRITE_SAGE
db SPRITE_GRANNY
db SPRITE_ROCKER
db SPRITE_POKEFAN_M
db SPRITE_KIMONO_GIRL
db SPRITE_TWIN
db SPRITE_POKEFAN_F
db SPRITE_RED
db SPRITE_BLUE
db SPRITE_OFFICER
db SPRITE_ROCKET_GIRL

View File

@ -570,42 +570,7 @@ Function17042c: ; 17042c
ret ret
; 170470 ; 170470
Unknown_170470: INCLUDE "data/battle_tower/unknown_levels.asm"
db $12
db $24
db $45
db $45
db $42
db $42
db $45
db $42
db $27
db $27
db $45
db $27
db $42
db $24
Unknown_17047e:
; see data/battle_tower_2.asm
db $03, 4
db $05, 8
db $03, 5
db $0e, 6
db $03, 2
db $00, 0
db $39, 7
db $07, 4
db $00, 5
db $04, 7
db $01, 5
db $00, 0
db $0f, 5
db $14, 7
db $05, 5
db $11, 12
db $0c, 6
db $06, 4
CopyBTTrainer_FromBT_OT_TowBT_OTTemp: ; 1704a2 CopyBTTrainer_FromBT_OT_TowBT_OTTemp: ; 1704a2
@ -1653,7 +1618,7 @@ Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
ld b, $0 ld b, $0
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ld hl, .Sprites ld hl, BTTrainerClassSprites
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
ld [wBTTempOTSprite], a ld [wBTTempOTSprite], a
@ -1685,73 +1650,7 @@ Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
ret ret
; 170b90 ; 170b90
.Sprites: INCLUDE "data/trainers/sprites.asm"
db SPRITE_FALKNER
db SPRITE_WHITNEY
db SPRITE_BUGSY
db SPRITE_MORTY
db SPRITE_PRYCE
db SPRITE_JASMINE
db SPRITE_CHUCK
db SPRITE_CLAIR
db SPRITE_SILVER
db SPRITE_OAK
db SPRITE_WILL
db SPRITE_CHRIS
db SPRITE_BRUNO
db SPRITE_KAREN
db SPRITE_KOGA
db SPRITE_LANCE
db SPRITE_BROCK
db SPRITE_MISTY
db SPRITE_SURGE
db SPRITE_SCIENTIST
db SPRITE_ERIKA
db SPRITE_YOUNGSTER
db SPRITE_YOUNGSTER
db SPRITE_YOUNGSTER
db SPRITE_LASS
db SPRITE_JANINE
db SPRITE_COOLTRAINER_M
db SPRITE_COOLTRAINER_F
db SPRITE_BUENA
db SPRITE_SUPER_NERD
db SPRITE_ROCKET
db SPRITE_GENTLEMAN
db SPRITE_BUENA
db SPRITE_TEACHER
db SPRITE_SABRINA
db SPRITE_BUG_CATCHER
db SPRITE_FISHER
db SPRITE_SUPER_NERD
db SPRITE_COOLTRAINER_F
db SPRITE_SAILOR
db SPRITE_SUPER_NERD
db SPRITE_BLUE
db SPRITE_ROCKER
db SPRITE_POKEFAN_M
db SPRITE_BIKER
db SPRITE_BLAINE
db SPRITE_PHARMACIST
db SPRITE_FISHER
db SPRITE_SUPER_NERD
db SPRITE_BLACK_BELT
db SPRITE_ROCKET
db SPRITE_YOUNGSTER
db SPRITE_LASS
db SPRITE_YOUNGSTER
db SPRITE_ROCKET_GIRL
db SPRITE_SAGE
db SPRITE_GRANNY
db SPRITE_ROCKER
db SPRITE_POKEFAN_M
db SPRITE_KIMONO_GIRL
db SPRITE_TWIN
db SPRITE_POKEFAN_F
db SPRITE_RED
db SPRITE_BLUE
db SPRITE_OFFICER
db SPRITE_ROCKET_GIRL
ret_170bd2: ; 170bd2 ret_170bd2: ; 170bd2
ret ret

View File

@ -207,4 +207,4 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081
ret ret
; 1f814e ; 1f814e
INCLUDE "data/battle_tower.asm" INCLUDE "data/battle_tower/parties.asm"

View File

@ -87,73 +87,7 @@ endc
INCLUDE "mobile/fixed_words.asm" INCLUDE "mobile/fixed_words.asm"
BTTrainerClassGenders: ; 11f2f0 INCLUDE "data/trainers/genders.asm"
db MALE ; FALKNER
db FEMALE ; WHITNEY
db FEMALE ; BUGSY
db MALE ; MORTY
db MALE ; PRYCE
db FEMALE ; JASMINE
db MALE ; CHUCK
db FEMALE ; CLAIR
db MALE ; RIVAL1
db MALE ; POKEMON_PROF
db FEMALE ; WILL
db MALE ; CAL
db MALE ; BRUNO
db FEMALE ; KAREN
db MALE ; KOGA
db MALE ; CHAMPION
db MALE ; BROCK
db FEMALE ; MISTY
db MALE ; LT_SURGE
db MALE ; SCIENTIST
db FEMALE ; ERIKA
db MALE ; YOUNGSTER
db MALE ; SCHOOLBOY
db MALE ; BIRD_KEEPER
db FEMALE ; LASS
db FEMALE ; JANINE
db MALE ; COOLTRAINERM
db FEMALE ; COOLTRAINERF
db FEMALE ; BEAUTY
db MALE ; POKEMANIAC
db MALE ; GRUNTM
db MALE ; GENTLEMAN
db FEMALE ; SKIER
db FEMALE ; TEACHER
db FEMALE ; SABRINA
db MALE ; BUG_CATCHER
db MALE ; FISHER
db MALE ; SWIMMERM
db FEMALE ; SWIMMERF
db MALE ; SAILOR
db MALE ; SUPER_NERD
db MALE ; RIVAL2
db MALE ; GUITARIST
db MALE ; HIKER
db MALE ; BIKER
db MALE ; BLAINE
db MALE ; BURGLAR
db MALE ; FIREBREATHER
db MALE ; JUGGLER
db MALE ; BLACKBELT_T
db MALE ; EXECUTIVEM
db MALE ; PSYCHIC_T
db FEMALE ; PICNICKER
db MALE ; CAMPER
db FEMALE ; EXECUTIVEF
db MALE ; SAGE
db FEMALE ; MEDIUM
db MALE ; BOARDER
db MALE ; POKEFANM
db FEMALE ; KIMONO_GIRL
db FEMALE ; TWINS
db FEMALE ; POKEFANF
db MALE ; RED
db MALE ; BLUE
db MALE ; OFFICER
db FEMALE ; GRUNTF
BTMaleTrainerTexts: ; 11f332 BTMaleTrainerTexts: ; 11f332

View File

@ -244,7 +244,7 @@ INCLUDE "engine/stats_screen.asm"
INCLUDE "engine/events/catch_tutorial.asm" INCLUDE "engine/events/catch_tutorial.asm"
INCLUDE "engine/evolution_animation.asm" INCLUDE "engine/evolution_animation.asm"
INCLUDE "engine/init_hof_credits.asm" INCLUDE "engine/init_hof_credits.asm"
INCLUDE "mobile/get_trainer_class.asm" INCLUDE "engine/events/battle_tower/get_trainer_class.asm"
INCLUDE "engine/battle/sliding_intro.asm" INCLUDE "engine/battle/sliding_intro.asm"
INCLUDE "mobile/print_opp_message.asm" INCLUDE "mobile/print_opp_message.asm"
INCLUDE "engine/battle/checkbattlescene.asm" INCLUDE "engine/battle/checkbattlescene.asm"
@ -321,7 +321,7 @@ INCLUDE "mobile/mobile_22.asm"
INCLUDE "engine/events/crystal_unown.asm" INCLUDE "engine/events/crystal_unown.asm"
INCLUDE "engine/events/buena.asm" INCLUDE "engine/events/buena.asm"
INCLUDE "engine/events/dratini.asm" INCLUDE "engine/events/dratini.asm"
INCLUDE "engine/events/battle_tower_rules.asm" INCLUDE "engine/events/battle_tower/rules.asm"
INCLUDE "mobile/mobile_22_2.asm" INCLUDE "mobile/mobile_22_2.asm"
@ -534,7 +534,7 @@ INCLUDE "mobile/mobile_46.asm"
SECTION "Battle Tower", ROMX SECTION "Battle Tower", ROMX
INCLUDE "mobile/battle_tower_47.asm" INCLUDE "engine/events/battle_tower/trainer_text.asm"
SECTION "bank5B", ROMX SECTION "bank5B", ROMX
@ -629,7 +629,7 @@ INCLUDE "text/battle_tower.asm"
SECTION "Battle Tower Trainer Data", ROMX SECTION "Battle Tower Trainer Data", ROMX
INCLUDE "data/battle_tower_2.asm" INCLUDE "data/battle_tower/unknown.asm"
SECTION "Mobile News Data", ROMX SECTION "Mobile News Data", ROMX
@ -639,7 +639,7 @@ INCLUDE "mobile/news/news.asm"
SECTION "Crystal Events", ROMX SECTION "Crystal Events", ROMX
INCLUDE "engine/events/battle_tower.asm" INCLUDE "engine/events/battle_tower/load_trainer.asm"
INCLUDE "engine/events/odd_egg.asm" INCLUDE "engine/events/odd_egg.asm"

View File

@ -75,7 +75,7 @@ Function17005a: ; 17005a
; 1700b0 ; 1700b0
INCLUDE "mobile/battle_tower_5c.asm" INCLUDE "engine/events/battle_tower/battle_tower.asm"
Function170be4: ; 170be4 Function170be4: ; 170be4
ld a, $5 ld a, $5