-
Notifications
You must be signed in to change notification settings - Fork 0
/
time.asm
149 lines (102 loc) · 2.83 KB
/
time.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
init_screen_time
lda #0
sta ScreenTicks
sta ScreenSeconds
sta ScreenMinutes
rts
update_screen_time
inc ScreenTicks
lda ScreenTicks
cmpa #60
bne update_screen_seconds_over
lda #0
sta ScreenTicks
inc ScreenSeconds
update_screen_seconds_over
lda ScreenSeconds
cmpa #60
bne update_screen_minutes_over
lda #0
sta ScreenSeconds
inc ScreenMinutes
update_screen_minutes_over
rts
update_gamescreen_time
lda ScreenSeconds
cmpa #60
bne update_minutes_over
update_minutes_over
jsr check_gamescreen_condition1
jsr check_gamescreen_condition2
jsr check_gamescreen_condition3
jsr check_gamescreen_condition4
jsr check_gamescreen_condition5
rts
increase_enemy_speed
dec EnemyVelocityX
rts
check_gamescreen_condition1
lda ScreenTicks
cmpa #0
bne check_condition1_over
lda ScreenSeconds
cmpa #5
bne check_condition1_over
lda ScreenMinutes
cmpa #0
bne check_condition1_over
jsr increase_enemy_speed
check_condition1_over
rts
check_gamescreen_condition2
lda ScreenTicks
cmpa #0
bne check_condition2_over
lda ScreenSeconds
cmpa #10
bne check_condition2_over
lda ScreenMinutes
cmpa #0
bne check_condition2_over
jsr increase_enemy_speed
check_condition2_over
rts
check_gamescreen_condition3
lda ScreenTicks
cmpa #0
bne check_condition3_over
lda ScreenSeconds
cmpa #30
bne check_condition3_over
lda ScreenMinutes
cmpa #0
bne check_condition3_over
jsr increase_enemy_speed
check_condition3_over
rts
check_gamescreen_condition4
lda ScreenTicks
cmpa #0
bne check_condition4_over
lda ScreenSeconds
cmpa #30
bne check_condition4_over
lda ScreenMinutes
cmpa #0
beq check_condition4_over
jsr increase_enemy_speed
check_condition4_over
rts
check_gamescreen_condition5
lda ScreenTicks
cmpa #0
bne check_condition5_over
lda ScreenSeconds
cmpa #59
bne check_condition5_over
lda ScreenMinutes
cmpa #0
beq check_condition5_over
jsr increase_enemy_speed
check_condition5_over
rts