Support for loading TIM
This commit is contained in:
@@ -32,5 +32,7 @@ namespace FontCycler {
|
||||
}
|
||||
|
||||
namespace ScreenCenter {
|
||||
extern const volatile JabyEngine::AutoLBAEntry lba[];
|
||||
extern JabyEngine::CDFile Assets[1];
|
||||
void main();
|
||||
}
|
@@ -2,6 +2,7 @@
|
||||
#include "include/frame.hpp"
|
||||
#include <FontWriter/fonts.hpp>
|
||||
#include <PSX/GPU/gpu.hpp>
|
||||
#include <PSX/GPU/make_gpu_primitives.hpp>
|
||||
#include <PSX/Periphery/periphery.hpp>
|
||||
#include <PSX/Timer/frame_timer.hpp>
|
||||
|
||||
@@ -76,6 +77,13 @@ namespace ScreenCenter {
|
||||
Formular{.name = PSYQ::Name, .function = PSYQ::set_offset}
|
||||
};
|
||||
|
||||
static constexpr const auto background_img = Make::POLY_FT4(
|
||||
Make::AreaI16(Make::PositionI16((GPU::Display::Width - 256)/2, (GPU::Display::Height - 240)/2), Make::SizeI16(256, 240)),
|
||||
Make::PageOffset(0, 0),
|
||||
Make::TPage(Make::PositionU16(384, 256), GPU::SemiTransparency::B_Half_add_F_Half, GPU::TextureColorMode::clut4),
|
||||
Make::PageClut(Make::PositionU16(384, 255))
|
||||
);
|
||||
|
||||
static auto frame = Frame::create();
|
||||
|
||||
static ButtonPulser button_pulse[4];
|
||||
@@ -182,6 +190,7 @@ namespace ScreenCenter {
|
||||
}
|
||||
|
||||
static void render() {
|
||||
GPU::render(background_img);
|
||||
frame.render();
|
||||
Shared::back_menu.render();
|
||||
}
|
||||
|
@@ -0,0 +1,17 @@
|
||||
#include <PSX/File/Processor/cd_file_processor.hpp>
|
||||
#include <PSX/AutoLBA/auto_lba_declaration.hpp>
|
||||
|
||||
namespace ScreenCenter {
|
||||
using namespace JabyEngine;
|
||||
|
||||
enum LBA {
|
||||
__jabyengine_start_lba_request
|
||||
__jabyengine_request_lba_for(BG_IMAGE, "ASSETS/SAND.TIM"),
|
||||
__jabyengine_end_lba_request
|
||||
};
|
||||
__declare_lba_header(LBA);
|
||||
|
||||
CDFile Assets[1] = {
|
||||
CDFileBuilder::sony_tim(LBA::BG_IMAGE, TIM::create())
|
||||
};
|
||||
}
|
@@ -121,7 +121,7 @@ namespace Assets {
|
||||
}
|
||||
|
||||
void load_screen_center() {
|
||||
load(CDFileBuilder::overlay(LBA::SCREEN_CENT_OVL, &__screen_center_start));
|
||||
load(CDFileBuilder::overlay(LBA::SCREEN_CENT_OVL, &__screen_center_start), ScreenCenter::lba, ScreenCenter::Assets);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user