aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2006-01-14 21:26:19 +0000
committerMax Horn2006-01-14 21:26:19 +0000
commita4c0d84acb9c8f771403e47ba46f50c2ff4d413b (patch)
tree027261963ba7362c536acb20fae5653fc28a7066
parentff7a1c734f4ea32b330dfacf212b719f3b590955 (diff)
downloadscummvm-rg350-a4c0d84acb9c8f771403e47ba46f50c2ff4d413b.tar.gz
scummvm-rg350-a4c0d84acb9c8f771403e47ba46f50c2ff4d413b.tar.bz2
scummvm-rg350-a4c0d84acb9c8f771403e47ba46f50c2ff4d413b.zip
Added an error() to drawString to catch charset mask usage in V7+ games, if any exists
svn-id: r20033
-rw-r--r--scumm/string.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 85703a3d6b..16f14823bf 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -626,6 +626,25 @@ void ScummEngine::drawString(int a, const byte *msg) {
convertMessageToString(msg, buf, sizeof(buf));
+ if (_version >= 7) {
+ // I recently disabled charset mask related code for V7+ games, thinking
+ // that it should never be needed there. Well, I missed on case: In this
+ // method, it could potentially still be used. Now the question is:
+ // Does this actually ever happen? Basically, drawString is called from
+ // two spots: First off, from drawVerb, which I *think* is not used for
+ // V7+ games (but I am not 100% sure), and secondly from printString().
+ // The latter is much harder to predict. Maybe in some obscure place it
+ // is used after all?
+ //
+ // Hence I am adding this error message, hoping that either somebody
+ // triggers it (at which point I can investigate), or, if nobody ever
+ // triggers it, we can assume that it's safe to keep this error even
+ // after the release.
+ //
+ // TODO/FIXME: Remove or update this hack before the next release!
+ error("drawString(%d, '%s') -- please inform Fingolfin about this crash!", a, buf);
+ }
+
_charset->_top = _string[a].ypos + _screenTop;
_charset->_startLeft = _charset->_left = _string[a].xpos;
_charset->_right = _string[a].right;