ASYLUM: Palette and gamma functions update

- Identify dead code and remove unused parameters
- Rename several gamma and palette-relted functions
- Add stubs for palette fading functions
This commit is contained in:
Julien Templier 2011-07-27 09:12:01 -04:00 committed by Eugene Sandulenko
parent f453ab6da7
commit fb8afdc6d6
No known key found for this signature in database
GPG key ID: 014D387312D34F08
23 changed files with 202 additions and 124 deletions

View file

@ -965,7 +965,7 @@ IMPLEMENT_OPCODE(PlayMovie)
if (!getSharedData()->matteBarHeight) {
getCursor()->hide();
getScreen()->makeGreyPalette();
getScreen()->loadPalette();
getSharedData()->matteVar1 = 1;
getSharedData()->matteBarHeight = 1;
getSharedData()->matteVar2 = 0;
@ -981,10 +981,10 @@ IMPLEMENT_OPCODE(PlayMovie)
ActionArea *area = getWorld()->actions[getScene()->getActor()->getActionIndex3()];
if (area->paletteResourceId) {
getScreen()->setPalette(area->paletteResourceId);
getScreen()->setGammaLevel(area->paletteResourceId, 0);
getScreen()->setGammaLevel(area->paletteResourceId);
} else {
getScreen()->setPalette(getWorld()->currentPaletteId);
getScreen()->setGammaLevel(getWorld()->currentPaletteId, 0);
getScreen()->setGammaLevel(getWorld()->currentPaletteId);
}
getSharedData()->matteBarHeight = 0;
@ -1128,7 +1128,7 @@ END_OPCODE
// Opcode 0x3B
IMPLEMENT_OPCODE(CreatePalette)
if (!cmd->param2) {
getScreen()->makeGreyPalette();
getScreen()->loadPalette();
cmd->param2 = 1;
}
@ -1699,7 +1699,7 @@ END_OPCODE
IMPLEMENT_OPCODE(SetResourcePalette)
getWorld()->currentPaletteId = getWorld()->graphicResourceIds[cmd->param1];
getScreen()->setPalette(getWorld()->currentPaletteId);
getScreen()->setGammaLevel(getWorld()->currentPaletteId, 0);
getScreen()->setGammaLevel(getWorld()->currentPaletteId);
END_OPCODE
//////////////////////////////////////////////////////////////////////////