From 2a9dba45c2219757dccb249737d504b922f4451e Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Wed, 10 May 2023 12:18:27 +0100 Subject: Add frame support, updated sprite --- game/player.asm | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'game/player.asm') diff --git a/game/player.asm b/game/player.asm index 4a6537f..0e44411 100644 --- a/game/player.asm +++ b/game/player.asm @@ -44,5 +44,29 @@ player_update: ld [a : x], y - ret + ; update frame + inc x + bo + inc a + + ; base frame + ld y, 0 + + ; both left and right + and b, 48 + cmp b, 48 + bz + jmp player_store_frame + + ; left + bit b, 4 + bz + ld y, 2 + ; right + bit b, 5 + bz + ld y, 1 +player_store_frame: + ld [a : x], y + ret -- cgit v1.2.3