Beta-MyConfig
This commit is contained in:
parent
760c83b0cf
commit
9858eff1f1
|
@ -1,18 +1,13 @@
|
|||
#pragma once
|
||||
#include <PSX/GPU/gpu_types.hpp>
|
||||
//#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";
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
#define __USE_DEBUG_COLOR__
|
|
@ -1,2 +0,0 @@
|
|||
#pragma once
|
||||
|
|
@ -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(<jabyengine_custom_config.hpp>)
|
||||
#include <jabyengine_custom_config.hpp>
|
||||
using Configuration = CustomConfiguration;
|
||||
#else
|
||||
#define TEST_STR "Planschbecken sind default"
|
||||
using Configuration = DefaultConfiguration;
|
||||
#endif // has jabyengine_custom_config
|
||||
}
|
|
@ -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
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue