summaryrefslogtreecommitdiff
path: root/constants/tileset_constants.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2021-03-03 22:22:41 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2021-03-05 16:10:25 -0500
commit5454e1e0deefc6b4fc8c4de0e63314052fceebc0 (patch)
tree565805b252fa596aab3f80b3128ebc91b1fae540 /constants/tileset_constants.asm
parentb423e94be700cc6434465cf1dcccf0b677489192 (diff)
Verify data table sizes with table_width and assert_table_length macros
It also uncovered some off-by-one issues with defining some constants. A few structs now use rsreset/_RS to define their offset constants.
Diffstat (limited to 'constants/tileset_constants.asm')
-rw-r--r--constants/tileset_constants.asm7
1 files changed, 7 insertions, 0 deletions
diff --git a/constants/tileset_constants.asm b/constants/tileset_constants.asm
index e02393cb..527740d8 100644
--- a/constants/tileset_constants.asm
+++ b/constants/tileset_constants.asm
@@ -28,6 +28,13 @@
const TILESET_ICE_PATH ; 1a
const TILESET_DARK_CAVE ; 1b
const TILESET_FOREST ; 1c
+NUM_TILESETS EQU const_value - 1
+
+; wTileset struct size
+TILESET_LENGTH EQU 15
+
+; roof length (see gfx/tilesets/roofs)
+ROOF_LENGTH EQU 9
; bg palette values (see gfx/tilesets/*_palette_map.asm)
; TilesetBGPalette indexes (see gfx/tilesets/bg_tiles.pal)