pokered/scripts/BluesHouse.asm

90 lines
1.8 KiB
NASM
Raw Normal View History

BluesHouse_Script:
2014-05-18 18:19:10 +00:00
call EnableAutoTextBoxDrawing
ld hl, BluesHouse_ScriptPointers
2016-01-29 16:20:47 +00:00
ld a, [wBluesHouseCurScript]
2014-05-18 18:19:10 +00:00
jp CallFunctionInTable
BluesHouse_ScriptPointers:
def_script_pointers
dw_const BluesHouseDefaultScript, SCRIPT_BLUESHOUSE_DEFAULT
dw_const BluesHouseNoopScript, SCRIPT_BLUESHOUSE_NOOP
2014-05-18 18:19:10 +00:00
BluesHouseDefaultScript:
2015-07-21 17:36:03 +00:00
SetEvent EVENT_ENTERED_BLUES_HOUSE
ld a, SCRIPT_BLUESHOUSE_NOOP
2016-01-29 16:20:47 +00:00
ld [wBluesHouseCurScript], a
2014-05-18 18:19:10 +00:00
ret
BluesHouseNoopScript:
2014-05-18 18:19:10 +00:00
ret
BluesHouse_TextPointers:
def_text_pointers
dw_const BluesHouseDaisySittingText, TEXT_BLUESHOUSE_DAISY_SITTING
dw_const BluesHouseDaisyWalkingText, TEXT_BLUESHOUSE_DAISY_WALKING
dw_const BluesHouseTownMapText, TEXT_BLUESHOUSE_TOWN_MAP
2014-05-18 18:19:10 +00:00
BluesHouseDaisySittingText:
text_asm
2015-07-21 17:36:03 +00:00
CheckEvent EVENT_GOT_TOWN_MAP
jr nz, .got_town_map
2015-07-21 01:32:02 +00:00
CheckEvent EVENT_GOT_POKEDEX
jr nz, .give_town_map
ld hl, BluesHouseDaisyRivalAtLabText
2014-05-18 18:19:10 +00:00
call PrintText
jr .done
2016-01-29 16:20:47 +00:00
.give_town_map
ld hl, BluesHouseDaisyOfferMapText
2014-05-18 18:19:10 +00:00
call PrintText
2015-08-05 21:20:29 +00:00
lb bc, TOWN_MAP, 1
2014-05-18 18:19:10 +00:00
call GiveItem
jr nc, .bag_full
2016-01-29 16:20:47 +00:00
ld a, HS_TOWN_MAP
ld [wMissableObjectIndex], a
predef HideObject
2016-01-29 16:20:47 +00:00
ld hl, GotMapText
2014-05-18 18:19:10 +00:00
call PrintText
2015-07-21 17:36:03 +00:00
SetEvent EVENT_GOT_TOWN_MAP
2014-05-18 18:19:10 +00:00
jr .done
2016-01-29 16:20:47 +00:00
.got_town_map
ld hl, BluesHouseDaisyUseMapText
2014-05-18 18:19:10 +00:00
call PrintText
jr .done
2016-01-29 16:20:47 +00:00
.bag_full
ld hl, BluesHouseDaisyBagFullText
2014-05-18 18:19:10 +00:00
call PrintText
.done
jp TextScriptEnd
BluesHouseDaisyRivalAtLabText:
text_far _BluesHouseDaisyRivalAtLabText
text_end
2014-05-18 18:19:10 +00:00
BluesHouseDaisyOfferMapText:
text_far _BluesHouseDaisyOfferMapText
text_end
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
GotMapText:
text_far _GotMapText
sound_get_key_item
text_end
2014-05-18 18:19:10 +00:00
BluesHouseDaisyBagFullText:
text_far _BluesHouseDaisyBagFullText
text_end
2014-05-18 18:19:10 +00:00
BluesHouseDaisyUseMapText:
text_far _BluesHouseDaisyUseMapText
text_end
2014-05-18 18:19:10 +00:00
BluesHouseDaisyWalkingText:
text_far _BluesHouseDaisyWalkingText
text_end
2014-05-18 18:19:10 +00:00
BluesHouseTownMapText:
text_far _BluesHouseTownMapText
text_end