X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdraw%2Fao_text.c;h=c20f2399d97849d7d3f4dcbf8005fe39bd2d8481;hb=f36f98ad97f029ded83d9198d8344d59818c535a;hp=cc43b362cdde9e43d8d142e90fafe486e05e1cc5;hpb=1c717d96d39855ee3919f0ed760f33243aee32bd;p=fw%2Faltos diff --git a/src/draw/ao_text.c b/src/draw/ao_text.c index cc43b362..c20f2399 100644 --- a/src/draw/ao_text.c +++ b/src/draw/ao_text.c @@ -18,6 +18,12 @@ #include #include +extern uint32_t ao_glyph_temp[]; + +static struct ao_bitmap src_bitmap = { + .base = ao_glyph_temp, +}; + void ao_text(struct ao_bitmap *dst, const struct ao_font *font, @@ -28,16 +34,11 @@ ao_text(struct ao_bitmap *dst, uint8_t rop) { int16_t glyph_stride = ao_stride(font->max_width); - uint32_t src[glyph_stride * font->max_height]; char c; int h; int16_t x_off = 0, y_off = 0, advance = 0; int16_t byte_width = 0; - struct ao_bitmap src_bitmap = { - .base = src, - }; - rop = (rop & 3) | 0x4; if ((fill&1) == 0) @@ -67,7 +68,7 @@ ao_text(struct ao_bitmap *dst, } for (h = 0; h < src_bitmap.height; h++) - memcpy(&src[h * src_bitmap.stride], &bytes[h * byte_width], (size_t) byte_width); + memcpy(&ao_glyph_temp[h * src_bitmap.stride], &bytes[h * byte_width], (size_t) byte_width); ao_copy(dst, x + x_off, y - y_off, src_bitmap.width, src_bitmap.height,