Add palette difference in FF.

svn-id: r19545
This commit is contained in:
Travis Howell 2005-11-10 05:33:31 +00:00
parent 1085bd26b5
commit edc8e87174
3 changed files with 18 additions and 15 deletions

View File

@ -604,7 +604,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
_unkPalFlag = 0;
_exitCutscene = 0;
_skipSpeech = 0;
_videoVar9 = 0;
_paletteFlag = 0;
_soundFileId = 0;
_lastMusicPlayed = -1;
@ -2805,8 +2805,8 @@ void SimonEngine::timer_vga_sprites() {
const byte *vc_ptr_org = _vcPtr;
uint16 params[5]; // parameters to vc10
if (_videoVar9 == 2)
_videoVar9 = 1;
if (_paletteFlag == 2)
_paletteFlag = 1;
if (_game & GF_SIMON2 && _scrollFlag) {
timer_vga_sprites_helper();
@ -2888,8 +2888,8 @@ void SimonEngine::timer_vga_sprites_2() {
const byte *vc_ptr_org = _vcPtr;
uint16 params[5]; // parameters to vc10_draw
if (_videoVar9 == 2)
_videoVar9 = 1;
if (_paletteFlag == 2)
_paletteFlag = 1;
vsp = _vgaSprites;
while (vsp->id != 0) {
@ -3955,8 +3955,8 @@ void SimonEngine::dx_copy_from_attached_to_3(uint lines) {
void SimonEngine::dx_update_screen_and_palette() {
_numScreenUpdates++;
if (_paletteColorCount == 0 && _videoVar9 == 1) {
_videoVar9 = 0;
if (_paletteColorCount == 0 && _paletteFlag == 1) {
_paletteFlag = 0;
if (memcmp(_palette, _paletteBackup, 256 * 4) != 0) {
memcpy(_paletteBackup, _palette, 256 * 4);
_system->setPalette(_palette, 0, 256);
@ -3978,7 +3978,7 @@ void SimonEngine::dx_update_screen_and_palette() {
}
void SimonEngine::realizePalette() {
_videoVar9 = false;
_paletteFlag = false;
memcpy(_paletteBackup, _palette, 256 * 4);
if (_paletteColorCount & 0x8000) {

View File

@ -275,7 +275,7 @@ protected:
bool _unkPalFlag;
bool _exitCutscene;
bool _skipSpeech;
byte _videoVar9;
byte _paletteFlag;
uint _soundFileId;
int16 _lastMusicPlayed;

View File

@ -706,9 +706,7 @@ void SimonEngine::vc10_draw() {
if (_dumpImages)
dump_single_bitmap(_vgaCurFileId, state.image, state.depack_src, width * 16, height,
state.palette);
// TODO::Add support for image scaling
if (_game == GAME_FEEBLEFILES)
return;
// TODO::Add support for image scaling in Feeble Files
if (flags & 0x80 && !(state.flags & 0x10)) {
if (state.flags & 1) {
@ -1209,11 +1207,16 @@ void SimonEngine::vc22_setSpritePalette() {
uint a = vc_read_next_word();
uint b = vc_read_next_word();
uint num = a == 0 ? 0x20 : 0x10;
uint palSize = 96;
byte *palptr, *src;
palptr = &_palette[(a << 6)];
if (_game == GAME_FEEBLEFILES) {
num = 256;
palSize = 768;
}
src = _curVgaFile1 + 6 + b * 96;
palptr = &_palette[(a << 6)];
src = _curVgaFile1 + 6 + b * palSize;
do {
palptr[0] = src[0] << 2;
@ -1225,7 +1228,7 @@ void SimonEngine::vc22_setSpritePalette() {
src += 3;
} while (--num);
_videoVar9 = 2;
_paletteFlag = 2;
_vgaSpriteChanged++;
}