mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-22 22:58:12 +03:00
Ignore zero palette entry in Gakuen Senki
This prevents unused palette portions of loaded CG from cluttering other parts of the screen.
This commit is contained in:
+7
-1
@@ -55,8 +55,14 @@ CG AGS::load_vsp(const std::vector<uint8_t>& data, bool set_palette, int transpa
|
||||
uint8_t r = (data[p++] & 0xf) * 0x11;
|
||||
uint8_t g = (data[p++] & 0xf) * 0x11;
|
||||
colors[i] = {r, g, b, 255};
|
||||
// In Gakuen Senki, zero entries should not be set to the palette.
|
||||
if (game_id.is(GameId::GAKUEN) && (b | r | g) != 0) {
|
||||
SDL_SetPaletteColors(program_palette, colors + i, base + i, 1);
|
||||
}
|
||||
}
|
||||
if (!game_id.is(GameId::GAKUEN)) {
|
||||
SDL_SetPaletteColors(program_palette, colors, base, 16);
|
||||
}
|
||||
SDL_SetPaletteColors(program_palette, colors, base, 16);
|
||||
}
|
||||
|
||||
// パレット展開
|
||||
|
||||
Reference in New Issue
Block a user