Testing font and color font

This commit is contained in:
Jaby
2023-06-15 20:48:25 +02:00
committed by Jaby
parent 534a8b0c43
commit a5786fed82
5 changed files with 61 additions and 12 deletions

View File

@@ -1,7 +1,25 @@
#include "assets.hpp"
#include <PSX/GPU/gpu_primitives.hpp>
#include <PSX/GPU/gpu.hpp>
#include <stdio.h>
using namespace JabyEngine;
static auto FontPage = GPU::TexPage({Assets::FontTIM.get_texture_x(), Assets::FontTIM.get_texture_y()}, GPU::TexturePageColor::$4bit).linked();
static auto FontTest = GPU::SPRT(
GPU::AreaI16({0, 0}, {256, 96}), {GPU::PagePosition(0, 0), GPU::PageClut(Assets::FontTIM.get_clut_x(), Assets::FontTIM.get_clut_y())},
GPU::Color24::Grey()
).linked();
static auto FontTestColor = GPU::SPRT(
GPU::AreaI16({0, 96}, {256, 96}), {GPU::PagePosition(0, 0), GPU::PageClut(Assets::FontTIM.get_clut_x(), Assets::FontTIM.get_clut_y())},
GPU::Color24(0x0, 0x0, 0xA0)
).linked();
void main() {
Assets::load_for_main();
printf("Planschbecken c:\n");
FontPage.concat(FontTest).concat(FontTestColor);
while(true) {
GPU::swap_buffers_vsync(1);
GPU::render(FontPage);
}
}