Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/scripts/BluesHouse.asm
1270 views
1
BluesHouse_Script:
2
call EnableAutoTextBoxDrawing
3
ld hl, BluesHouse_ScriptPointers
4
ld a, [wBluesHouseCurScript]
5
jp CallFunctionInTable
6
7
BluesHouse_ScriptPointers:
8
def_script_pointers
9
dw_const BluesHouseDefaultScript, SCRIPT_BLUESHOUSE_DEFAULT
10
dw_const BluesHouseNoopScript, SCRIPT_BLUESHOUSE_NOOP
11
12
BluesHouseDefaultScript:
13
SetEvent EVENT_ENTERED_BLUES_HOUSE
14
ld a, SCRIPT_BLUESHOUSE_NOOP
15
ld [wBluesHouseCurScript], a
16
ret
17
18
BluesHouseNoopScript:
19
ret
20
21
BluesHouse_TextPointers:
22
def_text_pointers
23
dw_const BluesHouseDaisySittingText, TEXT_BLUESHOUSE_DAISY_SITTING
24
dw_const BluesHouseDaisyWalkingText, TEXT_BLUESHOUSE_DAISY_WALKING
25
dw_const BluesHouseTownMapText, TEXT_BLUESHOUSE_TOWN_MAP
26
27
BluesHouseDaisySittingText:
28
text_asm
29
CheckEvent EVENT_GOT_TOWN_MAP
30
jr nz, .got_town_map
31
CheckEvent EVENT_GOT_POKEDEX
32
jr nz, .give_town_map
33
ld hl, BluesHouseDaisyRivalAtLabText
34
call PrintText
35
jr .done
36
37
.give_town_map
38
ld hl, BluesHouseDaisyOfferMapText
39
call PrintText
40
lb bc, TOWN_MAP, 1
41
call GiveItem
42
jr nc, .bag_full
43
ld a, HS_TOWN_MAP
44
ld [wMissableObjectIndex], a
45
predef HideObject
46
ld hl, GotMapText
47
call PrintText
48
SetEvent EVENT_GOT_TOWN_MAP
49
jr .done
50
51
.got_town_map
52
ld hl, BluesHouseDaisyUseMapText
53
call PrintText
54
jr .done
55
56
.bag_full
57
ld hl, BluesHouseDaisyBagFullText
58
call PrintText
59
.done
60
jp TextScriptEnd
61
62
BluesHouseDaisyRivalAtLabText:
63
text_far _BluesHouseDaisyRivalAtLabText
64
text_end
65
66
BluesHouseDaisyOfferMapText:
67
text_far _BluesHouseDaisyOfferMapText
68
text_end
69
70
GotMapText:
71
text_far _GotMapText
72
sound_get_key_item
73
text_end
74
75
BluesHouseDaisyBagFullText:
76
text_far _BluesHouseDaisyBagFullText
77
text_end
78
79
BluesHouseDaisyUseMapText:
80
text_far _BluesHouseDaisyUseMapText
81
text_end
82
83
BluesHouseDaisyWalkingText:
84
text_far _BluesHouseDaisyWalkingText
85
text_end
86
87
BluesHouseTownMapText:
88
text_far _BluesHouseTownMapText
89
text_end
90
91