aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-05-01 12:25:30 +0000
committerTravis Howell2005-05-01 12:25:30 +0000
commitae14f7049e11684381503945690121a60d90e5dc (patch)
tree137ed12867800aafbe0d600845c98259267651eb
parente3b906b56967584a6dbb07c138f4dc52d1529b32 (diff)
downloadscummvm-rg350-ae14f7049e11684381503945690121a60d90e5dc.tar.gz
scummvm-rg350-ae14f7049e11684381503945690121a60d90e5dc.tar.bz2
scummvm-rg350-ae14f7049e11684381503945690121a60d90e5dc.zip
HE80+ games store current charset numberin VAR80.
Fixes crash in bb2demo. svn-id: r17885
-rw-r--r--scumm/scumm.cpp1
-rw-r--r--scumm/scumm.h1
-rw-r--r--scumm/string.cpp4
-rw-r--r--scumm/vars.cpp1
4 files changed, 7 insertions, 0 deletions
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 577b63b5b1..8fdf4f481e 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1049,6 +1049,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
VAR_MUSIC_BUNDLE_LOADED = 0xFF;
VAR_VOICE_BUNDLE_LOADED = 0xFF;
+ VAR_CURRENT_CHARSET = 0xFF;
VAR_SKIP_RESET_TALK_ACTOR = 0xFF;
VAR_MUSIC_CHANNEL = 0xFF;
VAR_SOUND_CHANNEL = 0xFF;
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 5afc978229..f626d6ee1c 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -1293,6 +1293,7 @@ public:
byte VAR_CLICK_AREA;
// HE specific variables
+ byte VAR_CURRENT_CHARSET;
byte VAR_SKIP_RESET_TALK_ACTOR;
byte VAR_MUSIC_CHANNEL;
byte VAR_SOUND_CHANNEL;
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 84a406fb90..a10ea9ef0a 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -757,6 +757,10 @@ void ScummEngine::initCharset(int charsetno) {
for (i = 0; i < 16; i++)
_charsetColorMap[i] = _charsetData[charsetno][i];
+
+ if (_heversion >= 80) {
+ VAR(VAR_CURRENT_CHARSET) = charsetno;
+ }
}
void ScummEngine_v6::enqueueText(const byte *text, int x, int y, byte color, byte charset, bool center) {
diff --git a/scumm/vars.cpp b/scumm/vars.cpp
index 0875b744e7..55d5920ff0 100644
--- a/scumm/vars.cpp
+++ b/scumm/vars.cpp
@@ -272,6 +272,7 @@ void ScummEngine_v72he::setupScummVars() {
if (_heversion >= 80)
VAR_PLATFORM = 78; // 1 is PC, 2 is Macintosh
VAR_WINDOWS_VERSION = 79; // 31 is Windows 3.1, 40 is Windows 95+
+ VAR_CURRENT_CHARSET = 80;
VAR_KEY_STATE = 86;
VAR_NUM_SOUND_CHANNELS = 88;
if (_heversion >= 90) {