From 018cd9dac07c7343d61adcdf5e84b79a58bde88a Mon Sep 17 00:00:00 2001 From: jaby Date: Fri, 1 Dec 2023 22:39:44 -0500 Subject: [PATCH] Move make code to own header --- .../src/Overlay/GPUTests/gpu_tests.cpp | 2 +- examples/PoolBox/application/src/main.cpp | 2 +- include/PSX/GPU/gpu_primitives.hpp | 331 +----------------- include/PSX/GPU/make_gpu_primitives.hpp | 331 ++++++++++++++++++ support/src/FontWriter/src/font_writer.cpp | 2 +- 5 files changed, 335 insertions(+), 333 deletions(-) create mode 100644 include/PSX/GPU/make_gpu_primitives.hpp diff --git a/examples/PoolBox/application/src/Overlay/GPUTests/gpu_tests.cpp b/examples/PoolBox/application/src/Overlay/GPUTests/gpu_tests.cpp index e81fd235..ccb92147 100644 --- a/examples/PoolBox/application/src/Overlay/GPUTests/gpu_tests.cpp +++ b/examples/PoolBox/application/src/Overlay/GPUTests/gpu_tests.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include enum LBA { diff --git a/examples/PoolBox/application/src/main.cpp b/examples/PoolBox/application/src/main.cpp index ea35df81..27e3b831 100644 --- a/examples/PoolBox/application/src/main.cpp +++ b/examples/PoolBox/application/src/main.cpp @@ -3,7 +3,7 @@ #include "Overlay/Overlay.hpp" #include "assets.hpp" #include -#include +#include #include #include #include diff --git a/include/PSX/GPU/gpu_primitives.hpp b/include/PSX/GPU/gpu_primitives.hpp index f7b14774..54a32079 100644 --- a/include/PSX/GPU/gpu_primitives.hpp +++ b/include/PSX/GPU/gpu_primitives.hpp @@ -3,333 +3,4 @@ #include "Primitives/primitive_gpu_commands.hpp" #include "Primitives/primitive_line_types.hpp" #include "Primitives/primitive_rectangle_types.hpp" -#include "Primitives/primitive_poly_types.hpp" - -namespace JabyEngine { - namespace Make { - using JabyEngine::operator""_i16; - using JabyEngine::operator""_u16; - - template - static constexpr T creator_template(const ARGS&...args) { - return T::create(args...); - } - - // ################################################################### - - static constexpr GPU::SizeI16 SizeI16() { - return creator_template(0_i16, 0_i16); - } - static constexpr GPU::SizeI16 SizeI16(int16_t x, int16_t y) { - return creator_template(x, y); - } - - // ################################################################### - - static constexpr GPU::SizeU16 SizeU16() { - return creator_template(0_u16, 0_u16); - } - static constexpr GPU::SizeU16 SizeU16(uint16_t x, uint16_t y) { - return creator_template(x, y); - } - - // ################################################################### - - static constexpr GPU::PositionI8 PositionI8() { - return creator_template(0_i8, 0_i8); - } - static constexpr GPU::PositionI8 PositionI8(int8_t x, int8_t y) { - return creator_template(x, y); - } - - // ################################################################### - - static constexpr GPU::PositionU8 PositionU8() { - return creator_template(0_u8, 0_u8); - } - static constexpr GPU::PositionU8 PositionU8(int8_t x, int8_t y) { - return creator_template(x, y); - } - - // ################################################################### - - static constexpr GPU::PositionI16 PositionI16() { - return creator_template(0_i16, 0_i16); - } - static constexpr GPU::PositionI16 PositionI16(int16_t x, int16_t y) { - return creator_template(x, y); - } - - // ################################################################### - - static constexpr GPU::PositionU16 PositionU16() { - return creator_template(0_u16, 0_u16); - } - static constexpr GPU::PositionU16 PositionU16(uint16_t x, uint16_t y) { - return creator_template(x, y); - } - - // ################################################################### - - static constexpr GPU::Vertex Vertex() { - return creator_template(0_i16, 0_i16); - } - static constexpr GPU::Vertex Vertex(int16_t x, int16_t y) { - return creator_template(x, y); - } - - // ################################################################### - - static constexpr GPU::AreaI16 AreaI16() { - return creator_template(0, 0, 0, 0); - } - static constexpr GPU::AreaI16 AreaI16(int16_t x, int16_t y, int16_t w, int16_t h) { - return creator_template(x, y, w, h); - } - static constexpr GPU::AreaI16 AreaI16(GPU::PositionI16 pos, GPU::SizeI16 size) { - return creator_template(pos, size); - } - - // ################################################################### - - static constexpr GPU::AreaU16 AreaU16() { - return creator_template(0, 0, 0, 0); - } - static constexpr GPU::AreaU16 AreaU16(uint16_t x, uint16_t y, uint16_t w, uint16_t h) { - return creator_template(x, y, w, h); - } - static constexpr GPU::AreaU16 AreaU16(GPU::PositionU16 pos, GPU::SizeU16 size) { - return creator_template(pos, size); - } - - // ################################################################### - - static constexpr GPU::PageOffset PageOffset() { - return creator_template(0_u8, 0_u8); - } - static constexpr GPU::PageOffset PageOffset(uint8_t u, uint8_t v) { - return creator_template(u, v); - } - - // ################################################################### - - static constexpr GPU::PageClut PageClut() { - return creator_template(0_u16, 0_u16); - } - static constexpr GPU::PageClut PageClut(uint16_t x, uint16_t y) { - return creator_template(x, y); - } - static constexpr GPU::PageClut PageClut(const GPU::PositionU16& clut_pos) { - return creator_template(clut_pos); - } - - // ################################################################### - - static constexpr GPU::TPage TPage() { - return creator_template(0_u16, 0_u16, GPU::SemiTransparency::B_add_F, GPU::TexturePageColor::$4bit); - } - static constexpr GPU::TPage TPage(uint16_t x, uint16_t y, GPU::SemiTransparency transparency, GPU::TexturePageColor clut_color) { - return creator_template(x, y, transparency, clut_color); - } - - // ################################################################### - - static constexpr GPU::TexPage TexPage() { - return creator_template(PositionU16(), GPU::TexturePageColor::$4bit, GPU::SemiTransparency::B_Half_add_F_Half, false); - } - static constexpr GPU::TexPage TexPage(const GPU::PositionU16& tex_pos, GPU::TexturePageColor tex_color, GPU::SemiTransparency transparency = GPU::SemiTransparency::B_Half_add_F_Half, bool dither = false) { - return creator_template(tex_pos, tex_color, transparency, dither); - } - - // ################################################################### - - static constexpr GPU::OffsetPageWithClut OffsetPageWithClut() { - return creator_template(PageOffset(), PageClut()); - } - static constexpr GPU::OffsetPageWithClut OffsetPageWithClut(GPU::PageOffset tex_offset, GPU::PageClut clut) { - return creator_template(tex_offset, clut); - } - - // ################################################################### - - static constexpr GPU::VertexColor VertexColor() { - return creator_template(Vertex(), GPU::Color24::Black()); - } - static constexpr GPU::VertexColor VertexColor(GPU::Vertex pos, GPU::Color24 color) { - return creator_template(pos, color); - } - - // ################################################################### - - static constexpr GPU::ColorVertex ColorVertex() { - return creator_template(GPU::Color24::Black(), Vertex()); - } - static constexpr GPU::ColorVertex ColorVertex(GPU::Color24 color, GPU::Vertex pos) { - return creator_template(color, pos); - } - - // ################################################################### - - static constexpr GPU::internal::SingleLine LINE_F(const GPU::Color24& color, const GPU::Vertex& start_point, const GPU::Vertex& end_point) { - return GPU::LINE_F::create(color, start_point, end_point); - } - - template - static constexpr GPU::internal::MultiLine LINE_F(const GPU::Color24& color, const GPU::Vertex& start_point, const ARGS&...rest) { - return GPU::LINE_F::create(color, start_point, rest...); - } - - static constexpr GPU::internal::SingleLine LINE_G(const GPU::ColorVertex& start_point, const GPU::ColorVertex& end_point) { - return GPU::LINE_G::create(start_point, end_point); - } - - template - static constexpr GPU::internal::MultiLine LINE_G(const GPU::ColorVertex& start_point, const ARGS&...rest) { - return GPU::LINE_G::create(start_point, rest...); - } - - // ################################################################### - // ################################################################### - // ################################################################### - - static constexpr GPU::POLY_F3 POLY_F3(const GPU::Vertex (&verticies)[3], GPU::Color24 color) { - return creator_template(verticies, color); - } - - static constexpr GPU::POLY_FT3 POLY_FT3(const GPU::Vertex (&verticies)[3], const GPU::PageOffset (&tex_offset)[3], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color = GPU::Color24::Grey()) { - return creator_template(verticies, tex_offset, tpage, clut, color); - } - - static constexpr GPU::POLY_FT3 POLY_FT3(const GPU::POLY_FT3::VertexEx (&vertices_ex)[3], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color) { - return creator_template(vertices_ex, tpage, clut, color); - } - - static constexpr GPU::POLY_G3 POLY_G3(const GPU::Vertex (&verticies)[3], const GPU::Color24 (&color)[3]) { - return creator_template(verticies, color); - } - - static constexpr GPU::POLY_G3 POLY_G3(const GPU::VertexColor (&verticies_ex)[3]) { - return creator_template(verticies_ex); - } - - static constexpr GPU::POLY_GT3 POLY_GT3(const GPU::Vertex (&verticies)[3], const GPU::PageOffset (&tex_offset)[3], const GPU::Color24 (&color)[3], GPU::TPage tpage, GPU::PageClut clut) { - return creator_template(verticies, tex_offset, color, tpage, clut); - } - - static constexpr GPU::POLY_GT3 POLY_GT3(const GPU::POLY_GT3::VertexEx (&verticies_ex)[3], GPU::TPage tpage, GPU::PageClut clut) { - return creator_template(verticies_ex, tpage, clut); - } - - static constexpr GPU::POLY_F4 POLY_F4(const GPU::Vertex (&verticies)[4], GPU::Color24 color) { - return creator_template(verticies, color); - } - - static constexpr GPU::POLY_F4 POLY_F4(const GPU::AreaI16& area, GPU::Color24 color) { - return creator_template(area, color); - } - - static constexpr GPU::POLY_FT4 POLY_FT4(const GPU::Vertex (&verticies)[4], const GPU::PageOffset (&tex_offset)[4], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color) { - return creator_template(verticies, tex_offset, tpage, clut, color); - } - - static constexpr GPU::POLY_FT4 POLY_FT4(const GPU::POLY_FT4::VertexEx (&vertices_ex)[4], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color = GPU::Color24::Grey()) { - return creator_template(vertices_ex, tpage, clut, color); - } - - static constexpr GPU::POLY_FT4 POLY_FT4(const GPU::AreaI16& area, const GPU::PageOffset& tex_offset, GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color) { - return creator_template(area, tex_offset, tpage, clut, color); - } - - static constexpr GPU::POLY_G4 POLY_G4(const GPU::Vertex (&verticies)[4], const GPU::Color24 (&color)[4]) { - return creator_template(verticies, color); - } - - static constexpr GPU::POLY_G4 POLY_G4(const GPU::VertexColor (&verticies_ex)[4]) { - return creator_template(verticies_ex); - } - - static constexpr GPU::POLY_G4 POLY_G4(const GPU::AreaI16& area, const GPU::Color24 (&color)[4]) { - return creator_template(area, color); - } - - static constexpr GPU::POLY_GT4 POLY_GT4(const GPU::Vertex (&verticies)[4], const GPU::PageOffset (&tex_offset)[4], const GPU::Color24 (&color)[4], GPU::TPage tpage, GPU::PageClut clut) { - return creator_template(verticies, tex_offset, color, tpage, clut); - } - - static constexpr GPU::POLY_GT4 POLY_GT4(const GPU::POLY_GT4::VertexEx (&verticies_ex)[4], GPU::TPage tpage, GPU::PageClut clut) { - return creator_template(verticies_ex, tpage, clut); - } - - static constexpr GPU::POLY_GT4 POLY_GT4(const GPU::AreaI16& area, const GPU::PageOffset& tex_offset, GPU::TPage tpage, GPU::PageClut clut, const GPU::Color24 (&color)[4]) { - return creator_template(area, tex_offset, tpage, clut, color); - } - - // ################################################################### - - static constexpr GPU::TILE_1 TILE_1() { - return creator_template(Vertex(), GPU::Color24::Black()); - } - - static constexpr GPU::TILE_1 TILE_1(const GPU::Vertex& position, const GPU::Color24& color) { - return creator_template(position, color); - } - - static constexpr GPU::TILE_8 TILE_8() { - return creator_template(Vertex(), GPU::Color24::Black()); - } - - static constexpr GPU::TILE_8 TILE_8(const GPU::Vertex& position, const GPU::Color24& color) { - return creator_template(position, color); - } - - static constexpr GPU::TILE_16 TILE_16() { - return creator_template(Vertex(), GPU::Color24::Black()); - } - - static constexpr GPU::TILE_16 TILE_16(const GPU::Vertex& position, const GPU::Color24& color) { - return creator_template(position, color); - } - - static constexpr GPU::TILE TILE() { - return creator_template(AreaI16(), GPU::Color24::Black()); - } - - static constexpr GPU::TILE TILE(const GPU::AreaI16& area, const GPU::Color24& color) { - return creator_template(area, color); - } - - // ################################################################### - - static constexpr GPU::SPRT_1 SPRT_1() { - return creator_template(Vertex(), OffsetPageWithClut(), GPU::Color24::Black()); - } - - static constexpr GPU::SPRT_1 SPRT_1(const GPU::Vertex& position, const GPU::OffsetPageWithClut& tex_offset_w_clut, const GPU::Color24& color = GPU::Color24::Grey()) { - return creator_template(position, tex_offset_w_clut, color); - } - - static constexpr GPU::SPRT_8 SPRT_8() { - return creator_template(Vertex(), OffsetPageWithClut(), GPU::Color24::Black()); - } - - static constexpr GPU::SPRT_8 SPRT_8(const GPU::Vertex& position, const GPU::OffsetPageWithClut& tex_offset_w_clut, const GPU::Color24& color = GPU::Color24::Grey()) { - return creator_template(position, tex_offset_w_clut, color); - } - - static constexpr GPU::SPRT_16 SPRT_16() { - return creator_template(Vertex(), OffsetPageWithClut(), GPU::Color24::Black()); - } - - static constexpr GPU::SPRT_16 SPRT_16(const GPU::Vertex& position, const GPU::OffsetPageWithClut& tex_offset_w_clut, const GPU::Color24& color = GPU::Color24::Grey()) { - return creator_template(position, tex_offset_w_clut, color); - } - - static constexpr GPU::SPRT SPRT() { - return creator_template(AreaI16(), OffsetPageWithClut(), GPU::Color24::Black()); - } - - static constexpr GPU::SPRT SPRT(const GPU::AreaI16& area, const GPU::OffsetPageWithClut& tex_offset_w_clut, const GPU::Color24& color = GPU::Color24::Grey()) { - return creator_template(area, tex_offset_w_clut, color); - } - } -} \ No newline at end of file +#include "Primitives/primitive_poly_types.hpp" \ No newline at end of file diff --git a/include/PSX/GPU/make_gpu_primitives.hpp b/include/PSX/GPU/make_gpu_primitives.hpp new file mode 100644 index 00000000..fd5d28cd --- /dev/null +++ b/include/PSX/GPU/make_gpu_primitives.hpp @@ -0,0 +1,331 @@ +#pragma once +#include "gpu_primitives.hpp" + +namespace JabyEngine { + namespace Make { + using JabyEngine::operator""_i16; + using JabyEngine::operator""_u16; + + template + static constexpr T creator_template(const ARGS&...args) { + return T::create(args...); + } + + // ################################################################### + + static constexpr GPU::SizeI16 SizeI16() { + return creator_template(0_i16, 0_i16); + } + static constexpr GPU::SizeI16 SizeI16(int16_t x, int16_t y) { + return creator_template(x, y); + } + + // ################################################################### + + static constexpr GPU::SizeU16 SizeU16() { + return creator_template(0_u16, 0_u16); + } + static constexpr GPU::SizeU16 SizeU16(uint16_t x, uint16_t y) { + return creator_template(x, y); + } + + // ################################################################### + + static constexpr GPU::PositionI8 PositionI8() { + return creator_template(0_i8, 0_i8); + } + static constexpr GPU::PositionI8 PositionI8(int8_t x, int8_t y) { + return creator_template(x, y); + } + + // ################################################################### + + static constexpr GPU::PositionU8 PositionU8() { + return creator_template(0_u8, 0_u8); + } + static constexpr GPU::PositionU8 PositionU8(int8_t x, int8_t y) { + return creator_template(x, y); + } + + // ################################################################### + + static constexpr GPU::PositionI16 PositionI16() { + return creator_template(0_i16, 0_i16); + } + static constexpr GPU::PositionI16 PositionI16(int16_t x, int16_t y) { + return creator_template(x, y); + } + + // ################################################################### + + static constexpr GPU::PositionU16 PositionU16() { + return creator_template(0_u16, 0_u16); + } + static constexpr GPU::PositionU16 PositionU16(uint16_t x, uint16_t y) { + return creator_template(x, y); + } + + // ################################################################### + + static constexpr GPU::Vertex Vertex() { + return creator_template(0_i16, 0_i16); + } + static constexpr GPU::Vertex Vertex(int16_t x, int16_t y) { + return creator_template(x, y); + } + + // ################################################################### + + static constexpr GPU::AreaI16 AreaI16() { + return creator_template(0, 0, 0, 0); + } + static constexpr GPU::AreaI16 AreaI16(int16_t x, int16_t y, int16_t w, int16_t h) { + return creator_template(x, y, w, h); + } + static constexpr GPU::AreaI16 AreaI16(GPU::PositionI16 pos, GPU::SizeI16 size) { + return creator_template(pos, size); + } + + // ################################################################### + + static constexpr GPU::AreaU16 AreaU16() { + return creator_template(0, 0, 0, 0); + } + static constexpr GPU::AreaU16 AreaU16(uint16_t x, uint16_t y, uint16_t w, uint16_t h) { + return creator_template(x, y, w, h); + } + static constexpr GPU::AreaU16 AreaU16(GPU::PositionU16 pos, GPU::SizeU16 size) { + return creator_template(pos, size); + } + + // ################################################################### + + static constexpr GPU::PageOffset PageOffset() { + return creator_template(0_u8, 0_u8); + } + static constexpr GPU::PageOffset PageOffset(uint8_t u, uint8_t v) { + return creator_template(u, v); + } + + // ################################################################### + + static constexpr GPU::PageClut PageClut() { + return creator_template(0_u16, 0_u16); + } + static constexpr GPU::PageClut PageClut(uint16_t x, uint16_t y) { + return creator_template(x, y); + } + static constexpr GPU::PageClut PageClut(const GPU::PositionU16& clut_pos) { + return creator_template(clut_pos); + } + + // ################################################################### + + static constexpr GPU::TPage TPage() { + return creator_template(0_u16, 0_u16, GPU::SemiTransparency::B_add_F, GPU::TexturePageColor::$4bit); + } + static constexpr GPU::TPage TPage(uint16_t x, uint16_t y, GPU::SemiTransparency transparency, GPU::TexturePageColor clut_color) { + return creator_template(x, y, transparency, clut_color); + } + + // ################################################################### + + static constexpr GPU::TexPage TexPage() { + return creator_template(PositionU16(), GPU::TexturePageColor::$4bit, GPU::SemiTransparency::B_Half_add_F_Half, false); + } + static constexpr GPU::TexPage TexPage(const GPU::PositionU16& tex_pos, GPU::TexturePageColor tex_color, GPU::SemiTransparency transparency = GPU::SemiTransparency::B_Half_add_F_Half, bool dither = false) { + return creator_template(tex_pos, tex_color, transparency, dither); + } + + // ################################################################### + + static constexpr GPU::OffsetPageWithClut OffsetPageWithClut() { + return creator_template(PageOffset(), PageClut()); + } + static constexpr GPU::OffsetPageWithClut OffsetPageWithClut(GPU::PageOffset tex_offset, GPU::PageClut clut) { + return creator_template(tex_offset, clut); + } + + // ################################################################### + + static constexpr GPU::VertexColor VertexColor() { + return creator_template(Vertex(), GPU::Color24::Black()); + } + static constexpr GPU::VertexColor VertexColor(GPU::Vertex pos, GPU::Color24 color) { + return creator_template(pos, color); + } + + // ################################################################### + + static constexpr GPU::ColorVertex ColorVertex() { + return creator_template(GPU::Color24::Black(), Vertex()); + } + static constexpr GPU::ColorVertex ColorVertex(GPU::Color24 color, GPU::Vertex pos) { + return creator_template(color, pos); + } + + // ################################################################### + + static constexpr GPU::internal::SingleLine LINE_F(const GPU::Color24& color, const GPU::Vertex& start_point, const GPU::Vertex& end_point) { + return GPU::LINE_F::create(color, start_point, end_point); + } + + template + static constexpr GPU::internal::MultiLine LINE_F(const GPU::Color24& color, const GPU::Vertex& start_point, const ARGS&...rest) { + return GPU::LINE_F::create(color, start_point, rest...); + } + + static constexpr GPU::internal::SingleLine LINE_G(const GPU::ColorVertex& start_point, const GPU::ColorVertex& end_point) { + return GPU::LINE_G::create(start_point, end_point); + } + + template + static constexpr GPU::internal::MultiLine LINE_G(const GPU::ColorVertex& start_point, const ARGS&...rest) { + return GPU::LINE_G::create(start_point, rest...); + } + + // ################################################################### + // ################################################################### + // ################################################################### + + static constexpr GPU::POLY_F3 POLY_F3(const GPU::Vertex (&verticies)[3], GPU::Color24 color) { + return creator_template(verticies, color); + } + + static constexpr GPU::POLY_FT3 POLY_FT3(const GPU::Vertex (&verticies)[3], const GPU::PageOffset (&tex_offset)[3], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color = GPU::Color24::Grey()) { + return creator_template(verticies, tex_offset, tpage, clut, color); + } + + static constexpr GPU::POLY_FT3 POLY_FT3(const GPU::POLY_FT3::VertexEx (&vertices_ex)[3], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color) { + return creator_template(vertices_ex, tpage, clut, color); + } + + static constexpr GPU::POLY_G3 POLY_G3(const GPU::Vertex (&verticies)[3], const GPU::Color24 (&color)[3]) { + return creator_template(verticies, color); + } + + static constexpr GPU::POLY_G3 POLY_G3(const GPU::VertexColor (&verticies_ex)[3]) { + return creator_template(verticies_ex); + } + + static constexpr GPU::POLY_GT3 POLY_GT3(const GPU::Vertex (&verticies)[3], const GPU::PageOffset (&tex_offset)[3], const GPU::Color24 (&color)[3], GPU::TPage tpage, GPU::PageClut clut) { + return creator_template(verticies, tex_offset, color, tpage, clut); + } + + static constexpr GPU::POLY_GT3 POLY_GT3(const GPU::POLY_GT3::VertexEx (&verticies_ex)[3], GPU::TPage tpage, GPU::PageClut clut) { + return creator_template(verticies_ex, tpage, clut); + } + + static constexpr GPU::POLY_F4 POLY_F4(const GPU::Vertex (&verticies)[4], GPU::Color24 color) { + return creator_template(verticies, color); + } + + static constexpr GPU::POLY_F4 POLY_F4(const GPU::AreaI16& area, GPU::Color24 color) { + return creator_template(area, color); + } + + static constexpr GPU::POLY_FT4 POLY_FT4(const GPU::Vertex (&verticies)[4], const GPU::PageOffset (&tex_offset)[4], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color) { + return creator_template(verticies, tex_offset, tpage, clut, color); + } + + static constexpr GPU::POLY_FT4 POLY_FT4(const GPU::POLY_FT4::VertexEx (&vertices_ex)[4], GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color = GPU::Color24::Grey()) { + return creator_template(vertices_ex, tpage, clut, color); + } + + static constexpr GPU::POLY_FT4 POLY_FT4(const GPU::AreaI16& area, const GPU::PageOffset& tex_offset, GPU::TPage tpage, GPU::PageClut clut, GPU::Color24 color) { + return creator_template(area, tex_offset, tpage, clut, color); + } + + static constexpr GPU::POLY_G4 POLY_G4(const GPU::Vertex (&verticies)[4], const GPU::Color24 (&color)[4]) { + return creator_template(verticies, color); + } + + static constexpr GPU::POLY_G4 POLY_G4(const GPU::VertexColor (&verticies_ex)[4]) { + return creator_template(verticies_ex); + } + + static constexpr GPU::POLY_G4 POLY_G4(const GPU::AreaI16& area, const GPU::Color24 (&color)[4]) { + return creator_template(area, color); + } + + static constexpr GPU::POLY_GT4 POLY_GT4(const GPU::Vertex (&verticies)[4], const GPU::PageOffset (&tex_offset)[4], const GPU::Color24 (&color)[4], GPU::TPage tpage, GPU::PageClut clut) { + return creator_template(verticies, tex_offset, color, tpage, clut); + } + + static constexpr GPU::POLY_GT4 POLY_GT4(const GPU::POLY_GT4::VertexEx (&verticies_ex)[4], GPU::TPage tpage, GPU::PageClut clut) { + return creator_template(verticies_ex, tpage, clut); + } + + static constexpr GPU::POLY_GT4 POLY_GT4(const GPU::AreaI16& area, const GPU::PageOffset& tex_offset, GPU::TPage tpage, GPU::PageClut clut, const GPU::Color24 (&color)[4]) { + return creator_template(area, tex_offset, tpage, clut, color); + } + + // ################################################################### + + static constexpr GPU::TILE_1 TILE_1() { + return creator_template(Vertex(), GPU::Color24::Black()); + } + + static constexpr GPU::TILE_1 TILE_1(const GPU::Vertex& position, const GPU::Color24& color) { + return creator_template(position, color); + } + + static constexpr GPU::TILE_8 TILE_8() { + return creator_template(Vertex(), GPU::Color24::Black()); + } + + static constexpr GPU::TILE_8 TILE_8(const GPU::Vertex& position, const GPU::Color24& color) { + return creator_template(position, color); + } + + static constexpr GPU::TILE_16 TILE_16() { + return creator_template(Vertex(), GPU::Color24::Black()); + } + + static constexpr GPU::TILE_16 TILE_16(const GPU::Vertex& position, const GPU::Color24& color) { + return creator_template(position, color); + } + + static constexpr GPU::TILE TILE() { + return creator_template(AreaI16(), GPU::Color24::Black()); + } + + static constexpr GPU::TILE TILE(const GPU::AreaI16& area, const GPU::Color24& color) { + return creator_template(area, color); + } + + // ################################################################### + + static constexpr GPU::SPRT_1 SPRT_1() { + return creator_template(Vertex(), OffsetPageWithClut(), GPU::Color24::Black()); + } + + static constexpr GPU::SPRT_1 SPRT_1(const GPU::Vertex& position, const GPU::OffsetPageWithClut& tex_offset_w_clut, const GPU::Color24& color = GPU::Color24::Grey()) { + return creator_template(position, tex_offset_w_clut, color); + } + + static constexpr GPU::SPRT_8 SPRT_8() { + return creator_template(Vertex(), OffsetPageWithClut(), GPU::Color24::Black()); + } + + static constexpr GPU::SPRT_8 SPRT_8(const GPU::Vertex& position, const GPU::OffsetPageWithClut& tex_offset_w_clut, const GPU::Color24& color = GPU::Color24::Grey()) { + return creator_template(position, tex_offset_w_clut, color); + } + + static constexpr GPU::SPRT_16 SPRT_16() { + return creator_template(Vertex(), OffsetPageWithClut(), GPU::Color24::Black()); + } + + static constexpr GPU::SPRT_16 SPRT_16(const GPU::Vertex& position, const GPU::OffsetPageWithClut& tex_offset_w_clut, const GPU::Color24& color = GPU::Color24::Grey()) { + return creator_template(position, tex_offset_w_clut, color); + } + + static constexpr GPU::SPRT SPRT() { + return creator_template(AreaI16(), OffsetPageWithClut(), GPU::Color24::Black()); + } + + static constexpr GPU::SPRT SPRT(const GPU::AreaI16& area, const GPU::OffsetPageWithClut& tex_offset_w_clut, const GPU::Color24& color = GPU::Color24::Grey()) { + return creator_template(area, tex_offset_w_clut, color); + } + } +} \ No newline at end of file diff --git a/support/src/FontWriter/src/font_writer.cpp b/support/src/FontWriter/src/font_writer.cpp index 57e8fb77..85c7db0a 100644 --- a/support/src/FontWriter/src/font_writer.cpp +++ b/support/src/FontWriter/src/font_writer.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include