Render Dönerfisch for the GTE test
This commit is contained in:
parent
40c86eea0e
commit
c33f6e8c1e
|
@ -5,8 +5,16 @@ namespace Assets {
|
|||
using namespace JabyEngine;
|
||||
|
||||
namespace Main {
|
||||
static constexpr auto PacoTIM = SimpleTIM(896, 0, 960, 510);
|
||||
static constexpr auto DoenerFishTIM = SimpleTIM(896 + 30, 0, 960 + 16, 510);
|
||||
struct ImageInfo {
|
||||
SimpleTIM tim;
|
||||
GPU::SizeI16 size;
|
||||
};
|
||||
|
||||
static constexpr auto PacoTIM = SimpleTIM(896, 0, 960, 510);
|
||||
static constexpr auto DoenerFishInfo = ImageInfo{
|
||||
.tim = SimpleTIM(896 + 30, 0, 960 + 16, 510),
|
||||
.size = GPU::SizeI16::create(128, 64)
|
||||
};
|
||||
|
||||
void load();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,47 @@
|
|||
#include "../../../include/asset_mgr.hpp"
|
||||
#include "../../../include/shared.hpp"
|
||||
#include <PSX/GPU/make_gpu_primitives.hpp>
|
||||
#include <PSX/Periphery/periphery.hpp>
|
||||
#include <stdio.h>
|
||||
|
||||
namespace GTETest {
|
||||
using namespace JabyEngine;
|
||||
|
||||
static auto doener_fish = Make::POLY_FT4(
|
||||
Make::AreaI16(Make::PositionI16(0, 0), Assets::Main::DoenerFishInfo.size),
|
||||
Assets::Main::DoenerFishInfo.tim.get_page_offset_clut4(),
|
||||
Make::TPage(Assets::Main::DoenerFishInfo.tim.get_texture_position(), GPU::SemiTransparency::B_add_F, GPU::TexturePageColor::$4bit),
|
||||
Make::PageClut(Assets::Main::DoenerFishInfo.tim.get_clut_position()),
|
||||
GPU::Color24::Grey()
|
||||
);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void render() {
|
||||
GPU::render(doener_fish);
|
||||
Shared::back_menu.render();
|
||||
}
|
||||
|
||||
void main() {
|
||||
printf("PLANSCHIPLANSCHIPLANSCHIPLANSCHI\n");
|
||||
setup();
|
||||
|
||||
while(true) {
|
||||
if(update_or_exit()) {
|
||||
break;
|
||||
}
|
||||
GPU::swap_buffers_vsync(1);
|
||||
render();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -39,8 +39,8 @@ static const Menu::SimpleMenu::Entry MenuEntries[] = {
|
|||
};
|
||||
|
||||
static const auto doener_fish = Make::SPRT(
|
||||
Make::AreaI16(8, GPU::Display::Height - 64, 128, 64), // v this needs to be nicer! Has to be
|
||||
Make::OffsetPageWithClut(Assets::Main::DoenerFishTIM.get_page_offset_clut4(), Make::PageClut(Assets::Main::DoenerFishTIM.get_clut_position())),
|
||||
Make::AreaI16(Make::PositionI16(8, GPU::Display::Height - Assets::Main::DoenerFishInfo.size.height), Assets::Main::DoenerFishInfo.size), // v this needs to be nicer! Has to be
|
||||
Make::OffsetPageWithClut(Assets::Main::DoenerFishInfo.tim.get_page_offset_clut4(), Make::PageClut(Assets::Main::DoenerFishInfo.tim.get_clut_position())),
|
||||
GPU::Color24::Grey()
|
||||
);
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace Assets {
|
|||
namespace Main {
|
||||
static const CDFile Files[] = {
|
||||
CDFileBuilder::simple_tim(LBA::PACO, PacoTIM),
|
||||
CDFileBuilder::simple_tim(LBA::DFISH, DoenerFishTIM)
|
||||
CDFileBuilder::simple_tim(LBA::DFISH, DoenerFishInfo.tim)
|
||||
};
|
||||
|
||||
void load() {
|
||||
|
|
Loading…
Reference in New Issue