diff options
author | Travis Howell | 2005-09-23 12:35:30 +0000 |
---|---|---|
committer | Travis Howell | 2005-09-23 12:35:30 +0000 |
commit | 5f12ad8de5d67128474da3e9cef5745edf3da45e (patch) | |
tree | a6ab372e01062ebd75069ef596cd4bc859f9085d /scumm | |
parent | 639502d507ffa1abc0c6edc57f345540d2c7e8a7 (diff) | |
download | scummvm-rg350-5f12ad8de5d67128474da3e9cef5745edf3da45e.tar.gz scummvm-rg350-5f12ad8de5d67128474da3e9cef5745edf3da45e.tar.bz2 scummvm-rg350-5f12ad8de5d67128474da3e9cef5745edf3da45e.zip |
Fix subtitle display in C64 maniac.
svn-id: r18863
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/intern.h | 1 | ||||
-rw-r--r-- | scumm/script_c64.cpp | 36 | ||||
-rw-r--r-- | scumm/string.cpp | 4 |
3 files changed, 40 insertions, 1 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 965933110c..12845ee1f0 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -406,6 +406,7 @@ protected: virtual const char *getOpcodeDesc(byte i); virtual void setupScummVars(); + virtual void decodeParseString(); virtual int getVarOrDirectWord(byte mask); virtual uint fetchScriptWord(); diff --git a/scumm/script_c64.cpp b/scumm/script_c64.cpp index 6c03abdd4f..e7c60208b4 100644 --- a/scumm/script_c64.cpp +++ b/scumm/script_c64.cpp @@ -389,6 +389,42 @@ int ScummEngine_c64::getObjectFlag() { return fetchScriptByte(); } +void ScummEngine_c64::decodeParseString() { + byte buffer[512]; + byte *ptr = buffer; + byte c; + bool insertSpace = false; + + while ((c = fetchScriptByte())) { + + insertSpace = (c & 0x80) != 0; + c &= 0x7f; + + if (c == '/') { + *ptr++ = 13; + } else { + *ptr++ = c; + } + + if (insertSpace) + *ptr++ = ' '; + + } + *ptr = 0; + + int textSlot = 0; + _string[textSlot].xpos = 0; + _string[textSlot].ypos = 0; + _string[textSlot].right = 320; + _string[textSlot].center = false; + _string[textSlot].overhead = false; + + if (_actorToPrintStrFor == 0xFF) + _string[textSlot].color = 14; + + actorTalk(buffer); +} + void ScummEngine_c64::setStateCommon(byte type) { int obj = getObjectFlag(); putState(obj, getState(obj) | type); diff --git a/scumm/string.cpp b/scumm/string.cpp index 49c45a378b..e949a04a55 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -236,7 +236,9 @@ void ScummEngine::CHARSET_1() { if (_charset->_center) { _charset->_nextLeft -= _charset->getStringWidth(0, buffer) / 2; } - if (!(_platform == Common::kPlatformFMTowns) && _string[0].height) { + if (_platform == Common::kPlatformC64 && _gameId == GID_MANIAC) { + break; + } else if (!(_platform == Common::kPlatformFMTowns) && _string[0].height) { _charset->_nextTop += _string[0].height; } else { _charset->_nextTop += _charset->getFontHeight(); |