Introduce JabyEngine configuration file
This commit is contained in:
parent
f1d4197762
commit
837073fcda
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
#include "../jabyegine_config.hpp"
|
||||
#include "gpu_primitives.hpp"
|
||||
|
||||
namespace JabyEngine {
|
||||
|
@ -7,9 +8,8 @@ namespace JabyEngine {
|
|||
// This size is by Hardware limitation
|
||||
static constexpr auto Size = SizeU16::create(16, 16);
|
||||
|
||||
// The following two values can be easily changed
|
||||
static constexpr auto TextureLoadPos = PositionU16::create(320, 256);
|
||||
static constexpr auto CLUTLoadPos = PositionU16::create(320, 511);
|
||||
static constexpr auto TextureLoadPos = Configuration::BIOSFont::TextureLoadPos;
|
||||
static constexpr auto CLUTLoadPos = Configuration::BIOSFont::CLUTLoadPos;
|
||||
|
||||
static constexpr TexPage get_tex_page() {
|
||||
return TexPage::create(BIOS_Font::TextureLoadPos, GPU::TexturePageColor::$4bit);
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
#pragma once
|
||||
#include "../jabyegine_config.hpp"
|
||||
#include "raw_controller.hpp"
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace Periphery {
|
||||
extern RawController controller[1][1];
|
||||
static constexpr uint32_t PortCount = Configuration::Periphery::UsePortB ? 2 : 1;
|
||||
static constexpr uint32_t DeviceCount = Configuration::Periphery::UseMultiTap ? 4 : 1;
|
||||
|
||||
extern RawController controller[PortCount][DeviceCount];
|
||||
|
||||
void query_controller();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#pragma once
|
||||
#include "GPU/gpu_types.hpp"
|
||||
|
||||
namespace JabyEngine {
|
||||
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 UsePortB = false;
|
||||
static constexpr bool UseMultiTap = false;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,10 +3,13 @@
|
|||
|
||||
namespace JabyEngine {
|
||||
namespace Periphery {
|
||||
RawController controller[1][1];
|
||||
RawController controller[PortCount][DeviceCount];
|
||||
|
||||
void query_controller() {
|
||||
printf("Needs implementation\n");
|
||||
}
|
||||
|
||||
static_assert(!Configuration::Periphery::UsePortB, "Port B not supported yet");
|
||||
static_assert(!Configuration::Periphery::UseMultiTap, "MultiTap not supported yet");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue