From 63912e8bef35885096451b4f89787e06aafe999b Mon Sep 17 00:00:00 2001 From: xCrystal Date: Mon, 2 Oct 2023 16:11:52 +0200 Subject: [PATCH] Add debug maps for testing --- constants/engine_flags.asm | 4 ++++ constants/map_constants.asm | 16 ++++++++++++++++ constants/map_data_constants.asm | 4 ++++ data/events/engine_flags.asm | 4 ++++ data/level_selection_menu.asm | 8 ++++---- data/maps/attributes.asm | 4 ++++ data/maps/blocks.asm | 12 ++++++++++++ data/maps/maps.asm | 24 ++++++++++++++++++++++++ data/maps/outdoor_sprites.asm | 8 ++++++++ data/maps/roofs.asm | 4 ++++ data/maps/scripts.asm | 4 ++++ data/maps/spawn_points.asm | 4 ++++ gfx/tilesets/roofs.pal | 24 ++++++++++++++++++++++++ maps/DebugLevel2_Map1.asm | 17 +++++++++++++++++ maps/DebugLevel2_Map1.blk | 1 + maps/DebugLevel3_Map1.asm | 17 +++++++++++++++++ maps/DebugLevel3_Map1.blk | 1 + maps/DebugLevel4_Map1.asm | 17 +++++++++++++++++ maps/DebugLevel4_Map1.blk | 1 + maps/DebugLevel5_Map1.asm | 17 +++++++++++++++++ maps/DebugLevel5_Map1.blk | 1 + 21 files changed, 188 insertions(+), 4 deletions(-) create mode 100755 maps/DebugLevel2_Map1.asm create mode 100755 maps/DebugLevel2_Map1.blk create mode 100755 maps/DebugLevel3_Map1.asm create mode 100755 maps/DebugLevel3_Map1.blk create mode 100755 maps/DebugLevel4_Map1.asm create mode 100755 maps/DebugLevel4_Map1.blk create mode 100755 maps/DebugLevel5_Map1.asm create mode 100755 maps/DebugLevel5_Map1.blk diff --git a/constants/engine_flags.asm b/constants/engine_flags.asm index 8d846be95..a2a4f4fd5 100644 --- a/constants/engine_flags.asm +++ b/constants/engine_flags.asm @@ -64,6 +64,10 @@ const ENGINE_FLYPOINT_LEVEL_1 if DEF(_DEBUG) const ENGINE_FLYPOINT_DEBUGLEVEL_1 + const ENGINE_FLYPOINT_DEBUGLEVEL_2 + const ENGINE_FLYPOINT_DEBUGLEVEL_3 + const ENGINE_FLYPOINT_DEBUGLEVEL_4 + const ENGINE_FLYPOINT_DEBUGLEVEL_5 endc const ENGINE_FLYPOINT_UNUSED ; wLuckyNumberShowFlag diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 5bbc48882..0492caee6 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -48,6 +48,22 @@ if DEF(_DEBUG) newgroup DEBUGLEVEL_1 map_const DEBUGLEVEL_1_MAP_1, 5, 4 ; 1 endgroup + + newgroup DEBUGLEVEL_2 + map_const DEBUGLEVEL_2_MAP_1, 5, 4 ; 1 + endgroup + + newgroup DEBUGLEVEL_3 + map_const DEBUGLEVEL_3_MAP_1, 5, 4 ; 1 + endgroup + + newgroup DEBUGLEVEL_4 + map_const DEBUGLEVEL_4_MAP_1, 5, 4 ; 1 + endgroup + + newgroup DEBUGLEVEL_5 + map_const DEBUGLEVEL_5_MAP_1, 5, 4 ; 1 + endgroup endc DEF NUM_MAP_GROUPS EQU const_value diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm index 16225ef4b..237b99cef 100644 --- a/constants/map_data_constants.asm +++ b/constants/map_data_constants.asm @@ -81,6 +81,10 @@ DEF NUM_FISHGROUPS EQU const_value - 1 ; const SPAWN_LEVEL_2 if DEF(_DEBUG) const SPAWN_DEBUGLEVEL_1 + const SPAWN_DEBUGLEVEL_2 + const SPAWN_DEBUGLEVEL_3 + const SPAWN_DEBUGLEVEL_4 + const SPAWN_DEBUGLEVEL_5 endc DEF NUM_SPAWNS EQU const_value DEF SPAWN_N_A EQU -1 diff --git a/data/events/engine_flags.asm b/data/events/engine_flags.asm index 97cf0a3ce..61dc0d8cf 100644 --- a/data/events/engine_flags.asm +++ b/data/events/engine_flags.asm @@ -74,6 +74,10 @@ EngineFlags: engine_flag wVisitedSpawns, SPAWN_LEVEL_1 if DEF(_DEBUG) engine_flag wVisitedSpawns, SPAWN_DEBUGLEVEL_1 + engine_flag wVisitedSpawns, SPAWN_DEBUGLEVEL_2 + engine_flag wVisitedSpawns, SPAWN_DEBUGLEVEL_3 + engine_flag wVisitedSpawns, SPAWN_DEBUGLEVEL_4 + engine_flag wVisitedSpawns, SPAWN_DEBUGLEVEL_5 endc engine_flag wVisitedSpawns, NUM_SPAWNS ; unused diff --git a/data/level_selection_menu.asm b/data/level_selection_menu.asm index fdc5f8515..384b1dd52 100755 --- a/data/level_selection_menu.asm +++ b/data/level_selection_menu.asm @@ -22,10 +22,10 @@ LevelSelectionMenu_Landmarks: .landmark2 if DEF(_DEBUG) level_selection_menu_landmark 0, 16, 11, .DebugLevel1LandmarkName, SPAWN_DEBUGLEVEL_1 ; LANDMARK_DEBUGLEVEL_1 - level_selection_menu_landmark 0, 11, 9, .DebugLevel2LandmarkName, SPAWN_DEBUGLEVEL_1 ; LANDMARK_DEBUGLEVEL_2 - level_selection_menu_landmark 0, 9, 11, .DebugLevel3LandmarkName, SPAWN_DEBUGLEVEL_1 ; LANDMARK_DEBUGLEVEL_3 - level_selection_menu_landmark 1, 16, 11, .DebugLevel4LandmarkName, SPAWN_DEBUGLEVEL_1 ; LANDMARK_DEBUGLEVEL_4 - level_selection_menu_landmark 2, 9, 5, .DebugLevel5LandmarkName, SPAWN_DEBUGLEVEL_1 ; LANDMARK_DEBUGLEVEL_5 + level_selection_menu_landmark 0, 11, 9, .DebugLevel2LandmarkName, SPAWN_DEBUGLEVEL_2 ; LANDMARK_DEBUGLEVEL_2 + level_selection_menu_landmark 0, 9, 11, .DebugLevel3LandmarkName, SPAWN_DEBUGLEVEL_3 ; LANDMARK_DEBUGLEVEL_3 + level_selection_menu_landmark 1, 16, 11, .DebugLevel4LandmarkName, SPAWN_DEBUGLEVEL_4 ; LANDMARK_DEBUGLEVEL_4 + level_selection_menu_landmark 2, 9, 5, .DebugLevel5LandmarkName, SPAWN_DEBUGLEVEL_5 ; LANDMARK_DEBUGLEVEL_5 endc .Level1LandmarkName: db "LEVEL 1@" diff --git a/data/maps/attributes.asm b/data/maps/attributes.asm index 0b7df0803..ec1e752fc 100644 --- a/data/maps/attributes.asm +++ b/data/maps/attributes.asm @@ -108,4 +108,8 @@ if DEF(_DEBUG) map_attributes DebugLevel1_Map1, DEBUGLEVEL_1_MAP_1, $00, SOUTH | NORTH connection south, DebugLevel1_Map1, DEBUGLEVEL_1_MAP_1, 0 connection north, DebugLevel1_Map1, DEBUGLEVEL_1_MAP_1, 0 + map_attributes DebugLevel2_Map1, DEBUGLEVEL_2_MAP_1, $00, 0 + map_attributes DebugLevel3_Map1, DEBUGLEVEL_3_MAP_1, $00, 0 + map_attributes DebugLevel4_Map1, DEBUGLEVEL_4_MAP_1, $00, 0 + map_attributes DebugLevel5_Map1, DEBUGLEVEL_5_MAP_1, $00, 0 endc diff --git a/data/maps/blocks.asm b/data/maps/blocks.asm index a20cb588d..26594bd44 100644 --- a/data/maps/blocks.asm +++ b/data/maps/blocks.asm @@ -6,4 +6,16 @@ INCBIN "maps/Level1_Map1.blk" if DEF(_DEBUG) DebugLevel1_Map1_Blocks: INCBIN "maps/DebugLevel1_Map1.blk" + +DebugLevel2_Map1_Blocks: +INCBIN "maps/DebugLevel2_Map1.blk" + +DebugLevel3_Map1_Blocks: +INCBIN "maps/DebugLevel3_Map1.blk" + +DebugLevel4_Map1_Blocks: +INCBIN "maps/DebugLevel4_Map1.blk" + +DebugLevel5_Map1_Blocks: +INCBIN "maps/DebugLevel5_Map1.blk" endc diff --git a/data/maps/maps.asm b/data/maps/maps.asm index 66a6d6b45..f5530bf80 100644 --- a/data/maps/maps.asm +++ b/data/maps/maps.asm @@ -21,6 +21,10 @@ MapGroupPointers:: ; dw MapGroup_Level2 ; 2 if DEF(_DEBUG) dw MapGroup_DebugLevel1 ; 1 + dw MapGroup_DebugLevel2 ; 2 + dw MapGroup_DebugLevel3 ; 3 + dw MapGroup_DebugLevel4 ; 4 + dw MapGroup_DebugLevel5 ; 5 endc assert_table_length NUM_MAP_GROUPS @@ -40,4 +44,24 @@ MapGroup_DebugLevel1: table_width MAP_LENGTH, MapGroup_DebugLevel1 map DebugLevel1_Map1, TILESET_PLAYERS_ROOM, INDOOR_BUILDING, LANDMARK_DEBUGLEVEL_1, MUSIC_NEW_BARK_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE assert_table_length NUM_DEBUGLEVEL_1_MAPS + +MapGroup_DebugLevel2: + table_width MAP_LENGTH, MapGroup_DebugLevel2 + map DebugLevel2_Map1, TILESET_CAVE, INDOOR_CAVE, LANDMARK_DEBUGLEVEL_2, MUSIC_NEW_BARK_TOWN, FALSE, PALETTE_NITE | IN_DARKNESS, FISHGROUP_SHORE + assert_table_length NUM_DEBUGLEVEL_2_MAPS + +MapGroup_DebugLevel3: + table_width MAP_LENGTH, MapGroup_DebugLevel3 + map DebugLevel3_Map1, TILESET_FOREST, INDOOR_FOREST, LANDMARK_DEBUGLEVEL_3, MUSIC_NEW_BARK_TOWN, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + assert_table_length NUM_DEBUGLEVEL_3_MAPS + +MapGroup_DebugLevel4: + table_width MAP_LENGTH, MapGroup_DebugLevel4 + map DebugLevel4_Map1, TILESET_JOHTO, OUTDOOR_GRASSY, LANDMARK_DEBUGLEVEL_4, MUSIC_NEW_BARK_TOWN, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + assert_table_length NUM_DEBUGLEVEL_4_MAPS + +MapGroup_DebugLevel5: + table_width MAP_LENGTH, MapGroup_DebugLevel5 + map DebugLevel5_Map1, TILESET_JOHTO, OUTDOOR_GRASSY, LANDMARK_DEBUGLEVEL_5, MUSIC_NEW_BARK_TOWN, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + assert_table_length NUM_DEBUGLEVEL_5_MAPS endc \ No newline at end of file diff --git a/data/maps/outdoor_sprites.asm b/data/maps/outdoor_sprites.asm index a99a7168d..0f6a89830 100644 --- a/data/maps/outdoor_sprites.asm +++ b/data/maps/outdoor_sprites.asm @@ -8,6 +8,10 @@ OutdoorSprites: ; dw Level2GroupSprites if DEF(_DEBUG) dw DebugLevel1GroupSprites + dw DebugLevel2GroupSprites + dw DebugLevel3GroupSprites + dw DebugLevel4GroupSprites + dw DebugLevel5GroupSprites endc assert_table_length NUM_MAP_GROUPS @@ -33,6 +37,10 @@ Level1GroupSprites: if DEF(_DEBUG) DebugLevel1GroupSprites: +DebugLevel2GroupSprites: +DebugLevel3GroupSprites: +DebugLevel4GroupSprites: +DebugLevel5GroupSprites: db SPRITE_YOUNGSTER db SPRITE_BUG_CATCHER db SPRITE_FISHER diff --git a/data/maps/roofs.asm b/data/maps/roofs.asm index fe2eb1a66..92ffcdefd 100644 --- a/data/maps/roofs.asm +++ b/data/maps/roofs.asm @@ -15,6 +15,10 @@ MapGroupRoofs: db ROOF_OLIVINE ; 1 (Level1) if DEF(_DEBUG) db ROOF_OLIVINE ; 1 (DebugLevel1) + db ROOF_OLIVINE ; 2 (DebugLevel2) + db ROOF_OLIVINE ; 3 (DebugLevel3) + db ROOF_OLIVINE ; 4 (DebugLevel4) + db ROOF_OLIVINE ; 5 (DebugLevel5) endc assert_table_length NUM_MAP_GROUPS + 1 diff --git a/data/maps/scripts.asm b/data/maps/scripts.asm index 8b648148f..1988b12a7 100644 --- a/data/maps/scripts.asm +++ b/data/maps/scripts.asm @@ -4,4 +4,8 @@ INCLUDE "maps/Level1_Map1.asm" if DEF(_DEBUG) INCLUDE "maps/DebugLevel1_Map1.asm" +INCLUDE "maps/DebugLevel2_Map1.asm" +INCLUDE "maps/DebugLevel3_Map1.asm" +INCLUDE "maps/DebugLevel4_Map1.asm" +INCLUDE "maps/DebugLevel5_Map1.asm" endc diff --git a/data/maps/spawn_points.asm b/data/maps/spawn_points.asm index 254248f0e..5a14b2fed 100644 --- a/data/maps/spawn_points.asm +++ b/data/maps/spawn_points.asm @@ -12,6 +12,10 @@ SpawnPoints: ; spawn LEVEL_2_MAP_1, 5, 3 ; SPAWN_LEVEL_2 if DEF(_DEBUG) spawn DEBUGLEVEL_1_MAP_1, 3, 3, ; SPAWN_DEBUGLEVEL_1 + spawn DEBUGLEVEL_2_MAP_1, 3, 3, ; SPAWN_DEBUGLEVEL_2 + spawn DEBUGLEVEL_3_MAP_1, 3, 3, ; SPAWN_DEBUGLEVEL_3 + spawn DEBUGLEVEL_4_MAP_1, 3, 3, ; SPAWN_DEBUGLEVEL_4 + spawn DEBUGLEVEL_5_MAP_1, 3, 3, ; SPAWN_DEBUGLEVEL_5 endc spawn N_A, -1, -1 diff --git a/gfx/tilesets/roofs.pal b/gfx/tilesets/roofs.pal index 270fb7bc0..760a58eb4 100644 --- a/gfx/tilesets/roofs.pal +++ b/gfx/tilesets/roofs.pal @@ -16,6 +16,30 @@ if DEF(_DEBUG) RGB 14,17,31, 07,11,15 ; day RGB 09,09,17, 05,07,13 ; nite RGB 12,13,23, 06,08,11 ; eve + +; debug group 2 (DebugLevel2) + RGB 14,17,31, 07,11,15 ; morn + RGB 14,17,31, 07,11,15 ; day + RGB 09,09,17, 05,07,13 ; nite + RGB 12,13,23, 06,08,11 ; eve + +; debug group 3 (DebugLevel3) + RGB 14,17,31, 07,11,15 ; morn + RGB 14,17,31, 07,11,15 ; day + RGB 09,09,17, 05,07,13 ; nite + RGB 12,13,23, 06,08,11 ; eve + +; debug group 4 (DebugLevel4) + RGB 14,17,31, 07,11,15 ; morn + RGB 14,17,31, 07,11,15 ; day + RGB 09,09,17, 05,07,13 ; nite + RGB 12,13,23, 06,08,11 ; eve + +; debug group 5 (DebugLevel5) + RGB 14,17,31, 07,11,15 ; morn + RGB 14,17,31, 07,11,15 ; day + RGB 09,09,17, 05,07,13 ; nite + RGB 12,13,23, 06,08,11 ; eve endc ; group 2 (Mahogany) diff --git a/maps/DebugLevel2_Map1.asm b/maps/DebugLevel2_Map1.asm new file mode 100755 index 000000000..4b48f8426 --- /dev/null +++ b/maps/DebugLevel2_Map1.asm @@ -0,0 +1,17 @@ + object_const_def + +DebugLevel2_Map1_MapScripts: + def_scene_scripts + + def_callbacks + +DebugLevel2_Map1_MapEvents: + db 0, 0 ; filler + + def_warp_events + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/DebugLevel2_Map1.blk b/maps/DebugLevel2_Map1.blk new file mode 100755 index 000000000..44a18c06b --- /dev/null +++ b/maps/DebugLevel2_Map1.blk @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/maps/DebugLevel3_Map1.asm b/maps/DebugLevel3_Map1.asm new file mode 100755 index 000000000..daa664a22 --- /dev/null +++ b/maps/DebugLevel3_Map1.asm @@ -0,0 +1,17 @@ + object_const_def + +DebugLevel3_Map1_MapScripts: + def_scene_scripts + + def_callbacks + +DebugLevel3_Map1_MapEvents: + db 0, 0 ; filler + + def_warp_events + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/DebugLevel3_Map1.blk b/maps/DebugLevel3_Map1.blk new file mode 100755 index 000000000..b0a311851 --- /dev/null +++ b/maps/DebugLevel3_Map1.blk @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/maps/DebugLevel4_Map1.asm b/maps/DebugLevel4_Map1.asm new file mode 100755 index 000000000..16b3937a1 --- /dev/null +++ b/maps/DebugLevel4_Map1.asm @@ -0,0 +1,17 @@ + object_const_def + +DebugLevel4_Map1_MapScripts: + def_scene_scripts + + def_callbacks + +DebugLevel4_Map1_MapEvents: + db 0, 0 ; filler + + def_warp_events + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/DebugLevel4_Map1.blk b/maps/DebugLevel4_Map1.blk new file mode 100755 index 000000000..b0a311851 --- /dev/null +++ b/maps/DebugLevel4_Map1.blk @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/maps/DebugLevel5_Map1.asm b/maps/DebugLevel5_Map1.asm new file mode 100755 index 000000000..8e8048b74 --- /dev/null +++ b/maps/DebugLevel5_Map1.asm @@ -0,0 +1,17 @@ + object_const_def + +DebugLevel5_Map1_MapScripts: + def_scene_scripts + + def_callbacks + +DebugLevel5_Map1_MapEvents: + db 0, 0 ; filler + + def_warp_events + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/DebugLevel5_Map1.blk b/maps/DebugLevel5_Map1.blk new file mode 100755 index 000000000..dc973931c --- /dev/null +++ b/maps/DebugLevel5_Map1.blk @@ -0,0 +1 @@ + \ No newline at end of file