diff options
author | Travis Howell | 2009-03-08 10:08:09 +0000 |
---|---|---|
committer | Travis Howell | 2009-03-08 10:08:09 +0000 |
commit | 56189fcf30e0f0bcf086d82896a26e6bda2b0bc0 (patch) | |
tree | add856e36814ad2c568166b71a3f02d1587392e0 /engines/agos | |
parent | a630759d6db2d3f0aae4b7baf9a1e0fcf323f2e1 (diff) | |
download | scummvm-rg350-56189fcf30e0f0bcf086d82896a26e6bda2b0bc0.tar.gz scummvm-rg350-56189fcf30e0f0bcf086d82896a26e6bda2b0bc0.tar.bz2 scummvm-rg350-56189fcf30e0f0bcf086d82896a26e6bda2b0bc0.zip |
Clarify several errors messages.
svn-id: r39219
Diffstat (limited to 'engines/agos')
-rw-r--r-- | engines/agos/agos.cpp | 2 | ||||
-rw-r--r-- | engines/agos/agos.h | 2 | ||||
-rw-r--r-- | engines/agos/charset-fontdata.cpp | 4 | ||||
-rw-r--r-- | engines/agos/charset.cpp | 4 | ||||
-rw-r--r-- | engines/agos/cursor.cpp | 10 | ||||
-rw-r--r-- | engines/agos/debug.cpp | 6 | ||||
-rw-r--r-- | engines/agos/event.cpp | 42 | ||||
-rw-r--r-- | engines/agos/gfx.cpp | 20 | ||||
-rw-r--r-- | engines/agos/icons.cpp | 28 | ||||
-rw-r--r-- | engines/agos/input.cpp | 2 | ||||
-rw-r--r-- | engines/agos/menus.cpp | 6 | ||||
-rw-r--r-- | engines/agos/oracle.cpp | 4 | ||||
-rw-r--r-- | engines/agos/res_ami.cpp | 2 | ||||
-rw-r--r-- | engines/agos/saveload.cpp | 28 | ||||
-rw-r--r-- | engines/agos/script.cpp | 20 | ||||
-rw-r--r-- | engines/agos/script_e1.cpp | 4 | ||||
-rw-r--r-- | engines/agos/script_pn.cpp | 40 | ||||
-rw-r--r-- | engines/agos/script_s1.cpp | 16 | ||||
-rw-r--r-- | engines/agos/script_s2.cpp | 8 | ||||
-rw-r--r-- | engines/agos/string.cpp | 2 | ||||
-rw-r--r-- | engines/agos/verb.cpp | 8 | ||||
-rw-r--r-- | engines/agos/vga.cpp | 10 | ||||
-rw-r--r-- | engines/agos/vga_pn.cpp | 4 | ||||
-rw-r--r-- | engines/agos/window.cpp | 12 | ||||
-rw-r--r-- | engines/agos/zones.cpp | 2 |
25 files changed, 143 insertions, 143 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 35c8054b02..10014bcdae 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -307,7 +307,7 @@ AGOSEngine::AGOSEngine(OSystem *syst) _dummyItem2 = new Item(); _dummyItem3 = new Item(); - _lockWord = 0; + _videoLockOut = 0; _scrollUpHitArea = 0; _scrollDownHitArea = 0; diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 7ac6523671..d4a0adc4c9 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -421,7 +421,7 @@ protected: Item *_dummyItem2; Item *_dummyItem3; - volatile uint16 _lockWord; + volatile uint16 _videoLockOut; uint16 _scrollUpHitArea; uint16 _scrollDownHitArea; diff --git a/engines/agos/charset-fontdata.cpp b/engines/agos/charset-fontdata.cpp index 6f26c566a4..6e8b6d2172 100644 --- a/engines/agos/charset-fontdata.cpp +++ b/engines/agos/charset-fontdata.cpp @@ -1876,7 +1876,7 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) { if (_noOracleScroll) return; - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); @@ -1984,7 +1984,7 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) { _system->unlockScreen(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } } // End of namespace AGOS diff --git a/engines/agos/charset.cpp b/engines/agos/charset.cpp index 3f38e17ea1..51323feb3a 100644 --- a/engines/agos/charset.cpp +++ b/engines/agos/charset.cpp @@ -629,7 +629,7 @@ void AGOSEngine::windowNewLine(WindowBlock *window) { } void AGOSEngine::windowScroll(WindowBlock *window) { - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; if (window->height != 1) { Graphics::Surface *screen = _system->lockScreen(); @@ -654,7 +654,7 @@ void AGOSEngine::windowScroll(WindowBlock *window) { colorBlock(window, window->x * 8, (window->height - 1) * 8 + window->y, window->width * 8, 8); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } } // End of namespace AGOS diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp index d0481e8f5a..88c0105fc1 100644 --- a/engines/agos/cursor.cpp +++ b/engines/agos/cursor.cpp @@ -487,7 +487,7 @@ void AGOSEngine_PN::handleMouseMoved() { _leftClick = false; if (_dragFlag != 0) { _hitCalled = 4; - } else if (_lockWord & 0x10) { + } else if (_videoLockOut & 0x10) { if (_oneClick != 0) { _hitCalled = 2; _oneClick = 0; @@ -513,7 +513,7 @@ void AGOSEngine_PN::handleMouseMoved() { if (_mouseDown <= 20) { _mouseDown++; if (_mouseDown > 20) { - if (_lockWord & 0x10) { + if (_videoLockOut & 0x10) { if (_oneClick == 0) _hitCalled = 3; } else { @@ -521,7 +521,7 @@ void AGOSEngine_PN::handleMouseMoved() { } } } - } else if ((_lockWord & 0x10) && _oneClick != 0) { + } else if ((_videoLockOut & 0x10) && _oneClick != 0) { _oneClick++; if (_oneClick < 10) { _hitCalled = 1; @@ -628,12 +628,12 @@ void AGOSEngine::mouseOff() { } void AGOSEngine::mouseOn() { - _lockWord |= 1; + _videoLockOut |= 1; if (_mouseHideCount != 0) _mouseHideCount--; - _lockWord &= ~1; + _videoLockOut &= ~1; } void AGOSEngine_PuzzlePack::initMouse() { diff --git a/engines/agos/debug.cpp b/engines/agos/debug.cpp index 0959d48e07..8ff4ca0187 100644 --- a/engines/agos/debug.cpp +++ b/engines/agos/debug.cpp @@ -220,7 +220,7 @@ void AGOSEngine::dumpVideoScript(const byte *src, bool singeOpcode) { } if (opcode >= _numVideoOpcodes) { - error("Invalid opcode %x", opcode); + error("dumpVideoScript: Opcode %d out of range (%d)", opcode, _numVideoOpcodes); } if (getGameType() == GType_FF || getGameType() == GType_PP) { @@ -238,7 +238,7 @@ void AGOSEngine::dumpVideoScript(const byte *src, bool singeOpcode) { } if (strn == NULL) { - error("dumpVideoScript: INVALID OPCODE %d", opcode); + error("dumpVideoScript: Invalid Opcode %d", opcode); } while (*strn != '|') @@ -278,7 +278,7 @@ void AGOSEngine::dumpVideoScript(const byte *src, bool singeOpcode) { src += 2; break; default: - error("Invalid fmt string '%c' in decompile VGA", *str); + error("dumpVideoScript: Invalid fmt string '%c' in decompile VGA", *str); } } diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp index 248e9ee6c7..c915af1aba 100644 --- a/engines/agos/event.cpp +++ b/engines/agos/event.cpp @@ -170,10 +170,10 @@ bool AGOSEngine::isVgaQueueEmpty() { } void AGOSEngine::haltAnimation() { - if (_lockWord & 0x10) + if (_videoLockOut & 0x10) return; - _lockWord |= 0x10; + _videoLockOut |= 0x10; if (_displayScreen) { displayScreen(); @@ -182,7 +182,7 @@ void AGOSEngine::haltAnimation() { } void AGOSEngine::restartAnimation() { - if (!(_lockWord & 0x10)) + if (!(_videoLockOut & 0x10)) return; if (getGameType() != GType_PN) { @@ -191,13 +191,13 @@ void AGOSEngine::restartAnimation() { displayScreen(); } - _lockWord &= ~0x10; + _videoLockOut &= ~0x10; } void AGOSEngine::addVgaEvent(uint16 num, uint8 type, const byte *codePtr, uint16 curSprite, uint16 curZoneNum) { VgaTimerEntry *vte; - _lockWord |= 1; + _videoLockOut |= 1; for (vte = _vgaTimerList; vte->delay; vte++) { } @@ -208,11 +208,11 @@ void AGOSEngine::addVgaEvent(uint16 num, uint8 type, const byte *codePtr, uint16 vte->zoneNum = curZoneNum; vte->type = type; - _lockWord &= ~1; + _videoLockOut &= ~1; } void AGOSEngine::deleteVgaEvent(VgaTimerEntry * vte) { - _lockWord |= 1; + _videoLockOut |= 1; if (vte + 1 <= _nextVgaTimerToProcess) { _nextVgaTimerToProcess--; @@ -223,7 +223,7 @@ void AGOSEngine::deleteVgaEvent(VgaTimerEntry * vte) { vte++; } while (vte->delay); - _lockWord &= ~1; + _videoLockOut &= ~1; } void AGOSEngine::processVgaEvents() { @@ -561,14 +561,14 @@ void AGOSEngine::timerCallback() { } void AGOSEngine_Feeble::timerProc() { - if (_lockWord & 0x80E9 || _lockWord & 2) + if (_videoLockOut & 0x80E9 || _videoLockOut & 2) return; _syncCount++; - _lockWord |= 2; + _videoLockOut |= 2; - if (!(_lockWord & 0x10)) { + if (!(_videoLockOut & 0x10)) { _syncFlag2 ^= 1; if (!_syncFlag2) { processVgaEvents(); @@ -577,7 +577,7 @@ void AGOSEngine_Feeble::timerProc() { if (getGameType() == GType_FF && getBitFlag(99)) { processVgaEvents(); } else if (_scrollCount == 0) { - _lockWord &= ~2; + _videoLockOut &= ~2; return; } } @@ -610,22 +610,22 @@ void AGOSEngine_Feeble::timerProc() { _displayScreen = false; } - _lockWord &= ~2; + _videoLockOut &= ~2; } void AGOSEngine_PN::timerProc() { - if (_lockWord & 0x80E9 || _lockWord & 2) + if (_videoLockOut & 0x80E9 || _videoLockOut & 2) return; _syncCount++; - _lockWord |= 2; + _videoLockOut |= 2; _sound->handleSound(); handleMouseMoved(); handleKeyboard(); - if (!(_lockWord & 0x10)) { + if (!(_videoLockOut & 0x10)) { if (_sampleWait) { _vgaCurSpriteId = 0xFFFF; vc15_sync(); @@ -649,20 +649,20 @@ void AGOSEngine_PN::timerProc() { _displayScreen = false; } - _lockWord &= ~2; + _videoLockOut &= ~2; } void AGOSEngine::timerProc() { - if (_lockWord & 0x80E9 || _lockWord & 2) + if (_videoLockOut & 0x80E9 || _videoLockOut & 2) return; _syncCount++; - _lockWord |= 2; + _videoLockOut |= 2; handleMouseMoved(); - if (!(_lockWord & 0x10)) { + if (!(_videoLockOut & 0x10)) { processVgaEvents(); processVgaEvents(); _cepeFlag ^= 1; @@ -675,7 +675,7 @@ void AGOSEngine::timerProc() { _displayScreen = false; } - _lockWord &= ~2; + _videoLockOut &= ~2; } void AGOSEngine_PuzzlePack::dimpIdle() { diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp index 98df66b021..0268463ff5 100644 --- a/engines/agos/gfx.cpp +++ b/engines/agos/gfx.cpp @@ -734,7 +734,7 @@ void AGOSEngine_Simon1::drawImage(VC10_state *state) { drawBackGroundImage(state); } else if (state->flags & kDFMasked) { drawMaskedImage(state); - } else if (((_lockWord & 0x20) && state->palette == 0) || state->palette == 0xC0) { + } else if (((_videoLockOut & 0x20) && state->palette == 0) || state->palette == 0xC0) { draw32ColorImage(state); } else { drawVertImage(state); @@ -1306,8 +1306,8 @@ void AGOSEngine::setWindowImageEx(uint16 mode, uint16 vgaSpriteId) { } - if (_lockWord & 0x10) - error("setWindowImageEx: _lockWord & 0x10"); + if (_videoLockOut & 0x10) + error("setWindowImageEx: _videoLockOut & 0x10"); if (getGameType() != GType_PP && getGameType() != GType_FF) { if (getGameType() == GType_WW && (mode == 6 || mode == 8 || mode == 9)) { @@ -1327,7 +1327,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas uint16 updateWindow; _windowNum = updateWindow = mode; - _lockWord |= 0x20; + _videoLockOut |= 0x20; if (getGameType() == GType_FF || getGameType() == GType_PP) { vc27_resetSprite(); @@ -1366,7 +1366,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas if (_window3Flag == 1) { clearVideoBackGround(3, 0); - _lockWord &= ~0x20; + _videoLockOut &= ~0x20; return; } @@ -1393,7 +1393,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas srcWidth = _screenWidth; } else { _system->unlockScreen(); - _lockWord &= ~0x20; + _videoLockOut &= ~0x20; return; } } else if (getGameType() == GType_SIMON1) { @@ -1408,7 +1408,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas srcWidth = _screenWidth; } else { _system->unlockScreen(); - _lockWord &= ~0x20; + _videoLockOut &= ~0x20; return; } } else if (getGameType() == GType_WW) { @@ -1420,7 +1420,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas srcWidth = _screenWidth; } else { _system->unlockScreen(); - _lockWord &= ~0x20; + _videoLockOut &= ~0x20; return; } } else if (getGameType() == GType_ELVIRA2) { @@ -1432,7 +1432,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas srcWidth = _screenWidth; } else { _system->unlockScreen(); - _lockWord &= ~0x20; + _videoLockOut &= ~0x20; return; } } else if (getGameType() == GType_ELVIRA1) { @@ -1480,7 +1480,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas _system->unlockScreen(); } - _lockWord &= ~0x20; + _videoLockOut &= ~0x20; } // Personal Nightmare specific diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp index 908b712ade..641e79e4a6 100644 --- a/engines/agos/icons.cpp +++ b/engines/agos/icons.cpp @@ -196,7 +196,7 @@ void AGOSEngine_Simon2::drawIcon(WindowBlock *window, uint icon, uint x, uint y) byte *dst; byte *src; - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); dst = (byte *)screen->pixels; @@ -215,14 +215,14 @@ void AGOSEngine_Simon2::drawIcon(WindowBlock *window, uint icon, uint x, uint y) _system->unlockScreen(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } void AGOSEngine_Simon1::drawIcon(WindowBlock *window, uint icon, uint x, uint y) { byte *dst; byte *src; - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); dst = (byte *)screen->pixels; @@ -243,14 +243,14 @@ void AGOSEngine_Simon1::drawIcon(WindowBlock *window, uint icon, uint x, uint y) _system->unlockScreen(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } void AGOSEngine_Waxworks::drawIcon(WindowBlock *window, uint icon, uint x, uint y) { byte *dst; byte *src; - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); dst = (byte *)screen->pixels; @@ -271,14 +271,14 @@ void AGOSEngine_Waxworks::drawIcon(WindowBlock *window, uint icon, uint x, uint _system->unlockScreen(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } void AGOSEngine_Elvira2::drawIcon(WindowBlock *window, uint icon, uint x, uint y) { byte *dst; byte *src; - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); dst = (byte *)screen->pixels; @@ -299,14 +299,14 @@ void AGOSEngine_Elvira2::drawIcon(WindowBlock *window, uint icon, uint x, uint y _system->unlockScreen(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } void AGOSEngine_Elvira1::drawIcon(WindowBlock *window, uint icon, uint x, uint y) { byte *dst; byte *src; - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); dst = (byte *)screen->pixels; @@ -326,14 +326,14 @@ void AGOSEngine_Elvira1::drawIcon(WindowBlock *window, uint icon, uint x, uint y _system->unlockScreen(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } void AGOSEngine::drawIcon(WindowBlock *window, uint icon, uint x, uint y) { byte *dst; byte *src; - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); dst = (byte *)screen->pixels + y * _dxSurfacePitch + x * 8; @@ -363,7 +363,7 @@ void AGOSEngine::drawIcon(WindowBlock *window, uint icon, uint x, uint y) { _system->unlockScreen(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } void AGOSEngine_Feeble::drawIconArray(uint num, Item *itemRef, int line, int classMask) { @@ -764,7 +764,7 @@ void AGOSEngine_Simon1::addArrows(WindowBlock *window, uint8 num) { ha->window = window; ha->verb = 1; - _lockWord |= 0x8; + _videoLockOut |= 0x8; VgaPointersEntry *vpe = &_vgaBufferPointers[1]; byte *curVgaFile2Orig = _curVgaFile2; @@ -778,7 +778,7 @@ void AGOSEngine_Simon1::addArrows(WindowBlock *window, uint8 num) { _curVgaFile2 = curVgaFile2Orig; _windowNum = windowNumOrig; - _lockWord &= ~0x8; + _videoLockOut &= ~0x8; } void AGOSEngine_Waxworks::addArrows(WindowBlock *window, uint8 num) { diff --git a/engines/agos/input.cpp b/engines/agos/input.cpp index 991d355979..2a43cd2484 100644 --- a/engines/agos/input.cpp +++ b/engines/agos/input.cpp @@ -648,7 +648,7 @@ void AGOSEngine_PN::handleKeyboard() { chr = _keyPressed.ascii; if (chr == 8 || chr == 13) { addChar(chr); - } else if (!(_lockWord & 0x10)) { + } else if (!(_videoLockOut & 0x10)) { if (chr >= 32) addChar(chr); } diff --git a/engines/agos/menus.cpp b/engines/agos/menus.cpp index 7f61925528..9e71849c6e 100644 --- a/engines/agos/menus.cpp +++ b/engines/agos/menus.cpp @@ -57,7 +57,7 @@ void AGOSEngine::loadMenuFile() { void AGOSEngine::restoreMenu() { _wiped = 0; - _lockWord |= 0x80; + _videoLockOut |= 0x80; clearVideoWindow(3, 0); @@ -70,8 +70,8 @@ void AGOSEngine::restoreMenu() { _windowNum = oldWindowNum; - _lockWord |= 0x20; - _lockWord &= ~0x80; + _videoLockOut |= 0x20; + _videoLockOut &= ~0x80; } // Elvira 1 specific diff --git a/engines/agos/oracle.cpp b/engines/agos/oracle.cpp index 64772101ba..88346fa9f8 100644 --- a/engines/agos/oracle.cpp +++ b/engines/agos/oracle.cpp @@ -501,7 +501,7 @@ void AGOSEngine_Feeble::windowBackSpace(WindowBlock *window) { byte *dst; uint x, y, h, w; - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; x = window->x + window->textColumn; y = window->y + window->textRow; @@ -516,7 +516,7 @@ void AGOSEngine_Feeble::windowBackSpace(WindowBlock *window) { dst += _screenWidth; } - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } } // End of namespace AGOS diff --git a/engines/agos/res_ami.cpp b/engines/agos/res_ami.cpp index f86d0344f5..ecfef7a3a0 100644 --- a/engines/agos/res_ami.cpp +++ b/engines/agos/res_ami.cpp @@ -146,7 +146,7 @@ byte *AGOSEngine::convertImage(VC10_state *state, bool compressed) { uint8 colorDepth = 4; if (getGameType() == GType_SIMON1) { - if (((_lockWord & 0x20) && !state->palette) || ((getFeatures() & GF_32COLOR) && + if (((_videoLockOut & 0x20) && !state->palette) || ((getFeatures() & GF_32COLOR) && state->palette != 0xC0)) { colorDepth = 5; } diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index 700d451b83..40c469c6da 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -1019,7 +1019,7 @@ bool AGOSEngine::loadGame(const char *filename, bool restartMode) { Common::SeekableReadStream *f = NULL; uint num, item_index, i; - _lockWord |= 0x100; + _videoLockOut |= 0x100; if (restartMode) { // Load restart state @@ -1031,7 +1031,7 @@ bool AGOSEngine::loadGame(const char *filename, bool restartMode) { } if (f == NULL) { - _lockWord &= ~0x100; + _videoLockOut &= ~0x100; return false; } @@ -1043,7 +1043,7 @@ bool AGOSEngine::loadGame(const char *filename, bool restartMode) { if (f->readUint32BE() != 0xFFFFFFFF || num != _itemArrayInited - 1) { delete f; - _lockWord &= ~0x100; + _videoLockOut &= ~0x100; return false; } @@ -1106,7 +1106,7 @@ bool AGOSEngine::loadGame(const char *filename, bool restartMode) { _noParentNotify = false; - _lockWord &= ~0x100; + _videoLockOut &= ~0x100; return true; } @@ -1118,11 +1118,11 @@ bool AGOSEngine::saveGame(uint slot, const char *caption) { uint32 curTime = getTime(); uint32 gsc = _gameStoppedClock; - _lockWord |= 0x100; + _videoLockOut |= 0x100; f = _saveFileMan->openForSaving(genSaveName(slot)); if (f == NULL) { - _lockWord &= ~0x100; + _videoLockOut &= ~0x100; return false; } @@ -1185,7 +1185,7 @@ bool AGOSEngine::saveGame(uint slot, const char *caption) { bool result = !f->err(); delete f; - _lockWord &= ~0x100; + _videoLockOut &= ~0x100; return result; } @@ -1195,7 +1195,7 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) { Common::SeekableReadStream *f = NULL; uint num, item_index, i, j; - _lockWord |= 0x100; + _videoLockOut |= 0x100; if (restartMode) { // Load restart state @@ -1207,7 +1207,7 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) { } if (f == NULL) { - _lockWord &= ~0x100; + _videoLockOut &= ~0x100; return false; } @@ -1225,7 +1225,7 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) { if (f->readUint32BE() != 0xFFFFFFFF || num != _itemArrayInited - 1) { delete f; - _lockWord &= ~0x100; + _videoLockOut &= ~0x100; return false; } @@ -1381,7 +1381,7 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) { _noParentNotify = false; - _lockWord &= ~0x100; + _videoLockOut &= ~0x100; return true; } @@ -1393,11 +1393,11 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) { uint32 curTime = getTime(); uint32 gsc = _gameStoppedClock; - _lockWord |= 0x100; + _videoLockOut |= 0x100; f = _saveFileMan->openForSaving(genSaveName(slot)); if (f == NULL) { - _lockWord &= ~0x100; + _videoLockOut &= ~0x100; return false; } @@ -1548,7 +1548,7 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) { bool result = !f->err(); delete f; - _lockWord &= ~0x100; + _videoLockOut &= ~0x100; return result; } diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index 5eb864d40b..3d8b80b659 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -495,7 +495,7 @@ void AGOSEngine::o_comment() { void AGOSEngine::o_haltAnimation() { // 88: stop animation - _lockWord |= 0x10; + _videoLockOut |= 0x10; if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { VgaTimerEntry *vte = _vgaTimerList; @@ -512,7 +512,7 @@ void AGOSEngine::o_haltAnimation() { void AGOSEngine::o_restartAnimation() { // 89: restart animation - _lockWord &= ~0x10; + _videoLockOut &= ~0x10; } void AGOSEngine::o_getParent() { @@ -570,7 +570,7 @@ void AGOSEngine::o_loadZone() { // 97: load zone uint vga_res = getVarOrWord(); - _lockWord |= 0x80; + _videoLockOut |= 0x80; if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) { @@ -586,14 +586,14 @@ void AGOSEngine::o_loadZone() { _vgaSpriteChanged = 0; } - _lockWord &= ~0x80; + _videoLockOut &= ~0x80; } void AGOSEngine::o_killAnimate() { // 100: kill animations - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; vc27_resetSprite(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } void AGOSEngine::o_defWindow() { @@ -1044,18 +1044,18 @@ void AGOSEngine::synchChain(Item *i) { void AGOSEngine::sendSync(uint a) { uint16 id = to16Wrapper(a); - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; _vcPtr = (byte *)&id; vc15_sync(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } void AGOSEngine::stopAnimate(uint16 a) { uint16 b = to16Wrapper(a); - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; _vcPtr = (byte *)&b; vc60_stopAnimation(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } void AGOSEngine::waitForSync(uint a) { diff --git a/engines/agos/script_e1.cpp b/engines/agos/script_e1.cpp index ddc57bac45..3be40b0f5b 100644 --- a/engines/agos/script_e1.cpp +++ b/engines/agos/script_e1.cpp @@ -738,9 +738,9 @@ void AGOSEngine_Elvira1::oe1_animate() { int16 y = getVarOrWord(); uint16 palette = getVarOrWord(); - _lockWord |= 0x40; + _videoLockOut |= 0x40; animate(windowNum, vgaSpriteId / 100, vgaSpriteId, x, y, palette); - _lockWord &= ~0x40; + _videoLockOut &= ~0x40; } void AGOSEngine_Elvira1::oe1_stopAnimate() { diff --git a/engines/agos/script_pn.cpp b/engines/agos/script_pn.cpp index b129cc4d99..7b58e46cd8 100644 --- a/engines/agos/script_pn.cpp +++ b/engines/agos/script_pn.cpp @@ -127,7 +127,7 @@ void AGOSEngine_PN::executeOpcode(int opcode) { #define readfromline() (_linct-- ? (int)*_workptr++ : readoverr()) int readoverr() { - error("Internal Error - Line Over-run"); + error("readfromline: Internal Error - Line Over-run"); } // ----------------------------------------------------------------------- @@ -626,9 +626,9 @@ void AGOSEngine_PN::opn_opcode57() { int16 y = varval(); uint16 palette = varval(); - _lockWord |= 0x40; + _videoLockOut |= 0x40; animate(windowNum, 0, vgaSpriteId, x, y, palette); - _lockWord &= ~0x40; + _videoLockOut &= ~0x40; setScriptReturn(true); } @@ -636,7 +636,7 @@ void AGOSEngine_PN::opn_opcode57() { void AGOSEngine_PN::opn_opcode62() { int32 zoneNum = varval(); - _lockWord |= 0x80; + _videoLockOut |= 0x80; vc29_stopAllSounds(); @@ -650,7 +650,7 @@ void AGOSEngine_PN::opn_opcode62() { _copyScnFlag = 0; _vgaSpriteChanged = 0; - _lockWord &= ~0x80; + _videoLockOut &= ~0x80; setScriptReturn(true); } @@ -662,7 +662,7 @@ void AGOSEngine_PN::opn_opcode63() { setScriptReturn(inventoryOn(varval())); break; case 64: - setScriptReturn((_lockWord & 0x10) != 0); + setScriptReturn((_videoLockOut & 0x10) != 0); break; case 63: setScriptReturn(inventoryOff()); @@ -674,10 +674,10 @@ void AGOSEngine_PN::opn_opcode63() { int AGOSEngine_PN::inventoryOn(int val) { writeVariable(210, val); - if (_lockWord & 0x10) { + if (_videoLockOut & 0x10) { iconPage(); } else { - _lockWord |= 0x10; + _videoLockOut |= 0x10; _hitAreaList = _invHitAreas; _windowArray[2]->textColor = 0; @@ -694,13 +694,13 @@ int AGOSEngine_PN::inventoryOn(int val) { } int AGOSEngine_PN::inventoryOff() { - if (_lockWord & 0x10) { + if (_videoLockOut & 0x10) { _windowArray[2]->textColor = 15; restoreBlock(48, 2, 272, 130); _hitAreaList = _hitAreas; - _lockWord &= ~0x10; + _videoLockOut &= ~0x10; _vgaSpriteChanged++; } return 1; @@ -765,7 +765,7 @@ int AGOSEngine_PN::varval() { b = varval(); return(bitextract((int32)_quickptr[4] + b * _quickshort[3], varval())); default: - error("VARVAL : Illegal code encountered"); + error("VARVAL : Illegal code %d encountered", a); } } @@ -776,14 +776,14 @@ void AGOSEngine_PN::writeval(uint8 *ptr, int val) { _linct = 255; if ((a = readfromline()) < 247) - error("Write to constant"); + error("writeval: Write to constant (%d)", a); switch (a) { case 249: - error("Write to constant"); + error("writeval: Write to constant (%d)", a); break; case 250: - error("Write to constant"); + error("writeval: Write to constant (%d)", a); break; case 251: _variableArray[varval()] = val; @@ -815,7 +815,7 @@ void AGOSEngine_PN::writeval(uint8 *ptr, int val) { setbitf((uint32)_quickptr[4] + b * _quickshort[3], varval(), val); break; default: - error("WRITEVAL : undefined evaluation"); + error("WRITEVAL : undefined evaluation %d", a); } _linct = lsav; _workptr = savpt; @@ -861,7 +861,7 @@ int AGOSEngine_PN::doline(int needsave) { mybuf = (jmp_buf *)malloc(sizeof(jmp_buf)); if (mybuf == NULL) - error("Out of memory - stack overflow"); + error("doline: Out of memory - stack overflow"); if ((x = setjmp(*mybuf)) > 0) { dumpstack(); @@ -1049,7 +1049,7 @@ void AGOSEngine_PN::addstack(int type) { a = (struct stackframe *)malloc(sizeof(struct stackframe)); if (a == NULL) - error("Out of memory - stack overflow"); + error("addstack: Out of memory - stack overflow"); a->nextframe = _stackbase; _stackbase = a; @@ -1072,7 +1072,7 @@ void AGOSEngine_PN::dumpstack() { struct stackframe *a; if (_stackbase == NULL) - error("Stack underflow or unknown longjmp"); + error("dumpstack: Stack underflow or unknown longjmp"); a = _stackbase->nextframe; free((char *)_stackbase); @@ -1083,7 +1083,7 @@ void AGOSEngine_PN::junkstack() { struct stackframe *a; if (_stackbase == NULL) - error("Stack underflow or unknown longjmp"); + error("junkstack: Stack underflow or unknown longjmp"); a = _stackbase->nextframe; if (_stackbase->classnum == -1) @@ -1099,7 +1099,7 @@ void AGOSEngine_PN::popstack(int type) { junkstack(); if (_stackbase == NULL) - error("Stack underflow or unknown longjmp"); + error("popstack: Stack underflow or unknown longjmp"); _linct = _stackbase->ll; _linebase = _stackbase->lbase; diff --git a/engines/agos/script_s1.cpp b/engines/agos/script_s1.cpp index 030a4e5d74..2e3d936037 100644 --- a/engines/agos/script_s1.cpp +++ b/engines/agos/script_s1.cpp @@ -300,9 +300,9 @@ void AGOSEngine_Simon1::os1_animate() { _lastVgaWaitFor = 0; } - _lockWord |= 0x40; + _videoLockOut |= 0x40; animate(windowNum, vgaSpriteId / 100, vgaSpriteId, x, y, palette); - _lockWord &= ~0x40; + _videoLockOut &= ~0x40; } void AGOSEngine_Simon1::os1_pauseGame() { @@ -529,9 +529,9 @@ void AGOSEngine_Simon1::os1_loadBeard() { // 182: load beard if (_beardLoaded == false) { _beardLoaded = true; - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; loadVGABeardFile(328); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } } @@ -539,9 +539,9 @@ void AGOSEngine_Simon1::os1_unloadBeard() { // 183: unload beard if (_beardLoaded == true) { _beardLoaded = false; - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; loadVGABeardFile(23); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } } @@ -591,9 +591,9 @@ void AGOSEngine_Simon1::os1_specialFade() { } void AGOSEngine::scriptMouseOff() { - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; vc34_setMouseOff(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } } // End of namespace AGOS diff --git a/engines/agos/script_s2.cpp b/engines/agos/script_s2.cpp index d868e1e5bd..7d6b5e7a36 100644 --- a/engines/agos/script_s2.cpp +++ b/engines/agos/script_s2.cpp @@ -316,9 +316,9 @@ void AGOSEngine_Simon2::os2_animate() { int16 y = getVarOrWord(); uint16 palette = (getVarOrWord() & 15); - _lockWord |= 0x40; + _videoLockOut |= 0x40; animate(windowNum, zoneNum, vgaSpriteId, x, y, palette); - _lockWord &= ~0x40; + _videoLockOut &= ~0x40; } void AGOSEngine_Simon2::os2_stopAnimate() { @@ -475,10 +475,10 @@ void AGOSEngine::stopAnimateSimon2(uint16 a, uint16 b) { items[0] = to16Wrapper(a); items[1] = to16Wrapper(b); - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; _vcPtr = (byte *)&items; vc60_stopAnimation(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } void AGOSEngine::waitForMark(uint i) { diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp index 8bfaa1e4eb..aad276ca5d 100644 --- a/engines/agos/string.cpp +++ b/engines/agos/string.cpp @@ -1519,7 +1519,7 @@ char *AGOSEngine_PN::getMessage(char *msg, uint16 num) { strPtr1[1] = 13; strPtr1[2] = 0; - if (_lockWord & 0x10) { + if (_videoLockOut & 0x10) { strPtr1 = origPtr; count = 6; while (strPtr1[0] != 0) { diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp index 6f91562a87..c6fc1d193f 100644 --- a/engines/agos/verb.cpp +++ b/engines/agos/verb.cpp @@ -964,7 +964,7 @@ void AGOSEngine::invertBox(HitArea *ha, byte a, byte b, byte c, byte d) { byte *src, color; int w, h, i; - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); src = (byte *)screen->pixels + ha->y * _dxSurfacePitch + ha->x; @@ -1024,7 +1024,7 @@ void AGOSEngine::invertBox(HitArea *ha, byte a, byte b, byte c, byte d) { _system->unlockScreen(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } // Personal Nightmare specific @@ -1119,7 +1119,7 @@ void AGOSEngine_PN::execMouseHit(HitArea *ha) { hitBox5(ha); else if (ha->flags & kOBFRoomBox) hitBox6(ha); - } else if (_lockWord & 10) { + } else if (_videoLockOut & 10) { hitBox8(ha); } } else { @@ -1163,7 +1163,7 @@ void AGOSEngine_PN::hitBox4(HitArea *ha) { return; uint16 num = ha->msg1 & ~0x8000; - if ((_lockWord & 0x10) && !(ha->flags & (kOBFInventoryBox | kOBFRoomBox)) && + if ((_videoLockOut & 0x10) && !(ha->flags & (kOBFInventoryBox | kOBFRoomBox)) && !testContainer(num)) { return; } diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp index 323e8de96c..d00c9ceb34 100644 --- a/engines/agos/vga.cpp +++ b/engines/agos/vga.cpp @@ -171,7 +171,7 @@ void AGOSEngine::runVgaScript() { return; if (opcode >= _numVideoOpcodes || !_vga_opcode_table[opcode]) - error("Invalid VGA opcode '%d' encountered", opcode); + error("runVgaScript: Invalid VGA opcode '%d' encountered", opcode); (this->*_vga_opcode_table[opcode]) (); } @@ -1103,7 +1103,7 @@ void AGOSEngine::vc27_resetSprite() { VgaSleepStruct *vfs; VgaTimerEntry *vte, *vte2; - _lockWord |= 8; + _videoLockOut |= 8; _lastVgaWaitFor = 0; @@ -1157,7 +1157,7 @@ void AGOSEngine::vc27_resetSprite() { } } - if (_lockWord & 0x20) { + if (_videoLockOut & 0x20) { AnimTable *animTable = _screenAnim1; while (animTable->srcPtr) { animTable->srcPtr = 0; @@ -1171,7 +1171,7 @@ void AGOSEngine::vc27_resetSprite() { if (getGameType() == GType_FF || getGameType() == GType_PP) setBitFlag(42, true); - _lockWord &= ~8; + _videoLockOut &= ~8; } void AGOSEngine::vc28_playSFX() { @@ -1361,7 +1361,7 @@ void AGOSEngine::vc37_pokePalette() { palptr[2] = ((color & 0x00f) >> 0) * 32; palptr[3] = 0; - if (!(_lockWord & 0x20)) { + if (!(_videoLockOut & 0x20)) { _paletteFlag = 1; _displayScreen++; } diff --git a/engines/agos/vga_pn.cpp b/engines/agos/vga_pn.cpp index 5c6eaf6778..ae9bb8eac4 100644 --- a/engines/agos/vga_pn.cpp +++ b/engines/agos/vga_pn.cpp @@ -93,7 +93,7 @@ void AGOSEngine::vc36_pause() { bool oldWiped = _wiped; _wiped = 0; - _lockWord |= 8; + _videoLockOut |= 8; windowPutChar(_windowArray[2], 13); @@ -112,7 +112,7 @@ void AGOSEngine::vc36_pause() { windowPutChar(_windowArray[2], 128); _wiped = oldWiped; - _lockWord &= ~8; + _videoLockOut &= ~8; } void AGOSEngine::vc39_volume() { diff --git a/engines/agos/window.cpp b/engines/agos/window.cpp index 31215f1f7c..8737498e79 100644 --- a/engines/agos/window.cpp +++ b/engines/agos/window.cpp @@ -126,7 +126,7 @@ void AGOSEngine_Feeble::colorWindow(WindowBlock *window) { byte *dst; uint16 h, w; - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; dst = getBackGround() + _dxSurfacePitch * window->y + window->x; @@ -138,7 +138,7 @@ void AGOSEngine_Feeble::colorWindow(WindowBlock *window) { dst += _screenWidth; } - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } void AGOSEngine::colorWindow(WindowBlock *window) { @@ -168,7 +168,7 @@ void AGOSEngine::colorWindow(WindowBlock *window) { } void AGOSEngine::colorBlock(WindowBlock *window, uint16 x, uint16 y, uint16 w, uint16 h) { - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); byte *dst = (byte *)screen->pixels + y * _screenWidth + x; @@ -184,7 +184,7 @@ void AGOSEngine::colorBlock(WindowBlock *window, uint16 x, uint16 y, uint16 w, u _system->unlockScreen(); - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } void AGOSEngine::resetWindow(WindowBlock *window) { @@ -194,7 +194,7 @@ void AGOSEngine::resetWindow(WindowBlock *window) { } void AGOSEngine::restoreWindow(WindowBlock *window) { - _lockWord |= 0x8000; + _videoLockOut |= 0x8000; if (getGameType() == GType_FF || getGameType() == GType_PP) { restoreBlock(window->y + window->height, window->x + window->width, window->y, window->x); @@ -225,7 +225,7 @@ void AGOSEngine::restoreWindow(WindowBlock *window) { restoreBlock(x * 8, window->y, (x + w) * 8, window->y + window->height * 8); } - _lockWord &= ~0x8000; + _videoLockOut &= ~0x8000; } void AGOSEngine::restoreBlock(uint16 x, uint16 y, uint16 w, uint16 h) { diff --git a/engines/agos/zones.cpp b/engines/agos/zones.cpp index 4e3d5b0007..86f2edc820 100644 --- a/engines/agos/zones.cpp +++ b/engines/agos/zones.cpp @@ -146,7 +146,7 @@ byte *AGOSEngine::allocBlock(uint32 size) { void AGOSEngine::checkRunningAnims() { VgaSprite *vsp; if (getGameType() != GType_FF && getGameType() != GType_PP && - (_lockWord & 0x20)) { + (_videoLockOut & 0x20)) { return; } |