mirror of
https://github.com/catseye/SixtyPical.git
synced 2025-01-10 02:29:23 +00:00
Begin using static in the demo game.
This commit is contained in:
parent
31a16ed37c
commit
1bd765dbce
@ -9,6 +9,7 @@ History of SixtyPical
|
|||||||
as `ld a, [ptr] + y` and `st a, [ptr] + y`.
|
as `ld a, [ptr] + y` and `st a, [ptr] + y`.
|
||||||
* Implements the "union rule for trashes" when analyzing `if` blocks.
|
* Implements the "union rule for trashes" when analyzing `if` blocks.
|
||||||
* Even if we `goto` another routine, we can't trash an output.
|
* Even if we `goto` another routine, we can't trash an output.
|
||||||
|
* `static` storage locations local to routines can now be defined within routines.
|
||||||
* Fixed bug where `trash` was not marking the location as being virtually altered.
|
* Fixed bug where `trash` was not marking the location as being virtually altered.
|
||||||
|
|
||||||
0.11
|
0.11
|
||||||
|
@ -59,14 +59,6 @@ This should be tracked in the abstract interpretation.
|
|||||||
Range-checking buffers might be too difficult. Range checking tables will be easier.
|
Range-checking buffers might be too difficult. Range checking tables will be easier.
|
||||||
If a value is ANDed with 15, its range must be 0-15, etc.
|
If a value is ANDed with 15, its range must be 0-15, etc.
|
||||||
|
|
||||||
### Routine-local static memory locations
|
|
||||||
|
|
||||||
These would not need to appear in the inputs/outputs/trashes sets of the routines
|
|
||||||
that call this routine.
|
|
||||||
|
|
||||||
These might be forced to specify an initial value so that they can always be
|
|
||||||
assumed to be meaningful.
|
|
||||||
|
|
||||||
### Re-order routines and optimize tail-calls to fallthroughs
|
### Re-order routines and optimize tail-calls to fallthroughs
|
||||||
|
|
||||||
Not because it saves 3 bytes, but because it's a neat trick. Doing it optimally
|
Not because it saves 3 bytes, but because it's a neat trick. Doing it optimally
|
||||||
|
@ -37,7 +37,7 @@ typedef routine
|
|||||||
outputs button_down, dispatch_game_state,
|
outputs button_down, dispatch_game_state,
|
||||||
actor_pos, actor_delta, actor_logic,
|
actor_pos, actor_delta, actor_logic,
|
||||||
screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4
|
screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4
|
||||||
trashes a, x, y, c, z, n, v, pos, new_pos, delta, ptr, save_x, compare_target, dispatch_logic
|
trashes a, x, y, c, z, n, v, pos, new_pos, delta, ptr, compare_target, dispatch_logic
|
||||||
game_state_routine
|
game_state_routine
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -93,7 +93,6 @@ vector logic_routine dispatch_logic
|
|||||||
byte button_down : 0 // effectively static-local to check_button
|
byte button_down : 0 // effectively static-local to check_button
|
||||||
byte table[32] press_fire_msg: "PRESS`FIRE`TO`PLAY"
|
byte table[32] press_fire_msg: "PRESS`FIRE`TO`PLAY"
|
||||||
|
|
||||||
byte save_x
|
|
||||||
word compare_target
|
word compare_target
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -410,6 +409,7 @@ define game_state_title_screen game_state_routine
|
|||||||
}
|
}
|
||||||
|
|
||||||
define game_state_play game_state_routine
|
define game_state_play game_state_routine
|
||||||
|
static byte save_x : 0
|
||||||
{
|
{
|
||||||
ld x, 0
|
ld x, 0
|
||||||
repeat {
|
repeat {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user