Convert Configurations to function based for overrides

This commit is contained in:
2024-02-15 22:18:22 -05:00
parent 3ec3c5ffed
commit 842e7c594e
4 changed files with 34 additions and 24 deletions

View File

@@ -1,23 +1,33 @@
#pragma once
#include <PSX/GPU/gpu_types.hpp>
#if __has_include(<jabyengine_custom_config.hpp>)
#include <jabyengine_custom_config.hpp>
#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
struct Periphery {
static constexpr bool include_portB() {
return false;
}
static constexpr bool use_multi_tap(){
return false;
}
};
};
#if __has_include(<jabyengine_custom_config.hpp>)
#include <jabyengine_custom_config.hpp>
#else
#define TEST_STR "Planschbecken sind default"
using Configuration = DefaultConfiguration;
#endif // has jabyengine_custom_config
}