Integrate all the progress into master #6
|
@ -4,7 +4,7 @@
|
|||
#include <PSX/GPU/make_gpu_primitives.hpp>
|
||||
|
||||
namespace JabyEngine {
|
||||
using FontPrimitive = GPU::SPRT_16::Linked;
|
||||
using FontPrimitive = GPU::SPRT::Linked;
|
||||
|
||||
struct FontInfo {
|
||||
GPU::SizeU16 texture_size;
|
||||
|
|
|
@ -16,8 +16,6 @@ namespace JabyEngine {
|
|||
GPU::PageClut clut;
|
||||
GPU::Link* last_primitive;
|
||||
|
||||
void setup(const SimpleTIM& vram_dst, const GPU::SizeI16& font_size);
|
||||
|
||||
public:
|
||||
static constexpr FontWriter empty() {
|
||||
FontWriter instance;
|
||||
|
@ -30,6 +28,8 @@ namespace JabyEngine {
|
|||
return instance;
|
||||
}
|
||||
|
||||
void setup(const SimpleTIM& vram_dst, const GPU::SizeI16& font_size);
|
||||
|
||||
void setup(const SimpleTIM& vram_dst, const FontInfo& font_info) {
|
||||
FontWriter::setup(vram_dst, Make::SizeI16(font_info.font_size.width, font_info.font_size.height));
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ namespace JabyEngine {
|
|||
auto& primitive = GlobalPrimitiveFactory.new_primitive();
|
||||
|
||||
primitive->position = state.pos;
|
||||
primitive->size = this->font_size;
|
||||
if(wiggle) {
|
||||
const auto [off_x, off_y] = (*wiggle)[(state.wiggle_count++)&0x7];
|
||||
primitive->position.move(off_x, off_y);
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace JabyEngine {
|
|||
const auto*const buffer_end = start + length;
|
||||
|
||||
for(auto* cur_prim = start; cur_prim < buffer_end; cur_prim++) {
|
||||
*cur_prim = FontPrimitive::create(Make::SPRT_16(Make::Vertex(), Make::OffsetPageWithClut()));
|
||||
*cur_prim = FontPrimitive::create(Make::SPRT(Make::AreaI16(), Make::OffsetPageWithClut()));
|
||||
}
|
||||
|
||||
GlobalPrimitiveFactory = PrimitiveFactory::create(start, length);
|
||||
|
|
Loading…
Reference in New Issue