mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Use constants to delineate map types, and factor out more data
This commit is contained in:
parent
70eac3a1f7
commit
bfd9f617c9
17 changed files with 126 additions and 135 deletions
|
|
@ -4,7 +4,7 @@ PrintCardKeyText:
|
|||
ld b, a
|
||||
.silphCoMapListLoop
|
||||
ld a, [hli]
|
||||
cp $ff
|
||||
cp -1
|
||||
ret z
|
||||
cp b
|
||||
jr nz, .silphCoMapListLoop
|
||||
|
|
@ -58,18 +58,7 @@ PrintCardKeyText:
|
|||
ldh [hSpriteIndexOrTextID], a
|
||||
jp PrintPredefTextID
|
||||
|
||||
SilphCoMapList:
|
||||
db SILPH_CO_2F
|
||||
db SILPH_CO_3F
|
||||
db SILPH_CO_4F
|
||||
db SILPH_CO_5F
|
||||
db SILPH_CO_6F
|
||||
db SILPH_CO_7F
|
||||
db SILPH_CO_8F
|
||||
db SILPH_CO_9F
|
||||
db SILPH_CO_10F
|
||||
db SILPH_CO_11F
|
||||
db $FF
|
||||
INCLUDE "data/events/card_key_maps.asm"
|
||||
|
||||
CardKeySuccessText::
|
||||
text_far _CardKeySuccessText1
|
||||
|
|
|
|||
|
|
@ -83,17 +83,18 @@ UnusedPlayerNameLengthFunc:
|
|||
dec c
|
||||
jr .loop
|
||||
|
||||
diploma_text: MACRO
|
||||
dw \3
|
||||
dwcoord \1, \2
|
||||
ENDM
|
||||
|
||||
DiplomaTextPointersAndCoords:
|
||||
dw DiplomaText
|
||||
dwcoord 5, 2
|
||||
dw DiplomaPlayer
|
||||
dwcoord 3, 4
|
||||
dw DiplomaEmptyText
|
||||
dwcoord 15, 4
|
||||
dw DiplomaCongrats
|
||||
dwcoord 2, 6
|
||||
dw DiplomaGameFreak
|
||||
dwcoord 9, 16
|
||||
; x, y, text
|
||||
diploma_text 5, 2, DiplomaText
|
||||
diploma_text 3, 4, DiplomaPlayer
|
||||
diploma_text 15, 4, DiplomaEmptyText
|
||||
diploma_text 2, 6, DiplomaCongrats
|
||||
diploma_text 9, 16, DiplomaGameFreak
|
||||
|
||||
DiplomaText:
|
||||
db CIRCLE_TILE_ID, "Diploma", CIRCLE_TILE_ID, "@"
|
||||
|
|
|
|||
|
|
@ -17,30 +17,11 @@ PrintBenchGuyText:
|
|||
ld b, a
|
||||
ld a, [wSpritePlayerStateData1FacingDirection]
|
||||
cp b
|
||||
jr nz, .loop ; player isn't facing left at the bench guy
|
||||
jr nz, .loop ; player isn't facing the bench guy
|
||||
ld a, [hl]
|
||||
jp PrintPredefTextID
|
||||
|
||||
bench_guy_text: MACRO
|
||||
db \1, \2
|
||||
db_tx_pre \3
|
||||
ENDM
|
||||
|
||||
BenchGuyTextPointers:
|
||||
; map id, player facing direction, predef text
|
||||
bench_guy_text VIRIDIAN_POKECENTER, SPRITE_FACING_LEFT, ViridianCityPokecenterBenchGuyText
|
||||
bench_guy_text PEWTER_POKECENTER, SPRITE_FACING_LEFT, PewterCityPokecenterBenchGuyText
|
||||
bench_guy_text CERULEAN_POKECENTER, SPRITE_FACING_LEFT, CeruleanCityPokecenterBenchGuyText
|
||||
bench_guy_text LAVENDER_POKECENTER, SPRITE_FACING_LEFT, LavenderCityPokecenterBenchGuyText
|
||||
bench_guy_text VERMILION_POKECENTER, SPRITE_FACING_LEFT, VermilionCityPokecenterBenchGuyText
|
||||
bench_guy_text CELADON_POKECENTER, SPRITE_FACING_LEFT, CeladonCityPokecenterBenchGuyText
|
||||
bench_guy_text CELADON_HOTEL, SPRITE_FACING_LEFT, CeladonCityHotelText
|
||||
bench_guy_text FUCHSIA_POKECENTER, SPRITE_FACING_LEFT, FuchsiaCityPokecenterBenchGuyText
|
||||
bench_guy_text CINNABAR_POKECENTER, SPRITE_FACING_LEFT, CinnabarIslandPokecenterBenchGuyText
|
||||
bench_guy_text SAFFRON_POKECENTER, SPRITE_FACING_LEFT, SaffronCityPokecenterBenchGuyText
|
||||
bench_guy_text MT_MOON_POKECENTER, SPRITE_FACING_LEFT, MtMoonPokecenterBenchGuyText
|
||||
bench_guy_text ROCK_TUNNEL_POKECENTER, SPRITE_FACING_LEFT, RockTunnelPokecenterBenchGuyText
|
||||
db -1 ; end
|
||||
INCLUDE "data/events/bench_guys.asm"
|
||||
|
||||
ViridianCityPokecenterBenchGuyText::
|
||||
text_far _ViridianCityPokecenterGuyText
|
||||
|
|
|
|||
|
|
@ -56,38 +56,22 @@ PokedexRatingText_441cc:
|
|||
text_end
|
||||
|
||||
DexRatingsTable:
|
||||
db 10
|
||||
dw PokedexRatingText_44201
|
||||
db 20
|
||||
dw PokedexRatingText_44206
|
||||
db 30
|
||||
dw PokedexRatingText_4420b
|
||||
db 40
|
||||
dw PokedexRatingText_44210
|
||||
db 50
|
||||
dw PokedexRatingText_44215
|
||||
db 60
|
||||
dw PokedexRatingText_4421a
|
||||
db 70
|
||||
dw PokedexRatingText_4421f
|
||||
db 80
|
||||
dw PokedexRatingText_44224
|
||||
db 90
|
||||
dw PokedexRatingText_44229
|
||||
db 100
|
||||
dw PokedexRatingText_4422e
|
||||
db 110
|
||||
dw PokedexRatingText_44233
|
||||
db 120
|
||||
dw PokedexRatingText_44238
|
||||
db 130
|
||||
dw PokedexRatingText_4423d
|
||||
db 140
|
||||
dw PokedexRatingText_44242
|
||||
db 150
|
||||
dw PokedexRatingText_44247
|
||||
db NUM_POKEMON + 1
|
||||
dw PokedexRatingText_4424c
|
||||
dbw 10, PokedexRatingText_44201
|
||||
dbw 20, PokedexRatingText_44206
|
||||
dbw 30, PokedexRatingText_4420b
|
||||
dbw 40, PokedexRatingText_44210
|
||||
dbw 50, PokedexRatingText_44215
|
||||
dbw 60, PokedexRatingText_4421a
|
||||
dbw 70, PokedexRatingText_4421f
|
||||
dbw 80, PokedexRatingText_44224
|
||||
dbw 90, PokedexRatingText_44229
|
||||
dbw 100, PokedexRatingText_4422e
|
||||
dbw 110, PokedexRatingText_44233
|
||||
dbw 120, PokedexRatingText_44238
|
||||
dbw 130, PokedexRatingText_4423d
|
||||
dbw 140, PokedexRatingText_44242
|
||||
dbw 150, PokedexRatingText_44247
|
||||
dbw NUM_POKEMON + 1, PokedexRatingText_4424c
|
||||
|
||||
PokedexRatingText_44201:
|
||||
text_far _OaksLabText_44201
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue