Update PoolBox with latest changes

This commit is contained in:
2024-01-05 12:25:11 -06:00
parent e1c0f2bcb1
commit 3e6f5505c2
4 changed files with 53 additions and 7 deletions

View File

@@ -1,7 +1,29 @@
#include "../../../include/shared.hpp"
#include <PSX/GPU/gpu.hpp>
#include <stdio.h>
namespace ScreenCenter {
using namespace JabyEngine;
static const char*const ASCII = "!\"#$%&'()*+,-./0\n123456789:;<=>?@\nABCDEFGHIJKLMNOP\nQRSTUVWXYZ[\\]^_`\nabcdefghijklmnop\nqrstuvwxyz{|}~";
static void setup() {}
static void update() {
auto cursor = FontWriter::update(Make::PositionI16(8, 8));
FontWriter::bios_font_writer.write(cursor, ASCII);
}
static void render() {
FontWriter::bios_font_writer.render();
}
void main() {
printf("BlubbBlubbBlubbBlubb\n");
setup();
while(true) {
update();
GPU::swap_buffers_vsync(1);
render();
}
}
}

View File

@@ -81,7 +81,7 @@ static void setup() {
namespace NormalScene {
static void update() {
static const char Title[] = "Pool Box";
static constexpr auto TitleLength = (sizeof(Title) - 1)*DefaultFont::Info.font_size.width;
static constexpr auto TitleLength = (sizeof(Title) - 1)*DefaultFont::Info.get_font_size().width;
Periphery::query_controller();
auto cursor = FontWriter::update(JabyEngine::Make::PositionI16((GPU::Display::Width-TitleLength)/2, 16));
@@ -108,7 +108,7 @@ namespace NormalScene {
namespace LoadingScene {
static void update() {
static const char Title[] = "Loading...";
static constexpr auto TitleLength = (sizeof(Title) - 1)*DefaultFont::Info.font_size.width;
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));