Done working on asset corruption.

This commit is contained in:
Ulysse Cura 2026-08-08 19:10:59 +02:00
parent de1f66374b
commit d0e2dc99d2
1 changed files with 0 additions and 16 deletions

View File

@ -190,22 +190,6 @@ static inline int load_texture(asset_t *asset, asset_header_def_t *asset_header_
return EXIT_FAILURE;
}
for(size_t i = 0; i < height; i++)
{
for(size_t j = 0; j < width; j += sizeof(uint16_t))
{
uint8_t r, g, b;
r = *(uint16_t *)&tmp_surface->pixels[i * sizeof(uint16_t) * width + j] & 0x001F;
g = *(uint16_t *)&tmp_surface->pixels[i * sizeof(uint16_t) * width + j + 1] >> 5;
b = *(uint16_t *)&tmp_surface->pixels[i * sizeof(uint16_t) * width + j + 2] >> 11;
printf("\033[48;2;%d;%d;%dm ", r, g, b);
}
puts("\033[m");
}
if(!SDL_SetSurfaceColorKey(tmp_surface, true, 0xF81F))
{
error_printf("Failed to set color key of temporary surface : %s", SDL_GetError());