-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgameloop.asm
42 lines (34 loc) · 1012 Bytes
/
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
gameloop
jsr init_general
lda #0
sta CurrentScreen
gameloop_mainloop ; TODO: find out how to jump to locations stored in memory
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
jmp gameloop_mainloop
include "gamescreen.asm"
include "logoscreen.asm"
include "titlescreen.asm"
include "gameoverscreen.asm"