diff --git a/eg/proto-game.60p b/eg/proto-game.60p index 87725fc..a2d0c1f 100644 --- a/eg/proto-game.60p +++ b/eg/proto-game.60p @@ -30,6 +30,7 @@ pointer ptr @ 254 word table actor_pos word pos +word new_pos word table actor_delta word delta @@ -51,10 +52,10 @@ byte save_x vector dispatch_game_state inputs joy2, button_down, press_fire_msg, dispatch_game_state, save_x, - actor_pos, pos, actor_delta, delta, + actor_pos, pos, new_pos, actor_delta, delta, screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4 outputs button_down, dispatch_game_state, save_x, - actor_pos, pos, actor_delta, delta, + actor_pos, pos, new_pos, actor_delta, delta, screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4 trashes a, x, y, c, z, n, v, ptr @@ -72,20 +73,20 @@ vector dispatch_game_state vector cinv inputs joy2, button_down, press_fire_msg, dispatch_game_state, save_x, - actor_pos, pos, actor_delta, delta, + actor_pos, pos, new_pos, actor_delta, delta, screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4 outputs button_down, dispatch_game_state, save_x, - actor_pos, pos, actor_delta, delta, + actor_pos, pos, new_pos, actor_delta, delta, screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4 trashes a, x, y, c, z, n, v, ptr @ 788 vector save_cinv inputs joy2, button_down, press_fire_msg, dispatch_game_state, save_x, - actor_pos, pos, actor_delta, delta, + actor_pos, pos, new_pos, actor_delta, delta, screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4 outputs button_down, dispatch_game_state, save_x, - actor_pos, pos, actor_delta, delta, + actor_pos, pos, new_pos, actor_delta, delta, screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4 trashes a, x, y, c, z, n, v, ptr @@ -180,26 +181,90 @@ routine clear_screen } until z } +routine calculate_new_position + inputs pos, delta + outputs new_pos + trashes a, c, n, z, v +{ + copy pos, new_pos + st off, c + add new_pos, delta +} + +// routine compare_new_pos +// { +// lda >new_position +// cmp >compare_target +// if beq { +// lda