[Scummvm-cvs-logs] SF.net SVN: scummvm:[39219] scummvm/trunk/engines/agos

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Sun Mar 8 11:08:09 CET 2009


Revision: 39219
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39219&view=rev
Author:   Kirben
Date:     2009-03-08 10:08:09 +0000 (Sun, 08 Mar 2009)

Log Message:
-----------
Clarify several errors messages.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.cpp
    scummvm/trunk/engines/agos/agos.h
    scummvm/trunk/engines/agos/charset-fontdata.cpp
    scummvm/trunk/engines/agos/charset.cpp
    scummvm/trunk/engines/agos/cursor.cpp
    scummvm/trunk/engines/agos/debug.cpp
    scummvm/trunk/engines/agos/event.cpp
    scummvm/trunk/engines/agos/gfx.cpp
    scummvm/trunk/engines/agos/icons.cpp
    scummvm/trunk/engines/agos/input.cpp
    scummvm/trunk/engines/agos/menus.cpp
    scummvm/trunk/engines/agos/oracle.cpp
    scummvm/trunk/engines/agos/res_ami.cpp
    scummvm/trunk/engines/agos/saveload.cpp
    scummvm/trunk/engines/agos/script.cpp
    scummvm/trunk/engines/agos/script_e1.cpp
    scummvm/trunk/engines/agos/script_pn.cpp
    scummvm/trunk/engines/agos/script_s1.cpp
    scummvm/trunk/engines/agos/script_s2.cpp
    scummvm/trunk/engines/agos/string.cpp
    scummvm/trunk/engines/agos/verb.cpp
    scummvm/trunk/engines/agos/vga.cpp
    scummvm/trunk/engines/agos/vga_pn.cpp
    scummvm/trunk/engines/agos/window.cpp
    scummvm/trunk/engines/agos/zones.cpp

Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/agos.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -307,7 +307,7 @@
 	_dummyItem2 = new Item();
 	_dummyItem3 = new Item();
 
-	_lockWord = 0;
+	_videoLockOut = 0;
 	_scrollUpHitArea = 0;
 	_scrollDownHitArea = 0;
 

Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/agos.h	2009-03-08 10:08:09 UTC (rev 39219)
@@ -421,7 +421,7 @@
 	Item *_dummyItem2;
 	Item *_dummyItem3;
 
-	volatile uint16 _lockWord;
+	volatile uint16 _videoLockOut;
 	uint16 _scrollUpHitArea;
 	uint16 _scrollDownHitArea;
 

Modified: scummvm/trunk/engines/agos/charset-fontdata.cpp
===================================================================
--- scummvm/trunk/engines/agos/charset-fontdata.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/charset-fontdata.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -1876,7 +1876,7 @@
 	if (_noOracleScroll)
 		return;
 
-	_lockWord |= 0x8000;
+	_videoLockOut |= 0x8000;
 
 	Graphics::Surface *screen = _system->lockScreen();
 
@@ -1984,7 +1984,7 @@
 
 	_system->unlockScreen();
 
-	_lockWord &= ~0x8000;
+	_videoLockOut &= ~0x8000;
 }
 
 } // End of namespace AGOS

Modified: scummvm/trunk/engines/agos/charset.cpp
===================================================================
--- scummvm/trunk/engines/agos/charset.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/charset.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -629,7 +629,7 @@
 }
 
 void AGOSEngine::windowScroll(WindowBlock *window) {
-	_lockWord |= 0x8000;
+	_videoLockOut |= 0x8000;
 
 	if (window->height != 1) {
 		Graphics::Surface *screen = _system->lockScreen();
@@ -654,7 +654,7 @@
 
 	colorBlock(window, window->x * 8, (window->height - 1) * 8 + window->y, window->width * 8, 8);
 
-	_lockWord &= ~0x8000;
+	_videoLockOut &= ~0x8000;
 }
 } // End of namespace AGOS
 

