70 lines
1.2 KiB
NASM
70 lines
1.2 KiB
NASM
include consts/arch
|
|
include consts/game
|
|
include consts/keyboard
|
|
include consts/map
|
|
include consts/scene
|
|
include consts/screen
|
|
include consts/sprites
|
|
|
|
include sections/init_sprite_lookup_table
|
|
include sections/init_screen
|
|
|
|
call drawing.draw_whole_map
|
|
|
|
include sections/init_robot_state
|
|
include sections/init_ghost_state
|
|
include sections/init_timers
|
|
|
|
game_loop:
|
|
include sections/handle_event
|
|
|
|
/*
|
|
For all timers:
|
|
r1, r2: tick duration high, low
|
|
r7, r8: now high, low
|
|
*/
|
|
add r9, zr, ptr.tick_duration_high
|
|
load_32 r1, [r9]
|
|
add r9, zr, ptr.tick_duration_low
|
|
load_32 r2, [r9]
|
|
time_0 r8
|
|
time_1 r7
|
|
|
|
push r1
|
|
push r2
|
|
push r7
|
|
push r8
|
|
include sections/timer_robot
|
|
pop r8
|
|
pop r7
|
|
pop r2
|
|
pop r1
|
|
|
|
include sections/timer_ghost
|
|
|
|
jmp game_loop
|
|
|
|
include lib/u64
|
|
include lib/game
|
|
include lib/drawing
|
|
include lib/sprite_rotation
|
|
|
|
include dist/empty
|
|
include dist/placeholder
|
|
include dist/wall_end
|
|
include dist/wall_straight
|
|
include dist/wall_corner
|
|
include dist/robot_up
|
|
include dist/robot_right
|
|
include dist/robot_down
|
|
include dist/robot_left
|
|
include dist/ghost_up
|
|
include dist/ghost_right
|
|
include dist/ghost_down
|
|
include dist/ghost_left
|
|
include dist/coin
|
|
|
|
include dist/map
|
|
|
|
include reserved_space
|