From 5b6e1d22c95020e3adf9c3275e19a73d91a2ca41 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Mon, 12 Jan 2026 22:53:21 +0100 Subject: [PATCH] tiles: made tile size smaller --- src/actor.s | 48 ------------------------------------------------ src/defs.s | 11 ----------- src/macros.inc | 4 +--- src/player.s | 8 ++++---- 4 files changed, 5 insertions(+), 66 deletions(-) diff --git a/src/actor.s b/src/actor.s index f81d4a5..c4261e6 100644 --- a/src/actor.s +++ b/src/actor.s @@ -327,54 +327,6 @@ act_set_tact: ld [hl], a ret - - ; clears tprop t the current prop position - ; inputs: - ; de: actor -act_clear_tprop: - ld hl, act_pos_y - add hl, de - ld a, [hl+] - ld b, a - ld a, [hl] - ld c, a - call map_get_tile - ; get tile - - ld bc, t_prop - add hl, bc - ; clear value - xor a, a - ld [hl+], a - ld [hl], a - - ret - - ; sets tprop at the current prop location - ; inputs: - ; de: actor -act_set_tprop: - push de - ld hl, act_pos_y - add hl, de - ld a, [hl+] - ld b, a - ld a, [hl] - ld c, a - call map_get_tile - ; get tile - - ld bc, t_prop - add hl, bc - - ; set ptr - pop de - - ld a, d - ld [hl+], a - ld a, e - ld [hl], a - ret ; performs an attack diff --git a/src/defs.s b/src/defs.s index bf4369d..1fd4eb4 100644 --- a/src/defs.s +++ b/src/defs.s @@ -141,21 +141,10 @@ ; tile struct .se 0 .de t_type, 1 - ; flags0: exit and lock related flags - ; the lower 4 bits are exit directions - ; the upper 4 bits indicate if the exit is locked - ; locked doors may be forced open by attacking, - ; lockpicked or opened with a key .de t_flags0, 1 - ; flags1: tile type related flags (e.g. lava) -.de t_flags1, 1 ; actor currently ; standing on tile (ptr) .de t_act, 2 - ; prop actor ptr - ; currently located at this tile - ; this actor does not block the tile -.de t_prop, 2 .de t_p0, 1 .de t_size, 0 diff --git a/src/macros.inc b/src/macros.inc index 4ebf251..7153504 100644 --- a/src/macros.inc +++ b/src/macros.inc @@ -182,11 +182,9 @@ $1: ; $2: flags ; $3: p0 #macro tiledef - .db $1, $2, 0 + .db $1, $2 ; t_actor .db 0, 0 - ; t_prop - .db 0, 0 .db $3 #endmacro diff --git a/src/player.s b/src/player.s index 9c96a46..11f93d3 100644 --- a/src/player.s +++ b/src/player.s @@ -103,7 +103,7 @@ player_handle_move: @not_attack: ld b, DIRLEFT - input_just + input_held jr z, @not_left REL ld a, [player+act_pos_x] dec a @@ -122,7 +122,7 @@ player_handle_move: @not_left: ld b, DIRRIGHT - input_just + input_held jr z, @not_right REL ld a, [player+act_pos_x] inc a @@ -140,7 +140,7 @@ player_handle_move: @not_right: ld b, DIRUP - input_just + input_held jr z, @not_up REL ld a, [player+act_pos_y] dec a @@ -158,7 +158,7 @@ player_handle_move: @not_up: ld b, DIRDOWN - input_just + input_held jr z, @not_down REL ld a, [player+act_pos_y] inc a -- 2.30.2