From 105534de5b21ed1d7f0180ebb492ede0c035c853 Mon Sep 17 00:00:00 2001 From: Chris Pressey Date: Thu, 8 Feb 2018 16:03:22 +0000 Subject: [PATCH] Trim the type of game_state_routine, but run into something odd. --- eg/proto-game.60p | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/eg/proto-game.60p b/eg/proto-game.60p index 5767a8f..eca054d 100644 --- a/eg/proto-game.60p +++ b/eg/proto-game.60p @@ -31,8 +31,8 @@ // typedef routine - inputs joy2, button_down, press_fire_msg, dispatch_game_state, save_x, - actor_pos, pos, new_pos, actor_delta, delta, actor_logic, + inputs joy2, button_down, press_fire_msg, dispatch_game_state, + actor_pos, actor_delta, actor_logic, screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4 outputs button_down, dispatch_game_state, actor_pos, pos, new_pos, actor_delta, delta, actor_logic, @@ -243,8 +243,8 @@ routine check_new_position_in_bounds routine init_game inputs actor_pos, actor_delta, actor_logic - outputs actor_pos, actor_delta, pos, actor_logic - trashes a, y, z, n, c, v + outputs actor_pos, actor_delta, actor_logic + trashes pos, a, y, z, n, c, v { ld y, 0 copy word 0, pos @@ -402,7 +402,12 @@ define game_state_title_screen game_state_routine if c { call clear_screen + + // FIXME: this seems wrong and we need to investigate it. + // init_game trashes `pos` (this is reasonable.) But pos is declared + // as an output to `game_state_routine`. This should be an error... call init_game + copy forward game_state_play, dispatch_game_state }