git @ Cat's Eye Technologies SixtyPical / 4099c9c
Attempting to debug this vector table stuff. Chris Pressey 3 years ago
1 changed file(s) with 21 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
250250 repeat {
251251 copy pos, actor_pos + y
252252 copy word 40, actor_delta + y
253 copy forward enemy_logic, actor_logic + y
253 copy forward null_logic, actor_logic + y
254254
255255 st off, c
256256 add pos, word 7
262262 ld y, 0
263263 copy word 0, actor_pos + y
264264 copy word 0, actor_delta + y
265 copy forward player_logic, actor_logic + y
265 // copy forward player_logic, actor_logic + y
266266 }
267267
268268 // ----------------------------------------------------------------
386386 st off, c
387387 }
388388
389 define null_logic logic_routine
390 {
391 copy pos, new_pos
392 copy new_pos, pos
393 st off, c
394 }
395
389396 // ----------------------------------------------------------------
390397 // Game States
391398 // ----------------------------------------------------------------
437444
438445 st x, save_x
439446
447 // OLD SKOOL
448 cmp x, 0
449 if z {
450 call player_logic
451 } else {
452 call enemy_logic
453 }
454
455 ld x, save_x
456
457 // NEW SKOOL
440458 copy actor_logic + x, dispatch_logic
441 call dispatch_logic
459 call null_logic // dispatch_logic
442460
443461 if c {
444462 // Player died! Want no dead! Break out of the loop (this is a bit awkward.)