Change to object orientated design
This commit is contained in:
@@ -14,12 +14,13 @@ using NewFontWriter = ::JabyEngine::FontWriter;
|
||||
|
||||
static object::Paco paco;
|
||||
static FontPrimitive font_buffer[2][256];
|
||||
static NewFontWriter new_font_writer;
|
||||
|
||||
static void setup() {
|
||||
static constexpr auto FontTIM = SimpleTIM(320, 0, 320, DefaultFont::Info.VRAMSize.height);
|
||||
|
||||
DefaultFont::load(&__heap_start, FontTIM);
|
||||
NewFontWriter::setup(FontBufferInfo::from(font_buffer), FontTIM, DefaultFont::Info);
|
||||
new_font_writer.setup(FontBufferInfo::from(font_buffer), FontTIM, DefaultFont::Info);
|
||||
|
||||
Assets::load_for_main();
|
||||
FontWriter::FontWriter::setup();
|
||||
@@ -29,13 +30,11 @@ static void setup() {
|
||||
|
||||
static void update() {
|
||||
FontWriter::FontWriter cursor;
|
||||
auto new_cursor = NewFontWriter::start(Make::PositionI16(16, 16));
|
||||
|
||||
const auto end_pos = cursor.write(FontWriter::Position::create(0, 32), "Cody is cute\n&\na \x1b[8;0;0mBAAAAABY!!!");
|
||||
cursor.write(end_pos, "\x1b[0;7;7mJaby was\nhere c:");
|
||||
|
||||
new_cursor.write("0");
|
||||
|
||||
new_font_writer.write(Make::PositionI16(8, 8), "012345");
|
||||
paco.update();
|
||||
}
|
||||
|
||||
@@ -43,7 +42,7 @@ static void render() {
|
||||
GPU::swap_buffers_vsync(1);
|
||||
FontWriter::FontWriter::render();
|
||||
paco.render();
|
||||
NewFontWriter::render();
|
||||
new_font_writer.render();
|
||||
}
|
||||
|
||||
void main() {
|
||||
|
Reference in New Issue
Block a user