diff --git a/examples/PoolBox/application/src/FontWriter/font_writer.cpp b/examples/PoolBox/application/src/FontWriter/font_writer.cpp index 1e3fdfd6..6a8f47ac 100644 --- a/examples/PoolBox/application/src/FontWriter/font_writer.cpp +++ b/examples/PoolBox/application/src/FontWriter/font_writer.cpp @@ -20,7 +20,7 @@ namespace FontWriter { } void FontWriter::Pool::Buffer :: setup() { - this->page = GPU::TexPage({Assets::FontTIM.get_texture_x(), Assets::FontTIM.get_texture_y()}, GPU::TexturePageColor::$4bit).linked(); + this->page = GPU::TexPage::create({Assets::FontTIM.get_texture_x(), Assets::FontTIM.get_texture_y()}, GPU::TexturePageColor::$4bit).linked(); for(auto& single_char : this->text_buffer) { single_char.set_link_identitiy(); single_char->set_identitiy(); diff --git a/examples/PoolBox/application/src/Objects/paco.hpp b/examples/PoolBox/application/src/Objects/paco.hpp index af262767..a57c8ba8 100644 --- a/examples/PoolBox/application/src/Objects/paco.hpp +++ b/examples/PoolBox/application/src/Objects/paco.hpp @@ -20,7 +20,7 @@ namespace object { public: constexpr Paco() : - tex_page(GPU::TexPage( + tex_page(GPU::TexPage::create( {TIM.get_texture_x(), TIM.get_texture_y()}, GPU::TexturePageColor::$4bit).linked()), sprite(GPU::SPRT( diff --git a/examples/PoolBox/application/src/Overlay/GPUTests/gpu_tests.cpp b/examples/PoolBox/application/src/Overlay/GPUTests/gpu_tests.cpp index 0d4966b3..fdb60741 100644 --- a/examples/PoolBox/application/src/Overlay/GPUTests/gpu_tests.cpp +++ b/examples/PoolBox/application/src/Overlay/GPUTests/gpu_tests.cpp @@ -115,7 +115,7 @@ static constexpr const auto rect2 = GPU::TILE_16({GPU::Display::Width - 16, GPU: static constexpr const auto rect3 = GPU::TILE_8({GPU::Display::Width - 8, GPU::Display::Height - 8}, GPU::Color24::Yellow()); static constexpr const auto rect4 = GPU::TILE_1({GPU::Display::Width - 1, GPU::Display::Height - 1}, GPU::Color24::Red()); -static constexpr const auto texpage = GPU::TexPage({320, 0}, GPU::TexturePageColor::$4bit); +static constexpr const auto texpage = GPU::TexPage::create({320, 0}, GPU::TexturePageColor::$4bit); static constexpr const auto rect5 = GPU::SPRT(GPU::AreaI16({0, GPU::Display::Height - 32}, {32, 32}), {{0, 0}, TriangleClut}, GPU::Color24::Green()); static constexpr const auto rect6 = GPU::SPRT_16({0, GPU::Display::Height - 16}, {{0, 0}, TriangleClut}, GPU::Color24::Blue()); static constexpr const auto rect7 = GPU::SPRT_8({0, GPU::Display::Height - 8}, {{0, 0}, TriangleClut}, GPU::Color24::Yellow()); diff --git a/include/PSX/GPU/Primitives/primitive_gpu_commands.hpp b/include/PSX/GPU/Primitives/primitive_gpu_commands.hpp index c1301b1a..aa2b5077 100644 --- a/include/PSX/GPU/Primitives/primitive_gpu_commands.hpp +++ b/include/PSX/GPU/Primitives/primitive_gpu_commands.hpp @@ -11,9 +11,9 @@ namespace JabyEngine { struct GPU_IO::GP0 value; - constexpr TexPage() = default; - constexpr TexPage(const PositionU16& tex_pos, TexturePageColor tex_color, SemiTransparency transparency = SemiTransparency::B_Half_add_F_Half, bool dither = false) : value{ - GPU_IO::Command::TexPage(tex_pos, transparency, tex_color, dither, false)} {} + static constexpr TexPage create(const PositionU16& tex_pos, TexturePageColor tex_color, SemiTransparency transparency = SemiTransparency::B_Half_add_F_Half, bool dither = false) { + return TexPage{.value = GPU_IO::Command::TexPage(tex_pos, transparency, tex_color, dither, false)}; + } }; } }