Modified: scummvm/trunk/engines/agos/cursor.cpp
===================================================================
--- scummvm/trunk/engines/agos/cursor.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/cursor.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -487,7 +487,7 @@
 		_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 @@
 		if (_mouseDown <= 20) {
 			_mouseDown++;
 			if (_mouseDown > 20) {
-				if (_lockWord & 0x10) {
+				if (_videoLockOut & 0x10) {
 					if (_oneClick == 0)
 						_hitCalled = 3;
 				} else {
@@ -521,7 +521,7 @@
 				}
 			}
 		}
-	} else if ((_lockWord & 0x10) && _oneClick != 0) {
+	} else if ((_videoLockOut & 0x10) && _oneClick != 0) {
 		_oneClick++;
 		if (_oneClick < 10) {
 			_hitCalled = 1;
@@ -628,12 +628,12 @@
 }
 
 void AGOSEngine::mouseOn() {
-	_lockWord |= 1;
+	_videoLockOut |= 1;
 
 	if (_mouseHideCount != 0)
 		_mouseHideCount--;
 
-	_lockWord &= ~1;
+	_videoLockOut &= ~1;
 }
 
 void AGOSEngine_PuzzlePack::initMouse() {

Modified: scummvm/trunk/engines/agos/debug.cpp
===================================================================
--- scummvm/trunk/engines/agos/debug.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/debug.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -220,7 +220,7 @@
 		}
 
 		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 @@
 		}
 
 		if (strn == NULL) {
-			error("dumpVideoScript: INVALID OPCODE %d", opcode);
+			error("dumpVideoScript: Invalid Opcode %d", opcode);
 		}
 
 		while (*strn != '|')
@@ -278,7 +278,7 @@
 				src += 2;
 				break;
 			default:
-				error("Invalid fmt string '%c' in decompile VGA", *str);
+				error("dumpVideoScript: Invalid fmt string '%c' in decompile VGA", *str);
 			}
 		}
 

Modified: scummvm/trunk/engines/agos/event.cpp
===================================================================
--- scummvm/trunk/engines/agos/event.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/event.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -170,10 +170,10 @@
 }
 
 void AGOSEngine::haltAnimation() {
-	if (_lockWord & 0x10)
+	if (_videoLockOut & 0x10)
 		return;
 
-	_lockWord |= 0x10;
+	_videoLockOut |= 0x10;
 
 	if (_displayScreen) {
 		displayScreen();
@@ -182,7 +182,7 @@
 }
 
 void AGOSEngine::restartAnimation() {
-	if (!(_lockWord & 0x10))
+	if (!(_videoLockOut & 0x10))
 		return;
 
 	if (getGameType() != GType_PN) {
@@ -191,13 +191,13 @@
 		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 @@
 	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 @@
 		vte++;
 	} while (vte->delay);
 
-	_lockWord &= ~1;
+	_videoLockOut &= ~1;
 }
 
 void AGOSEngine::processVgaEvents() {
@@ -561,14 +561,14 @@
 }
 
 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 @@
 			if (getGameType() == GType_FF && getBitFlag(99)) {
 				processVgaEvents();
 			} else if (_scrollCount == 0) {
-				_lockWord &= ~2;
+				_videoLockOut &= ~2;
 				return;
 			}
 		}
@@ -610,22 +610,22 @@
 		_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 @@
 		_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 @@
 		_displayScreen = false;
 	}
 
-	_lockWord &= ~2;
+	_videoLockOut &= ~2;
 }
 
 void AGOSEngine_PuzzlePack::dimpIdle() {

Modified: scummvm/trunk/engines/agos/gfx.cpp
===================================================================
--- scummvm/trunk/engines/agos/gfx.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/gfx.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -734,7 +734,7 @@
 		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 @@
 
 	}
 
-	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 @@
 	uint16 updateWindow;
 
 	_windowNum = updateWindow = mode;
