1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
PrintStrengthTxt:
ld hl, wd728
set 0, [hl]
ld hl, UsedStrengthText
call PrintText
ld hl, CanMoveBouldersText
jp PrintText
UsedStrengthText:
text_far _UsedStrengthText
text_asm
ld a, [wcf91]
call PlayCry
call Delay3
jp TextScriptEnd
CanMoveBouldersText:
text_far _CanMoveBouldersText
text_end
IsSurfingAllowed:
; Returns whether surfing is allowed in bit 1 of wd728.
; Surfing isn't allowed on the Cycling Road or in the lowest level of the
; Seafoam Islands before the current has been slowed with boulders.
ld hl, wd728
set 1, [hl]
ld a, [wd732]
bit 5, a
jr nz, .forcedToRideBike
ld a, [wCurMap]
cp SEAFOAM_ISLANDS_B4F
ret nz
CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE
ret z
ld hl, CoordsData_cdf7
call ArePlayerCoordsInArray
ret nc
ld hl, wd728
res 1, [hl]
ld hl, CurrentTooFastText
jp PrintText
.forcedToRideBike
ld hl, wd728
res 1, [hl]
ld hl, CyclingIsFunText
jp PrintText
CoordsData_cdf7:
dbmapcoord 7, 11
db -1 ; end
CurrentTooFastText:
text_far _CurrentTooFastText
text_end
CyclingIsFunText:
text_far _CyclingIsFunText
text_end
|