mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Naming screen constants
This commit is contained in:
parent
60b09f291d
commit
38bf21ae35
@ -93,3 +93,15 @@ HMENURETURN_ASM EQU %11111111
|
||||
const PARTYMENUTEXT_REVIVE
|
||||
const PARTYMENUTEXT_LEVEL_UP
|
||||
const PARTYMENUTEXT_HEAL_CONFUSION
|
||||
|
||||
; Naming types (see engine/menus/naming_screen.asm)
|
||||
const_def
|
||||
const NAME_MON
|
||||
const NAME_PLAYER
|
||||
const NAME_RIVAL
|
||||
const NAME_MOM
|
||||
const NAME_BOX
|
||||
const NAME_FRIEND
|
||||
const NAME_6 ; duplicate of NAME_MON
|
||||
const NAME_7 ; duplicate of NAME_MON
|
||||
NUM_NAME_TYPES EQU const_value
|
||||
|
@ -32,7 +32,7 @@ _NameRater:
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
ld [wCurSpecies], a
|
||||
call GetBaseData
|
||||
ld b, 0
|
||||
ld b, NAME_MON
|
||||
ld de, wStringBuffer2
|
||||
farcall _NamingScreen
|
||||
; If the new name is empty, treat it as unchanged.
|
||||
|
@ -84,7 +84,7 @@ FoundNone:
|
||||
ret
|
||||
|
||||
NameRival:
|
||||
ld b, $2 ; rival
|
||||
ld b, NAME_RIVAL
|
||||
ld de, wRivalName
|
||||
farcall _NamingScreen
|
||||
; default to "SILVER"
|
||||
|
@ -584,7 +584,7 @@ PokeBallEffect:
|
||||
push de
|
||||
xor a ; PARTYMON
|
||||
ld [wMonType], a
|
||||
ld b, 0
|
||||
ld b, NAME_MON
|
||||
farcall NamingScreen
|
||||
|
||||
call RotateThreePalettesRight
|
||||
@ -637,7 +637,7 @@ PokeBallEffect:
|
||||
ld a, BOXMON
|
||||
ld [wMonType], a
|
||||
ld de, wMonOrItemNameBuffer
|
||||
ld b, $0
|
||||
ld b, NAME_MON
|
||||
farcall NamingScreen
|
||||
|
||||
ld a, BANK(sBoxMonNicknames)
|
||||
|
@ -747,7 +747,7 @@ NamePlayer:
|
||||
ret
|
||||
|
||||
.NewName:
|
||||
ld b, 1
|
||||
ld b, NAME_PLAYER
|
||||
ld de, wPlayerName
|
||||
farcall NamingScreen
|
||||
|
||||
|
@ -61,7 +61,7 @@ NamingScreen:
|
||||
|
||||
.GetNamingScreenSetup:
|
||||
ld a, [wNamingScreenType]
|
||||
and 7
|
||||
maskbits NUM_NAME_TYPES
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .Jumptable
|
||||
@ -73,6 +73,7 @@ NamingScreen:
|
||||
jp hl
|
||||
|
||||
.Jumptable:
|
||||
; entries correspond to NAME_* constants
|
||||
dw .Pokemon
|
||||
dw .Player
|
||||
dw .Rival
|
||||
|
@ -2454,7 +2454,7 @@ BillsPC_ChangeBoxSubmenu:
|
||||
ret
|
||||
|
||||
.Name:
|
||||
ld b, $4 ; box
|
||||
ld b, NAME_BOX
|
||||
ld de, wd002
|
||||
farcall NamingScreen
|
||||
call ClearTileMap
|
||||
|
@ -330,7 +330,7 @@ HatchEggs:
|
||||
xor a
|
||||
ld [wMonType], a
|
||||
push de
|
||||
ld b, $0
|
||||
ld b, NAME_MON
|
||||
farcall NamingScreen
|
||||
pop hl
|
||||
ld de, wStringBuffer1
|
||||
|
@ -1809,7 +1809,7 @@ InitNickname:
|
||||
call DisableSpriteUpdates
|
||||
pop de
|
||||
push de
|
||||
ld b, $0
|
||||
ld b, NAME_MON
|
||||
farcall NamingScreen
|
||||
pop hl
|
||||
ld de, wStringBuffer1
|
||||
|
@ -3487,7 +3487,7 @@ Function8a765:
|
||||
Function8a78c:
|
||||
call Function891fe
|
||||
ld de, wd002
|
||||
ld b, $5
|
||||
ld b, NAME_FRIEND
|
||||
farcall NamingScreen
|
||||
call OpenSRAMBank4
|
||||
call Function8931b
|
||||
|
Loading…
Reference in New Issue
Block a user