-	_lockWord |= 0x20;
+	_videoLockOut |= 0x20;
 
 	if (getGameType() == GType_FF || getGameType() == GType_PP) {
 		vc27_resetSprite();
@@ -1366,7 +1366,7 @@
 
 		if (_window3Flag == 1) {
 			clearVideoBackGround(3, 0);
-			_lockWord &= ~0x20;
+			_videoLockOut &= ~0x20;
 			return;
 		}
 
@@ -1393,7 +1393,7 @@
 				srcWidth = _screenWidth;
 			} else {
 				_system->unlockScreen();
-				_lockWord &= ~0x20;
+				_videoLockOut &= ~0x20;
 				return;
 			}
 		} else if (getGameType() == GType_SIMON1) {
@@ -1408,7 +1408,7 @@
 				srcWidth = _screenWidth;
 			} else {
 				_system->unlockScreen();
-				_lockWord &= ~0x20;
+				_videoLockOut &= ~0x20;
 				return;
 			}
 		} else if (getGameType() == GType_WW) {
@@ -1420,7 +1420,7 @@
 				srcWidth = _screenWidth;
 			} else {
 				_system->unlockScreen();
-				_lockWord &= ~0x20;
+				_videoLockOut &= ~0x20;
 				return;
 			}
 		} else if (getGameType() == GType_ELVIRA2) {
@@ -1432,7 +1432,7 @@
 				srcWidth = _screenWidth;
 			} else {
 				_system->unlockScreen();
-				_lockWord &= ~0x20;
+				_videoLockOut &= ~0x20;
 				return;
 			}
 		} else if (getGameType() == GType_ELVIRA1) {
@@ -1480,7 +1480,7 @@
 		_system->unlockScreen();
 	}
 
-	_lockWord &= ~0x20;
+	_videoLockOut &= ~0x20;
 }
 
 // Personal Nightmare specific

Modified: scummvm/trunk/engines/agos/icons.cpp
===================================================================
--- scummvm/trunk/engines/agos/icons.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/icons.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -196,7 +196,7 @@
 	byte *dst;
 	byte *src;
 
-	_lockWord |= 0x8000;
+	_videoLockOut |= 0x8000;
 
 	Graphics::Surface *screen = _system->lockScreen();
 	dst = (byte *)screen->pixels;
@@ -215,14 +215,14 @@
 
 	_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 @@
 
 	_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 @@
 
 	_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 @@
 
 	_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 @@
 
 	_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 @@
 
 	_system->unlockScreen();
 
-	_lockWord &= ~0x8000;
+	_videoLockOut &= ~0x8000;
 }
 
 void AGOSEngine_Feeble::drawIconArray(uint num, Item *itemRef, int line, int classMask) {
@@ -764,7 +764,7 @@
 	ha->window = window;
 	ha->verb = 1;
 
-	_lockWord |= 0x8;
+	_videoLockOut |= 0x8;
 
 	VgaPointersEntry *vpe = &_vgaBufferPointers[1];
 	byte *curVgaFile2Orig = _curVgaFile2;
@@ -778,7 +778,7 @@
 	_curVgaFile2 = curVgaFile2Orig;
 	_windowNum = windowNumOrig;
 
-	_lockWord &= ~0x8;
+	_videoLockOut &= ~0x8;
 }
 
 void AGOSEngine_Waxworks::addArrows(WindowBlock *window, uint8 num) {

Modified: scummvm/trunk/engines/agos/input.cpp
===================================================================
--- scummvm/trunk/engines/agos/input.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/input.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -648,7 +648,7 @@
 		chr = _keyPressed.ascii;
 		if (chr == 8 || chr == 13) {
 			addChar(chr);
-		} else if (!(_lockWord & 0x10)) {
+		} else if (!(_videoLockOut & 0x10)) {
 			if (chr >= 32)
 				addChar(chr);
 		}

Modified: scummvm/trunk/engines/agos/menus.cpp
===================================================================
--- scummvm/trunk/engines/agos/menus.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/menus.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -57,7 +57,7 @@
 void AGOSEngine::restoreMenu() {
 	_wiped = 0;
 
-	_lockWord |= 0x80;
+	_videoLockOut |= 0x80;
 
 	clearVideoWindow(3, 0);
 
@@ -70,8 +70,8 @@
 
 	_windowNum = oldWindowNum;
 
-	_lockWord |= 0x20;
-	_lockWord &= ~0x80;
+	_videoLockOut |= 0x20;
+	_videoLockOut &= ~0x80;
 }
 
 // Elvira 1 specific

Modified: scummvm/trunk/engines/agos/oracle.cpp
===================================================================
--- scummvm/trunk/engines/agos/oracle.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/oracle.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -501,7 +501,7 @@
 	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 @@
 		dst += _screenWidth;
 	}
 
