diff options
-rw-r--r-- | scumm/actor.cpp | 6 | ||||
-rw-r--r-- | scumm/gfx.cpp | 18 | ||||
-rw-r--r-- | scumm/saveload.cpp | 8 | ||||
-rw-r--r-- | scumm/script_v5.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 6 | ||||
-rw-r--r-- | scumm/script_v8.cpp | 15 | ||||
-rw-r--r-- | scumm/scumm.h | 2 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 6 | ||||
-rw-r--r-- | scumm/string.cpp | 254 | ||||
-rw-r--r-- | scumm/verbs.cpp | 22 |
10 files changed, 174 insertions, 165 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 529a688f43..54f5e0f613 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -1095,9 +1095,9 @@ void Scumm::actorTalk() int oldact; Actor *a; - _msgPtrToAdd = charset._buffer; + _msgPtrToAdd = _charset._buffer; _messagePtr = addMessageToStack(_messagePtr); - assert((int)(_msgPtrToAdd - charset._buffer) < (int)(sizeof(charset._buffer))); + assert((int)(_msgPtrToAdd - _charset._buffer) < (int)(sizeof(_charset._buffer))); if (_actorToPrintStrFor == 0xFF) { if (!_keepText) @@ -1128,7 +1128,7 @@ void Scumm::actorTalk() a = derefActorSafe(_vars[VAR_TALK_ACTOR], "actorTalk(2)"); _charsetColor = a->talkColor; } - charset._bufPos = 0; + _charset._bufPos = 0; _talkDelay = 0; _haveMsg = 0xFF; _vars[VAR_HAVE_MSG] = 0xFF; diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index eac9c9d593..a909f337e8 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -613,7 +613,7 @@ void Scumm::redrawBGAreas() int diff; if (!(_features & GF_AFTER_V7)) - if (camera._cur.x != camera._last.x && charset._hasMask) + if (camera._cur.x != camera._last.x && _charset._hasMask) stopTalk(); val = 0; @@ -675,14 +675,14 @@ void Scumm::restoreCharsetBg() { if (gdi._mask_left != -1) { restoreBG(gdi._mask_left, gdi._mask_top, gdi._mask_right, gdi._mask_bottom); - charset._hasMask = false; + _charset._hasMask = false; gdi._mask_left = -1; - charset._strLeft = -1; - charset._left = -1; + _charset._strLeft = -1; + _charset._left = -1; } - charset._nextLeft = _string[0].xpos; - charset._nextTop = _string[0].ypos; + _charset._nextLeft = _string[0].xpos; + _charset._nextTop = _string[0].ypos; } void Scumm::restoreBG(int left, int top, int right, int bottom, byte backColor) @@ -725,7 +725,7 @@ void Scumm::restoreBG(int left, int top, int right, int bottom, byte backColor) if (vs->alloctwobuffers && _currentRoom != 0 /*&& _vars[VAR_V5_DRAWFLAGS]&2 */ ) { blit(backbuff, bgbak, width, height); - if (vs->number == 0 && charset._hasMask && height) { + if (vs->number == 0 && _charset._hasMask && height) { byte *mask; int mask_width = (width >> 3); @@ -751,7 +751,7 @@ void Scumm::restoreBG(int left, int top, int right, int bottom, byte backColor) int Scumm::hasCharsetMask(int x, int y, int x2, int y2) { - if (!charset._hasMask || y > gdi._mask_bottom || x > gdi._mask_right || + if (!_charset._hasMask || y > gdi._mask_bottom || x > gdi._mask_right || y2 < gdi._mask_top || x2 < gdi._mask_left) return 0; return 1; @@ -1737,7 +1737,7 @@ void Scumm::setCameraAt(int pos_x, int pos_y) runScript(_vars[VAR_SCROLL_SCRIPT], 0, 0, 0); } - if (camera._cur.x != camera._last.x && charset._hasMask) + if (camera._cur.x != camera._last.x && _charset._hasMask) stopTalk(); } } diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 3fecbc1d65..cc8c21dde6 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -358,7 +358,7 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) MKARRAY(Scumm, vm.localvar[0][0], sleUint16, NUM_SCRIPT_SLOT * 17, VER_V9), MKARRAY(Scumm, _resourceMapper[0], sleByte, 128, VER_V8), - MKARRAY(Scumm, charset._colorMap[0], sleByte, 16, VER_V8), + MKARRAY(Scumm, _charset._colorMap[0], sleByte, 16, VER_V8), // _charsetData grew from 10*16 to 15*16 bytes MKARRAY_OLD(Scumm, _charsetData[0][0], sleByte, 10 * 16, VER_V8, VER_V9), @@ -386,8 +386,8 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) MKLINE(Scumm, _charsetColor, sleByte, VER_V8), // charset._bufPos was changed from byte to int - MKLINE_OLD(Scumm, charset._bufPos, sleByte, VER_V8, VER_V9), - MKLINE(Scumm, charset._bufPos, sleInt16, VER_V10), + MKLINE_OLD(Scumm, _charset._bufPos, sleByte, VER_V8, VER_V9), + MKLINE(Scumm, _charset._bufPos, sleInt16, VER_V10), MKLINE(Scumm, _haveMsg, sleByte, VER_V8), MKLINE(Scumm, _useTalkAnims, sleByte, VER_V8), @@ -429,7 +429,7 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) MKARRAY(Scumm, _proc_special_palette[0], sleByte, 256, VER_V8), - MKARRAY(Scumm, charset._buffer[0], sleByte, 256, VER_V8), + MKARRAY(Scumm, _charset._buffer[0], sleByte, 256, VER_V8), MKLINE(Scumm, _egoPositioned, sleByte, VER_V8), diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index d385bab2dc..97b7fc9ac4 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -655,7 +655,7 @@ void Scumm_v5::o5_cursorCommand() case 14: /* unk */ getWordVararg(table); for (i = 0; i < 16; i++) - charset._colorMap[i] = _charsetData[_string[1].t_charset][i] = (unsigned char)table[i]; + _charset._colorMap[i] = _charsetData[_string[1].t_charset][i] = (unsigned char)table[i]; break; } diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 8d131dec33..ae564b6919 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -864,7 +864,7 @@ void Scumm_v6::o6_cursorCommand() case 0x9D: /* set charset colors */ getStackList(args, sizeof(args) / sizeof(args[0])); for (i = 0; i < 16; i++) - charset._colorMap[i] = _charsetData[_string[1].t_charset][i] = (unsigned char)args[i]; + _charset._colorMap[i] = _charsetData[_string[1].t_charset][i] = (unsigned char)args[i]; break; case 0xD6: makeCursorColorTransparent(pop()); @@ -2582,10 +2582,10 @@ void Scumm_v6::o6_miscOps() setStringVars(0); addMessageToStack(getStringAddressVar(VAR_STRING2DRAW)); if (strncmp("/SYSTEM.007/ /", (char *)buf, 14) == 0) { - translateText(buf + 13, charset._buffer); + translateText(buf + 13, _charset._buffer); //description(); } else if (strncmp("/SYSTEM.007/ ", (char *)buf, 13) == 0) { - strcpy((char *)charset._buffer, (char *)buf + 13); + strcpy((char *)_charset._buffer, (char *)buf + 13); //description(); } } else { diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index 20b611041c..1b5b8b2780 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -35,8 +35,10 @@ * might even be wrong... so don't hold your breath. */ -#define OPCODE(x) { &Scumm_v8::x, #x } +// #define FONT_HACK + +#ifdef FONT_HACK // FIXME: Copied from smush/player.cpp - this should probably go somewhere sensible :) static FontRenderer *loadFont(const char * file, const char * directory, bool original = false) { #ifdef DEBUG @@ -47,6 +49,11 @@ static FontRenderer *loadFont(const char * file, const char * directory, bool or p.play(file, directory); return fr; } +#endif + + + +#define OPCODE(x) { &Scumm_v8::x, #x } void Scumm_v8::setupOpcodes() { @@ -759,7 +766,9 @@ void Scumm_v8::o8_cursorCommand() char fontname[255]; sprintf(fontname, "resource/font%d.nut", charset); -// _fr[charset] = loadFont(fontname, getGameDataPath(), true); +#ifdef FONT_HACK + _fr[charset] = loadFont(fontname, getGameDataPath(), true); +#endif if (!_fr[charset]) warning("Failed to load font %d from %s%s\n", charset, getGameDataPath(), fontname); @@ -769,7 +778,7 @@ void Scumm_v8::o8_cursorCommand() case 0xE8: // SO_CHARSET_COLOR getStackList(args, sizeof(args) / sizeof(args[0])); for (i = 0; i < 16; i++) - charset._colorMap[i] = _charsetData[_string[1].t_charset][i] = (unsigned char)args[i]; + _charset._colorMap[i] = _charsetData[_string[1].t_charset][i] = (unsigned char)args[i]; break; case 0xE9: // SO_CURSOR_PUT default: diff --git a/scumm/scumm.h b/scumm/scumm.h index 7c8292ef07..a89255a208 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -908,7 +908,7 @@ public: /* String class */ - CharsetRenderer charset; + CharsetRenderer _charset; byte _charsetColor; bool _noSubtitles; // Skip all subtitles? byte _charsetData[15][16]; diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index b294bdae02..0baa7f32a8 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -289,7 +289,7 @@ void Scumm::scummInit() _numObjectsInRoom = 0; _actorToPrintStrFor = 0; - charset._bufPos = 0; + _charset._bufPos = 0; _haveMsg = 0; _varwatch = -1; @@ -487,7 +487,7 @@ int Scumm::scummLoop(int delta) if (_completeScreenRedraw) { _completeScreenRedraw = false; gdi.clearUpperMask(); - charset._hasMask = false; + _charset._hasMask = false; redrawVerbs(); _fullRedraw = true; } @@ -1557,7 +1557,7 @@ void Scumm::mainRun() void Scumm::launch() { - charset._vm = this; + _charset._vm = this; gdi._vm = this; _maxHeapThreshold = 450000; diff --git a/scumm/string.cpp b/scumm/string.cpp index baa48f53f4..43a81984ea 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -494,28 +494,28 @@ void Scumm::CHARSET_1() } } - charset._top = _string[0].ypos; - charset._startLeft = charset._left = _string[0].xpos; + _charset._top = _string[0].ypos; + _charset._startLeft = _charset._left = _string[0].xpos; if (a && a->charset) - charset.setCurID(a->charset); + _charset.setCurID(a->charset); else - charset.setCurID(_string[0].charset); + _charset.setCurID(_string[0].charset); - charset._center = _string[0].center; - charset._right = _string[0].right; - charset._color = _charsetColor; + _charset._center = _string[0].center; + _charset._right = _string[0].right; + _charset._color = _charsetColor; if (!(_features & GF_OLD256)) // FIXME for (i = 0; i < 4; i++) - charset._colorMap[i] = _charsetData[charset.getCurID()][i]; + _charset._colorMap[i] = _charsetData[_charset.getCurID()][i]; if (_keepText) { - charset._strLeft = gdi._mask_left; - charset._strRight = gdi._mask_right; - charset._strTop = gdi._mask_top; - charset._strBottom = gdi._mask_bottom; + _charset._strLeft = gdi._mask_left; + _charset._strRight = gdi._mask_right; + _charset._strTop = gdi._mask_top; + _charset._strBottom = gdi._mask_bottom; } if (_talkDelay) @@ -555,23 +555,23 @@ void Scumm::CHARSET_1() restoreCharsetBg(); } - t = charset._right - _string[0].xpos - 1; - if (charset._center) { - if (t > charset._nextLeft) - t = charset._nextLeft; + t = _charset._right - _string[0].xpos - 1; + if (_charset._center) { + if (t > _charset._nextLeft) + t = _charset._nextLeft; t <<= 1; } - buffer = charset._buffer + charset._bufPos; - charset.addLinebreaks(0, buffer, 0, t); + buffer = _charset._buffer + _charset._bufPos; + _charset.addLinebreaks(0, buffer, 0, t); - if (charset._center) { - charset._nextLeft -= charset.getStringWidth(0, buffer, 0) >> 1; - if (charset._nextLeft < 0) - charset._nextLeft = 0; + if (_charset._center) { + _charset._nextLeft -= _charset.getStringWidth(0, buffer, 0) >> 1; + if (_charset._nextLeft < 0) + _charset._nextLeft = 0; } - charset._disableOffsX = charset._firstChar = !_keepText; + _charset._disableOffsX = _charset._firstChar = !_keepText; do { c = *buffer++; @@ -585,16 +585,16 @@ void Scumm::CHARSET_1() if (c == 13) { newLine:; if (_features & GF_OLD256) { - charset._nextTop = 8; - charset._nextLeft = 0; + _charset._nextTop = 8; + _charset._nextLeft = 0; continue; } else { - charset._nextLeft = _string[0].xpos; - if (charset._center) { - charset._nextLeft -= charset.getStringWidth(0, buffer, 0) >> 1; + _charset._nextLeft = _string[0].xpos; + if (_charset._center) { + _charset._nextLeft -= _charset.getStringWidth(0, buffer, 0) >> 1; } - charset._nextTop += charset.getFontPtr()[1]; - charset._disableOffsX = true; + _charset._nextTop += _charset.getFontPtr()[1]; + _charset._disableOffsX = true; continue; } } @@ -603,20 +603,20 @@ void Scumm::CHARSET_1() c = 0xFF; if (c != 0xFF) { - charset._left = charset._nextLeft; - charset._top = charset._nextTop; + _charset._left = _charset._nextLeft; + _charset._top = _charset._nextTop; if (_features & GF_OLD256) - charset.printCharOld(c); + _charset.printCharOld(c); else if (!(_features & GF_AFTER_V6)) { if (!(_haveMsg == 0xFE && _noSubtitles)) - charset.printChar(c); + _charset.printChar(c); } else { if (!((_haveMsg == 0xFE || _haveMsg == 0xFF) && _noSubtitles)) - charset.printChar(c); + _charset.printChar(c); } - charset._nextLeft = charset._left; - charset._nextTop = charset._top; + _charset._nextLeft = _charset._left; + _charset._nextTop = _charset._top; _talkDelay += _vars[VAR_CHARINC]; continue; } @@ -654,21 +654,21 @@ void Scumm::CHARSET_1() color = *buffer++; color |= *buffer++ << 8; if (color == 0xFF) - charset._color = _charsetColor; + _charset._color = _charsetColor; else - charset._color = color; + _charset._color = color; break; case 13: buffer += 2; break; case 14: { - int oldy = charset.getFontPtr()[1]; + int oldy = _charset.getFontPtr()[1]; - charset.setCurID(*buffer++); + _charset.setCurID(*buffer++); buffer += 2; for (i = 0; i < 4; i++) - charset._colorMap[i] = _charsetData[charset.getCurID()][i]; - charset._nextTop -= charset.getFontPtr()[1] - oldy; + _charset._colorMap[i] = _charsetData[_charset.getCurID()][i]; + _charset._nextTop -= _charset.getFontPtr()[1] - oldy; break; } default: @@ -689,12 +689,12 @@ void Scumm::CHARSET_1() if (a && has_anim) a->startAnimActor(frme != -1 ? frme : a->talkFrame1); - charset._bufPos = buffer - charset._buffer; + _charset._bufPos = buffer - _charset._buffer; - gdi._mask_left = charset._strLeft; - gdi._mask_right = charset._strRight; - gdi._mask_top = charset._strTop; - gdi._mask_bottom = charset._strBottom; + gdi._mask_left = _charset._strLeft; + gdi._mask_right = _charset._strRight; + gdi._mask_top = _charset._strTop; + gdi._mask_bottom = _charset._strBottom; } void Scumm::description() @@ -702,22 +702,22 @@ void Scumm::description() int c; byte *buffer; - buffer = charset._buffer; + buffer = _charset._buffer; _string[0].ypos = camera._cur.y + 88; - _string[0].xpos = (_realWidth / 2) - (charset.getStringWidth(0, buffer, 0) >> 1); + _string[0].xpos = (_realWidth / 2) - (_charset.getStringWidth(0, buffer, 0) >> 1); if (_string[0].xpos < 0) _string[0].xpos = 0; - charset._bufPos = 0; - charset._top = _string[0].ypos; - charset._startLeft = charset._left = _string[0].xpos; - charset._right = _realWidth - 1; - charset._center = false; - charset._color = 15; - charset._disableOffsX = charset._firstChar = true; - charset.setCurID(3); - charset._nextLeft = _string[0].xpos; - charset._nextTop = _string[0].ypos; + _charset._bufPos = 0; + _charset._top = _string[0].ypos; + _charset._startLeft = _charset._left = _string[0].xpos; + _charset._right = _realWidth - 1; + _charset._center = false; + _charset._color = 15; + _charset._disableOffsX = _charset._firstChar = true; + _charset.setCurID(3); + _charset._nextLeft = _string[0].xpos; + _charset._nextTop = _string[0].ypos; // FIXME: _talkdelay = 1 - display description, not correct ego actor talking, // 0 - no display, correct ego actor talking _talkDelay = 0; @@ -731,19 +731,19 @@ void Scumm::description() break; } if (c != 0xFF) { - charset._left = charset._nextLeft; - charset._top = charset._nextTop; - charset.printChar(c); - charset._nextLeft = charset._left; - charset._nextTop = charset._top; + _charset._left = _charset._nextLeft; + _charset._top = _charset._nextTop; + _charset.printChar(c); + _charset._nextLeft = _charset._left; + _charset._nextTop = _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; + gdi._mask_left = _charset._strLeft; + gdi._mask_right = _charset._strRight; + gdi._mask_top = _charset._strTop; + gdi._mask_bottom = _charset._strBottom; } void Scumm::drawDescString(byte *msg) @@ -753,21 +753,21 @@ void Scumm::drawDescString(byte *msg) buf = _msgPtrToAdd = buffer; addMessageToStack(msg); - charset._bufPos = 0; - charset._top = _string[0].ypos; - charset._startLeft = charset._left = _string[0].xpos; - charset._right = _realWidth - 1; - charset._center = _string[0].center; - charset._color = _string[0].color; - charset._disableOffsX = charset._firstChar = true; - charset.setCurID(_string[0].charset); - charset._nextLeft = _string[0].xpos; - charset._nextTop = _string[0].ypos; + _charset._bufPos = 0; + _charset._top = _string[0].ypos; + _charset._startLeft = _charset._left = _string[0].xpos; + _charset._right = _realWidth - 1; + _charset._center = _string[0].center; + _charset._color = _string[0].color; + _charset._disableOffsX = _charset._firstChar = true; + _charset.setCurID(_string[0].charset); + _charset._nextLeft = _string[0].xpos; + _charset._nextTop = _string[0].ypos; // Center text - charset._nextLeft -= charset.getStringWidth(0, buffer, 0) >> 1; - if (charset._nextLeft < 0) - charset._nextLeft = 0; + _charset._nextLeft -= _charset.getStringWidth(0, buffer, 0) >> 1; + if (_charset._nextLeft < 0) + _charset._nextLeft = 0; _talkDelay = 1; @@ -780,19 +780,19 @@ void Scumm::drawDescString(byte *msg) break; } if (c != 0xFF) { - charset._left = charset._nextLeft; - charset._top = charset._nextTop; - charset.printChar(c); - charset._nextLeft = charset._left; - charset._nextTop = charset._top; + _charset._left = _charset._nextLeft; + _charset._top = _charset._nextTop; + _charset.printChar(c); + _charset._nextLeft = _charset._left; + _charset._nextTop = _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; + 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) @@ -806,19 +806,19 @@ void Scumm::drawString(int a) _msgPtrToAdd = buf; _messagePtr = addMessageToStack(_messagePtr); - charset._top = _string[a].ypos; - charset._startLeft = charset._left = _string[a].xpos; - charset._right = _string[a].right; - charset._center = _string[a].center; - charset._color = _string[a].color; - charset._disableOffsX = charset._firstChar = true; - charset.setCurID(_string[a].charset); + _charset._top = _string[a].ypos; + _charset._startLeft = _charset._left = _string[a].xpos; + _charset._right = _string[a].right; + _charset._center = _string[a].center; + _charset._color = _string[a].color; + _charset._disableOffsX = _charset._firstChar = true; + _charset.setCurID(_string[a].charset); if (!(_features & GF_OLD256)) { for (i = 0; i < 4; i++) - charset._colorMap[i] = _charsetData[charset.getCurID()][i]; + _charset._colorMap[i] = _charsetData[_charset.getCurID()][i]; - fontHeight = charset.getFontPtr()[1]; + fontHeight = _charset.getFontPtr()[1]; } _msgPtrToAdd = buf; @@ -836,12 +836,12 @@ void Scumm::drawString(int a) } if (space) *space = '\0'; - if (charset._center) { - charset._left -= charset.getStringWidth(a, buf, 0) >> 1; + if (_charset._center) { + _charset._left -= _charset.getStringWidth(a, buf, 0) >> 1; } if (!(_features & GF_AFTER_V7)) - charset._ignoreCharsetMask = true; + _charset._ignoreCharsetMask = true; // In Full Throttle (and other games?), verb text should always mask @@ -868,55 +868,55 @@ void Scumm::drawString(int a) break; case 1: case 8: - if (charset._center) { - charset._left = charset._startLeft - charset.getStringWidth(a, buf, i); + if (_charset._center) { + _charset._left = _charset._startLeft - _charset.getStringWidth(a, buf, i); } else { - charset._left = charset._startLeft; + _charset._left = _charset._startLeft; } - charset._top += fontHeight; + _charset._top += fontHeight; break; case 12: color = buf[i] + (buf[i + 1] << 8); i += 2; if (color == 0xFF) - charset._color = _string[a].color; + _charset._color = _string[a].color; else - charset._color = color; + _charset._color = color; break; } } else { if (a == 1 && (_features & GF_AFTER_V6)) { if (_string[a].no_talk_anim == 0) - charset._blitAlso = true; + _charset._blitAlso = true; } if (_features & GF_OLD256) - charset.printCharOld(chr); + _charset.printCharOld(chr); else - charset.printChar(chr); - charset._blitAlso = false; + _charset.printChar(chr); + _charset._blitAlso = false; } } - charset._ignoreCharsetMask = false; + _charset._ignoreCharsetMask = false; if (a == 0) { - charset._nextLeft = charset._left; - charset._nextTop = charset._top; + _charset._nextLeft = _charset._left; + _charset._nextTop = _charset._top; } - _string[a].xpos = charset._strRight + 8; // Indy3: Fixes Grail Diary text positioning + _string[a].xpos = _charset._strRight + 8; // Indy3: Fixes Grail Diary text positioning if (_features & GF_AFTER_V7) { - charset._hasMask = true; - if (charset._strLeft < gdi._mask_left) - gdi._mask_left = charset._strLeft; - if (charset._strRight > gdi._mask_right) - gdi._mask_right = charset._strRight; - if (charset._strTop < gdi._mask_top) - gdi._mask_top = charset._strTop; - if (charset._strBottom > gdi._mask_bottom) - gdi._mask_bottom = charset._strBottom; + _charset._hasMask = true; + if (_charset._strLeft < gdi._mask_left) + gdi._mask_left = _charset._strLeft; + if (_charset._strRight > gdi._mask_right) + gdi._mask_right = _charset._strRight; + if (_charset._strTop < gdi._mask_top) + gdi._mask_top = _charset._strTop; + if (_charset._strBottom > gdi._mask_bottom) + gdi._mask_bottom = _charset._strBottom; } } @@ -1118,7 +1118,7 @@ void Scumm::initCharset(int charsetno) _string[1].t_charset = charsetno; for (i = 0; i < 16; i++) - charset._colorMap[i] = _charsetData[charset.getCurID()][i]; + _charset._colorMap[i] = _charsetData[_charset.getCurID()][i]; } void Scumm::loadLanguageBundle() { File file; diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp index 924c2bd6e1..e72210df53 100644 --- a/scumm/verbs.cpp +++ b/scumm/verbs.cpp @@ -156,18 +156,18 @@ void Scumm::drawVerb(int verb, int mode) return; assert(_messagePtr); - tmp = charset._center; - charset._center = 0; + tmp = _charset._center; + _charset._center = 0; drawString(4); - charset._center = tmp; - - vs->right = charset._strRight; - vs->bottom = charset._strBottom; - vs->oldleft = charset._strLeft; - vs->oldright = charset._strRight; - vs->oldtop = charset._strTop; - vs->oldbottom = charset._strBottom; - charset._strLeft = charset._strRight; + _charset._center = tmp; + + vs->right = _charset._strRight; + vs->bottom = _charset._strBottom; + vs->oldleft = _charset._strLeft; + vs->oldright = _charset._strRight; + vs->oldtop = _charset._strTop; + vs->oldbottom = _charset._strBottom; + _charset._strLeft = _charset._strRight; } else { restoreVerbBG(verb); } |