Use setup code in example

This commit is contained in:
Jaby 2023-11-24 22:23:44 -05:00
parent 2c44f21748
commit c535b96ccb
1 changed files with 7 additions and 1 deletions

View File

@ -5,14 +5,21 @@
#include <PSX/GPU/gpu.hpp> #include <PSX/GPU/gpu.hpp>
#include <PSX/GPU/gpu_primitives.hpp> #include <PSX/GPU/gpu_primitives.hpp>
#include <PSX/Timer/frame_timer.hpp> #include <PSX/Timer/frame_timer.hpp>
#include <FontWriter/default_font.hpp>
#include <FontWriter/font_writer.hpp> #include <FontWriter/font_writer.hpp>
#include <stdio.h> #include <stdio.h>
using namespace JabyEngine; using namespace JabyEngine;
using NewFontWriter = ::JabyEngine::FontWriter;
static object::Paco paco; static object::Paco paco;
static void setup() { static void setup() {
static constexpr auto VRAMFontDst = GPU::PositionU16::create(320, 0);
DefaultFont::load(VRAMFontDst);
NewFontWriter::setup(VRAMFontDst, DefaultFont::Info);
Assets::load_for_main(); Assets::load_for_main();
FontWriter::FontWriter::setup(); FontWriter::FontWriter::setup();
@ -35,7 +42,6 @@ static void render() {
} }
void main() { void main() {
test();
setup(); setup();
Overlay::TimerTest::mesaure_busy_loop(); Overlay::TimerTest::mesaure_busy_loop();