-	_lockWord &= ~0x8000;
+	_videoLockOut &= ~0x8000;
 }
 
 } // End of namespace AGOS

Modified: scummvm/trunk/engines/agos/res_ami.cpp
===================================================================
--- scummvm/trunk/engines/agos/res_ami.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/res_ami.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -146,7 +146,7 @@
 
 	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;
 		}

Modified: scummvm/trunk/engines/agos/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agos/saveload.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/saveload.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -1019,7 +1019,7 @@
 	Common::SeekableReadStream *f = NULL;
 	uint num, item_index, i;
 
-	_lockWord |= 0x100;
+	_videoLockOut |= 0x100;
 
 	if (restartMode) {
 		// Load restart state
@@ -1031,7 +1031,7 @@
 	}
 
 	if (f == NULL) {
-		_lockWord &= ~0x100;
+		_videoLockOut &= ~0x100;
 		return false;
 	}
 
@@ -1043,7 +1043,7 @@
 
 	if (f->readUint32BE() != 0xFFFFFFFF || num != _itemArrayInited - 1) {
 		delete f;
-		_lockWord &= ~0x100;
+		_videoLockOut &= ~0x100;
 		return false;
 	}
 
@@ -1106,7 +1106,7 @@
 
 	_noParentNotify = false;
 
-	_lockWord &= ~0x100;
+	_videoLockOut &= ~0x100;
 
 	return true;
 }
@@ -1118,11 +1118,11 @@
 	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 result = !f->err();
 
 	delete f;
-	_lockWord &= ~0x100;
+	_videoLockOut &= ~0x100;
 
 	return result;
 }
@@ -1195,7 +1195,7 @@
 	Common::SeekableReadStream *f = NULL;
 	uint num, item_index, i, j;
 
-	_lockWord |= 0x100;
+	_videoLockOut |= 0x100;
 
 	if (restartMode) {
 		// Load restart state
@@ -1207,7 +1207,7 @@
 	}
 
 	if (f == NULL) {
-		_lockWord &= ~0x100;
+		_videoLockOut &= ~0x100;
 		return false;
 	}
 
@@ -1225,7 +1225,7 @@
 
 	if (f->readUint32BE() != 0xFFFFFFFF || num != _itemArrayInited - 1) {
 		delete f;
-		_lockWord &= ~0x100;
+		_videoLockOut &= ~0x100;
 		return false;
 	}
 
@@ -1381,7 +1381,7 @@
 
 	_noParentNotify = false;
 
-	_lockWord &= ~0x100;
+	_videoLockOut &= ~0x100;
 
 	return true;
 }
@@ -1393,11 +1393,11 @@
 	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 result = !f->err();
 
 	delete f;
-	_lockWord &= ~0x100;
+	_videoLockOut &= ~0x100;
 
 	return result;
 }

