aboutsummaryrefslogtreecommitdiff
path: root/string.cpp
diff options
context:
space:
mode:
authorPaweł Kołodziejski2002-05-25 08:53:08 +0000
committerPaweł Kołodziejski2002-05-25 08:53:08 +0000
commitf7c69ad830b74986a8579404e36cf1fd3df19fe5 (patch)
tree4ca18906c63f022057fb99af25eee550067ad964 /string.cpp
parent34c181cdcf1b91952031b2de98128b66fd3eb3b8 (diff)
downloadscummvm-rg350-f7c69ad830b74986a8579404e36cf1fd3df19fe5.tar.gz
scummvm-rg350-f7c69ad830b74986a8579404e36cf1fd3df19fe5.tar.bz2
scummvm-rg350-f7c69ad830b74986a8579404e36cf1fd3df19fe5.zip
The Dig: implement descriptions
svn-id: r4381
Diffstat (limited to 'string.cpp')
-rw-r--r--string.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/string.cpp b/string.cpp
index 68e55f9115..192c034aab 100644
--- a/string.cpp
+++ b/string.cpp
@@ -440,6 +440,57 @@ void Scumm::CHARSET_1()
gdi._mask_bottom = charset._strBottom;
}
+void Scumm::description()
+{
+ int c;
+ byte *buffer;
+
+ buffer = charset._buffer + charset._bufPos;
+ string[0].ypos = camera._cur.y + 88;
+ string[0].xpos = 160 - (charset.getStringWidth(0, buffer, 0) >> 1);
+ if (string[0].xpos < 0)
+ string[0].xpos = 0;
+
+ charset._top = string[0].ypos;
+ charset._left = string[0].xpos;
+ charset._left2 = string[0].xpos;
+ charset._right = 319;
+ charset._xpos2 = string[0].xpos;
+ charset._ypos2 = string[0].ypos;
+ charset._disableOffsX = charset._unk12 = 1;
+ charset._curId = 3;
+ charset._center = false;
+ charset._color = 15;
+ _bkColor = 0;
+ _talkDelay = 1;
+
+ restoreCharsetBg();
+
+ _lastXstart = virtscr[0].xstart;
+
+ do {
+ c = *buffer++;
+ if (c == 0) {
+ _haveMsg = 1;
+ break;
+ }
+ if (c != 0xFF) {
+ charset._left = charset._xpos2;
+ charset._top = charset._ypos2;
+ charset.printChar(c);
+ charset._xpos2 = charset._left;
+ charset._ypos2 = charset._top;
+ continue;
+ }
+
+ } while (1);
+
+ gdi._mask_left = charset._strLeft;
+ gdi._mask_right = charset._strRight;
+ gdi._mask_top = charset._strTop;
+ gdi._mask_bottom = charset._strBottom;
+}
+
void Scumm::drawString(int a)
{
byte buf[256];