diff options
Diffstat (limited to 'engines/cine/msg.cpp')
-rw-r--r-- | engines/cine/msg.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/engines/cine/msg.cpp b/engines/cine/msg.cpp index 45f81f7d05..a01afd147b 100644 --- a/engines/cine/msg.cpp +++ b/engines/cine/msg.cpp @@ -31,15 +31,11 @@ namespace Cine { -// FIXME: Global C++ objects affect portability negatively. -// Turn this into a class member instead. -Common::StringArray messageTable; - void loadMsg(char *pMsgName) { uint32 sourceSize; checkDataDisk(-1); - messageTable.clear(); + g_cine->_messageTable.clear(); byte *dataPtr = readBundleFile(findFileInBundle(pMsgName), &sourceSize); setMouseCursor(MOUSE_CURSOR_DISK); @@ -58,7 +54,7 @@ void loadMsg(char *pMsgName) { // This code works around input data that has empty strings residing outside the input // buffer (e.g. message indexes 58-254 in BATEAU.MSG in PROCS08 in Operation Stealth). if (messageDataPos < sourceSize) { - messageTable.push_back((const char *)(dataPtr + messageDataPos)); + g_cine->_messageTable.push_back((const char *)(dataPtr + messageDataPos)); } else { if (messageLen > 0) { // Only warn about overflowing non-empty strings warning("loadMsg(%s): message (%d. / %d) is overflowing the input buffer. Replacing it with an empty string", pMsgName, i + 1, count); @@ -66,7 +62,7 @@ void loadMsg(char *pMsgName) { debugC(5, kCineDebugPart, "loadMsg(%s): empty message (%d. / %d) resides outside input buffer", pMsgName, i + 1, count); } // Message resides outside the input buffer so we replace it with an empty string - messageTable.push_back(""); + g_cine->_messageTable.push_back(""); } // Jump to the next message messageDataPos += messageLen; |