aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gui
diff options
context:
space:
mode:
authorFilippos Karapetis2009-10-07 16:26:16 +0000
committerFilippos Karapetis2009-10-07 16:26:16 +0000
commitec421984a9a6aa8d1f51913a6382b8eb1eb2c59a (patch)
tree79cb21e4c5f80e2c318df9b4db1acbc5621a9115 /engines/sci/gui
parentde3d1cfdaf040d3f9959d9738205f0e3fc3b6b08 (diff)
downloadscummvm-rg350-ec421984a9a6aa8d1f51913a6382b8eb1eb2c59a.tar.gz
scummvm-rg350-ec421984a9a6aa8d1f51913a6382b8eb1eb2c59a.tar.bz2
scummvm-rg350-ec421984a9a6aa8d1f51913a6382b8eb1eb2c59a.zip
Replaced the view loading code with the new view loading functions. EGA view color translation has been disabled, as it caused palette problems in Codename:Iceman
svn-id: r44737
Diffstat (limited to 'engines/sci/gui')
-rw-r--r--engines/sci/gui/gui_view.cpp7
-rw-r--r--engines/sci/gui/gui_view.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/engines/sci/gui/gui_view.cpp b/engines/sci/gui/gui_view.cpp
index 379e8bf612..1c3072eaed 100644
--- a/engines/sci/gui/gui_view.cpp
+++ b/engines/sci/gui/gui_view.cpp
@@ -81,7 +81,8 @@ void SciGuiView::initData(GuiResourceId resourceId) {
if (palOffset && palOffset != 0x100) {
if (IsEGA) { // simple mapping for 16 colors
- _EGAMapping = _resourceData + palOffset;
+ // FIXME: this messes up the colors in Codename: Iceman
+ //_EGAMapping = _resourceData + palOffset;
} else {
_palette->createFromData(&_resourceData[palOffset], &_viewPalette);
_embeddedPal = true;
@@ -374,4 +375,8 @@ void SciGuiView::draw(Common::Rect rect, Common::Rect clipRect, Common::Rect cli
}
}
+GuiPalette *SciGuiView::getPalette() {
+ return _embeddedPal ? &_viewPalette : &_palette->_sysPalette;
+}
+
} // End of namespace Sci
diff --git a/engines/sci/gui/gui_view.h b/engines/sci/gui/gui_view.h
index 8ed7bb058b..9f07ee4c49 100644
--- a/engines/sci/gui/gui_view.h
+++ b/engines/sci/gui/gui_view.h
@@ -59,7 +59,7 @@ public:
byte *getBitmap(GuiViewLoopNo loopNo, GuiViewCelNo celNo);
void draw(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectTranslated, GuiViewLoopNo loopNo, GuiViewCelNo celNo, byte priority, uint16 paletteNo);
uint16 getLoopCount() const { return _loopCount; }
- GuiPalette *getPalette() { return &_viewPalette; }
+ GuiPalette *getPalette();
const byte *getEgaMapping() const { return _EGAMapping; }
private: