diff --git a/config/MyConfig/jabyengine_custom_config.hpp b/config/MyConfig/jabyengine_custom_config.hpp index 638e4501..230e7049 100644 --- a/config/MyConfig/jabyengine_custom_config.hpp +++ b/config/MyConfig/jabyengine_custom_config.hpp @@ -1,18 +1,13 @@ -#pragma once -#include +//#pragma once +//TODO: Why is pragma once not working?! -namespace JabyEngine { - #define TEST_STR "Planschbecken sind konfigurierbar" - - struct Configuration { - struct BIOSFont { - static constexpr auto TextureLoadPos = GPU::PositionU16::create(320, 256); - static constexpr auto CLUTLoadPos = GPU::PositionU16::create(320, 511); - }; - - struct Periphery { - static constexpr bool IncludePortB = false; - static constexpr bool UseMultiTap = false; - }; +//TODO: Fix IntelliSense +struct CustomConfiguration : public DefaultConfiguration { + struct Test { + static constexpr const char* string() { + return "I am a custom string"; + } }; -} \ No newline at end of file +}; + +#define __USE_DEBUG_COLOR__ \ No newline at end of file diff --git a/config/MyConfig/jabyengine_custom_defines.hpp b/config/MyConfig/jabyengine_custom_defines.hpp deleted file mode 100644 index 77e81455..00000000 --- a/config/MyConfig/jabyengine_custom_defines.hpp +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once - diff --git a/include/PSX/jabyengine_config.hpp b/include/PSX/jabyengine_config.hpp index 8652c8e0..2a5cc5c9 100644 --- a/include/PSX/jabyengine_config.hpp +++ b/include/PSX/jabyengine_config.hpp @@ -3,6 +3,12 @@ namespace JabyEngine { struct DefaultConfiguration { + struct Test { + static constexpr const char* string() { + return "I am default string"; + } + }; + struct BIOSFont { static constexpr GPU::PositionU16 texture_load_pos() { return GPU::PositionU16::create(320, 256); @@ -26,8 +32,8 @@ namespace JabyEngine { #if __has_include() #include + using Configuration = CustomConfiguration; #else - #define TEST_STR "Planschbecken sind default" using Configuration = DefaultConfiguration; #endif // has jabyengine_custom_config } \ No newline at end of file diff --git a/mkfile/common/CustomConfigHelper.mk b/mkfile/common/CustomConfigHelper.mk index b9f64446..a4874437 100644 --- a/mkfile/common/CustomConfigHelper.mk +++ b/mkfile/common/CustomConfigHelper.mk @@ -1,5 +1,5 @@ JABY_ENGINE_CONFIG_DIR = $(JABY_ENGINE_DIR)config ifdef CUSTOM_CONFIG # TODO: Use same header for -I and -imacros? - CCFLAGS += -I$(JABY_ENGINE_CONFIG_DIR)/$(CUSTOM_CONFIG) -imacros $(JABY_ENGINE_CONFIG_DIR)/$(CUSTOM_CONFIG)/jabyengine_custom_defines.hpp + CCFLAGS += -I$(JABY_ENGINE_CONFIG_DIR)/$(CUSTOM_CONFIG) -imacros $(JABY_ENGINE_CONFIG_DIR)/$(CUSTOM_CONFIG)/jabyengine_custom_config.hpp endif \ No newline at end of file diff --git a/src/Library/src/BootLoader/start_boot.cpp b/src/Library/src/BootLoader/start_boot.cpp index 97e9ad4e..ce0f2acf 100644 --- a/src/Library/src/BootLoader/start_boot.cpp +++ b/src/Library/src/BootLoader/start_boot.cpp @@ -146,7 +146,7 @@ namespace JabyEngine { static constexpr auto DebugScale = 1.0; //TODO: for now v - printf("Config-Str: %s\n", TEST_STR); + printf("Config-Str: %s\n", Configuration::Test::string()); __debug_boot_print_at(GPU::Color24::White(), DebugX, DebugY, DebugScale, "Starting Planschbecken\n"); printf("Heap starts @0x%p\n", &__heap_start); printf("BSS from 0x%p to 0x%p (%u)\n", &__bss_start, &__bss_end, __bss_len);