git @ Cat's Eye Technologies SixtyPical / a8a53e2
Save a few bytes in the demo game by using a `for` loop. Chris Pressey 3 years ago
1 changed file(s) with 3 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
8989 vector logic_routine table[256] actor_logic
9090 vector logic_routine dispatch_logic
9191
92 byte table[32] press_fire_msg: "PRESS`FIRE`TO`PLAY"
92 byte table[18] press_fire_msg: "PRESS`FIRE`TO`PLAY"
9393
9494 //
9595 // Points to the routine that implements the current game state.
383383 define game_state_title_screen game_state_routine
384384 {
385385 ld y, 0
386 repeat {
387
388 // First we "clip" the index to 0-31 to ensure we don't
389 // read outside the bounds of the table:
390 ld a, y
391 and a, 31
392 ld y, a
393
386 for y up to 17 {
394387 ld a, press_fire_msg + y
395388
396389 st on, c
397390 sub a, 64 // yuck. oh well
398391
399392 st a, screen1 + y
400 inc y
401 cmp y, 18
402 } until z
393 }
403394
404395 st off, c
405396 call check_button