COMMON: OSystem now has a PaletteManager

svn-id: r55806
This commit is contained in:
Max Horn 2011-02-07 17:52:38 +00:00
parent 8981fa3f16
commit ab039812e7
73 changed files with 367 additions and 203 deletions

View file

@ -511,7 +511,7 @@ void GfxScreen::getPalette(Palette *pal) {
// just copy palette to system
byte bpal[4 * 256];
// Get current palette, update it and put back
g_system->grabPalette(bpal, 0, 256);
g_system->getPaletteManager()->grabPalette(bpal, 0, 256);
for (int16 i = 1; i < 255; i++) {
pal->colors[i].r = bpal[i * 4];
pal->colors[i].g = bpal[i * 4 + 1];
@ -523,7 +523,7 @@ void GfxScreen::setPalette(Palette *pal) {
// just copy palette to system
byte bpal[4 * 256];
// Get current palette, update it and put back
g_system->grabPalette(bpal, 0, 256);
g_system->getPaletteManager()->grabPalette(bpal, 0, 256);
for (int16 i = 0; i < 256; i++) {
if (!pal->colors[i].used)
continue;
@ -532,7 +532,7 @@ void GfxScreen::setPalette(Palette *pal) {
bpal[i * 4 + 2] = CLIP(pal->colors[i].b * pal->intensity[i] / 100, 0, 255);
bpal[i * 4 + 3] = 100;
}
g_system->setPalette(bpal, 0, 256);
g_system->getPaletteManager()->setPalette(bpal, 0, 256);
}
void GfxScreen::setVerticalShakePos(uint16 shakePos) {