aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2005-03-17 10:53:29 +0000
committerTravis Howell2005-03-17 10:53:29 +0000
commit4361ef655eb1619f91282c07c763151d1186224d (patch)
tree8dbf15510aff39a17c5c880d459fcf2cebd55763 /scumm
parent4c3d302e19e9435e3fad3ff1f71f73b541f641ae (diff)
downloadscummvm-rg350-4361ef655eb1619f91282c07c763151d1186224d.tar.gz
scummvm-rg350-4361ef655eb1619f91282c07c763151d1186224d.tar.bz2
scummvm-rg350-4361ef655eb1619f91282c07c763151d1186224d.zip
HE72+ games use slightly different code for subtitle color.
svn-id: r17174
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp2
-rw-r--r--scumm/akos.cpp1
-rw-r--r--scumm/intern.h2
-rw-r--r--scumm/script_v100he.cpp4
-rw-r--r--scumm/script_v72he.cpp28
-rw-r--r--scumm/script_v80he.cpp4
-rw-r--r--scumm/script_v90he.cpp4
7 files changed, 35 insertions, 10 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 5d03fa119c..1266f6820b 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1278,7 +1278,7 @@ void ScummEngine::actorTalk(const byte *msg) {
return;
}
- if (getTalkingActor() > 0x7F) {
+ if (_heversion >= 72 || getTalkingActor() > 0x7F) {
_charsetColor = (byte)_string[0].color;
} else {
a = derefActor(getTalkingActor(), "actorTalk(2)");
diff --git a/scumm/akos.cpp b/scumm/akos.cpp
index e09713a26f..28ef532c93 100644
--- a/scumm/akos.cpp
+++ b/scumm/akos.cpp
@@ -1681,6 +1681,7 @@ void ScummEngine::akos_processQueue() {
a->_talkColor = a->_heTalkQueue[param_1].color;
_string[0].loadDefault();
+ _string[0].color = a->_talkColor;
actorTalk(a->_heTalkQueue[param_1].sentence);
} else if (param_1 != 0) {
diff --git a/scumm/intern.h b/scumm/intern.h
index ab560b32d7..89c71578d6 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -779,6 +779,8 @@ protected:
void o72_actorOps();
void o72_verbOps();
void o72_arrayOps();
+ void o72_talkActor();
+ void o72_talkEgo();
void o72_dimArray();
void o72_dim2dimArray();
void o72_traceStatus();
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index 5090f8f42a..562068dffc 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -174,9 +174,9 @@ void ScummEngine_v100he::setupOpcodes() {
OPCODE(o100_roomOps),
OPCODE(o6_printActor),
OPCODE(o6_printEgo),
- OPCODE(o6_talkActor),
+ OPCODE(o72_talkActor),
/* 6C */
- OPCODE(o6_talkEgo),
+ OPCODE(o72_talkEgo),
OPCODE(o6_invalid),
OPCODE(o60_seekFilePos),
OPCODE(o6_setBoxFlags),
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index af51631b42..3f78d52698 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -276,8 +276,8 @@ void ScummEngine_v72he::setupOpcodes() {
/* B8 */
OPCODE(o6_printActor),
OPCODE(o6_printEgo),
- OPCODE(o6_talkActor),
- OPCODE(o6_talkEgo),
+ OPCODE(o72_talkActor),
+ OPCODE(o72_talkEgo),
/* BC */
OPCODE(o72_dimArray),
OPCODE(o6_stopObjectCode),
@@ -1457,6 +1457,24 @@ void ScummEngine_v72he::o72_arrayOps() {
}
}
+void ScummEngine_v72he::o72_talkActor() {
+ Actor *a;
+
+ _actorToPrintStrFor = pop();
+ a = derefActorSafe(_actorToPrintStrFor, "o72_talkActor");
+
+ _string[0].loadDefault();
+ _string[0].color = a->_talkColor;
+ actorTalk(_scriptPointer);
+
+ _scriptPointer += resStrLen(_scriptPointer) + 1;
+}
+
+void ScummEngine_v72he::o72_talkEgo() {
+ push(VAR(VAR_EGO));
+ o6_talkActor();
+}
+
void ScummEngine_v72he::o72_dimArray() {
int data;
int type = fetchScriptByte();
@@ -2039,6 +2057,7 @@ void ScummEngine_v72he::o72_setWindowCaption() {
}
void ScummEngine_v72he::decodeParseString(int m, int n) {
+ Actor *a;
int i, colors, size;
int args[31];
byte name[1024];
@@ -2106,8 +2125,11 @@ void ScummEngine_v72he::decodeParseString(int m, int n) {
break;
case 0xFE:
_string[m].loadDefault();
- if (n)
+ if (n) {
_actorToPrintStrFor = pop();
+ a = derefActorSafe(_actorToPrintStrFor, "decodeParseString");
+ _string[0].color = a->_talkColor;
+ }
break;
case 0xFF:
_string[m].saveDefault();
diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp
index 904be46a8e..f573187592 100644
--- a/scumm/script_v80he.cpp
+++ b/scumm/script_v80he.cpp
@@ -273,8 +273,8 @@ void ScummEngine_v80he::setupOpcodes() {
/* B8 */
OPCODE(o6_printActor),
OPCODE(o6_printEgo),
- OPCODE(o6_talkActor),
- OPCODE(o6_talkEgo),
+ OPCODE(o72_talkActor),
+ OPCODE(o72_talkEgo),
/* BC */
OPCODE(o72_dimArray),
OPCODE(o6_stopObjectCode),
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index f4c6fb243e..af28880922 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -273,8 +273,8 @@ void ScummEngine_v90he::setupOpcodes() {
/* B8 */
OPCODE(o6_printActor),
OPCODE(o6_printEgo),
- OPCODE(o6_talkActor),
- OPCODE(o6_talkEgo),
+ OPCODE(o72_talkActor),
+ OPCODE(o72_talkEgo),
/* BC */
OPCODE(o72_dimArray),
OPCODE(o6_stopObjectCode),