aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorathrxx2011-06-18 19:44:18 +0200
committerathrxx2011-06-18 19:45:36 +0200
commit03ba1871f7392db32db09228878a2e148042f8c1 (patch)
tree43f69bf7868dce753a619f6279a792e483abade5 /engines/scumm
parent9b703356e6c7aecfea52cfa82714fb0ef8241465 (diff)
downloadscummvm-rg350-03ba1871f7392db32db09228878a2e148042f8c1.tar.gz
scummvm-rg350-03ba1871f7392db32db09228878a2e148042f8c1.tar.bz2
scummvm-rg350-03ba1871f7392db32db09228878a2e148042f8c1.zip
SCUMM: fixed messed up colors in 16bit HE games
(regression from 068b4a5351a5574dbfac6acff5776a0071f3f2dd)
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/gfx.cpp4
-rw-r--r--engines/scumm/gfx.h4
-rw-r--r--engines/scumm/scumm.cpp15
3 files changed, 12 insertions, 11 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index b78059bd94..fd529b36fe 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -251,7 +251,7 @@ GdiV2::~GdiV2() {
}
#ifdef USE_RGB_COLOR
-Gdi16Bit::Gdi16Bit(ScummEngine *vm) : Gdi(vm) {
+GdiHE16bit::GdiHE16bit(ScummEngine *vm) : GdiHE(vm) {
}
#endif
@@ -3674,7 +3674,7 @@ void Gdi::unkDecode11(byte *dst, int dstPitch, const byte *src, int height) cons
#undef READ_BIT_256
#ifdef USE_RGB_COLOR
-void Gdi16Bit::writeRoomColor(byte *dst, byte color) const {
+void GdiHE16bit::writeRoomColor(byte *dst, byte color) const {
WRITE_UINT16(dst, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2));
}
#endif
diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h
index 54ce724da1..2e7111e78b 100644
--- a/engines/scumm/gfx.h
+++ b/engines/scumm/gfx.h
@@ -430,11 +430,11 @@ public:
};
#ifdef USE_RGB_COLOR
-class Gdi16Bit : public Gdi {
+class GdiHE16bit : public GdiHE {
protected:
virtual void writeRoomColor(byte *dst, byte color) const;
public:
- Gdi16Bit(ScummEngine *vm);
+ GdiHE16bit(ScummEngine *vm);
};
#endif
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 362430d704..4fd1f6b32d 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -114,17 +114,18 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
_rnd("scumm")
{
- if (_game.heversion > 0) {
- _gdi = new GdiHE(this);
- } else if (_game.platform == Common::kPlatformNES) {
- _gdi = new GdiNES(this);
#ifdef USE_RGB_COLOR
- } else if (_game.features & GF_16BIT_COLOR) {
+ if (_game.features & GF_16BIT_COLOR) {
if (_game.platform == Common::kPlatformPCEngine)
_gdi = new GdiPCEngine(this);
- else
- _gdi = new Gdi16Bit(this);
+ else if (_game.heversion > 0)
+ _gdi = new GdiHE16bit(this);
+ } else
#endif
+ if (_game.heversion > 0) {
+ _gdi = new GdiHE(this);
+ } else if (_game.platform == Common::kPlatformNES) {
+ _gdi = new GdiNES(this);
} else if (_game.version <= 1) {
_gdi = new GdiV1(this);
} else if (_game.version == 2) {