diff --git a/constants/tileset_constants.asm b/constants/tileset_constants.asm index dc89852..06b6697 100644 --- a/constants/tileset_constants.asm +++ b/constants/tileset_constants.asm @@ -53,6 +53,7 @@ const TILESET_NIHON_WHITECITY ; 33 const TILESET_SEVII ; 34 const TILESET_LUSHCAVE ; 35 + const TILESET_UNDERWATER ; 36 DEF NUM_TILESETS EQU const_value - 1 ; wTileset struct size diff --git a/data/tilesets.asm b/data/tilesets.asm index 76b6733..36567ea 100644 --- a/data/tilesets.asm +++ b/data/tilesets.asm @@ -65,4 +65,5 @@ Tilesets:: tileset TilesetNihonWhiteCity tileset TilesetSevii tileset TilesetLushCave + tileset TilesetUnderwater assert_table_length NUM_TILESETS + 1 diff --git a/data/tilesets/underwater_attributes.bin b/data/tilesets/underwater_attributes.bin new file mode 100644 index 0000000..e69de29 diff --git a/data/tilesets/underwater_collision.asm b/data/tilesets/underwater_collision.asm new file mode 100644 index 0000000..e69de29 diff --git a/data/tilesets/underwater_metatiles.bin b/data/tilesets/underwater_metatiles.bin new file mode 100644 index 0000000..e69de29 diff --git a/engine/tilesets/tileset_palettes.asm b/engine/tilesets/tileset_palettes.asm index 0692a5f..f3d028a 100644 --- a/engine/tilesets/tileset_palettes.asm +++ b/engine/tilesets/tileset_palettes.asm @@ -227,4 +227,27 @@ LoadDesertPalette: jp FarCopyWRAM ret -INCLUDE "gfx/tilesets/desert.pal" \ No newline at end of file +INCLUDE "gfx/tilesets/desert.pal" + + +LoadSpecialMapObjectPalette: + ld a, [wMapTileset] + cp TILESET_UNDERWATER + jr z, .underwater + jr .do_nothing +.underwater + call LoadUnderwaterObjectPalette + scf + ret +.do_nothing + and a + ret +LoadUnderwaterObjectPalette: + ld a, BANK(wOBPals1) + ld de, wOBPals1 + ld hl, UnderwaterObjectPalette + ld bc, 8 palettes + call FarCopyWRAM + ret +UnderwaterObjectPalette: +INCLUDE "gfx/tilesets/underwater_sprites.pal" diff --git a/gfx/tilesets.asm b/gfx/tilesets.asm index 9723a37..5754bf1 100644 --- a/gfx/tilesets.asm +++ b/gfx/tilesets.asm @@ -668,3 +668,15 @@ INCBIN "data/tilesets/players_room_metatiles.bin" TilesetPlayersRoomColl:: INCLUDE "data/tilesets/players_room_collision.asm" + +TilesetUnderwaterGFX:: +INCBIN "gfx/tilesets/underwater.2bpp.lz" + +TilesetUnderwaterMeta:: +INCBIN "data/tilesets/underwater_metatiles.bin" + +TilesetUnderwaterColl:: +INCLUDE "data/tilesets/underwater_collision.asm" + +TilesetUnderwaterAttr:: +INCBIN "data/tilesets/underwater_attributes.bin" \ No newline at end of file diff --git a/gfx/tilesets/underwater.png b/gfx/tilesets/underwater.png new file mode 100644 index 0000000..a8278a6 Binary files /dev/null and b/gfx/tilesets/underwater.png differ diff --git a/gfx/tilesets/underwater_sprites.pal b/gfx/tilesets/underwater_sprites.pal new file mode 100644 index 0000000..d43bd12 --- /dev/null +++ b/gfx/tilesets/underwater_sprites.pal @@ -0,0 +1,40 @@ +; red + RGB 14, 17, 24 + RGB 11, 19, 10 + RGB 11, 07, 01 + RGB 00, 00, 00 +; blue + RGB 14, 17, 24 + RGB 11, 19, 10 + RGB 10, 09, 29 + RGB 00, 00, 00 +; green + RGB 14, 17, 24 + RGB 11, 19, 10 + RGB 07, 22, 03 + RGB 00, 00, 00 +; brown + RGB 14, 17, 24 + RGB 11, 19, 10 + RGB 11, 10, 03 + RGB 00, 00, 00 +; pink + RGB 14, 17, 24 + RGB 11, 19, 10 + RGB 10, 09, 02 + RGB 00, 00, 00 +; silver + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 13, 13, 13 + RGB 00, 00, 00 +; tree (bg green) + RGB 19, 31, 19 + RGB 11, 21, 28 + RGB 04, 16, 24 + RGB 00, 00, 00 +; rock (bg brown) + RGB 14, 17, 24 + RGB 08, 09, 16 + RGB 04, 05, 10 + RGB 02, 02, 04 \ No newline at end of file