Beta-MyConfig

This commit is contained in:
jaby 2024-02-15 22:31:52 -05:00
parent 842e7c594e
commit 5312a86e7b
5 changed files with 20 additions and 21 deletions

View File

@ -1,18 +1,13 @@
#pragma once //#pragma once
#include <PSX/GPU/gpu_types.hpp> //TODO: Why is pragma once not working?!
namespace JabyEngine { //TODO: Fix IntelliSense
#define TEST_STR "Planschbecken sind konfigurierbar" struct CustomConfiguration : public DefaultConfiguration {
struct Test {
struct Configuration { static constexpr const char* string() {
struct BIOSFont { return "I am a custom string";
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;
};
}; };
} };
#define __USE_DEBUG_COLOR__

View File

@ -1,2 +0,0 @@
#pragma once

View File

@ -3,6 +3,12 @@
namespace JabyEngine { namespace JabyEngine {
struct DefaultConfiguration { struct DefaultConfiguration {
struct Test {
static constexpr const char* string() {
return "I am default string";
}
};
struct BIOSFont { struct BIOSFont {
static constexpr GPU::PositionU16 texture_load_pos() { static constexpr GPU::PositionU16 texture_load_pos() {
return GPU::PositionU16::create(320, 256); return GPU::PositionU16::create(320, 256);
@ -26,8 +32,8 @@ namespace JabyEngine {
#if __has_include(<jabyengine_custom_config.hpp>) #if __has_include(<jabyengine_custom_config.hpp>)
#include <jabyengine_custom_config.hpp> #include <jabyengine_custom_config.hpp>
using Configuration = CustomConfiguration;
#else #else
#define TEST_STR "Planschbecken sind default"
using Configuration = DefaultConfiguration; using Configuration = DefaultConfiguration;
#endif // has jabyengine_custom_config #endif // has jabyengine_custom_config
} }

View File

@ -1,5 +1,5 @@
JABY_ENGINE_CONFIG_DIR = $(JABY_ENGINE_DIR)config JABY_ENGINE_CONFIG_DIR = $(JABY_ENGINE_DIR)config
ifdef CUSTOM_CONFIG ifdef CUSTOM_CONFIG
# TODO: Use same header for -I and -imacros? # 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 endif

View File

@ -146,7 +146,7 @@ namespace JabyEngine {
static constexpr auto DebugScale = 1.0; static constexpr auto DebugScale = 1.0;
//TODO: for now v //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"); __debug_boot_print_at(GPU::Color24::White(), DebugX, DebugY, DebugScale, "Starting Planschbecken\n");
printf("Heap starts @0x%p\n", &__heap_start); printf("Heap starts @0x%p\n", &__heap_start);
printf("BSS from 0x%p to 0x%p (%u)\n", &__bss_start, &__bss_end, __bss_len); printf("BSS from 0x%p to 0x%p (%u)\n", &__bss_start, &__bss_end, __bss_len);