Added splashpack parser, made renderer a singleton

This commit is contained in:
2025-03-21 17:54:25 +01:00
parent 4b7389da8d
commit 0d46881d7f
8 changed files with 121 additions and 44 deletions

View File

@@ -18,8 +18,6 @@ class PSXSplash final : public psyqo::Application {
public:
psyqo::Font<> m_font;
psxsplash::Renderer m_renderer;
PSXSplash() : m_renderer(gpu()) {}
};
class MainScene final : public psyqo::Scene {
@@ -39,7 +37,7 @@ void PSXSplash::prepare() {
.set(psyqo::GPU::ColorMode::C15BITS)
.set(psyqo::GPU::Interlace::PROGRESSIVE);
gpu().initialize(config);
m_renderer.initialize();
psxsplash::Renderer::init(gpu());
}
void PSXSplash::createScene() {
@@ -47,6 +45,6 @@ void PSXSplash::createScene() {
pushScene(&mainScene);
}
void MainScene::frame() { psxSplash.m_renderer.render(objects); }
void MainScene::frame() { psxsplash::Renderer::getInstance().render(objects); }
int main() { return psxSplash.run(); }