diff --git a/README.md b/README.md index 263c8cc..687799c 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ In general, there have been many wild encounter tweaks. View this document for d - Pokemon October et al: Bellignan, Caretorker, Inoshika, Bipulla, Sonegg, Kolta, Coinpur, Dodaerie, Bundra, Kiwooked, Koalyptus, Trebir - Tom Wang: Gold/Chris running sprite - Seasick: Kris running sprite +- Ferropexola/aforward9600: Time of day-based tileset palette code # 16-bit index expansion for Crystal diff --git a/constants/landmark_constants.asm b/constants/landmark_constants.asm index 8e0d014..63d2f65 100644 --- a/constants/landmark_constants.asm +++ b/constants/landmark_constants.asm @@ -121,6 +121,7 @@ DEF KANTO_LANDMARK EQU const_value ;const LANDMARK_ONE_ISLAND DEF NIHON_LANDMARK EQU const_value const LANDMARK_SILENT_HILLS + const LANDMARK_BLUE_FOREST DEF NUM_LANDMARKS EQU const_value ; used in CaughtData diff --git a/constants/map_constants.asm b/constants/map_constants.asm index e3a0cc3..b28edb3 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -516,8 +516,12 @@ ENDM endgroup newgroup SILENT_HILLS ; 27 - map_const SILENT_HILLS, 10, 10 ; 1 - map_const DEBUG_ROOM, 20, 20 ; 2 + map_const SILENT_HILLS, 10, 10 ; 1 + map_const DEBUG_ROOM, 20, 20 ; 2 + endgroup + + newgroup BLUE_FOREST ; 27 + map_const BLUE_FOREST, 20, 18 ; 1 endgroup DEF NUM_MAP_GROUPS EQU const_value ; 27 diff --git a/constants/scgb_constants.asm b/constants/scgb_constants.asm index dde5f41..7749fdc 100644 --- a/constants/scgb_constants.asm +++ b/constants/scgb_constants.asm @@ -72,6 +72,7 @@ DEF SCGB_DEFAULT EQU $ff const PREDEFPAL_SILVER_CAVE const PREDEFPAL_DUNGEONS const PREDEFPAL_SILENT_HILLS + const PREDEFPAL_BLUE_FOREST const PREDEFPAL_NITE const PREDEFPAL_BLACKOUT const PREDEFPAL_DIPLOMA ; RB_MEWMON diff --git a/data/maps/attributes.asm b/data/maps/attributes.asm index a23e8e9..7258025 100644 --- a/data/maps/attributes.asm +++ b/data/maps/attributes.asm @@ -711,3 +711,4 @@ ENDM map_attributes SilentHills, SILENT_HILLS, $00, 0 ; this is on its own for now. add connections to mt. silver later. map_attributes DebugRoom, DEBUG_ROOM, $05, 0 ; Debug Room :V map_attributes CliffCave, CLIFF_CAVE, $00, 0 + map_attributes BlueForest, BLUE_FOREST, $00, 0 ; this is on its own for now. add connections later. \ No newline at end of file diff --git a/data/maps/blocks.asm b/data/maps/blocks.asm index ec4aaac..fb5da4a 100644 --- a/data/maps/blocks.asm +++ b/data/maps/blocks.asm @@ -1083,3 +1083,6 @@ DebugRoom_Blocks: ; Pipis Room CliffCave_Blocks: INCBIN "maps/CliffCave.ablk" + +BlueForest_Blocks: + INCBIN "maps/BlueForest.ablk" diff --git a/data/maps/landmarks.asm b/data/maps/landmarks.asm index 9851c15..9629178 100644 --- a/data/maps/landmarks.asm +++ b/data/maps/landmarks.asm @@ -109,6 +109,7 @@ Landmarks: landmark 140, 116, FastShipName assert_table_length NIHON_LANDMARK landmark 92, 108, SilentHillsName + landmark 140, 60, BlueForestName assert_table_length NUM_LANDMARKS NewBarkTownName: db "NEW BARK¯TOWN@" @@ -215,3 +216,4 @@ UndergroundName: db "UNDERGROUND@" BattleTowerName: db "BATTLE¯TOWER@" SpecialMapName: db "SPECIAL@" SilentHillsName: db "SILENT¯HILLS@" +BlueForestName: db "BLUE¯FOREST@" diff --git a/data/maps/maps.asm b/data/maps/maps.asm index af16758..b569bde 100644 --- a/data/maps/maps.asm +++ b/data/maps/maps.asm @@ -44,6 +44,7 @@ MapGroupPointers:: dw MapGroup_Saffron ; 25 dw MapGroup_Cherrygrove ; 26 dw MapGroup_SilentHills ; 27 + dw MapGroup_BlueForest ; 28 assert_table_length NUM_MAP_GROUPS MapGroup_Olivine: @@ -557,3 +558,8 @@ MapGroup_SilentHills: map SilentHills, TILESET_NIHON_01, TOWN, LANDMARK_SILENT_HILLS, MUSIC_NIHON_TOWN_01, TRUE, PALETTE_AUTO, FISHGROUP_SHORE map DebugRoom, TILESET_NIHON_01, TOWN, LANDMARK_SILENT_HILLS, MUSIC_SINJOH_RUINS, TRUE, PALETTE_MORN, FISHGROUP_SHORE assert_table_length NUM_SILENT_HILLS_MAPS + +MapGroup_BlueForest: + table_width MAP_LENGTH, MapGroup_BlueForest + map BlueForest, TILESET_NIHON_SNOWY, TOWN, LANDMARK_BLUE_FOREST, MUSIC_SINJOH_RUINS, TRUE, PALETTE_AUTO, FISHGROUP_SHORE + assert_table_length NUM_BLUE_FOREST_MAPS diff --git a/data/maps/outdoor_sprites.asm b/data/maps/outdoor_sprites.asm index feab3ce..fdac697 100644 --- a/data/maps/outdoor_sprites.asm +++ b/data/maps/outdoor_sprites.asm @@ -31,6 +31,7 @@ OutdoorSprites: dw SaffronGroupSprites dw CherrygroveGroupSprites dw SilentHillsGroupSprites + dw BlueForestGroupSprites assert_table_length NUM_MAP_GROUPS PalletGroupSprites: @@ -309,6 +310,7 @@ IndigoGroupSprites: db SPRITE_BOULDER SilentHillsGroupSprites: ; Will have its own thing eventually +BlueForestGroupSprites: ; Will have its own thing eventually NewBarkGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY diff --git a/data/maps/roofs.asm b/data/maps/roofs.asm index 1e2b09d..569e251 100644 --- a/data/maps/roofs.asm +++ b/data/maps/roofs.asm @@ -39,6 +39,7 @@ MapGroupRoofs: db -1 ; 25 db ROOF_NEW_BARK ; 26 (Cherrygrove) db ROOF_NEW_BARK ; 27 (Silent Hills) + db ROOF_NEW_BARK ; 28 (Blue Forest) assert_table_length NUM_MAP_GROUPS + 1 Roofs: diff --git a/data/maps/scripts.asm b/data/maps/scripts.asm index e07d360..4ae02e8 100644 --- a/data/maps/scripts.asm +++ b/data/maps/scripts.asm @@ -500,3 +500,4 @@ INCLUDE "maps/LakeOfRageMart.asm" INCLUDE "maps/LakeOfRagePrycesHouse.asm" INCLUDE "maps/DebugRoom.asm" INCLUDE "maps/CliffCave.asm" +INCLUDE "maps/BlueForest.asm" diff --git a/data/maps/sgb_roof_pal_inds.asm b/data/maps/sgb_roof_pal_inds.asm index 788abfe..78ebbca 100644 --- a/data/maps/sgb_roof_pal_inds.asm +++ b/data/maps/sgb_roof_pal_inds.asm @@ -31,4 +31,5 @@ MapGroupRoofSGBPalInds: db PREDEFPAL_SAFFRON db PREDEFPAL_CHERRYGROVE db PREDEFPAL_SILENT_HILLS + db PREDEFPAL_BLUE_FOREST assert_table_length NUM_MAP_GROUPS + 1 diff --git a/data/tilesets/nihon_snowy_attributes.bin b/data/tilesets/nihon_snowy_attributes.bin index 8275bcd..b66d60a 100644 Binary files a/data/tilesets/nihon_snowy_attributes.bin and b/data/tilesets/nihon_snowy_attributes.bin differ diff --git a/data/tilesets/nihon_snowy_collision.asm b/data/tilesets/nihon_snowy_collision.asm index 4a901e2..886a3f9 100644 --- a/data/tilesets/nihon_snowy_collision.asm +++ b/data/tilesets/nihon_snowy_collision.asm @@ -2,3 +2,15 @@ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b + tilecoll WALL, DOOR, FLOOR, FLOOR ; 0c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f diff --git a/data/tilesets/nihon_snowy_metatiles.bin b/data/tilesets/nihon_snowy_metatiles.bin index 86c74e0..363b7d8 100644 Binary files a/data/tilesets/nihon_snowy_metatiles.bin and b/data/tilesets/nihon_snowy_metatiles.bin differ diff --git a/engine/tilesets/tileset_palettes.asm b/engine/tilesets/tileset_palettes.asm index 9941022..14530d1 100644 --- a/engine/tilesets/tileset_palettes.asm +++ b/engine/tilesets/tileset_palettes.asm @@ -12,6 +12,8 @@ LoadSpecialMapPalette: jr z, .radio_tower cp TILESET_MANSION jr z, .mansion_mobile + cp TILESET_NIHON_SNOWY + jr z, .snowy jr .do_nothing .pokecom_2f @@ -48,6 +50,11 @@ LoadSpecialMapPalette: scf ret +.snowy + call LoadSnowyPalette + scf + ret + .do_nothing and a ret @@ -135,3 +142,35 @@ LoadMansionPalette: MansionPalette2: INCLUDE "gfx/tilesets/mansion_2.pal" + +LoadSnowyPalette: + ld a, [wTimeOfDay] + and $7 + cp NITE_F + jr z, .nite + cp DAY_F + jr z, .day + scf +;morn + ld a, BANK(wBGPals1) + ld de, wBGPals1 + ld hl, SnowyMornPalette + ld bc, 8 palettes + jp FarCopyWRAM + ret +.day + ld a, BANK(wBGPals1) + ld de, wBGPals1 + ld hl, SnowyDayPalette + ld bc, 8 palettes + jp FarCopyWRAM + ret +.nite + ld a, BANK(wBGPals1) + ld de, wBGPals1 + ld hl, SnowyNitePalette + ld bc, 8 palettes + jp FarCopyWRAM + ret + +INCLUDE "gfx/tilesets/snowy.pal" diff --git a/gfx/sgb/predef.pal b/gfx/sgb/predef.pal index 9299476..05dd7a3 100644 --- a/gfx/sgb/predef.pal +++ b/gfx/sgb/predef.pal @@ -24,6 +24,7 @@ RGB 31,31,31, 26,26,26, 15,20,31, 00,00,00 ; PREDEFPAL_SILVER_CAVE RGB 31,31,31, 21,14,09, 15,20,20, 00,00,00 ; PREDEFPAL_DUNGEONS RGB 31,31,31, 12,28,22, 15,20,20, 00,00,00 ; PREDEFPAL_SILENT_HILLS + RGB 31,31,31, 18,14,31, 15,20,20, 00,00,00 ; PREDEFPAL_BLUE_FOREST RGB 31,31,31, 12,28,22, 15,20,20, 00,00,00 ; PREDEFPAL_NITE RGB 31,31,31, 07,07,07, 02,03,03, 00,00,00 ; PREDEFPAL_BLACKOUT RGB 31,31,31, 30,22,17, 16,14,19, 00,00,00 ; PREDEFPAL_DIPLOMA diff --git a/gfx/tilesets/nihon_snowy.png b/gfx/tilesets/nihon_snowy.png index 09bb716..a14135b 100644 Binary files a/gfx/tilesets/nihon_snowy.png and b/gfx/tilesets/nihon_snowy.png differ diff --git a/gfx/tilesets/roofs.pal b/gfx/tilesets/roofs.pal index 1c32cdd..c101bc8 100644 --- a/gfx/tilesets/roofs.pal +++ b/gfx/tilesets/roofs.pal @@ -109,3 +109,7 @@ ; group 27 (Silent Hills) RGB 09,31,23, 10,22,22 ; morn/day RGB 03,15,17, 02,10,15 ; nite + +; group 28 (Blue Forest) + RGB 24,22,31, 18,14,31 ; morn/day + RGB 12,10,24, 08,03,23 ; nite diff --git a/gfx/tilesets/snowy.pal b/gfx/tilesets/snowy.pal index 4ad6bb4..3b581e1 100644 --- a/gfx/tilesets/snowy.pal +++ b/gfx/tilesets/snowy.pal @@ -1,24 +1,24 @@ -; morn +SnowyMornPalette: RGB 29,31,21, 23,23,31, 13,13,18, 07,07,07 ; gray RGB 29,31,21, 31,19,24, 30,10,06, 07,07,07 ; red - RGB 29,31,21, 12,25,01, 05,14,00, 07,07,07 ; green (cyan) + RGB 29,31,21, 09,28,31, 16,11,31, 07,07,07 ; green (cyan) RGB 31,31,31, 08,12,31, 01,04,31, 07,07,07 ; water RGB 29,31,21, 31,31,07, 31,16,01, 07,07,07 ; yellow RGB 29,31,21, 24,18,07, 20,15,03, 07,07,07 ; brown RGB 29,31,21, 15,31,31, 05,17,31, 07,07,07 ; roof RGB 31,31,16, 31,31,16, 14,09,00, 00,00,00 ; text -; day +SnowyDayPalette: RGB 27,31,31, 23,23,31, 13,13,18, 07,07,07 ; gray RGB 27,31,31, 31,19,24, 30,10,06, 07,07,07 ; red - RGB 27,31,31, 12,25,01, 05,14,00, 07,07,07 ; green (cyan) + RGB 27,31,31, 09,28,31, 16,11,31, 07,07,07 ; green (cyan) RGB 31,31,31, 08,12,31, 01,04,31, 07,07,07 ; water RGB 27,31,31, 31,31,07, 31,16,01, 07,07,07 ; yellow RGB 27,31,31, 24,18,07, 20,15,03, 07,07,07 ; brown RGB 27,31,31, 15,31,31, 05,17,31, 07,07,07 ; roof RGB 31,31,16, 31,31,16, 14,09,00, 00,00,00 ; text -; nite +SnowyNitePalette: RGB 15,14,24, 11,11,22, 07,07,16, 00,00,00 ; gray RGB 15,14,24, 14,07,17, 13,00,08, 00,00,00 ; red RGB 15,14,24, 02,12,23, 05,05,17, 00,00,00 ; green (cyan) @@ -26,4 +26,5 @@ RGB 30,30,11, 16,14,18, 16,14,10, 00,00,00 ; yellow RGB 15,14,24, 12,09,15, 08,04,05, 00,00,00 ; brown RGB 15,14,24, 13,12,23, 11,09,20, 00,00,00 ; roof - RGB 31,31,16, 31,31,16, 14,09,00, 00,00,00 ; text \ No newline at end of file + RGB 31,31,16, 31,31,16, 14,09,00, 00,00,00 ; text + \ No newline at end of file diff --git a/maps/BlueForest.ablk b/maps/BlueForest.ablk new file mode 100644 index 0000000..3d2ed6f Binary files /dev/null and b/maps/BlueForest.ablk differ diff --git a/maps/BlueForest.asm b/maps/BlueForest.asm new file mode 100644 index 0000000..7a4827d --- /dev/null +++ b/maps/BlueForest.asm @@ -0,0 +1,18 @@ + object_const_def + +BlueForest_MapScripts: + def_scene_scripts + + def_callbacks + +BlueForest_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 22, DEBUG_ROOM, 1 + + def_coord_events + + def_bg_events + + def_object_events \ No newline at end of file diff --git a/maps/DebugRoom.asm b/maps/DebugRoom.asm index aee8ae3..586b41d 100644 --- a/maps/DebugRoom.asm +++ b/maps/DebugRoom.asm @@ -97,10 +97,10 @@ DebugRoom_MapEvents: warp_event 15, 2, GOLDENROD_CITY, 1 ; city warp warp_event 4, 9, PALLET_TOWN, 1 ; left lab/league warp warp_event 5, 9, PALLET_TOWN, 1 ; right lab/league warp - warp_event 35, 17, VIRIDIAN_FOREST, 1 ; east warp - warp_event 5, 35, VIRIDIAN_FOREST, 1 ; southwest warp - warp_event 19, 34, VIRIDIAN_FOREST, 1 ; southern warp - warp_event 33, 33, VIRIDIAN_FOREST, 1 ; southeast warp + warp_event 35, 17, BLUE_FOREST, 1 ; east warp + warp_event 5, 35, BLUE_FOREST, 1 ; southwest warp + warp_event 19, 34, BLUE_FOREST, 1 ; southern warp + warp_event 33, 33, BLUE_FOREST, 1 ; southeast warp warp_event 5, 3, AZALEA_TOWN, 1 warp_event 34, 11, CLIFF_CAVE, 1