git @ Cat's Eye Technologies SixtyPical / 79d7c8d
button_down is local to check_button. Chris Pressey 3 years ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
3030 //
3131
3232 typedef routine
33 inputs joy2, button_down, press_fire_msg, dispatch_game_state,
33 inputs joy2, press_fire_msg, dispatch_game_state,
3434 actor_pos, actor_delta, actor_logic,
3535 screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4
36 outputs button_down, dispatch_game_state,
36 outputs dispatch_game_state,
3737 actor_pos, actor_delta, actor_logic,
3838 screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4
3939 trashes a, x, y, c, z, n, v, pos, new_pos, delta, ptr, dispatch_logic
8989 vector (logic_routine) table[256] actor_logic
9090 vector logic_routine dispatch_logic
9191
92 byte button_down : 0 // effectively static-local to check_button
9392 byte table[32] press_fire_msg: "PRESS`FIRE`TO`PLAY"
9493
9594 //
154153 // call this routine.
155154 // Upon return, if carry is set, the button was pressed then released.
156155
157 routine check_button
158 inputs joy2, button_down
159 outputs c, button_down
156 define check_button routine
157 inputs joy2
158 outputs c
160159 trashes a, z, n
160 static byte button_down : 0
161161 {
162162 ld a, button_down
163163 if z {