Modified: scummvm/trunk/engines/agos/script.cpp
===================================================================
--- scummvm/trunk/engines/agos/script.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/script.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -495,7 +495,7 @@
 
 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_restartAnimation() {
 	// 89: restart animation
-	_lockWord &= ~0x10;
+	_videoLockOut &= ~0x10;
 }
 
 void AGOSEngine::o_getParent() {
@@ -570,7 +570,7 @@
 	// 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 @@
 		_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::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) {

Modified: scummvm/trunk/engines/agos/script_e1.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_e1.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/script_e1.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -738,9 +738,9 @@
 	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() {

Modified: scummvm/trunk/engines/agos/script_pn.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_pn.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/script_pn.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -127,7 +127,7 @@
 #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 @@
 	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_opcode62() {
 	int32 zoneNum = varval();
 
-	_lockWord |= 0x80;
+	_videoLockOut |= 0x80;
 
 	vc29_stopAllSounds();
 
@@ -650,7 +650,7 @@
 	_copyScnFlag = 0;
 	_vgaSpriteChanged = 0;
 
-	_lockWord &= ~0x80;
+	_videoLockOut &= ~0x80;
 
 	setScriptReturn(true);
 }
@@ -662,7 +662,7 @@
 			setScriptReturn(inventoryOn(varval()));
 			break;
 		case 64:
-			setScriptReturn((_lockWord & 0x10) != 0);
+			setScriptReturn((_videoLockOut & 0x10) != 0);
 			break;
 		case 63:
 			setScriptReturn(inventoryOff());
@@ -674,10 +674,10 @@
 
 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::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 @@
 			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 @@
 	_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 @@
 			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 @@
 
 	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 @@
 
 	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 @@
 	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 @@
 	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 @@
 		junkstack();
 
 	if (_stackbase == NULL)
-		error("Stack underflow or unknown longjmp");
+		error("popstack: Stack underflow or unknown longjmp");
 
 	_linct = _stackbase->ll;
 	_linebase = _stackbase->lbase;

Modified: scummvm/trunk/engines/agos/script_s1.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_s1.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/script_s1.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -300,9 +300,9 @@
 		_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 @@
 	// 182: load beard
 	if (_beardLoaded == false) {
 		_beardLoaded = true;
-		_lockWord |= 0x8000;
+		_videoLockOut |= 0x8000;
 		loadVGABeardFile(328);
-		_lockWord &= ~0x8000;
+		_videoLockOut &= ~0x8000;
 	}
 }
 
@@ -539,9 +539,9 @@
 	// 183: unload beard
 	if (_beardLoaded == true) {
 		_beardLoaded = false;
-		_lockWord |= 0x8000;
+		_videoLockOut |= 0x8000;
 		loadVGABeardFile(23);
-		_lockWord &= ~0x8000;
+		_videoLockOut &= ~0x8000;
 	}
 }
 
@@ -591,9 +591,9 @@
 }
 
 void AGOSEngine::scriptMouseOff() {
-	_lockWord |= 0x8000;
+	_videoLockOut |= 0x8000;
 	vc34_setMouseOff();
-	_lockWord &= ~0x8000;
+	_videoLockOut &= ~0x8000;
 }
 
 } // End of namespace AGOS

