mirror of
https://github.com/pret/pokegold.git
synced 2026-04-25 16:20:19 -05:00
Separate constants for name types and naming screen types
This commit is contained in:
parent
b3305e76af
commit
359d7ae325
|
|
@ -125,4 +125,4 @@ DEF NUM_PARTYMENUACTIONS EQU const_value
|
|||
const NAME_FRIEND
|
||||
const NAME_6 ; duplicate of NAME_MON
|
||||
const NAME_7 ; duplicate of NAME_MON
|
||||
DEF NUM_NAME_TYPES EQU const_value
|
||||
DEF NUM_NAMING_SCREEN_TYPES EQU const_value
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ DEF NAME_LENGTH_JAPANESE EQU 6
|
|||
const ENEMY_OT_NAME ; 6
|
||||
const TRAINER_NAME ; 7
|
||||
const MOVE_DESC_NAME_BROKEN ; 8
|
||||
DEF NUM_NAME_TYPES EQU const_value - 1
|
||||
|
||||
; see home/text.asm
|
||||
DEF BORDER_WIDTH EQU 2
|
||||
|
|
|
|||
|
|
@ -61,10 +61,10 @@ NamingScreen:
|
|||
|
||||
.GetNamingScreenSetup:
|
||||
ld a, [wNamingScreenType]
|
||||
maskbits NUM_NAME_TYPES
|
||||
maskbits NUM_NAMING_SCREEN_TYPES
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .Jumptable
|
||||
ld hl, NamingScreenJumptable
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
|
|
@ -72,8 +72,9 @@ NamingScreen:
|
|||
ld l, a
|
||||
jp hl
|
||||
|
||||
.Jumptable:
|
||||
; entries correspond to NAME_* constants
|
||||
NamingScreenJumptable:
|
||||
; entries correspond to NAME_* constants (see constants/menu_constants.asm)
|
||||
table_width 2
|
||||
dw .Pokemon
|
||||
dw .Player
|
||||
dw .Rival
|
||||
|
|
@ -82,6 +83,7 @@ NamingScreen:
|
|||
dw .Pokemon
|
||||
dw .Pokemon
|
||||
dw .Pokemon
|
||||
assert_table_length NUM_NAMING_SCREEN_TYPES
|
||||
|
||||
.Pokemon:
|
||||
ld a, [wCurPartySpecies]
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
NamesPointers::
|
||||
; entries correspond to GetName constants (see constants/text_constants.asm)
|
||||
table_width 3
|
||||
dba PokemonNames ; MON_NAME (not used; jumps to GetPokemonName)
|
||||
dba MoveNames ; MOVE_NAME
|
||||
dba NULL ; DUMMY_NAME
|
||||
dba ItemNames ; ITEM_NAME
|
||||
dbw 0, wPartyMonOTs ; PARTY_OT_NAME
|
||||
dbw 0, wOTPartyMonOTs ; ENEMY_OT_NAME
|
||||
dbw 0, wPartyMonOTs ; PARTY_OT_NAME
|
||||
dbw 0, wOTPartyMonOTs ; ENEMY_OT_NAME
|
||||
dba TrainerClassNames ; TRAINER_NAME
|
||||
dbw 4, MoveDescriptions ; MOVE_DESC_NAME_BROKEN (wrong bank)
|
||||
assert_table_length NUM_NAME_TYPES
|
||||
|
||||
GetName::
|
||||
; Return name wCurSpecies from name list wNamedObjectType in wStringBuffer1.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user