From adfcd603ddc64a2de32024b7ade0bb9392cf3a3e Mon Sep 17 00:00:00 2001 From: xCrystal Date: Tue, 3 Oct 2023 19:02:36 +0200 Subject: [PATCH] Implement common tileset portion at second half of vTiles5 (#19) --- constants/tileset_constants.asm | 12 +++- data/tilesets.asm | 76 +++++++++++----------- gfx/tilesets.asm | 15 +++++ gfx/tilesets/spaces/fixed_spaces.png | Bin 0 -> 288 bytes gfx/tilesets/spaces/variable_spaces_1.png | Bin 0 -> 304 bytes gfx/tilesets/spaces/variable_spaces_2.png | Bin 0 -> 304 bytes home/map.asm | 43 +++++++++++- layout.link | 1 + ram/hram.asm | 3 +- ram/wram.asm | 1 + 10 files changed, 110 insertions(+), 41 deletions(-) create mode 100755 gfx/tilesets/spaces/fixed_spaces.png create mode 100755 gfx/tilesets/spaces/variable_spaces_1.png create mode 100755 gfx/tilesets/spaces/variable_spaces_2.png diff --git a/constants/tileset_constants.asm b/constants/tileset_constants.asm index 3d0c4aec4..cc56842b3 100644 --- a/constants/tileset_constants.asm +++ b/constants/tileset_constants.asm @@ -39,7 +39,7 @@ DEF NUM_TILESETS EQU const_value - 1 ; wTileset struct size -DEF TILESET_LENGTH EQU 13 +DEF TILESET_LENGTH EQU 14 ; roof length (see gfx/tilesets/roofs) DEF ROOF_LENGTH EQU 9 @@ -55,3 +55,13 @@ DEF ROOF_LENGTH EQU 9 const PAL_BG_BROWN ; 5 const PAL_BG_ROOF ; 6 const PAL_BG_TEXT ; 7 + +; variable spaces sets (see gfx/tilesets.asm) + const_def + const TILESET_VARIABLE_SPACES_1 ; 0 +; const TILESET_VARIABLE_SPACES_2 ; 1 +DEF NUM_VARIABLE_SPACES_SETS EQU const_value + +; size of the tileset occupied by space tiles (see LoadTilesetGFX) +DEF TILESET_FIXED_SPACES_SIZE EQU $20 tiles +DEF TILESET_VARIABLE_SPACES_SIZE EQU $20 tiles diff --git a/data/tilesets.asm b/data/tilesets.asm index d9cec1066..1bd635feb 100644 --- a/data/tilesets.asm +++ b/data/tilesets.asm @@ -2,51 +2,53 @@ MACRO tileset dba \1GFX, \1Meta, \1Coll dw \1Anim dw \1PalMap + db TILESET_VARIABLE_SPACES_\2 ENDM ; Associated data: ; - The *GFX, *Meta, and *Coll are defined in gfx/tilesets.asm ; - The *PalMap are defined in gfx/tileset_palette_maps.asm ; - The *Anim are defined in engine/tilesets/tileset_anims.asm +; - TILESET_VARIABLE_SPACES_* points to an entry of TilesetVariableSpacesPointers in gfx/tilesets.asm Tilesets:: ; entries correspond to TILESET_* constants (see constants/tileset_constants.asm) table_width TILESET_LENGTH, Tilesets - tileset Tileset0 - tileset TilesetJohto - tileset TilesetJohtoModern - tileset TilesetKanto - tileset TilesetBattleTowerOutside - tileset TilesetHouse - tileset TilesetPlayersHouse - tileset TilesetPokecenter - tileset TilesetGate - tileset TilesetPort - tileset TilesetLab - tileset TilesetFacility - tileset TilesetMart - tileset TilesetMansion - tileset TilesetGameCorner - tileset TilesetEliteFourRoom - tileset TilesetTraditionalHouse - tileset TilesetTrainStation - tileset TilesetChampionsRoom - tileset TilesetLighthouse - tileset TilesetPlayersRoom - tileset TilesetPokeComCenter - tileset TilesetBattleTowerInside - tileset TilesetTower - tileset TilesetCave - tileset TilesetPark - tileset TilesetRuinsOfAlph - tileset TilesetRadioTower - tileset TilesetUnderground - tileset TilesetIcePath - tileset TilesetDarkCave - tileset TilesetForest - tileset TilesetBetaWordRoom - tileset TilesetHoOhWordRoom - tileset TilesetKabutoWordRoom - tileset TilesetOmanyteWordRoom - tileset TilesetAerodactylWordRoom + tileset Tileset0, 1 + tileset TilesetJohto, 1 + tileset TilesetJohtoModern, 1 + tileset TilesetKanto, 1 + tileset TilesetBattleTowerOutside, 1 + tileset TilesetHouse, 1 + tileset TilesetPlayersHouse, 1 + tileset TilesetPokecenter, 1 + tileset TilesetGate, 1 + tileset TilesetPort, 1 + tileset TilesetLab, 1 + tileset TilesetFacility, 1 + tileset TilesetMart, 1 + tileset TilesetMansion, 1 + tileset TilesetGameCorner, 1 + tileset TilesetEliteFourRoom, 1 + tileset TilesetTraditionalHouse, 1 + tileset TilesetTrainStation, 1 + tileset TilesetChampionsRoom, 1 + tileset TilesetLighthouse, 1 + tileset TilesetPlayersRoom, 1 + tileset TilesetPokeComCenter, 1 + tileset TilesetBattleTowerInside, 1 + tileset TilesetTower, 1 + tileset TilesetCave, 1 + tileset TilesetPark, 1 + tileset TilesetRuinsOfAlph, 1 + tileset TilesetRadioTower, 1 + tileset TilesetUnderground, 1 + tileset TilesetIcePath, 1 + tileset TilesetDarkCave, 1 + tileset TilesetForest, 1 + tileset TilesetBetaWordRoom, 1 + tileset TilesetHoOhWordRoom, 1 + tileset TilesetKabutoWordRoom, 1 + tileset TilesetOmanyteWordRoom, 1 + tileset TilesetAerodactylWordRoom, 1 assert_table_length NUM_TILESETS + 1 diff --git a/gfx/tilesets.asm b/gfx/tilesets.asm index 7fb6b57b3..142ca1f49 100644 --- a/gfx/tilesets.asm +++ b/gfx/tilesets.asm @@ -4,6 +4,21 @@ MACRO tilecoll ENDM +SECTION "Tileset Spaces", ROMX + +TilesetVariableSpacesPointers:: +; entries correspond to TILESET_VARIABLE_SPACES_* constants (see constants/tileset_constants.asm) + table_width 2, TilesetVariableSpacesPointers + dw TilesetVariableSpaces1 + assert_table_length NUM_VARIABLE_SPACES_SETS + +TilesetFixedSpaces:: +INCBIN "gfx/tilesets/spaces/fixed_spaces.2bpp.lz" + +TilesetVariableSpaces1:: +INCBIN "gfx/tilesets/spaces/variable_spaces_1.2bpp.lz" + + SECTION "Tileset Data 1", ROMX TilesetKantoGFX:: diff --git a/gfx/tilesets/spaces/fixed_spaces.png b/gfx/tilesets/spaces/fixed_spaces.png new file mode 100755 index 0000000000000000000000000000000000000000..1c580cafc3031013c848ad0105309f195f83b885 GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^4L~fw!3HGnMU-~{DaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheoCO|{#S9EWB_ParFHODzD7e+r#W5tq`R&YuTt^gmT+aSmT(_idN%p3# zI!gmO+eOmu9hI45q}wkSlC{>B*GqGkj&afPFU+R%i?^9}U7NM`-aoa5w)OH)I{)(& z{o`eN^JTi>cgcBXwubRh@{1InS8tckkWkum^?&l^1k*Kl-nyQ5fBd$d%fVnF!-D{Z z0u2TW5e6A920m7XcBTer#sikDGmbZFL)D!>z2NkoQ)gUGFF3x-`fsId&4aW19T|>Z cw_mECS#W{hZ{pQyKo2l@y85}Sb4q9e00kFrL;wH) literal 0 HcmV?d00001 diff --git a/gfx/tilesets/spaces/variable_spaces_1.png b/gfx/tilesets/spaces/variable_spaces_1.png new file mode 100755 index 0000000000000000000000000000000000000000..d4e541dd48f7303ff22e6798d8d170dfd5179a7a GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0vp^4L~fw!3HGnMU-~{DaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheoCO|{#S9EWB_ParFHODzD0tM<#W5tq`RzxXUB*Ay|EFz^ZA?9lwNJUW-Kr@NTqMX&%Nb8*|L{R$*Vf|!T;~&NFS{NLtUFg z&z{XuZ8D9@7TWtoocTu6uLbcL&VSk2ZZv=WcICerliOL*-yA&+wr@B-T=@Uv*vn^U zX2%$`PyaWa(ZMI7;lTlhgN=+$%*-t8Y#e+%0&`9?xXUB*Ay|EFz^ZA?9lwNJUW-Kr@NTqMX&%Nb8*|L{R$*Vf|!T;~&NFS{NLtUFg z&z{XuZ8D9@7TWtoocTu6uLbcL&VSk2ZZv=WcICerliOL*-yA&+wr@B-T=@Uv*vn^U zX2%$`PyaWa(ZMI7;lTlhgN=+$%*-t8Y#e+%0&`9?