aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2004-06-29 05:36:01 +0000
committerTravis Howell2004-06-29 05:36:01 +0000
commitb1e49b13af63c9090b76b9ba6623fa003c4a7988 (patch)
tree87b3edf1006df77377453b0bfd935d38d1b8ed0c
parent7504e4f5c2b9c9a3d1a6327b4ea58f3e6acd2a61 (diff)
downloadscummvm-rg350-b1e49b13af63c9090b76b9ba6623fa003c4a7988.tar.gz
scummvm-rg350-b1e49b13af63c9090b76b9ba6623fa003c4a7988.tar.bz2
scummvm-rg350-b1e49b13af63c9090b76b9ba6623fa003c4a7988.zip
Fix actorOps case 218/9 in HE games
svn-id: r14115
-rw-r--r--scumm/actor.cpp2
-rw-r--r--scumm/actor.h1
-rw-r--r--scumm/base-costume.cpp6
-rw-r--r--scumm/base-costume.h2
-rw-r--r--scumm/script_v6he.cpp16
5 files changed, 14 insertions, 13 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 197504af5c..7b0fac37eb 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -57,6 +57,7 @@ Actor::Actor() {
walkbox = 0;
animProgress = 0;
skipLimb = false;
+ actor_draw_to_bg = false;
memset(animVariable, 0, sizeof(animVariable));
memset(palette, 0, sizeof(palette));
memset(sound, 0, sizeof(sound));
@@ -1017,6 +1018,7 @@ void Actor::drawActorCostume() {
bcr->_draw_bottom = bottom = 0;
bcr->_skipLimb = (skipLimb != 0);
+ bcr->_actor_draw_to_bg = (actor_draw_to_bg != 0);
// If the actor is partially hidden, redraw it next frame.
// Only done for pre-AKOS, though.
diff --git a/scumm/actor.h b/scumm/actor.h
index 74767d35ee..769ed1f1b2 100644
--- a/scumm/actor.h
+++ b/scumm/actor.h
@@ -108,6 +108,7 @@ public:
uint16 talkScript, walkScript;
bool ignoreTurns;
bool skipLimb;
+ bool actor_draw_to_bg;
int8 layer;
uint16 sound[8];
CostumeData cost;
diff --git a/scumm/base-costume.cpp b/scumm/base-costume.cpp
index 87380cf474..68275c3956 100644
--- a/scumm/base-costume.cpp
+++ b/scumm/base-costume.cpp
@@ -29,7 +29,11 @@ byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, const CostumeData &c
int i;
byte result = 0;
- _outptr = vs.screenPtr + vs.xstart;
+ if (_actor_draw_to_bg)
+ _outptr = _vm->getResourceAddress(rtBuffer, 5) + vs.xstart;
+ else
+ _outptr = vs.screenPtr + vs.xstart;
+
_outwidth = vs.width;
_outheight = vs.height;
_numStrips = vs.width / 8;
diff --git a/scumm/base-costume.h b/scumm/base-costume.h
index dac42e7dc3..a8dc0a2712 100644
--- a/scumm/base-costume.h
+++ b/scumm/base-costume.h
@@ -62,6 +62,7 @@ public:
int _draw_top, _draw_bottom;
bool _skipLimb;
+ bool _actor_draw_to_bg;
protected:
@@ -116,6 +117,7 @@ public:
_mirror = false;
_width = _height = 0;
_skipLimb = 0;
+ _actor_draw_to_bg = 0;
_outptr = 0;
diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp
index ad55ece790..e4135997b0 100644
--- a/scumm/script_v6he.cpp
+++ b/scumm/script_v6he.cpp
@@ -675,15 +675,12 @@ void ScummEngine_v6he::o6_actorOps() {
break;
case 218:
{
- // TODO: this opcode is used in the putt-putt fun pack, in 'checkers" mini game
- // and in fbear at original save screen
-
int top_actor = a->top;
int bottom_actor = a->bottom;
- a->forceClip = 1;
+ a->actor_draw_to_bg = true;
a->needRedraw = true;
a->drawActorCostume();
- a->forceClip = 0;
+ a->actor_draw_to_bg = false;
a->needRedraw = true;
a->drawActorCostume();
a->needRedraw = false;
@@ -693,12 +690,10 @@ void ScummEngine_v6he::o6_actorOps() {
if (a->bottom < bottom_actor)
a->bottom = bottom_actor;
- //FIXME Trigger redraw
- a->bottom = top_actor;
}
break;
case 219:
- a->forceClip = false;
+ a->actor_draw_to_bg = false;
a->needRedraw = true;
a->needBgReset = true;
break;
@@ -887,10 +882,7 @@ int ScummEngine_v6he::virtScreenSave(byte *dst, int x1, int y1, int x2, int y2)
int vs = 0; // XXX = gdi_virtScreen;
for (int j = y1; j <= y2; ++j) {
- // FIXME - to match the disassembly, we should save buffer (vs + 5),
- // but if we do that, then the cake decoration in Fatty Bear's Birthday
- // Surprise is not saved at all
- uint8 *p = getResourceAddress(rtBuffer, vs + 1);
+ uint8 *p = getResourceAddress(rtBuffer, vs + 5);
p += virtscr[kMainVirtScreen].xstart;
p += (j - virtscr[kMainVirtScreen].topline) * 320 + x1;