Start to move CDXA code around

This commit is contained in:
2024-05-31 23:47:39 +02:00
parent 9fab686e1e
commit 658eed7b46
6 changed files with 101 additions and 102 deletions

View File

@@ -7,7 +7,6 @@
#include <FontWriter/font_writer.hpp>
//#include <PSX/Audio/CDDA.hpp>
#include <PSX/Periphery/periphery.hpp>
#include <PSX/System/callbacks.hpp>
#include <stdio.hpp>
using namespace JabyEngine;
@@ -149,7 +148,7 @@ namespace LoadingScene {
static constexpr auto TitleLength = (sizeof(Title) - 1)*DefaultFont::Info.get_font_size().width;
auto cursor = FontWriter::update(JabyEngine::Make::PositionI16((GPU::Display::Width-TitleLength)/2, (GPU::Display::Height-16)/2));
FontWriter::new_font_writer.write(cursor, Title, GPU::Color24::Blue(0xD0));
FontWriter::new_font_writer.write(cursor, Title, GPU::Color24::Blue(0xD0));
}
static void render() {
@@ -159,12 +158,8 @@ namespace LoadingScene {
static void run() {
if(old_state_changer != state_changer) {
printf("Loading new state...\n");
Callback::VSyncCallback::install([]() {
// TODO: Use it or remove it!!
printf("Still loading...\n");
});
// TODO: Callback for file load? Locally?
update();
GPU::swap_buffers_vsync(1);
render();
@@ -175,7 +170,6 @@ namespace LoadingScene {
state_changer.asset_load();
old_state_changer = state_changer;
//CDDA::pop_play();
Callback::VSyncCallback::uninstall();
}
state_changer.main();