aboutsummaryrefslogtreecommitdiff
path: root/modes/vblank_handler_list.gbasm
blob: cacbdf71ccb24bd98f683413e59a577202ccee3c (plain)
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
Update_VBlank_Handler:
	PUSH HL
	LD A, $mem_current_mode
	AND $0f
	SLA A
	LD HL, =VBlank_Handler_List
	ADD L
	LD L, A
	LD A, $00
	ADC H
	LD H, A
	LD A, (HL+)
	LD ($mem_vblank_jump_destination+1), A
	LD A, (HL)
	LD ($mem_vblank_jump_destination), A
	POP HL
	RET

VBlank_Handler_List:
	; 0 (dungeon, dead)
	.DB =Dungeon_VBLANK_Entrypoint

	; 1 (dungeon dialogue, menu)
	.DB =Dialogue_VBLANK_Entrypoint

	; 2 (loading, animation)
	.DB =Loading_VBLANK_Entrypoint

	; 3 (new floor)
	.DB =New_Floor

.INCLUDE "modes/dialoguemenu.gbasm"
.INCLUDE "modes/dungeon.gbasm"
.INCLUDE "modes/loading.gbasm"
.INCLUDE "modes/dungeongeneration.gbasm"