AGS: Refactor palette management to use SDL_Palette

This commit is contained in:
kichikuou
2025-01-17 13:47:10 +09:00
parent 12e7804d9f
commit 1673a5eb3c
8 changed files with 141 additions and 203 deletions
+11 -8
View File
@@ -33,14 +33,17 @@ void AGS::load_vsp2l(uint8* data, int page, int transparent)
}
// パレット取得
screen_palette[base + 0] = SETPALETTE16(0x0, 0x0, 0x0);
screen_palette[base + 1] = SETPALETTE16(0x0, 0x0, 0xf);
screen_palette[base + 2] = SETPALETTE16(0xf, 0x0, 0x0);
screen_palette[base + 3] = SETPALETTE16(0xf, 0x0, 0xf);
screen_palette[base + 4] = SETPALETTE16(0x0, 0xf, 0x0);
screen_palette[base + 5] = SETPALETTE16(0x0, 0xf, 0xf);
screen_palette[base + 6] = SETPALETTE16(0xf, 0xf, 0x0);
screen_palette[base + 7] = SETPALETTE16(0xf, 0xf, 0xf);
const SDL_Color colors[8] = {
{0x00, 0x00, 0x00, 0xff},
{0x00, 0x00, 0xff, 0xff},
{0xff, 0x00, 0x00, 0xff},
{0xff, 0x00, 0xff, 0xff},
{0x00, 0xff, 0x00, 0xff},
{0x00, 0xff, 0xff, 0xff},
{0xff, 0xff, 0x00, 0xff},
{0xff, 0xff, 0xff, 0xff}
};
SDL_SetPaletteColors(screen_palette, colors, base, 8);
// VSP2L展開
uint8 cgdata[3][2][200], mask = 0;