tiles: made tile size smaller
authorLukas Krickl <lukas@krickl.dev>
Mon, 12 Jan 2026 21:53:21 +0000 (22:53 +0100)
committerLukas Krickl <lukas@krickl.dev>
Mon, 12 Jan 2026 21:53:21 +0000 (22:53 +0100)
src/actor.s
src/defs.s
src/macros.inc
src/player.s

index f81d4a5e31a84cbf4cce7eaf7866f36750adc231..c4261e604ace04dcd2edf76172c58aea77f7fc9a 100644 (file)
@@ -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
index bf4369dd4b5813198eeb23951a26a945363cb8a0..1fd4eb4409c53eae84e902c0c05e732bea275a89 100644 (file)
        ; 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
 
index 4ebf251bed78bb2bff680c5524d2c38df9c1bc14..7153504050822f3ec65d21fcaf5b5abd4e2dfa1e 100644 (file)
@@ -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
 
index 9c96a46b918c065dcf5150d37cc402e60584c786..11f93d349127c4b206c87deb96024a534c621911 100644 (file)
@@ -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