diff --git a/constants/engine_flags.asm b/constants/engine_flags.asm index 4c837d3..1420c28 100644 --- a/constants/engine_flags.asm +++ b/constants/engine_flags.asm @@ -109,6 +109,7 @@ const ENGINE_FLYPOINT_OLD const ENGINE_FLYPOINT_SAVOY const ENGINE_FLYPOINT_CORAL + const ENGINE_FLYPOINT_RUDDY const ENGINE_FLYPOINT_UNUSED ; wLuckyNumberShowFlag const ENGINE_LUCKY_NUMBER_SHOW diff --git a/constants/landmark_constants.asm b/constants/landmark_constants.asm index 62d1d8d..795da4f 100644 --- a/constants/landmark_constants.asm +++ b/constants/landmark_constants.asm @@ -141,6 +141,7 @@ DEF NIHON_LANDMARK EQU const_value const LANDMARK_CORAL_CITY const LANDMARK_ROUTE_51 const LANDMARK_ROUTE_52 + const LANDMARK_RUDDY_TOWN const LANDMARK_BLUE_FOREST const LANDMARK_ROUTE_66 const LANDMARK_WHITE_CITY diff --git a/constants/map_constants.asm b/constants/map_constants.asm index a1697e3..7abdfe0 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -679,13 +679,17 @@ ENDM map_const ROUTE_52, 10, 27 ; 3 endgroup - newgroup BLUE_FOREST ; 39 + newgroup RUDDY_TOWN ; 39 + map_const RUDDY_TOWN, 20, 18 ; 1 + endgroup + + newgroup BLUE_FOREST ; 40 map_const BLUE_FOREST, 20, 18 ; 1 endgroup - newgroup WHITE_CITY ; 40 + newgroup WHITE_CITY ; 41 map_const WHITE_CITY, 30, 27 ; 1 map_const ROUTE_66_WHITE_CITY_GATE, 5, 4 ; 2 endgroup -DEF NUM_MAP_GROUPS EQU const_value ; 40 +DEF NUM_MAP_GROUPS EQU const_value ; 41 diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm index 29678c8..05cb2ce 100644 --- a/constants/map_data_constants.asm +++ b/constants/map_data_constants.asm @@ -117,6 +117,7 @@ DEF NUM_FISHGROUPS EQU const_value - 1 const SPAWN_OLD_CITY const SPAWN_SAVOY_CITY const SPAWN_CORAL_CITY + const SPAWN_RUDDY_TOWN DEF NUM_SPAWNS EQU const_value DEF SPAWN_N_A EQU -1 @@ -165,6 +166,7 @@ DEF NIHON_FLYPOINT EQU const_value const FLY_OLD_CITY const FLY_SAVOY_CITY const FLY_CORAL_CITY + const FLY_RUDDY_TOWN DEF NUM_FLYPOINTS EQU const_value DEF MAX_OUTDOOR_SPRITES EQU 23 ; see engine/overworld/overworld.asm diff --git a/constants/scgb_constants.asm b/constants/scgb_constants.asm index 03bfe92..01afbe0 100644 --- a/constants/scgb_constants.asm +++ b/constants/scgb_constants.asm @@ -182,6 +182,8 @@ DEF SCGB_DEFAULT EQU $ff const PREDEFPAL_WHITE_CITY_MORN const PREDEFPAL_ROUTES_NIHON_MORN const PREDEFPAL_GATES_NIHON_MORN + const PREDEFPAL_RUDDY_TOWN + const PREDEFPAL_RUDDY_TOWN_MORN DEF NUM_PREDEF_PALS EQU const_value ; SGB system command codes diff --git a/data/events/engine_flags.asm b/data/events/engine_flags.asm index 82a8311..75c2567 100644 --- a/data/events/engine_flags.asm +++ b/data/events/engine_flags.asm @@ -119,6 +119,7 @@ EngineFlags: engine_flag wVisitedSpawns, SPAWN_OLD_CITY engine_flag wVisitedSpawns, SPAWN_SAVOY_CITY engine_flag wVisitedSpawns, SPAWN_CORAL_CITY + engine_flag wVisitedSpawns, SPAWN_RUDDY_TOWN engine_flag wVisitedSpawns, NUM_SPAWNS ; unused engine_flag wLuckyNumberShowFlag, LUCKYNUMBERSHOW_GAME_OVER_F diff --git a/data/maps/attributes.asm b/data/maps/attributes.asm index b50f5eb..744a644 100644 --- a/data/maps/attributes.asm +++ b/data/maps/attributes.asm @@ -904,6 +904,8 @@ ENDM map_attributes Route52, ROUTE_52, $6C, EAST connection east, Route51, ROUTE_51, 18 + map_attributes RuddyTown, RUDDY_TOWN, $04, 0 + map_attributes BlueForest, BLUE_FOREST, $00, 0 ; this is on its own for now. add connections later. map_attributes WhiteCity, WHITE_CITY, $01, 0 ; this is on its own for now. add connections later. diff --git a/data/maps/blocks.asm b/data/maps/blocks.asm index 8020d1b..645e596 100644 --- a/data/maps/blocks.asm +++ b/data/maps/blocks.asm @@ -1322,3 +1322,6 @@ Route51_Blocks: Route52_Blocks: INCBIN "maps/Route52.ablk" + +RuddyTown_Blocks: + INCBIN "maps/RuddyTown.ablk" diff --git a/data/maps/flypoints.asm b/data/maps/flypoints.asm index c7f3db4..8c28094 100644 --- a/data/maps/flypoints.asm +++ b/data/maps/flypoints.asm @@ -41,4 +41,5 @@ Flypoints: db LANDMARK_OLD_CITY, SPAWN_OLD_CITY db LANDMARK_SAVOY_CITY, SPAWN_SAVOY_CITY db LANDMARK_CORAL_CITY, SPAWN_CORAL_CITY + db LANDMARK_RUDDY_TOWN, SPAWN_RUDDY_TOWN db -1 ; end diff --git a/data/maps/landmarks.asm b/data/maps/landmarks.asm index 550bb1e..003a296 100644 --- a/data/maps/landmarks.asm +++ b/data/maps/landmarks.asm @@ -145,6 +145,7 @@ Landmarks: landmark 36, 92, CoralCityName landmark 24, 92, Route52Name landmark 12, 84, Route53Name + landmark 12, 68, RuddyTownName landmark 140, 60, BlueForestName landmark 108, 108, Route66Name landmark 124, 108, WhiteCityName @@ -276,5 +277,6 @@ OldCityName: db "SEPIA¯CITY@" PokemonPagodaName: db "#MON¯PAGODA@" SavoyCityName: db "SAVOY¯CITY@" CoralCityName: db "CORAL¯CITY@" +RuddyTownName: db "RUDDY¯TOWN@" BlueForestName: db "BLUE¯FOREST@" WhiteCityName: db "WHITE¯CITY@" diff --git a/data/maps/maps.asm b/data/maps/maps.asm index 9f1ef87..5934489 100644 --- a/data/maps/maps.asm +++ b/data/maps/maps.asm @@ -55,8 +55,9 @@ MapGroupPointers:: dw MapGroup_OldCity ; 36 dw MapGroup_SavoyCity ; 37 dw MapGroup_CoralCity ; 38 - dw MapGroup_BlueForest ; 39 - dw MapGroup_WhiteCity ; 40 + dw MapGroup_RuddyTown ; 39 + dw MapGroup_BlueForest ; 40 + dw MapGroup_WhiteCity ; 41 assert_table_length NUM_MAP_GROUPS MapGroup_Olivine: @@ -743,6 +744,11 @@ MapGroup_CoralCity: map Route52, TILESET_NIHON_HIGHTECH, ROUTE, LANDMARK_ROUTE_52, MUSIC_LAKE_OF_RAGE, FALSE, PALETTE_AUTO, FISHGROUP_SHORE assert_table_length NUM_CORAL_CITY_MAPS +MapGroup_RuddyTown: + table_width MAP_LENGTH, MapGroup_RuddyTown + map RuddyTown, TILESET_NIHON_SOUTH, TOWN, LANDMARK_RUDDY_TOWN, MUSIC_VERMILION_CITY, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + assert_table_length NUM_RUDDY_TOWN_MAPS + MapGroup_BlueForest: table_width MAP_LENGTH, MapGroup_BlueForest map BlueForest, TILESET_NIHON_SNOWY, TOWN, LANDMARK_BLUE_FOREST, MUSIC_SINJOH_RUINS, FALSE, PALETTE_AUTO, FISHGROUP_SHORE diff --git a/data/maps/outdoor_sprites.asm b/data/maps/outdoor_sprites.asm index 0c67aa6..0075191 100644 --- a/data/maps/outdoor_sprites.asm +++ b/data/maps/outdoor_sprites.asm @@ -42,6 +42,7 @@ OutdoorSprites: dw OldCityGroupSprites dw SavoyCityGroupSprites dw CoralCityGroupSprites + dw RuddyTownGroupSprites dw BlueForestGroupSprites dw WhiteCityGroupSprites assert_table_length NUM_MAP_GROUPS @@ -333,6 +334,7 @@ IndigoGroupSprites: BlueForestGroupSprites: ; Will have its own thing eventually WhiteCityGroupSprites: ; Ditto +RuddyTownGroupSprites: ; Ditto NewBarkGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY diff --git a/data/maps/roofs.asm b/data/maps/roofs.asm index 6b1a144..df2db6e 100644 --- a/data/maps/roofs.asm +++ b/data/maps/roofs.asm @@ -50,8 +50,9 @@ MapGroupRoofs: db ROOF_VIOLET ; 36 (Old City) db ROOF_NEW_BARK ; 37 (Savoy City) db ROOF_NEW_BARK ; 38 (Coral City) - db ROOF_NEW_BARK ; 39 (Blue Forest) - db ROOF_NEW_BARK ; 40 (White City) + db ROOF_NEW_BARK ; 38 (Ruddy Town) + db ROOF_NEW_BARK ; 40 (Blue Forest) + db ROOF_NEW_BARK ; 41 (White City) assert_table_length NUM_MAP_GROUPS + 1 Roofs: diff --git a/data/maps/scripts.asm b/data/maps/scripts.asm index 4a2c4f6..6eaabee 100644 --- a/data/maps/scripts.asm +++ b/data/maps/scripts.asm @@ -637,4 +637,5 @@ INCLUDE "maps/SavoyCity.asm" INCLUDE "maps/Route50SavoyCityGate.asm" INCLUDE "maps/CoralCity.asm" INCLUDE "maps/Route51.asm" -INCLUDE "maps/Route52.asm" \ No newline at end of file +INCLUDE "maps/Route52.asm" +INCLUDE "maps/RuddyTown.asm" \ No newline at end of file diff --git a/data/maps/sgb_roof_pal_inds.asm b/data/maps/sgb_roof_pal_inds.asm index c06ce73..e6e920a 100644 --- a/data/maps/sgb_roof_pal_inds.asm +++ b/data/maps/sgb_roof_pal_inds.asm @@ -42,6 +42,7 @@ MapGroupRoofSGBPalInds: db PREDEFPAL_OLD_CITY db PREDEFPAL_SAVOY_CITY db PREDEFPAL_CORAL_CITY + db PREDEFPAL_RUDDY_TOWN db PREDEFPAL_BLUE_FOREST db PREDEFPAL_WHITE_CITY assert_table_length NUM_MAP_GROUPS + 1 @@ -88,6 +89,7 @@ MapGroupRoofSGBPalIndsMorn: db PREDEFPAL_OLD_CITY_MORN db PREDEFPAL_SAVOY_CITY_MORN db PREDEFPAL_CORAL_CITY_MORN + db PREDEFPAL_RUDDY_TOWN_MORN db PREDEFPAL_BLUE_FOREST_MORN db PREDEFPAL_WHITE_CITY_MORN assert_table_length NUM_MAP_GROUPS + 1 \ No newline at end of file diff --git a/data/maps/spawn_points.asm b/data/maps/spawn_points.asm index b7de071..88b78f9 100644 --- a/data/maps/spawn_points.asm +++ b/data/maps/spawn_points.asm @@ -51,6 +51,7 @@ SpawnPoints: spawn OLD_CITY, 27, 29 spawn SAVOY_CITY, 25, 15 spawn CORAL_CITY, 31, 11 + spawn RUDDY_TOWN, 35, 15 spawn N_A, -1, -1 diff --git a/data/tilesets/nihon_south_collision.asm b/data/tilesets/nihon_south_collision.asm index b760cc6..4401308 100644 --- a/data/tilesets/nihon_south_collision.asm +++ b/data/tilesets/nihon_south_collision.asm @@ -12,8 +12,8 @@ tilecoll WALL, WALL, FLOOR, FLOOR ; 0b tilecoll FLOOR, WALL, WALL, WALL ; 0c tilecoll WARP_CARPET_DOWN, WARP_CARPET_DOWN, WALL, WALL ; 0d - tilecoll FLOOR, FLOOR, WALL, WALL ; 0e - tilecoll WALL, WALL, WALL, WALL ; 0f + tilecoll WALL, FLOOR, WALL, WALL ; 0e + tilecoll WALL, WALL, WALL, DOOR ; 0f tilecoll WALL, WALL, WALL, WALL ; 10 tilecoll WALL, WALL, WALL, WALL ; 11 tilecoll WALL, WALL, WALL, WALL ; 12 @@ -58,7 +58,7 @@ tilecoll WALL, WALL, FLOOR, WALL ; 39 tilecoll WATER, WATER, WATER, WATER ; 3a tilecoll WATER, WATER, WATER, WATER ; 3b - tilecoll WALL, FLOOR, WALL, WALL ; 3c + tilecoll WALL, FLOOR, WALL, FLOOR ; 3c tilecoll WALL, WALL, WALL, WALL ; 3d tilecoll WALL, WALL, WALL, WALL ; 3e tilecoll FLOOR, FLOOR, WALL, FLOOR ; 3f diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm index de51331..1104825 100644 --- a/engine/gfx/color.asm +++ b/engine/gfx/color.asm @@ -955,19 +955,19 @@ _InitSGBBorderPals: dw DataSndPacket7 dw DataSndPacket8 -UpdateSGBBorder: ; unreferenced - di - xor a - ldh [rJOYP], a - ld hl, MaskEnFreezePacket - call _PushSGBPals - call PushSGBBorder - call SGBDelayCycles - call SGB_ClearVRAM - ld hl, MaskEnCancelPacket - call _PushSGBPals - ei - ret +;UpdateSGBBorder: ; unreferenced +; di +; xor a +; ldh [rJOYP], a +; ld hl, MaskEnFreezePacket +; call _PushSGBPals +; call PushSGBBorder +; call SGBDelayCycles +; call SGB_ClearVRAM +; ld hl, MaskEnCancelPacket +; call _PushSGBPals +; ei +; ret PushSGBBorder: call .LoadSGBBorderPointers diff --git a/gfx/sgb/predef.pal b/gfx/sgb/predef.pal index 6595688..c62a15c 100644 --- a/gfx/sgb/predef.pal +++ b/gfx/sgb/predef.pal @@ -134,4 +134,5 @@ RGB 31,31,31, 27,26,25, 12,15,20, 00,00,00 ; PREDEFPAL_WHITE_CITY_MORN RGB 31,31,31, 21,21,16, 12,15,20, 00,00,00 ; PREDEFPAL_ROUTES_NIHON_MORN RGB 31,31,31, 16,16,16, 12,15,20, 00,00,00 ; PREDEFPAL_GATES_NIHON_MORN - \ No newline at end of file + RGB 31,31,31, 26,10,06, 15,20,20, 00,00,00 ; PREDEFPAL_RUDDY_TOWN + RGB 31,31,31, 23,09,04, 12,15,20, 00,00,00 ; PREDEFPAL_RUDDY_TOWN_MORN # \ No newline at end of file diff --git a/gfx/tilesets/roofs.pal b/gfx/tilesets/roofs.pal index b43d7d5..ef50566 100644 --- a/gfx/tilesets/roofs.pal +++ b/gfx/tilesets/roofs.pal @@ -146,11 +146,15 @@ ; group 30 (Coral City) RGB 31,14,20, 27,05,16 ; morn/day RGB 14,03,17, 09,03,12 ; nite + +; group 31 (Ruddy Town) + RGB 28,08,05, 20,09,02 ; morn/day + RGB 14,07,08, 12,02,04 ; nite -; group 31 (Blue Forest) +; group 32 (Blue Forest) RGB 24,22,31, 18,14,31 ; morn/day RGB 12,10,24, 08,03,23 ; nite -; group 32 (White City) +; group 33 (White City) RGB 27,28,31, 24,24,26 ; morn/day RGB 13,12,24, 11,09,22 ; nite diff --git a/maps/Route52.asm b/maps/Route52.asm index 36a0112..1b7fc74 100644 --- a/maps/Route52.asm +++ b/maps/Route52.asm @@ -9,7 +9,9 @@ Route52_MapEvents: db 0, 0 ; filler def_warp_events - + warp_event 8, 9, RUDDY_TOWN, 1 + warp_event 9, 9, RUDDY_TOWN, 2 + def_coord_events def_bg_events diff --git a/maps/RuddyTown.ablk b/maps/RuddyTown.ablk index 2b74359..7df5e2c 100644 --- a/maps/RuddyTown.ablk +++ b/maps/RuddyTown.ablk @@ -1,3 +1,3 @@ -,@--A.,-0112-O((((0145B612NNNNNN=//?1H/>((L'''P((<11+C317P+//?11H3#:;(+/C3:KG;I''J -ME$%&& ()**' - !!!!!!"  \ No newline at end of file +,@--A.,-0112-O((((0145B612NNNNNN=//?1H/>((L'''P((<11+C317P+//?11H3#:;(+/C3:KG;I''J +ME$%&&& ()***' + !!!!!!"  \ No newline at end of file diff --git a/maps/RuddyTown.asm b/maps/RuddyTown.asm new file mode 100644 index 0000000..91ffd6f --- /dev/null +++ b/maps/RuddyTown.asm @@ -0,0 +1,25 @@ + object_const_def + +RuddyTown_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, .Flypoint + +.Flypoint: + setflag ENGINE_FLYPOINT_RUDDY + return + +RuddyTown_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 28, 30, ROUTE_52, 1 + warp_event 29, 30, ROUTE_52, 2 + + def_coord_events + + def_bg_events + + def_object_events +