aboutsummaryrefslogtreecommitdiff
path: root/scumm/string.cpp
diff options
context:
space:
mode:
authorMax Horn2004-03-15 03:09:48 +0000
committerMax Horn2004-03-15 03:09:48 +0000
commitba5aa37dccbb466f70984c8e7c51fbebf757457a (patch)
tree3aa3ba50bd863645eafe5e0aa20978f01aff1fe5 /scumm/string.cpp
parent759c05f936ab9a0317d28343a799d7c6857c3e27 (diff)
downloadscummvm-rg350-ba5aa37dccbb466f70984c8e7c51fbebf757457a.tar.gz
scummvm-rg350-ba5aa37dccbb466f70984c8e7c51fbebf757457a.tar.bz2
scummvm-rg350-ba5aa37dccbb466f70984c8e7c51fbebf757457a.zip
refactor use of _messagePtr -> instead of using it as an implicit parameter for various methods, pass its value explicitly to those methods. Note: this *should* be just a code transformation, with no change to the program logic - unless I messed up once again <sigh>
svn-id: r13298
Diffstat (limited to 'scumm/string.cpp')
-rw-r--r--scumm/string.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 16115a43fe..a184ca8abf 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -46,9 +46,9 @@ void ScummEngine::setStringVars(int slot) {
st->charset = st->t_charset;
}
-void ScummEngine::unkMessage1() {
+void ScummEngine::unkMessage1(const byte *msg) {
byte buffer[100];
- _messagePtr = addMessageToStack(_messagePtr, buffer, sizeof(buffer));
+ _messagePtr = addMessageToStack(msg, buffer, sizeof(buffer));
// if ((_gameId == GID_CMI) && _debugMode) { // In CMI, unkMessage1 is used for printDebug output
if ((buffer[0] != 0xFF) && _debugMode) {
@@ -71,13 +71,13 @@ void ScummEngine::unkMessage1() {
}
}
-void ScummEngine::unkMessage2() {
+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(_messagePtr, buf, sizeof(buf));
+ tmp = _messagePtr = addMessageToStack(msg, buf, sizeof(buf));
if (_string[3].color == 0)
_string[3].color = 4;
@@ -339,14 +339,14 @@ void ScummEngine::CHARSET_1() {
_charset->_mask = _charset->_str;
}
-void ScummEngine::drawString(int a) {
+void ScummEngine::drawString(int a, const byte *msg) {
byte buf[256];
byte *space;
int i, c;
byte fontHeight = 0;
uint color;
- _messagePtr = addMessageToStack(_messagePtr, buf, sizeof(buf));
+ _messagePtr = addMessageToStack(msg, buf, sizeof(buf));
_charset->_top = _string[a].ypos + _screenTop;
_charset->_startLeft = _charset->_left = _string[a].xpos;