Modified: scummvm/trunk/engines/agos/script_s2.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_s2.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/script_s2.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -316,9 +316,9 @@
 	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 @@
 	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) {

Modified: scummvm/trunk/engines/agos/string.cpp
===================================================================
--- scummvm/trunk/engines/agos/string.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/string.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -1519,7 +1519,7 @@
 	strPtr1[1] = 13;
 	strPtr1[2] = 0;
 
-	if (_lockWord & 0x10) {
+	if (_videoLockOut & 0x10) {
 		strPtr1 = origPtr;
 		count = 6;
 		while (strPtr1[0] != 0) {

Modified: scummvm/trunk/engines/agos/verb.cpp
===================================================================
--- scummvm/trunk/engines/agos/verb.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/verb.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -964,7 +964,7 @@
 	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 @@
 
 	_system->unlockScreen();
 
-	_lockWord &= ~0x8000;
+	_videoLockOut &= ~0x8000;
 }
 
 // Personal Nightmare specific
@@ -1119,7 +1119,7 @@
 				hitBox5(ha);
 			else if (ha->flags & kOBFRoomBox)
 				hitBox6(ha);
-		} else if (_lockWord & 10) {
+		} else if (_videoLockOut & 10) {
 			hitBox8(ha);
 		}
 	} else {
@@ -1163,7 +1163,7 @@
 		return;
 
 	uint16 num = ha->msg1 & ~0x8000;
-	if ((_lockWord & 0x10) && !(ha->flags & (kOBFInventoryBox | kOBFRoomBox)) &&
+	if ((_videoLockOut & 0x10) && !(ha->flags & (kOBFInventoryBox | kOBFRoomBox)) &&
 		!testContainer(num)) {
 		return;
 	}

Modified: scummvm/trunk/engines/agos/vga.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/vga.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -171,7 +171,7 @@
 			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 @@
 	VgaSleepStruct *vfs;
 	VgaTimerEntry *vte, *vte2;
 
-	_lockWord |= 8;
+	_videoLockOut |= 8;
 
 	_lastVgaWaitFor = 0;
 
@@ -1157,7 +1157,7 @@
 		}
 	}
 
-	if (_lockWord & 0x20) {
+	if (_videoLockOut & 0x20) {
 		AnimTable *animTable = _screenAnim1;
 		while (animTable->srcPtr) {
 			animTable->srcPtr = 0;
@@ -1171,7 +1171,7 @@
 	if (getGameType() == GType_FF || getGameType() == GType_PP)
 		setBitFlag(42, true);
 
-	_lockWord &= ~8;
+	_videoLockOut &= ~8;
 }
 
 void AGOSEngine::vc28_playSFX() {
@@ -1361,7 +1361,7 @@
 	palptr[2] = ((color & 0x00f) >> 0) * 32;
 	palptr[3] = 0;
 
-	if (!(_lockWord & 0x20)) {
+	if (!(_videoLockOut & 0x20)) {
 		_paletteFlag = 1;
 		_displayScreen++;
 	}

Modified: scummvm/trunk/engines/agos/vga_pn.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga_pn.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/vga_pn.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -93,7 +93,7 @@
 	bool oldWiped = _wiped;
 	_wiped = 0;
 
-	_lockWord |= 8;
+	_videoLockOut |= 8;
 
 	windowPutChar(_windowArray[2], 13);
 
@@ -112,7 +112,7 @@
 	windowPutChar(_windowArray[2], 128);
 	_wiped = oldWiped;
 
-	_lockWord &= ~8;
+	_videoLockOut &= ~8;
 }
 
 void AGOSEngine::vc39_volume() {

Modified: scummvm/trunk/engines/agos/window.cpp
===================================================================
--- scummvm/trunk/engines/agos/window.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/window.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -126,7 +126,7 @@
 	byte *dst;
 	uint16 h, w;
 
-	_lockWord |= 0x8000;
+	_videoLockOut |= 0x8000;
 
 	dst = getBackGround() + _dxSurfacePitch * window->y + window->x;
 
@@ -138,7 +138,7 @@
 		dst += _screenWidth;
 	}
 
-	_lockWord &= ~0x8000;
+	_videoLockOut &= ~0x8000;
 }
 
 void AGOSEngine::colorWindow(WindowBlock *window) {
@@ -168,7 +168,7 @@
 }
 
 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 @@
 
 	_system->unlockScreen();
 
-	_lockWord &= ~0x8000;
+	_videoLockOut &= ~0x8000;
 }
 
 void AGOSEngine::resetWindow(WindowBlock *window) {
@@ -194,7 +194,7 @@
 }
 
 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 @@
 		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) {

Modified: scummvm/trunk/engines/agos/zones.cpp
===================================================================
--- scummvm/trunk/engines/agos/zones.cpp	2009-03-08 09:53:52 UTC (rev 39218)
+++ scummvm/trunk/engines/agos/zones.cpp	2009-03-08 10:08:09 UTC (rev 39219)
@@ -146,7 +146,7 @@
 void AGOSEngine::checkRunningAnims() {
 	VgaSprite *vsp;
 	if (getGameType() != GType_FF && getGameType() != GType_PP &&
-		(_lockWord & 0x20)) {
+		(_videoLockOut & 0x20)) {
 		return;
 	}
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list