Refactor CG loaders

Now they return a newly introduced CG object instead of writing directly
to VRAM. The palette is still written directly in the load functions.
This commit is contained in:
kichikuou
2025-11-09 10:41:00 +09:00
parent 75e99d3fbc
commit 49cf5d55ed
8 changed files with 181 additions and 203 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ SDL_Texture* create_scanline_texture(SDL_Renderer* renderer, int width, int heig
{
SDL_Surface* sf = SDL_CreateRGBSurfaceWithFormat(0, width, height, 32, SDL_PIXELFORMAT_ARGB8888);
for (int y = 0; y < height; y++) {
uint32* p = surface_line(sf, y);
uint32* p = reinterpret_cast<uint32*>(surface_line(sf, y));
uint32 v = y % 2 ? (SCANLINE_ALPHA << 24) : 0;
for (int x = 0; x < width; x++) {
p[x] = v;