mirror of
https://github.com/pret/pokered.git
synced 2024-10-22 22:55:31 +00:00
d001ced41b
This introduces `def_script_pointers`, `def_text_pointers`, and `object_const_def` macros, and applies them to all maps. Most other map labels have also been identified.
95 lines
2.2 KiB
NASM
95 lines
2.2 KiB
NASM
MtMoonPokecenter_Script:
|
|
call Serial_TryEstablishingExternallyClockedConnection
|
|
jp EnableAutoTextBoxDrawing
|
|
|
|
MtMoonPokecenter_TextPointers:
|
|
def_text_pointers
|
|
dw_const MtMoonPokecenterNurseText, TEXT_MTMOONPOKECENTER_NURSE
|
|
dw_const MtMoonPokecenterYoungsterText, TEXT_MTMOONPOKECENTER_YOUNGSTER
|
|
dw_const MtMoonPokecenterGentlemanText, TEXT_MTMOONPOKECENTER_GENTLEMAN
|
|
dw_const MtMoonPokecenterMagikarpSalesmanText, TEXT_MTMOONPOKECENTER_MAGIKARP_SALESMAN
|
|
dw_const MtMoonPokecenterClipboardText, TEXT_MTMOONPOKECENTER_CLIPBOARD
|
|
dw_const MtMoonPokecenterLinkReceptionistText, TEXT_MTMOONPOKECENTER_LINK_RECEPTIONIST
|
|
|
|
MtMoonPokecenterNurseText:
|
|
script_pokecenter_nurse
|
|
|
|
MtMoonPokecenterYoungsterText:
|
|
text_far _MtMoonPokecenterYoungsterText
|
|
text_end
|
|
|
|
MtMoonPokecenterGentlemanText:
|
|
text_far _MtMoonPokecenterGentlemanText
|
|
text_end
|
|
|
|
MtMoonPokecenterMagikarpSalesmanText:
|
|
text_asm
|
|
CheckEvent EVENT_BOUGHT_MAGIKARP, 1
|
|
jp c, .alreadyBoughtMagikarp
|
|
ld hl, .IGotADealText
|
|
call PrintText
|
|
ld a, MONEY_BOX
|
|
ld [wTextBoxID], a
|
|
call DisplayTextBoxID
|
|
call YesNoChoice
|
|
ld a, [wCurrentMenuItem]
|
|
and a
|
|
jp nz, .choseNo
|
|
ldh [hMoney], a
|
|
ldh [hMoney + 2], a
|
|
ld a, $5
|
|
ldh [hMoney + 1], a
|
|
call HasEnoughMoney
|
|
jr nc, .enoughMoney
|
|
ld hl, .NoMoneyText
|
|
jr .printText
|
|
.enoughMoney
|
|
lb bc, MAGIKARP, 5
|
|
call GivePokemon
|
|
jr nc, .done
|
|
xor a
|
|
ld [wPriceTemp], a
|
|
ld [wPriceTemp + 2], a
|
|
ld a, $5
|
|
ld [wPriceTemp + 1], a
|
|
ld hl, wPriceTemp + 2
|
|
ld de, wPlayerMoney + 2
|
|
ld c, $3
|
|
predef SubBCDPredef
|
|
ld a, MONEY_BOX
|
|
ld [wTextBoxID], a
|
|
call DisplayTextBoxID
|
|
SetEvent EVENT_BOUGHT_MAGIKARP
|
|
jr .done
|
|
.choseNo
|
|
ld hl, .NoText
|
|
jr .printText
|
|
.alreadyBoughtMagikarp
|
|
ld hl, .NoRefundsText
|
|
.printText
|
|
call PrintText
|
|
.done
|
|
jp TextScriptEnd
|
|
|
|
.IGotADealText
|
|
text_far _MtMoonPokecenterMagikarpSalesmanIGotADealText
|
|
text_end
|
|
|
|
.NoText
|
|
text_far _MtMoonPokecenterMagikarpSalesmanNoText
|
|
text_end
|
|
|
|
.NoMoneyText
|
|
text_far _MtMoonPokecenterMagikarpSalesmanNoMoneyText
|
|
text_end
|
|
|
|
.NoRefundsText
|
|
text_far _MtMoonPokecenterMagikarpSalesmanNoRefundsText
|
|
text_end
|
|
|
|
MtMoonPokecenterClipboardText:
|
|
text_far _MtMoonPokecenterClipboardText
|
|
text_end
|
|
|
|
MtMoonPokecenterLinkReceptionistText:
|
|
script_cable_club_receptionist
|