aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2004-10-12 14:12:20 +0000
committerTravis Howell2004-10-12 14:12:20 +0000
commit687a5db4a835185147571452f22b700182f9b6f5 (patch)
treef046749b86c6517a1e457f93365b8383edd060ed /scumm
parentec413cc8f9d49ca3c93092e955032a92857c3960 (diff)
downloadscummvm-rg350-687a5db4a835185147571452f22b700182f9b6f5.tar.gz
scummvm-rg350-687a5db4a835185147571452f22b700182f9b6f5.tar.bz2
scummvm-rg350-687a5db4a835185147571452f22b700182f9b6f5.zip
Rename vars
Add some missng code for HE games. svn-id: r15528
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp18
-rw-r--r--scumm/actor.h11
-rw-r--r--scumm/akos.cpp2
-rw-r--r--scumm/base-costume.h4
-rw-r--r--scumm/script_v100he.cpp2
-rw-r--r--scumm/script_v72he.cpp2
-rw-r--r--scumm/script_v80he.cpp40
7 files changed, 56 insertions, 23 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 0546b64f1d..83dd71d167 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -62,7 +62,7 @@ void Actor::initActor(int mode) {
frame = 0;
_walkbox = 0;
animProgress = 0;
- skipLimb = false;
+ skipLimbs = false;
drawToBackBuf = false;
memset(animVariable, 0, sizeof(animVariable));
memset(palette, 0, sizeof(palette));
@@ -83,14 +83,14 @@ void Actor::initActor(int mode) {
_pos.y = 0;
facing = 180;
condMask = 1;
- talkUnk = 0;
+ noTalkAnimation = 0;
if (_vm->_version >= 7)
visible = false;
- skipLimb = false;
+ skipLimbs = false;
} else if (mode == 2) {
facing = 180;
condMask = 1;
- skipLimb = false;
+ skipLimbs = false;
}
_elevation = 0;
width = 24;
@@ -1079,10 +1079,10 @@ void Actor::drawActorCostume(bool hitTestMode) {
bcr->_draw_top = 0x7fffffff;
bcr->_draw_bottom = 0;
- bcr->_skipLimb = (skipLimb != 0);
+ bcr->_skipLimbs = (skipLimbs != 0);
bcr->_paletteNum = paletteNum;
- if (_vm->_heversion >= 80 && talkUnk == 0) {
+ if (_vm->_heversion >= 80 && noTalkAnimation == 0) {
condMask &= 0xFFFFFC00;
condMask |= 1;
if (_vm->getTalkingActor() == number) {
@@ -1092,7 +1092,7 @@ void Actor::drawActorCostume(bool hitTestMode) {
setTalkCondition(rnd);
}
}
- talkUnk = 0;
+ noTalkAnimation = 0;
// If the actor is partially hidden, redraw it next frame.
// Only done for pre-AKOS, though.
@@ -1352,7 +1352,7 @@ void Actor::setActorCostume(int c) {
int i;
if ((_vm->_features & GF_HUMONGOUS) && (c == -1 || c == -2)) {
- skipLimb = (c == -1);
+ skipLimbs = (c == -1);
needRedraw = true;
return;
}
@@ -2017,7 +2017,7 @@ const SaveLoadEntry *Actor::getSaveLoadEntries() {
MKLINE(Actor, cost.soundCounter, sleByte, VER(8)),
MKLINE(Actor, drawToBackBuf, sleByte, VER(32)),
MKLINE(Actor, flip, sleByte, VER(32)),
- MKLINE(Actor, skipLimb, sleByte, VER(32)),
+ MKLINE(Actor, skipLimbs, sleByte, VER(32)),
// Actor palette grew from 64 to 256 bytes
MKARRAY_OLD(Actor, palette[0], sleByte, 64, VER(8), VER(9)),
diff --git a/scumm/actor.h b/scumm/actor.h
index 9544b21dc5..f12e5d03d8 100644
--- a/scumm/actor.h
+++ b/scumm/actor.h
@@ -126,15 +126,18 @@ public:
int16 talkPosX, talkPosY;
uint16 talkScript, walkScript;
bool ignoreTurns;
- bool skipLimb;
bool drawToBackBuf;
- bool _talking;
int8 _layer;
uint16 sound[32];
CostumeData cost;
- uint32 condMask;
- bool talkUnk;
+
+ /* HE specific */
byte paletteNum;
+ bool noTalkAnimation;
+ bool skipLimbs;
+ bool _talking;
+ uint32 condMask;
+
AuxBlock auxBlock;
struct {
diff --git a/scumm/akos.cpp b/scumm/akos.cpp
index 08683c1992..8d4bb6ec6f 100644
--- a/scumm/akos.cpp
+++ b/scumm/akos.cpp
@@ -358,7 +358,7 @@ byte AkosRenderer::drawLimb(const Actor *a, int limb) {
seq3Idx[i] = i;
}
- if (_skipLimb)
+ if (_skipLimbs)
return 0;
if (_vm->_heversion >= 70 && cost.active[limb] == 8)
diff --git a/scumm/base-costume.h b/scumm/base-costume.h
index 57ba3b884f..e08d9ba904 100644
--- a/scumm/base-costume.h
+++ b/scumm/base-costume.h
@@ -63,7 +63,7 @@ public:
int _draw_top, _draw_bottom;
byte _paletteNum;
- bool _skipLimb;
+ bool _skipLimbs;
bool _actorDrawVirScr;
@@ -116,7 +116,7 @@ public:
_xmove = _ymove = 0;
_mirror = false;
_width = _height = 0;
- _skipLimb = 0;
+ _skipLimbs = 0;
_paletteNum = 0;
}
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index 8743c4bde2..ce8b572435 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -562,7 +562,7 @@ void ScummEngine_v100he::o100_actorOps() {
break;
case 142:
k = pop();
- a->talkUnk = 1;
+ a->noTalkAnimation = 1;
a->setTalkCondition(k);
debug(1,"o100_actorOps: case 24 (%d)", k);
break;
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index 24cf111a95..1632b505a6 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -1071,7 +1071,7 @@ void ScummEngine_v72he::o72_actorOps() {
break;
case 24: // HE 80+
k = pop();
- a->talkUnk = 1;
+ a->noTalkAnimation = 1;
a->setTalkCondition(k);
debug(1,"o72_actorOps: case 24 (%d)", k);
break;
diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp
index 679b4e1092..5265282939 100644
--- a/scumm/script_v80he.cpp
+++ b/scumm/script_v80he.cpp
@@ -636,30 +636,60 @@ void ScummEngine_v80he::o80_drawWizPolygon() {
void ScummEngine_v80he::o80_unknownE0() {
// wizImage related
- int a, b, c, d, e, f, type = 1;
+ int b, c, d, num, x1, y1, type = 0;
- a = pop();
b = pop();
+ num = pop();
c = pop();
d = pop();
- e = pop();
- f = pop();
+ y1 = pop();
+ x1 = pop();
byte subOp = fetchScriptByte();
switch (subOp) {
case 55:
+ {
+ Actor *a = derefActorSafe(num, "o80_unknownE0");
+ int top_actor = a->top;
+ int bottom_actor = a->bottom;
+ a->drawToBackBuf = true;
+ a->needRedraw = true;
+ a->drawActorCostume();
+ a->drawToBackBuf = false;
+ a->needRedraw = true;
+ a->drawActorCostume();
+ a->needRedraw = false;
+
+ if (a->top > top_actor)
+ a->top = top_actor;
+ if (a->bottom < bottom_actor)
+ a->bottom = bottom_actor;
+
type = 2;
+ }
break;
case 63:
+ {
+ WizImage wi;
+ wi.flags = 0;
+ wi.y1 = y1;
+ wi.x1 = x1;
+ wi.resNum = num;
+ wi.state = 0;
+ displayWizImage(&wi);
+
type = 3;
+ }
break;
case 66:
type = 1;
break;
+ default:
+ error("o80_unknownE0: default case %d", subOp);
}
- debug(1,"o80_unknownE0 stub: type %d (%d, %d, %d, %d, %d, %d)",subOp, a, b, c, d, e, f);
+ debug(1,"o80_unknownE0 stub: type %d (%d, num %d, %d, %d, y %d, x %d)", type, b, num, c, d, y1, x1);
}
void ScummEngine_v80he::o80_pickVarRandom() {