Separate constants for name types and naming screen types
This commit is contained in:
@@ -126,4 +126,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,16 +72,18 @@ 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
|
||||
dw .Mom
|
||||
dw .Box
|
||||
dw .Tomodachi
|
||||
dw .Friend
|
||||
dw .Pokemon
|
||||
dw .Pokemon
|
||||
assert_table_length NUM_NAMING_SCREEN_TYPES
|
||||
|
||||
.Pokemon:
|
||||
ld a, [wCurPartySpecies]
|
||||
@@ -180,14 +182,14 @@ NamingScreen:
|
||||
.BoxNameString:
|
||||
db "BOX NAME?@"
|
||||
|
||||
.Tomodachi:
|
||||
.Friend:
|
||||
hlcoord 3, 2
|
||||
ld de, .oTomodachi_no_namae_sutoringu
|
||||
ld de, .FriendsNameString
|
||||
call PlaceString
|
||||
call .StoreSpriteIconParams
|
||||
ret
|
||||
|
||||
.oTomodachi_no_namae_sutoringu
|
||||
.FriendsNameString:
|
||||
db "おともだち の なまえは?@"
|
||||
|
||||
.LoadSprite:
|
||||
|
@@ -1,5 +1,6 @@
|
||||
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
|
||||
@@ -8,6 +9,7 @@ NamesPointers::
|
||||
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.
|
||||
|
Reference in New Issue
Block a user