Re-create PoolBox Paco
This commit is contained in:
34
examples/PoolBox/application/src/include/paco.hpp
Normal file
34
examples/PoolBox/application/src/include/paco.hpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#include "../../include/asset_mgr.hpp"
|
||||
#include <PSX/GPU/make_gpu_primitives.hpp>
|
||||
#include <PSX/Timer/frame_timer.hpp>
|
||||
|
||||
namespace object {
|
||||
using namespace JabyEngine;
|
||||
|
||||
class Paco {
|
||||
private:
|
||||
static const GPU::Color24 Colors[];
|
||||
|
||||
GPU::TexPage::Linked tex_page;
|
||||
GPU::SPRT::Linked sprite;
|
||||
SimpleTimer<uint8_t> timer;
|
||||
uint8_t color_idx;
|
||||
|
||||
public:
|
||||
constexpr Paco() :
|
||||
tex_page(Make::TexPage(Make::PositionU16(
|
||||
Assets::Main::PacoTIM.get_texture_x(), Assets::Main::PacoTIM.get_texture_y()),
|
||||
GPU::TexturePageColor::$4bit).linked()),
|
||||
sprite(Make::SPRT(
|
||||
Make::AreaI16(Make::PositionI16(0, 100), Make::SizeI16(120, 128)),
|
||||
Make::OffsetPageWithClut(Make::PageOffset(0, 0), Make::PageClut(Assets::Main::PacoTIM.get_clut_x(), Assets::Main::PacoTIM.get_clut_y())),
|
||||
GPU::Color24::Blue()).linked()),
|
||||
timer(),
|
||||
color_idx(0) {}
|
||||
|
||||
void setup();
|
||||
void update();
|
||||
void render();
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user