Support %i

This commit is contained in:
2023-12-05 21:04:45 -05:00
parent f762536e33
commit c4892d51ab
4 changed files with 5 additions and 4 deletions

View File

@@ -40,7 +40,7 @@ namespace JabyEngine {
void write(State& state, const char* str, GPU::Color24 color, Wiggle* wiggle, ...) {
__write_impl(wiggle, color, wiggle);
}
void write(State& state, const char* str, GPU::Color24 color, Wiggle* wiggle, va_list b);
void write(State& state, const char* str, GPU::Color24 color, Wiggle* wiggle, va_list list);
void render();
#undef __write_impl

View File

@@ -43,7 +43,7 @@ namespace JabyEngine {
}
}
void FontWriter :: write(State& state, const char* str, GPU::Color24 color, Wiggle* wiggle, va_list b) {
void FontWriter :: write(State& state, const char* str, GPU::Color24 color, Wiggle* wiggle, va_list list) {
const auto* primitive_end = &this->prim_buffer.double_buffer[GPU::Display::current_id][this->prim_buffer.single_buffer_length];
const auto font_size = this->prim_buffer.double_buffer[0][0]->size;
const auto row_count = 256/font_size.width;
@@ -91,7 +91,7 @@ namespace JabyEngine {
switch(*str) {
case 'i':
prev_str = str + 1;
str = simple_itoa(buffer, -505, 10);
str = simple_itoa(buffer, va_arg(list, int), 10);
continue;
case '%':