Display Pacos art
This commit is contained in:
@@ -6,6 +6,7 @@ namespace Assets {
|
||||
using namespace JabyEngine;
|
||||
|
||||
static constexpr auto FontTIM = SimpleTIM(960, 0, 960, 511);
|
||||
static constexpr auto PacoTIM = SimpleTIM(896, 0, 960, 510);
|
||||
void load_for_main();
|
||||
}
|
||||
|
||||
|
@@ -1,19 +1,30 @@
|
||||
#include "FontWriter/font_writer.hpp"
|
||||
#include "assets.hpp"
|
||||
#include <PSX/GPU/gpu_primitives.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 SimpleTimer<uint8_t> timer;
|
||||
static auto paco_texpage = GPU::TexPage(
|
||||
{Assets::PacoTIM.get_texture_x(), Assets::PacoTIM.get_texture_y()},
|
||||
GPU::TexturePageColor::$4bit
|
||||
).linked();
|
||||
static auto paco = GPU::SPRT(
|
||||
// This pic used to be 122px (file size) and every tool would except it - however the display would be corrupt. Try it!!
|
||||
GPU::AreaI16({0, 100}, {120, 128}),
|
||||
GPU::PagePositionClut({0, 0}, GPU::PageClut(Assets::PacoTIM.get_clut_x(), Assets::PacoTIM.get_clut_y())),
|
||||
GPU::Color24::Grey()
|
||||
).linked();
|
||||
|
||||
static void setup() {
|
||||
Assets::load_for_main();
|
||||
FontWriter::setup();
|
||||
|
||||
timer.reset();
|
||||
paco_texpage.concat(paco);
|
||||
}
|
||||
|
||||
static void update() {
|
||||
@@ -28,6 +39,7 @@ static void update() {
|
||||
|
||||
static void render() {
|
||||
GPU::swap_buffers_vsync(1);
|
||||
GPU::render(paco_texpage);
|
||||
FontWriter::render();
|
||||
}
|
||||
|
||||
|
@@ -6,6 +6,7 @@ namespace Assets {
|
||||
enum LBA {
|
||||
__jabyengine_start_lba_request
|
||||
__jabyengine_request_lba_for(FONT, "ASSETS/MAIN/FONT.BIN"),
|
||||
__jabyengine_request_lba_for(PACO, "ASSETS/MAIN/PACO.BIN"),
|
||||
__jabyengine_end_lba_request
|
||||
};
|
||||
|
||||
@@ -14,6 +15,7 @@ namespace Assets {
|
||||
void load_for_main() {
|
||||
static const CDFile Assets[] = {
|
||||
CDFileBuilder::simple_tim(LBA::FONT, FontTIM),
|
||||
CDFileBuilder::simple_tim(LBA::PACO, PacoTIM),
|
||||
};
|
||||
|
||||
const auto buffer_cfg = CDFileProcessor::BufferConfiguration::new_default();
|
||||
|
Reference in New Issue
Block a user