Naming screen constants

This commit is contained in:
Rangi 2018-09-16 16:02:58 -04:00
parent 60b09f291d
commit 38bf21ae35
10 changed files with 23 additions and 10 deletions

View File

@ -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

View File

@ -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.

View File

@ -84,7 +84,7 @@ FoundNone:
ret
NameRival:
ld b, $2 ; rival
ld b, NAME_RIVAL
ld de, wRivalName
farcall _NamingScreen
; default to "SILVER"

View File

@ -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)

View File

@ -747,7 +747,7 @@ NamePlayer:
ret
.NewName:
ld b, 1
ld b, NAME_PLAYER
ld de, wPlayerName
farcall NamingScreen

View File

@ -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

View File

@ -2454,7 +2454,7 @@ BillsPC_ChangeBoxSubmenu:
ret
.Name:
ld b, $4 ; box
ld b, NAME_BOX
ld de, wd002
farcall NamingScreen
call ClearTileMap

View File

@ -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

View File

@ -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

View File

@ -3487,7 +3487,7 @@ Function8a765:
Function8a78c:
call Function891fe
ld de, wd002
ld b, $5
ld b, NAME_FRIEND
farcall NamingScreen
call OpenSRAMBank4
call Function8931b