aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorTravis Howell2005-11-10 05:33:31 +0000
committerTravis Howell2005-11-10 05:33:31 +0000
commitedc8e871744bb3b9fc1de11fa8814fe501b0dc73 (patch)
treeb6de0c1cc3a821c327ff5ca9e31420161671cd01 /simon
parent1085bd26b583b6300c2c3c6def7448d8ace05842 (diff)
downloadscummvm-rg350-edc8e871744bb3b9fc1de11fa8814fe501b0dc73.tar.gz
scummvm-rg350-edc8e871744bb3b9fc1de11fa8814fe501b0dc73.tar.bz2
scummvm-rg350-edc8e871744bb3b9fc1de11fa8814fe501b0dc73.zip
Add palette difference in FF.
svn-id: r19545
Diffstat (limited to 'simon')
-rw-r--r--simon/simon.cpp16
-rw-r--r--simon/simon.h2
-rw-r--r--simon/vga.cpp15
3 files changed, 18 insertions, 15 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 203fdebeb3..705617f0f0 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -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) {
diff --git a/simon/simon.h b/simon/simon.h
index 169a133e33..35b1f93c17 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -275,7 +275,7 @@ protected:
bool _unkPalFlag;
bool _exitCutscene;
bool _skipSpeech;
- byte _videoVar9;
+ byte _paletteFlag;
uint _soundFileId;
int16 _lastMusicPlayed;
diff --git a/simon/vga.cpp b/simon/vga.cpp
index 2187d58daf..78e78eefa2 100644
--- a/simon/vga.cpp
+++ b/simon/vga.cpp
@@ -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++;
}