Remove last constructor and remove GLOBAL SUB with it

This commit is contained in:
2023-10-03 13:16:46 +02:00
parent af5855804f
commit baa9e8c5de
11 changed files with 86 additions and 89 deletions

View File

@@ -3,10 +3,6 @@
#include <PSX/GPU/gpu.hpp>
#include <PSX/GPU/gpu_primitives.hpp>
extern "C" void memset() {
#pragma GCC warning "Declared to make code compile because of current GLOBAL_sub bug (Resolve this by not having any constructors)"
}
namespace FontWriter {
using namespace JabyEngine;
@@ -20,7 +16,7 @@ namespace FontWriter {
}
void FontWriter::Pool::Buffer :: setup() {
this->page = GPU::TexPage::create({Assets::FontTIM.get_texture_x(), Assets::FontTIM.get_texture_y()}, GPU::TexturePageColor::$4bit).linked();
this->page = GPU::TexPage::create(GPU::PositionU16::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();
@@ -86,7 +82,7 @@ namespace FontWriter {
}
const uint8_t char_id = cur_char - '!';
(*Pool::text_ptr)->page = {static_cast<uint8_t>((char_id & 0xF) << 4), static_cast<uint8_t>((char_id >> 4) << 4)};
(*Pool::text_ptr)->page = GPU::PagePosition::create(((char_id & 0xF) << 4), ((char_id >> 4) << 4));
(*Pool::text_ptr)->color = font_color;
Pool::last_link = &Pool::last_link->concat(*Pool::text_ptr);