diff --git a/include/PSX/GPU/gpu_auto_load_font.hpp b/include/PSX/GPU/gpu_auto_load_font.hpp index 3d32cba1..ab979624 100644 --- a/include/PSX/GPU/gpu_auto_load_font.hpp +++ b/include/PSX/GPU/gpu_auto_load_font.hpp @@ -8,8 +8,8 @@ namespace JabyEngine { // This size is by Hardware limitation static constexpr auto Size = SizeU16::create(16, 16); - static constexpr auto TextureLoadPos = Configuration::BIOSFont::TextureLoadPos; - static constexpr auto CLUTLoadPos = Configuration::BIOSFont::CLUTLoadPos; + static constexpr auto TextureLoadPos = Configuration::BIOSFont::texture_load_pos(); + static constexpr auto CLUTLoadPos = Configuration::BIOSFont::CLUT_load_pos(); static constexpr TexPage get_tex_page() { return TexPage::create(BIOS_Font::TextureLoadPos, GPU::TextureColorMode::clut4); diff --git a/include/PSX/Periphery/periphery.hpp b/include/PSX/Periphery/periphery.hpp index df12dcc9..8cdc7a57 100644 --- a/include/PSX/Periphery/periphery.hpp +++ b/include/PSX/Periphery/periphery.hpp @@ -4,8 +4,8 @@ namespace JabyEngine { namespace Periphery { - static constexpr uint32_t PortCount = Configuration::Periphery::IncludePortB ? 2 : 1; - static constexpr uint32_t DeviceCount = Configuration::Periphery::UseMultiTap ? 4 : 1; + static constexpr uint32_t PortCount = Configuration::Periphery::include_portB() ? 2 : 1; + static constexpr uint32_t DeviceCount = Configuration::Periphery::use_multi_tap() ? 4 : 1; extern RawController controller[PortCount][DeviceCount]; diff --git a/include/PSX/jabyengine_config.hpp b/include/PSX/jabyengine_config.hpp index 12285ed4..8652c8e0 100644 --- a/include/PSX/jabyengine_config.hpp +++ b/include/PSX/jabyengine_config.hpp @@ -1,23 +1,33 @@ #pragma once +#include -#if __has_include() - #include -#else - #include "GPU/gpu_types.hpp" +namespace JabyEngine { + struct DefaultConfiguration { + struct BIOSFont { + static constexpr GPU::PositionU16 texture_load_pos() { + return GPU::PositionU16::create(320, 256); + } - namespace JabyEngine { - #define TEST_STR "Planschbecken sind default" - - 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; - }; + static constexpr GPU::PositionU16 CLUT_load_pos() { + return GPU::PositionU16::create(320, 511); + } }; - } -#endif // has jabyengine_custom_config \ No newline at end of file + + struct Periphery { + static constexpr bool include_portB() { + return false; + } + + static constexpr bool use_multi_tap(){ + return false; + } + }; + }; + + #if __has_include() + #include + #else + #define TEST_STR "Planschbecken sind default" + using Configuration = DefaultConfiguration; + #endif // has jabyengine_custom_config +} \ No newline at end of file diff --git a/src/Library/src/Periphery/periphery.cpp b/src/Library/src/Periphery/periphery.cpp index cbf3e0d5..ba2132e8 100644 --- a/src/Library/src/Periphery/periphery.cpp +++ b/src/Library/src/Periphery/periphery.cpp @@ -126,7 +126,7 @@ namespace JabyEngine { } Periphery::close_connection(); - if(Configuration::Periphery::IncludePortB) { + if(Configuration::Periphery::include_portB()) { cur_controller_port ^= 0x1; } }