jabyengine/examples/PoolBox/application/src/Overlay/ScreenCenter/screen_center.cpp

44 lines
1.1 KiB
C++

#include "../../../include/shared.hpp"
#include "include/frame.hpp"
#include <PSX/GPU/gpu.hpp>
#include <PSX/Periphery/periphery.hpp>
#include <stdio.h>
namespace ScreenCenter {
using namespace JabyEngine;
static const auto frame = Frame::create();
static void setup() {
Shared::back_menu.reset();
}
static bool update_or_exit() {
Periphery::query_controller();
if(Shared::back_menu.update(Make::PositionI16(0, GPU::Display::Height - 32))) {
return true;
}
auto cursor = FontWriter::update(Make::PositionI16(8, 8));
FontWriter::bios_font_writer.write(cursor, "NOTHING TO SEE HERE", GPU::Color24::Red());
return false;
}
static void render() {
GPU::render(frame);
Shared::back_menu.render();
}
void main() {
printf("BlubbBlubbBlubbBlubb\n");
setup();
while(true) {
if(update_or_exit()) {
break;
}
GPU::swap_buffers_vsync(1);
render();
}
}
}