jabyengine/examples/PoolBox/application/src/main.cpp

42 lines
842 B
C++

#include "FontWriter/font_writer.hpp"
#include "Objects/paco.hpp"
#include "assets.hpp"
#include <PSX/GPU/gpu.hpp>
#include <PSX/GPU/gpu_primitives.hpp>
#include <PSX/Timer/frame_timer.hpp>
#include <stdio.h>
using namespace JabyEngine;
static object::Paco paco;
static void setup() {
Assets::load_for_main();
FontWriter::FontWriter::setup();
paco.setup();
}
static void update() {
FontWriter::FontWriter cursor;
const auto end_pos = cursor.write(FontWriter::Position::create(0, 32), "Cody is cute\n&\na \x1b[8;0;0mBAAAAABY!!!");
cursor.write(end_pos, "\x1b[0;7;7mJaby was\nhere c:");
paco.update();
}
static void render() {
GPU::swap_buffers_vsync(1);
FontWriter::FontWriter::render();
paco.render();
}
void main() {
setup();
while(true) {
update();
render();
}
}