#pragma once #include "../../System/IOPorts/gpu_io.hpp" #include "linked_elements.hpp" #include "primitive_support_types.hpp" namespace JabyEngine { namespace GPU { struct TexPage : public internal::LinkedElementCreator { static constexpr bool is_render_primitive = true; struct GPU_IO::GP0 value; 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)}; } }; struct CPU2VRAM { struct GPU_IO::GP0 cmd; struct GPU_IO::GP0 pos; struct GPU_IO::GP0 size; static constexpr CPU2VRAM create(const AreaU16& dst) { return CPU2VRAM{ .cmd = GPU_IO::Command::CPU2VRAM_Blitting(), .pos = GPU_IO::Command::TopLeftPosition(dst.position), .size = GPU_IO::Command::WidthHeight(dst.size) }; } }; } }