diff options
Diffstat (limited to 'src/debug.c')
| -rw-r--r-- | src/debug.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/debug.c b/src/debug.c index f9248c1..f232490 100644 --- a/src/debug.c +++ b/src/debug.c @@ -19,7 +19,7 @@ struct pw_debug *pw_debug_init(SDL_Renderer *renderer) { SDL_Palette *palette = NULL; SDL_Surface *surface = NULL; - pw_png image = NULL; + union pw_png_pixel *image = NULL; SDL_Texture *font = NULL; struct pw_debug *debug = NULL; @@ -47,14 +47,10 @@ struct pw_debug *pw_debug_init(SDL_Renderer *renderer) { if (!image) { goto error; } - union pw_png_pixel mask = {.ch = {0xff, 0xff, 0xff, 0x00}}; uint8_t *pixels = surface->pixels; for (size_t i = 0; i < PW_FONT_WIDTH * PW_FONT_HEIGHT; ++i) { - union pw_png_pixel px; - pw_png_pixel(image, i, &px); - - pixels[i] = !!(px.raw & mask.raw); + pixels[i] = !!(image[i].raw & mask.raw); } SDL_free(image); image = NULL; |
