mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-04 04:48:05 +03:00
AGS: Refactor palette management to use SDL_Palette
This commit is contained in:
+11
-8
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user