aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2004-09-28 00:58:00 +0000
committerTravis Howell2004-09-28 00:58:00 +0000
commit7ced14e961d9b79c3efdb6bb6f88942bd2755357 (patch)
treec6c24ea68845e002f2c87fddd51223e0a595c7c7
parentdaef27cec9d5bc6b4b4a39a32f0d4be5005dfad8 (diff)
downloadscummvm-rg350-7ced14e961d9b79c3efdb6bb6f88942bd2755357.tar.gz
scummvm-rg350-7ced14e961d9b79c3efdb6bb6f88942bd2755357.tar.bz2
scummvm-rg350-7ced14e961d9b79c3efdb6bb6f88942bd2755357.zip
talkQueue should be actor specific
svn-id: r15318
-rw-r--r--scumm/actor.cpp2
-rw-r--r--scumm/actor.h8
-rw-r--r--scumm/akos.cpp8
-rw-r--r--scumm/script_v6he.cpp8
-rw-r--r--scumm/script_v72he.cpp8
-rw-r--r--scumm/scumm.cpp2
-rw-r--r--scumm/scumm.h7
7 files changed, 21 insertions, 22 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 9c3752b709..664d6cd6a3 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -64,8 +64,8 @@ Actor::Actor() {
memset(&cost, 0, sizeof(CostumeData));
memset(&walkdata, 0, sizeof(ActorWalkData));
walkdata.point3.x = 32000;
-
walkScript = 0;
+ memset(talkQueue, 0, sizeof(talkQueue));
initActor(1);
}
diff --git a/scumm/actor.h b/scumm/actor.h
index e06af5a118..66c64cda3c 100644
--- a/scumm/actor.h
+++ b/scumm/actor.h
@@ -126,6 +126,14 @@ public:
uint32 condMask;
bool talkUnk;
AuxBlock auxBlock;
+
+ struct {
+ int16 posX;
+ int16 posY;
+ int16 color;
+ byte sentence[128];
+ } talkQueue[16];
+
protected:
byte palette[256];
int elevation;
diff --git a/scumm/akos.cpp b/scumm/akos.cpp
index 482b1a9899..8b828a376f 100644
--- a/scumm/akos.cpp
+++ b/scumm/akos.cpp
@@ -1675,12 +1675,12 @@ void ScummEngine::akos_processQueue() {
if (_heversion >= 71) {
_actorToPrintStrFor = a->number;
- a->talkPosX = _talkQueue[param_1].posX;
- a->talkPosY = _talkQueue[param_1].posY;
- a->talkColor = _talkQueue[param_1].color;
+ a->talkPosX = a->talkQueue[param_1].posX;
+ a->talkPosY = a->talkQueue[param_1].posY;
+ a->talkColor = a->talkQueue[param_1].color;
_string[0].loadDefault();
- actorTalk(_talkQueue[param_1].sentence);
+ actorTalk(a->talkQueue[param_1].sentence);
} else if (param_1 != 0) {
if (_imuseDigital) {
diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp
index 63c8a45f4a..624c536029 100644
--- a/scumm/script_v6he.cpp
+++ b/scumm/script_v6he.cpp
@@ -737,11 +737,11 @@ void ScummEngine_v60he::o60_actorOps() {
int slot = pop();
int len = resStrLen(string) + 1;
- addMessageToStack(string, _talkQueue[slot].sentence, len);
+ addMessageToStack(string, a->talkQueue[slot].sentence, len);
- _talkQueue[slot].posX = a->talkPosX;
- _talkQueue[slot].posY = a->talkPosY;
- _talkQueue[slot].color = a->talkColor;
+ a->talkQueue[slot].posX = a->talkPosX;
+ a->talkQueue[slot].posY = a->talkPosY;
+ a->talkQueue[slot].color = a->talkColor;
break;
}
default:
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index 210d701a59..a177a46a4b 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -1096,11 +1096,11 @@ void ScummEngine_v72he::o72_actorOps() {
int slot = pop();
int len = resStrLen(string) + 1;
- addMessageToStack(string, _talkQueue[slot].sentence, len);
+ addMessageToStack(string, a->talkQueue[slot].sentence, len);
- _talkQueue[slot].posX = a->talkPosX;
- _talkQueue[slot].posY = a->talkPosY;
- _talkQueue[slot].color = a->talkColor;
+ a->talkQueue[slot].posX = a->talkPosX;
+ a->talkQueue[slot].posY = a->talkPosY;
+ a->talkQueue[slot].color = a->talkColor;
break;
}
default:
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index cb955497d5..85e2acd846 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -701,8 +701,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
memset(_akosQueue, 0, sizeof(_akosQueue));
_akosQueuePos = 0;
- memset(_talkQueue, 0, sizeof(_talkQueue));
-
//
// Init all VARS to 0xFF
//
diff --git a/scumm/scumm.h b/scumm/scumm.h
index e43d0fb462..01636d7659 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -879,13 +879,6 @@ public:
} _akosQueue[32];
int16 _akosQueuePos;
- struct {
- int16 posX;
- int16 posY;
- int16 color;
- byte sentence[128];
- } _talkQueue[16];
-
Common::Rect _actorClipOverride;
bool akos_increaseAnims(const byte *akos, Actor *a);