From d4e4e556536d05cd7b343498a4157083c67ce057 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Fri, 21 Nov 2025 20:15:35 +0100 Subject: [PATCH] tiles: Added test wall tile --- src/defs.s | 6 +----- src/levels.s | 11 ++++------- src/tiles.s | 6 +++++- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/defs.s b/src/defs.s index 85df594..a060990 100644 --- a/src/defs.s +++ b/src/defs.s @@ -74,11 +74,7 @@ ; tile type enum .se 0 .de TT_EMPTY, 1 - - ; tile index enum - ; order of tile defs in tiles.s -.se 0 -.de TI_EMPTY, 1 +.de TT_WALL, 1 ; tile flags .se 1 diff --git a/src/levels.s b/src/levels.s index 8677f0f..3f0f1ca 100644 --- a/src/levels.s +++ b/src/levels.s @@ -1,10 +1,7 @@ - ; level to cell map -level_def_to_tile: - dw tile_grass ; tile grass -.def int TGS = TI_EMPTY - +.def int TGS = TT_EMPTY +.def int TWL = TT_WALL ; level definitions @@ -17,6 +14,7 @@ level_def_to_tile: l1: mapdef 0, map_r_nop, bank8000, bank8800, bank8C00, bank9000 + .db TWL, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS .db TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS .db TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS .db TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS @@ -31,5 +29,4 @@ l1: .db TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS .db TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS .db TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS - .db TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS - .db TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS + .db TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TGS, TWL diff --git a/src/tiles.s b/src/tiles.s index 86bb92e..9014bfc 100644 --- a/src/tiles.s +++ b/src/tiles.s @@ -1,14 +1,18 @@ ; tile definitions #define GFX_GRASS 0x20 +#define GFX_WALL 0x40 ; maps from tile ids ; to tile presets (tile index) tile_id_table: dw tile_grass - dw tile_grass + dw tile_wall tile_grass: tiledef TT_EMPTY, 0, GFX_GRASS + +tile_wall: + tiledef TT_WALL, 0, GFX_WALL -- 2.30.2