pokered/scripts/namerater.asm

108 lines
1.8 KiB
NASM
Raw Normal View History

2016-06-12 00:24:04 +00:00
NameRaterScript:
2014-05-18 18:19:10 +00:00
jp EnableAutoTextBoxDrawing
2016-06-12 00:24:04 +00:00
NameRaterScript_1da15:
2014-05-18 18:19:10 +00:00
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
2014-05-18 18:19:10 +00:00
and a
ret
2016-06-12 00:24:04 +00:00
NameRaterScript_1da20:
ld hl, wPartyMonOT
ld bc, NAME_LENGTH
2014-05-18 18:19:10 +00:00
ld a, [wWhichPokemon]
call AddNTimes
ld de, wPlayerName
ld c, NAME_LENGTH
2014-05-18 18:19:10 +00:00
call .asm_1da47
jr c, .asm_1da52
ld hl, wPartyMon1OTID
2015-08-10 04:56:20 +00:00
ld bc, wPartyMon2 - wPartyMon1
2014-05-18 18:19:10 +00:00
ld a, [wWhichPokemon]
call AddNTimes
ld de, wPlayerID
2014-05-18 18:19:10 +00:00
ld c, $2
.asm_1da47
ld a, [de]
cp [hl]
jr nz, .asm_1da52
2014-05-18 18:19:10 +00:00
inc hl
inc de
dec c
jr nz, .asm_1da47
2014-05-18 18:19:10 +00:00
and a
ret
.asm_1da52
scf
ret
2016-06-12 00:24:04 +00:00
NameRaterTextPointers:
2014-05-18 18:19:10 +00:00
dw NameRaterText1
2016-06-12 00:24:04 +00:00
NameRaterText1:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
call SaveScreenTilesToBuffer2
ld hl, NameRaterText_1dab3
call NameRaterScript_1da15
jr nz, .asm_1daae
2014-05-18 18:19:10 +00:00
ld hl, NameRaterText_1dab8
call PrintText
xor a
ld [wPartyMenuTypeOrMessageID], a
2014-09-13 07:50:56 +00:00
ld [wUpdateSpritesEnabled], a
2014-08-09 05:39:13 +00:00
ld [wMenuItemToSwap], a
2014-05-18 18:19:10 +00:00
call DisplayPartyMenu
push af
call GBPalWhiteOutWithDelay3
call RestoreScreenTilesAndReloadTilePatterns
2014-05-18 18:19:10 +00:00
call LoadGBPal
pop af
jr c, .asm_1daae
2014-05-18 18:19:10 +00:00
call GetPartyMonName2
call NameRaterScript_1da20
ld hl, NameRaterText_1dad1
jr c, .asm_1daa8
2014-05-18 18:19:10 +00:00
ld hl, NameRaterText_1dabd
call NameRaterScript_1da15
jr nz, .asm_1daae
2014-05-18 18:19:10 +00:00
ld hl, NameRaterText_1dac2
call PrintText
callba DisplayNameRaterScreen
jr c, .asm_1daae
2014-05-18 18:19:10 +00:00
ld hl, NameRaterText_1dac7
.asm_1daa8
call PrintText
jp TextScriptEnd
.asm_1daae
ld hl, NameRaterText_1dacc
jr .asm_1daa8
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
NameRaterText_1dab3:
2014-05-18 18:19:10 +00:00
TX_FAR _NameRaterText_1dab3
db "@"
2016-06-12 00:24:04 +00:00
NameRaterText_1dab8:
2014-05-18 18:19:10 +00:00
TX_FAR _NameRaterText_1dab8
db "@"
2016-06-12 00:24:04 +00:00
NameRaterText_1dabd:
2014-05-18 18:19:10 +00:00
TX_FAR _NameRaterText_1dabd
db "@"
2016-06-12 00:24:04 +00:00
NameRaterText_1dac2:
2014-05-18 18:19:10 +00:00
TX_FAR _NameRaterText_1dac2
db "@"
2016-06-12 00:24:04 +00:00
NameRaterText_1dac7:
2014-05-18 18:19:10 +00:00
TX_FAR _NameRaterText_1dac7
db "@"
2016-06-12 00:24:04 +00:00
NameRaterText_1dacc:
2014-05-18 18:19:10 +00:00
TX_FAR _NameRaterText_1dacc
db "@"
2016-06-12 00:24:04 +00:00
NameRaterText_1dad1:
2014-05-18 18:19:10 +00:00
TX_FAR _NameRaterText_1dad1
db "@"