From da5a9b34de9fdbd37a651e4079a227d51b7e7ad1 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sat, 18 Oct 2025 12:49:00 +0200 Subject: [PATCH] sprites: update sprites and renamed basic weapon to arrow --- STORY.md | 13 +++++++++---- src/actor.s | 4 ++-- src/defs.s | 4 ++-- src/enemy.s | 6 +++--- src/player.s | 10 +++++----- src/projectile.s | 28 ++++++++++++++-------------- tiles/bank8800.inc | 40 ++++++++++++++++++++-------------------- 7 files changed, 55 insertions(+), 50 deletions(-) diff --git a/STORY.md b/STORY.md index 992079c..34de669 100644 --- a/STORY.md +++ b/STORY.md @@ -1,6 +1,11 @@ # Setting -Your commander sends you on an impossible mission. -Infiltrate the lab and destroy weapon plans. -The floors are fileld with guards, dogs and other terrible experiments. -You cannot fail. Good luck. +It has been 1000 years since the collapse of the ley lines. +The Empire collapsed due to the loss of magic. +The world fell into barbarism. +A new evil is rising in the west. +You are sent by the local wizard to investiage. +Infiltrate their base and defeat their leader. +You are equipped with your bow. +Good luck. +You must not fail. diff --git a/src/actor.s b/src/actor.s index 574241e..82001ba 100644 --- a/src/actor.s +++ b/src/actor.s @@ -112,7 +112,7 @@ actor_update_draw_table: dw act_guard_update_and_draw dw act_nop dw act_nop - dw act_projectile_pistol_update_and_draw + dw act_projectile_arrow_update_and_draw ; called when an actor is spawned ; via a map object @@ -130,7 +130,7 @@ actor_collision_res_table: dw act_guard_col_res dw act_nop dw act_nop - dw act_projectile_pistol_col_res + dw act_projectile_arrow_col_res ; inits an actors ; inputs: diff --git a/src/defs.s b/src/defs.s index e89b5f8..260da4d 100644 --- a/src/defs.s +++ b/src/defs.s @@ -66,7 +66,7 @@ .de ACT_T_GUARD, 1 .de ACT_T_DOG, 1 .de ACT_T_HAZMAT, 1 -.de ACT_T_PISTOL_BULLET, 1 +.de ACT_T_ARROW_BULLET, 1 ; actor struct ; act_def @@ -151,5 +151,5 @@ ; weapon type for player .se 0 -.de WT_PISTOL, 1 +.de WT_ARROW, 1 .de WT_RIFLE, 1 diff --git a/src/enemy.s b/src/enemy.s index e337f96..4fc2725 100644 --- a/src/enemy.s +++ b/src/enemy.s @@ -69,11 +69,11 @@ act_guard_update_and_draw: ; bc: guard act_guard_col_res: ld a, [de] - cp a, ACT_T_PISTOL_BULLET - jr z, @pistol_bullet REL + cp a, ACT_T_ARROW_BULLET + jr z, @arrow_bullet REL ret -@pistol_bullet: +@arrow_bullet: ld hl, act_hp add hl, bc diff --git a/src/player.s b/src/player.s index f56a47e..353c77a 100644 --- a/src/player.s +++ b/src/player.s @@ -1,5 +1,5 @@ #define PLAYER_SPEED 0xE0 -#define PISTOL_TILE 0x86 +#define ARROW_TILE 0x86 #define PLAYER_WALKING_TILE 0x8E ; sets up the player actor @@ -295,14 +295,14 @@ player_draw: @weapon: ; TODO: draw based on player weapon type ld de, player - ld b, PISTOL_TILE + ld b, ARROW_TILE ld c, 0 - ld a, 0x48 + ld a, 0x46 call actor_draw ret -#define PLAYER_SHOOT_DELAY 15 +#define PLAYER_SHOOT_DELAY 32 ; shoots the player's current weapon player_shoot: ld a, [player_shoot_delay] @@ -316,7 +316,7 @@ player_shoot: or a, l ret z - call act_spawn_projectile_pistol_player + call act_spawn_projectile_arrow_player ld a, PLAYER_SHOOT_DELAY ld [player_shoot_delay], a diff --git a/src/projectile.s b/src/projectile.s index a0d8d87..f09054c 100644 --- a/src/projectile.s +++ b/src/projectile.s @@ -1,15 +1,15 @@ -#define PISTOL_SPRITE 0x82 +#define ARROW_SPRITE 0x82 ; projectile flags .se 1 .de PROJECTILE_F_PLAYER, 1 - ; spawns a pistol projectile for player + ; spawns a arrow projectile for player ; inputs: ; hl: actor ptr -act_spawn_projectile_pistol_player: - ld a, ACT_T_PISTOL_BULLET +act_spawn_projectile_arrow_player: + ld a, ACT_T_ARROW_BULLET ld [hl], a ; write type push hl @@ -36,10 +36,10 @@ act_spawn_projectile_pistol_player: ret - ; updates a simple pistol projectile + ; updates a simple arrow projectile ; inputs: ; de: actor ptr -act_projectile_pistol_update: +act_projectile_arrow_update: ; is this a player actor? ld hl, act_p0 add hl, de @@ -97,33 +97,33 @@ act_projectile_pistol_update: jp actor_despawn - ; draws a pistol projectile + ; draws a arrow projectile ; inputs: ; de: actor -act_projectile_pistol_draw: +act_projectile_arrow_draw: push de ld a, 1 call oamalloc pop de - ld b, PISTOL_SPRITE + ld b, ARROW_SPRITE ld c, 0 ld a, 0 jp actor_draw ; updates and draws projectile ; for pistosl -act_projectile_pistol_update_and_draw: +act_projectile_arrow_update_and_draw: push de - call act_projectile_pistol_update + call act_projectile_arrow_update pop de - jp act_projectile_pistol_draw + jp act_projectile_arrow_draw - ; collision resolution for pistol projectile + ; collision resolution for arrow projectile ; inputs: ; de: event origin actor ; bc: projectile -act_projectile_pistol_col_res: +act_projectile_arrow_col_res: ret diff --git a/tiles/bank8800.inc b/tiles/bank8800.inc index 005319a..cb6d2e0 100644 --- a/tiles/bank8800.inc +++ b/tiles/bank8800.inc @@ -18,11 +18,11 @@ ; tile 1 .chr 00000000 .chr 00010000 -.chr 00323000 +.chr 00121000 .chr 00030000 -.chr 00000000 -.chr 00000000 -.chr 00000000 +.chr 00030000 +.chr 00030000 +.chr 00303000 .chr 00000000 .chr 00000000 .chr 00000000 @@ -50,14 +50,14 @@ .chr 00000000 .chr 00000000 ; tile 3 -.chr 00000000 -.chr 00000000 -.chr 00000000 -.chr 00030000 -.chr 00033000 -.chr 00000000 -.chr 00000000 -.chr 00000000 +.chr 00003000 +.chr 00020300 +.chr 00020030 +.chr 00200030 +.chr 00200030 +.chr 00020030 +.chr 00020300 +.chr 00003000 .chr 00000000 .chr 00000000 .chr 00000000 @@ -69,13 +69,13 @@ ; tile 4 .chr 00000000 .chr 00000033 -.chr 00000033 -.chr 00000022 +.chr 00000333 +.chr 00000322 .chr 00000022 .chr 00003111 .chr 00001111 -.chr 00001333 -.chr 00003233 +.chr 00001111 +.chr 00003211 .chr 00000111 .chr 00000333 .chr 00000330 @@ -86,13 +86,13 @@ ; tile 5 .chr 00000000 .chr 30000000 -.chr 30000000 -.chr 20000000 +.chr 33000000 +.chr 23000000 .chr 20000000 .chr 11300000 .chr 11100000 -.chr 33333000 -.chr 33333300 +.chr 11100000 +.chr 11100000 .chr 11320000 .chr 33000000 .chr 33000000 -- 2.30.2