Trim the type of game_state_routine, but run into something odd.
Chris Pressey
7 years ago
30 | 30 | // |
31 | 31 | |
32 | 32 | typedef routine |
33 | inputs joy2, button_down, press_fire_msg, dispatch_game_state, save_x, | |
34 | actor_pos, pos, new_pos, actor_delta, delta, actor_logic, | |
33 | inputs joy2, button_down, press_fire_msg, dispatch_game_state, | |
34 | actor_pos, actor_delta, actor_logic, | |
35 | 35 | screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4 |
36 | 36 | outputs button_down, dispatch_game_state, |
37 | 37 | actor_pos, pos, new_pos, actor_delta, delta, actor_logic, |
242 | 242 | |
243 | 243 | routine init_game |
244 | 244 | inputs actor_pos, actor_delta, actor_logic |
245 | outputs actor_pos, actor_delta, pos, actor_logic | |
246 | trashes a, y, z, n, c, v | |
245 | outputs actor_pos, actor_delta, actor_logic | |
246 | trashes pos, a, y, z, n, c, v | |
247 | 247 | { |
248 | 248 | ld y, 0 |
249 | 249 | copy word 0, pos |
401 | 401 | |
402 | 402 | if c { |
403 | 403 | call clear_screen |
404 | ||
405 | // FIXME: this seems wrong and we need to investigate it. | |
406 | // init_game trashes `pos` (this is reasonable.) But pos is declared | |
407 | // as an output to `game_state_routine`. This should be an error... | |
404 | 408 | call init_game |
409 | ||
405 | 410 | copy forward game_state_play, dispatch_game_state |
406 | 411 | } |
407 | 412 |