aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2004-03-15 03:22:36 +0000
committerMax Horn2004-03-15 03:22:36 +0000
commite1b25fb7218fd18952cd07102818674c5f37c27d (patch)
treee3c27d3006aa8e1e013bf707a865e7cafa677cd5 /scumm
parentba5aa37dccbb466f70984c8e7c51fbebf757457a (diff)
downloadscummvm-rg350-e1b25fb7218fd18952cd07102818674c5f37c27d.tar.gz
scummvm-rg350-e1b25fb7218fd18952cd07102818674c5f37c27d.tar.bz2
scummvm-rg350-e1b25fb7218fd18952cd07102818674c5f37c27d.zip
After the refactoring it's clearly that _messagePtr can be removed. Hooray, yet another obscure global 'parameter' gone :-)
svn-id: r13299
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp3
-rw-r--r--scumm/scumm.cpp1
-rw-r--r--scumm/scumm.h1
-rw-r--r--scumm/string.cpp9
4 files changed, 4 insertions, 10 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index e2cb63d552..4da2d37b84 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1147,7 +1147,7 @@ int ScummEngine::getActorFromPos(int x, int y) {
void ScummEngine::actorTalk(const byte *msg) {
Actor *a;
- _messagePtr = addMessageToStack(msg, _charsetBuffer, sizeof(_charsetBuffer));
+ addMessageToStack(msg, _charsetBuffer, sizeof(_charsetBuffer));
// FIXME: Workaround for bugs #770039 and #770049
if (_gameId == GID_LOOM || _gameId == GID_LOOM256) {
@@ -1225,7 +1225,6 @@ void ScummEngine::stopTalk() {
}
void ScummEngine::clearMsgQueue() {
- _messagePtr = (const byte *)" ";
stopTalk();
}
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index ac82c2570e..0a5587f433 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -501,7 +501,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
_demoMode = false;
_confirmExit = false;
_msgPtrToAdd = NULL;
- _messagePtr = NULL;
_talkDelay = 0;
_keepText = false;
_existLanguageFile = false;
diff --git a/scumm/scumm.h b/scumm/scumm.h
index aeee376cbe..c329bcaa3a 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -1075,7 +1075,6 @@ public:
void clearMsgQueue(); // Used by Actor::putActor
protected:
byte *_msgPtrToAdd;
- const byte *_messagePtr;
bool _keepText;
public:
Common::Language _language;
diff --git a/scumm/string.cpp b/scumm/string.cpp
index a184ca8abf..bdd30a0136 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -48,7 +48,7 @@ void ScummEngine::setStringVars(int slot) {
void ScummEngine::unkMessage1(const byte *msg) {
byte buffer[100];
- _messagePtr = addMessageToStack(msg, buffer, sizeof(buffer));
+ addMessageToStack(msg, buffer, sizeof(buffer));
// if ((_gameId == GID_CMI) && _debugMode) { // In CMI, unkMessage1 is used for printDebug output
if ((buffer[0] != 0xFF) && _debugMode) {
@@ -75,17 +75,14 @@ void ScummEngine::unkMessage2(const byte *msg) {
// Original COMI used different code at this point.
// Seemed to use blastText for the messages
byte buf[100];
- const byte *tmp;
- tmp = _messagePtr = addMessageToStack(msg, buf, sizeof(buf));
+ addMessageToStack(msg, buf, sizeof(buf));
if (_string[3].color == 0)
_string[3].color = 4;
InfoDialog dialog(this, (char*)buf);
VAR(VAR_KEYPRESS) = runDialog(dialog);
-
- _messagePtr = tmp;
}
void ScummEngine::CHARSET_1() {
@@ -346,7 +343,7 @@ void ScummEngine::drawString(int a, const byte *msg) {
byte fontHeight = 0;
uint color;
- _messagePtr = addMessageToStack(msg, buf, sizeof(buf));
+ addMessageToStack(msg, buf, sizeof(buf));
_charset->_top = _string[a].ypos + _screenTop;
_charset->_startLeft = _charset->_left = _string[a].xpos;