WIP Backend System Redesign Step 1

- Created 1 Context for Backend Management and Sharing
- Made every class that used a static Backend require the Context or specific Backend
- Bring Back 3ds support
This commit is contained in:
2026-01-26 20:46:27 +01:00
parent 892f8ce0c4
commit e8072a064c
47 changed files with 350 additions and 242 deletions

View File

@@ -30,20 +30,21 @@ SOFTWARE.
#include <pd/ui7/viewport.hpp>
namespace PD {
class Context;
namespace UI7 {
class PD_API IO {
public:
IO() {
Time = Timer::New();
InputHandler = InputHandler::New();
IO(PD::Context& ctx) : pCtx(ctx) {
Time = Timer::New(*pCtx.Os().get());
InputHandler = InputHandler::New(pCtx);
Theme = UI7::Theme::New();
Back = Li::DrawList::New();
Front = Li::DrawList::New();
FDL = Li::DrawList::New();
Back = Li::DrawList::New(pCtx);
Front = Li::DrawList::New(pCtx);
FDL = Li::DrawList::New(pCtx);
DeltaStats = TimeStats::New(60);
/** Probably not the best solution i guess */
CurrentViewPort.z = PD::Gfx::pGfx->ViewPort.x;
CurrentViewPort.w = PD::Gfx::pGfx->ViewPort.y;
CurrentViewPort.z = pCtx.Gfx()->ViewPort.x;
CurrentViewPort.w = pCtx.Gfx()->ViewPort.y;
}
~IO() {}
@@ -90,6 +91,8 @@ class PD_API IO {
u32 NumIndices = 0; ///< Debug Indices Num
std::vector<u32> MenuOrder;
PD::Context& pCtx; // Palladium base context
// DrawListApi
void RegisterDrawList(const UI7::ID& id, Li::DrawList::Ref v) {
DrawListRegestry.push_back(std::make_pair(id, v));