This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
halloffameroom.asm
109 lines (100 loc) · 2.05 KB
/
halloffameroom.asm
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
HallofFameRoomScript:
call EnableAutoTextBoxDrawing
ld hl, HallofFameRoomScriptPointers
ld a, [wHallOfFameRoomCurScript]
jp CallFunctionInTable
HallofFameRoomScript_5a4aa:
xor a
ld [wJoyIgnore], a
ld [wHallOfFameRoomCurScript], a
ret
HallofFameRoomScriptPointers:
dw HallofFameRoomScript0
dw HallofFameRoomScript1
dw HallofFameRoomScript2
dw HallofFameRoomScript3
HallofFameRoomScript3:
ret
HallofFameRoomScript2:
call Delay3
ld a, [wLetterPrintingDelayFlags]
push af
xor a
ld [wJoyIgnore], a
predef HallOfFamePC
pop af
ld [wLetterPrintingDelayFlags], a
ld hl, wFlags_D733
res 1, [hl]
inc hl
set 0, [hl]
xor a
ld hl, wLoreleiCurScript
ld [hli], a
ld [hli], a
ld [hl], a
ld [wLanceCurScript], a
ld [wHallOfFameRoomCurScript], a
; Elite 4 events
ResetEventRange ELITE4_EVENTS_START, ELITE4_CHAMPION_EVENTS_END, 1
xor a
ld [wHallOfFameRoomCurScript], a
ld a, PALLET_TOWN
ld [wLastBlackoutMap], a
callba SaveSAVtoSRAM
ld b, 5
.delayLoop
ld c, 600 / 5
call DelayFrames
dec b
jr nz, .delayLoop
call WaitForTextScrollButtonPress
jp Init
HallofFameRoomScript0:
ld a, $ff
ld [wJoyIgnore], a
ld hl, wSimulatedJoypadStatesEnd
ld de, RLEMovement5a528
call DecodeRLEList
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $1
ld [wHallOfFameRoomCurScript], a
ret
RLEMovement5a528:
db D_UP,$5
db $ff
HallofFameRoomScript1:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
ld a, PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a
ld a, $1
ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF
ld a, SPRITE_FACING_LEFT
ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
call Delay3
xor a
ld [wJoyIgnore], a
inc a ; PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a
ld a, $1
ld [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $ff
ld [wJoyIgnore], a
ld a, HS_UNKNOWN_DUNGEON_GUY
ld [wMissableObjectIndex], a
predef HideObject
ld a, $2
ld [wHallOfFameRoomCurScript], a
ret
HallofFameRoomTextPointers:
dw HallofFameRoomText1
HallofFameRoomText1:
TX_FAR _HallofFameRoomText1
db "@"