HE80+ games store current charset numberin VAR80.

Fixes crash in bb2demo.

svn-id: r17885
This commit is contained in:
Travis Howell 2005-05-01 12:25:30 +00:00
parent e3b906b569
commit ae14f7049e
4 changed files with 7 additions and 0 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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) {

View file

@ -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) {