pokered/scripts/NameRatersHouse.asm

108 lines
1.8 KiB
NASM
Raw Normal View History

NameRatersHouse_Script:
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
NameRatersHouse_TextPointers:
2014-05-18 18:19:10 +00:00
dw NameRaterText1
2016-06-12 00:24:04 +00:00
NameRaterText1:
text_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
farcall 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:
text_far _NameRaterText_1dab3
text_end
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
NameRaterText_1dab8:
text_far _NameRaterText_1dab8
text_end
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
NameRaterText_1dabd:
text_far _NameRaterText_1dabd
text_end
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
NameRaterText_1dac2:
text_far _NameRaterText_1dac2
text_end
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
NameRaterText_1dac7:
text_far _NameRaterText_1dac7
text_end
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
NameRaterText_1dacc:
text_far _NameRaterText_1dacc
text_end
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
NameRaterText_1dad1:
text_far _NameRaterText_1dad1
text_end