aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game/main.asm16
1 files changed, 16 insertions, 0 deletions
diff --git a/game/main.asm b/game/main.asm
index cdf0844..bfc203c 100644
--- a/game/main.asm
+++ b/game/main.asm
@@ -3,6 +3,7 @@
.equ INT_VECTOR 0xff00
call init
+ call init_game
game_loop:
halt
@@ -27,9 +28,23 @@ init:
; enable interrupts
cif
+ ret
+init_game:
halt
+ ; set player initial coordinates
+ ld x, <player_coord
+ ld a, >player_coord
+
+ ld y, 56
+ ld [a : x], y
+ inc x
+ bo
+ inc a
+ ld y, 104
+ ld [a : x], y
+
; erase the screen
ld b, 0
ld a, 0xbf
@@ -64,6 +79,7 @@ entities:
; type
.db ET_PLAYER
; x, y
+player_coord:
.db 0, 0
; frame
.db 0