named party menu/naming screen wram variables

This commit is contained in:
YamaArashi 2015-07-13 15:40:33 -07:00
parent f66a74b9fc
commit 0066e09828
14 changed files with 105 additions and 75 deletions

View file

@ -27,8 +27,8 @@ AskName: ; 64eb (1:64eb)
xor a
ld [wUpdateSpritesEnabled], a
push hl
ld a, $2
ld [wd07d], a
ld a, NAME_MON_SCREEN
ld [wNamingScreenType], a
call DisplayNamingScreen
ld a, [W_ISINBATTLE]
and a
@ -53,12 +53,12 @@ DoYouWantToNicknameText: ; 0x6557
TX_FAR _DoYouWantToNicknameText
db "@"
Func_655c: ; 655c (1:655c)
DisplayNameRaterScreen: ; 655c (1:655c)
ld hl, wHPBarMaxHP
xor a
ld [wUpdateSpritesEnabled], a
ld a, $2
ld [wd07d], a
ld a, NAME_MON_SCREEN
ld [wNamingScreenType], a
call DisplayNamingScreen
call GBPalWhiteOutWithDelay3
call RestoreScreenTilesAndReloadTilePatterns
@ -236,8 +236,8 @@ DisplayNamingScreen: ; 6596 (1:6596)
cp $e4
ld de, Handakutens
jr z, .asm_66e3
ld a, [wd07d]
cp $2
ld a, [wNamingScreenType]
cp NAME_MON_SCREEN
jr nc, .checkMonNameLength
ld a, [wHPBarMaxHP]
cp $7 ; max length of player/rival names
@ -377,8 +377,8 @@ Func_680e: ; 680e (1:680e)
ld de, wcf4b
call PlaceString
hlCoord 10, 3
ld a, [wd07d]
cp $2
ld a, [wNamingScreenType]
cp NAME_MON_SCREEN
jr nc, .asm_6835
ld b, $7
jr .asm_6837
@ -390,8 +390,8 @@ Func_680e: ; 680e (1:680e)
ld [hli], a
dec b
jr nz, .asm_6839
ld a, [wd07d]
cp $2
ld a, [wNamingScreenType]
cp NAME_MON_SCREEN
ld a, [wHPBarMaxHP]
jr nc, .asm_684b
cp $7
@ -405,8 +405,8 @@ Func_680e: ; 680e (1:680e)
ld [wTopMenuItemX], a
ld a, $5
ld [wCurrentMenuItem], a
ld a, [wd07d]
cp $2
ld a, [wNamingScreenType]
cp NAME_MON_SCREEN
ld a, $9
jr nc, .asm_6867
ld a, $6
@ -462,7 +462,7 @@ CalcStringLength: ; 68eb (1:68eb)
PrintNamingText: ; 68f8 (1:68f8)
hlCoord 0, 1
ld a, [wd07d]
ld a, [wNamingScreenType]
ld de, YourTextString
and a
jr z, .notNickname

View file

@ -1,4 +1,4 @@
; [wd07d] = menu type / message ID
; [wPartyMenuTypeOrMessageID] = menu type / message ID
; if less than $F0, it is a menu type
; menu types:
; 00: normal pokemon menu (e.g. Start menu)
@ -25,11 +25,11 @@ DrawPartyMenu_: ; 12cd2 (4:6cd2)
callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
RedrawPartyMenu_: ; 12ce3 (4:6ce3)
ld a,[wd07d]
cp a,$04
ld a,[wPartyMenuTypeOrMessageID]
cp a,SWAP_MONS_PARTY_MENU
jp z,.printMessage
call ErasePartyMenuCursors
callba SendBlkPacket_PartyMenu ; loads some data to wcf2e
callba SendBlkPacket_PartyMenu
hlCoord 3, 0
ld de,wPartySpecies
xor a
@ -75,10 +75,10 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
inc hl
inc hl
.skipUnfilledRightArrow
ld a,[wd07d] ; menu type
cp a,$03
ld a,[wPartyMenuTypeOrMessageID] ; menu type
cp a,TMHM_PARTY_MENU
jr z,.teachMoveMenu
cp a,$05
cp a,EVO_STONE_PARTY_MENU
jr z,.evolutionStoneMenu
push hl
ld bc,14 ; 14 columns to the right
@ -196,7 +196,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
push af
push hl
set 6,[hl] ; turn off letter printing delay
ld a,[wd07d] ; message ID
ld a,[wPartyMenuTypeOrMessageID] ; message ID
cp a,$F0
jr nc,.printItemUseMessage
add a

View file

@ -12,14 +12,14 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
jp z,RedisplayStartMenu
xor a
ld [wMenuItemToSwap],a
ld [wd07d],a
ld [wPartyMenuTypeOrMessageID],a
ld [wUpdateSpritesEnabled],a
call DisplayPartyMenu
jr .checkIfPokemonChosen
.loop
xor a
ld [wMenuItemToSwap],a
ld [wd07d],a
ld [wPartyMenuTypeOrMessageID],a
call GoBackToPartyMenu
.checkIfPokemonChosen
jr nc,.chosePokemon
@ -89,8 +89,8 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
cp a,2 ; is there more than one pokemon in the party?
jp c,StartMenu_Pokemon ; if not, no switching
call SwitchPartyMon_Stats
ld a,$04 ; swap pokemon positions menu
ld [wd07d],a
ld a,SWAP_MONS_PARTY_MENU
ld [wPartyMenuTypeOrMessageID],a
call GoBackToPartyMenu
jp .checkIfPokemonChosen
.choseStats
@ -747,7 +747,7 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ret
.asm_13661
xor a
ld [wd07d], a
ld [wPartyMenuTypeOrMessageID], a
ld a, [wMenuItemToSwap]
dec a
ld b, a
@ -757,7 +757,7 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
jr nz, .asm_1367b
xor a
ld [wMenuItemToSwap], a
ld [wd07d], a
ld [wPartyMenuTypeOrMessageID], a
ret
.asm_1367b
ld a, b
@ -845,7 +845,7 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld [wWhichTrade], a
xor a
ld [wMenuItemToSwap], a
ld [wd07d], a
ld [wPartyMenuTypeOrMessageID], a
pop de
pop hl
ret