-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgameloop.asm
50 lines (41 loc) · 1.12 KB
/
gameloop.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
gameloop
jsr init_general
lda #0
sta CurrentScreen
gameloop_mainloop
lda CurrentScreen
cmpa #0
bne which_screen_0_over
jsr logoscreen
jmp gameloop_mainloop
which_screen_0_over
lda CurrentScreen
cmpa #1
bne which_screen_1_over
jsr titlescreen
jmp gameloop_mainloop
which_screen_1_over
lda CurrentScreen
cmpa #2
bne which_screen_2_over
jsr gamescreen
jmp gameloop_mainloop
which_screen_2_over
lda CurrentScreen
cmpa #3
bne which_screen_3_over
jsr gameoverscreen
jmp gameloop_mainloop
which_screen_3_over
lda CurrentScreen
cmpa #4
bne which_screen_4_over
jsr storyscreen
jmp gameloop_mainloop
which_screen_4_over
jmp gameloop_mainloop
include "gamescreen.asm"
include "logoscreen.asm"
include "titlescreen.asm"
include "gameoverscreen.asm"
include "storyscreen.asm"