diff --git a/.gitignore b/.gitignore index 21ba2828a..991dad6ef 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,9 @@ tools/*dSYM/ graphs/ tools/Flips/**/CMakeLists.txt +# Test Suite files +testsuite* + # Per-user configuration # If you want to use your own gitignore rules without modifying this file: # - use `git config core.excludesFile path/to/my_gitignore_file` diff --git a/.make_hackeroot.mk b/.make_hackeroot.mk index a73cc0c31..52600a5c2 100644 --- a/.make_hackeroot.mk +++ b/.make_hackeroot.mk @@ -1,5 +1,8 @@ #### Compiling #### +TESTSUITE_MODE ?= 0 +CPP_DEFINES += -DTESTSUITE_MODE=$(TESTSUITE_MODE) + # Returns the path to the command $(1) if exists. Otherwise returns an empty string. find-command = $(shell which $(1) 2>/dev/null) diff --git a/Makefile b/Makefile index 9601e1a5b..f83c2a158 100644 --- a/Makefile +++ b/Makefile @@ -637,6 +637,9 @@ $(ROM): $(ELF) @$(PRINT) "${GREEN}Rom Path: $(BLUE)$(ROM)$(NO_COL)\n" @$(PRINT) "${GREEN}Build Author: $(BLUE)$(PACKAGE_AUTHOR)$(NO_COL)\n" @$(PRINT) "${GREEN}Commit Author: $(BLUE)$(PACKAGE_COMMIT_AUTHOR)$(NO_COL)\n" +ifeq ($(TESTSUITE_MODE),1) + @$(PRINT) "${GREEN}Made with HackerTestSuite$(NO_COL)\n" +endif @$(PRINT) "${BLINK}Build succeeded.\n$(NO_COL)" $(ROMC): $(ROM) $(ELF) $(BUILD_DIR)/compress_ranges.txt diff --git a/include/tables/entrance_table.h b/include/tables/entrance_table.h index 2717b41fd..5d34d030f 100644 --- a/include/tables/entrance_table.h +++ b/include/tables/entrance_table.h @@ -1951,3 +1951,7 @@ /* 0x616 */ DEFINE_ENTRANCE(ENTR_EXAMPLE_0_2, SCENE_EXAMPLE, 0, false, true, TRANS_TYPE_FADE_WHITE, TRANS_TYPE_FADE_WHITE) /* 0x617 */ DEFINE_ENTRANCE(ENTR_EXAMPLE_0_3, SCENE_EXAMPLE, 0, false, true, TRANS_TYPE_FADE_WHITE, TRANS_TYPE_FADE_WHITE) #endif + +#if TESTSUITE_MODE +#include "testsuite/entrance_table.h" +#endif diff --git a/include/tables/scene_table.h b/include/tables/scene_table.h index 9efdc4e66..fb8f4a525 100644 --- a/include/tables/scene_table.h +++ b/include/tables/scene_table.h @@ -130,3 +130,7 @@ /* 0x6C */ DEFINE_SCENE(example_scene, none, SCENE_EXAMPLE, SDC_HAUNTED_WASTELAND, 0, 0) #endif #endif + +#if TESTSUITE_MODE +#include "testsuite/scene_table.h" +#endif diff --git a/spec/spec b/spec/spec index 562649217..59b31f7a3 100644 --- a/spec/spec +++ b/spec/spec @@ -5123,3 +5123,7 @@ beginseg number 3 endseg #endif + +#if TESTSUITE_MODE +#include "testsuite.inc" +#endif diff --git a/src/overlays/gamestates/ovl_select/z_select.h b/src/overlays/gamestates/ovl_select/z_select.h index 9f2f1349b..6fc5cf467 100644 --- a/src/overlays/gamestates/ovl_select/z_select.h +++ b/src/overlays/gamestates/ovl_select/z_select.h @@ -67,6 +67,9 @@ static const Color_RGBA8 sColors[] = { }; static MapSelectEntry sScenes[] = { +#if TESTSUITE_MODE +#include "testsuite/map_select.h" +#endif #if IS_DEBUG_BOOT_ENABLED { "Boot Menu", (void*)MapSelect_LoadDebugOpening, 0 }, #endif