2019-01-01 20:06:23 +00:00
|
|
|
NameRatersHouse_Script:
|
2014-05-18 18:19:10 +00:00
|
|
|
jp EnableAutoTextBoxDrawing
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
NameRatersHouseYesNoScript:
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
call YesNoChoice
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wCurrentMenuItem]
|
2014-05-18 18:19:10 +00:00
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
NameRatersHouseCheckMonOTScript:
|
|
|
|
; return carry if mon's OT name or OT ID do not match the player's
|
2014-06-14 11:12:40 +00:00
|
|
|
ld hl, wPartyMonOT
|
2015-08-11 04:51:20 +00:00
|
|
|
ld bc, NAME_LENGTH
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, [wWhichPokemon]
|
|
|
|
call AddNTimes
|
2014-06-14 11:12:40 +00:00
|
|
|
ld de, wPlayerName
|
2015-08-11 04:51:20 +00:00
|
|
|
ld c, NAME_LENGTH
|
2023-07-14 01:27:56 +00:00
|
|
|
call .check_match_loop
|
|
|
|
jr c, .no_match
|
2014-06-14 11:12:40 +00:00
|
|
|
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
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerID
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $2
|
2023-07-14 01:27:56 +00:00
|
|
|
.check_match_loop
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, [de]
|
|
|
|
cp [hl]
|
2023-07-14 01:27:56 +00:00
|
|
|
jr nz, .no_match
|
2014-05-18 18:19:10 +00:00
|
|
|
inc hl
|
|
|
|
inc de
|
|
|
|
dec c
|
2023-07-14 01:27:56 +00:00
|
|
|
jr nz, .check_match_loop
|
2014-05-18 18:19:10 +00:00
|
|
|
and a
|
|
|
|
ret
|
2023-07-14 01:27:56 +00:00
|
|
|
.no_match
|
2014-05-18 18:19:10 +00:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
NameRatersHouse_TextPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_text_pointers
|
|
|
|
dw_const NameRatersHouseNameRaterText, TEXT_NAMERATERSHOUSE_NAME_RATER
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
NameRatersHouseNameRaterText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
call SaveScreenTilesToBuffer2
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .WantMeToRateText
|
|
|
|
call NameRatersHouseYesNoScript
|
|
|
|
jr nz, .did_not_rename
|
|
|
|
ld hl, .WhichPokemonText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
xor a
|
2015-07-13 22:40:33 +00:00
|
|
|
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
|
2014-09-10 03:55:19 +00:00
|
|
|
call RestoreScreenTilesAndReloadTilePatterns
|
2014-05-18 18:19:10 +00:00
|
|
|
call LoadGBPal
|
|
|
|
pop af
|
2023-07-14 01:27:56 +00:00
|
|
|
jr c, .did_not_rename
|
2014-05-18 18:19:10 +00:00
|
|
|
call GetPartyMonName2
|
2023-07-14 01:27:56 +00:00
|
|
|
call NameRatersHouseCheckMonOTScript
|
|
|
|
ld hl, .ATrulyImpeccableNameText
|
|
|
|
jr c, .done
|
|
|
|
ld hl, .GiveItANiceNameText
|
|
|
|
call NameRatersHouseYesNoScript
|
|
|
|
jr nz, .did_not_rename
|
|
|
|
ld hl, .WhatShouldWeNameItText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2020-07-07 01:18:22 +00:00
|
|
|
farcall DisplayNameRaterScreen
|
2023-07-14 01:27:56 +00:00
|
|
|
jr c, .did_not_rename
|
|
|
|
ld hl, .PokemonHasBeenRenamedText
|
|
|
|
.done
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
2023-07-14 01:27:56 +00:00
|
|
|
.did_not_rename
|
|
|
|
ld hl, .ComeAnyTimeYouLikeText
|
|
|
|
jr .done
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.WantMeToRateText:
|
|
|
|
text_far _NameRatersHouseNameRaterWantMeToRateText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.WhichPokemonText:
|
|
|
|
text_far _NameRatersHouseNameRaterWhichPokemonText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.GiveItANiceNameText:
|
|
|
|
text_far _NameRatersHouseNameRaterGiveItANiceNameText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.WhatShouldWeNameItText:
|
|
|
|
text_far _NameRatersHouseNameRaterWhatShouldWeNameItText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.PokemonHasBeenRenamedText:
|
|
|
|
text_far _NameRatersHouseNameRaterPokemonHasBeenRenamedText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.ComeAnyTimeYouLikeText:
|
|
|
|
text_far _NameRatersHouseNameRaterComeAnyTimeYouLikeText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.ATrulyImpeccableNameText:
|
|
|
|
text_far _NameRatersHouseNameRaterATrulyImpeccableNameText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|