aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2006-09-18 19:22:40 +0000
committerMax Horn2006-09-18 19:22:40 +0000
commit06ddd876a5b1d76641740a0fadd4c1a5e88c3627 (patch)
tree0f17ecb519d400c38c3ce954309f4c1ee6619ae2
parentd9f16b8a4ad24fdc6dfc9551cdb929814d26c1b6 (diff)
downloadscummvm-rg350-06ddd876a5b1d76641740a0fadd4c1a5e88c3627.tar.gz
scummvm-rg350-06ddd876a5b1d76641740a0fadd4c1a5e88c3627.tar.bz2
scummvm-rg350-06ddd876a5b1d76641740a0fadd4c1a5e88c3627.zip
Fix --disable-he
svn-id: r23932
-rw-r--r--engines/scumm/gfx.cpp4
-rw-r--r--engines/scumm/gfx.h3
-rw-r--r--engines/scumm/object.cpp6
3 files changed, 11 insertions, 2 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 4330d75beb..1de8a7ad08 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -1711,6 +1711,7 @@ void Gdi::decodeMask(int x, int y, const int width, const int height,
}
}
+#ifndef DISABLE_HE
/**
* Draw a bitmap onto a virtual screen. This is main drawing method for room backgrounds
* used throughout HE71+ versions.
@@ -1803,7 +1804,6 @@ void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs) {
}
void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, int w, int h) {
-#ifndef DISABLE_HE
const byte *bmap_ptr = _vm->findResourceData(MKID_BE('BMAP'), ptr);
assert(bmap_ptr);
@@ -1828,7 +1828,6 @@ void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y,
((ScummEngine_v71he *)_vm)->restoreBackgroundHE(rect1);
}
-#endif
}
void ScummEngine_v70he::restoreBackgroundHE(Common::Rect rect, int dirtybit) {
@@ -1867,6 +1866,7 @@ void ScummEngine_v70he::restoreBackgroundHE(Common::Rect rect, int dirtybit) {
blit(dst, virtscr[0].pitch, src, virtscr[0].pitch, rw, rh);
markRectAsDirty(kMainVirtScreen, rect, dirtybit);
}
+#endif
/**
* Reset the background behind an actor or blast object.
diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h
index bc084a67f1..ffbab7ddca 100644
--- a/engines/scumm/gfx.h
+++ b/engines/scumm/gfx.h
@@ -285,8 +285,11 @@ public:
void decodeNESGfx(const byte *room);
void decodeNESObject(const byte *ptr, int xpos, int ypos, int width, int height);
+
+#ifndef DISABLE_HE
void drawBMAPBg(const byte *ptr, VirtScreen *vs);
void drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, int w, int h);
+#endif
byte *getMaskBuffer(int x, int y, int z);
void disableZBuffer() { _zbufferDisabled = true; }
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index 177996de90..0ab786bbc4 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -474,9 +474,11 @@ void ScummEngine::drawObject(int obj, int arg) {
(_game.id == GID_FT && getClass(od.obj_nr, kObjectClassPlayer)))
flags |= Gdi::dbDrawMaskOnAll;
+#ifndef DISABLE_HE
if (_game.heversion >= 70 && findResource(MKID_BE('SMAP'), ptr) == NULL)
_gdi->drawBMAPObject(ptr, &virtscr[0], obj, od.x_pos, od.y_pos, od.width, od.height);
else
+#endif
_gdi->drawBitmap(ptr, &virtscr[0], x, ypos, width * 8, height, x - xpos, numstrip, flags);
}
}
@@ -508,6 +510,7 @@ void ScummEngine::clearRoomObjects() {
}
}
+#ifndef DISABLE_HE
void ScummEngine_v70he::resetRoomObjects() {
ScummEngine_v60he::resetRoomObjects();
restoreFlObjects();
@@ -553,6 +556,7 @@ void ScummEngine_v70he::restoreFlObjects() {
_numStoredFlObjects = 0;
}
+#endif
void ScummEngine::resetRoomObjects() {
int i, j;
@@ -1751,6 +1755,7 @@ int ScummEngine::findFlObjectSlot() {
return -1;
}
+#ifndef DISABLE_HE
void ScummEngine_v70he::loadFlObject(uint object, uint room) {
// Don't load an already stored object
for (int i = 0; i < _numStoredFlObjects; i++) {
@@ -1760,6 +1765,7 @@ void ScummEngine_v70he::loadFlObject(uint object, uint room) {
ScummEngine_v60he::loadFlObject(object, room);
}
+#endif
void ScummEngine::loadFlObject(uint object, uint room) {
FindObjectInRoom foir;