[Scummvm-cvs-logs] CVS: scummvm/gob cdrom.cpp,1.5,1.6 dataio.cpp,1.12,1.13 draw.cpp,1.16,1.17 draw.h,1.7,1.8 game.cpp,1.30,1.31 global.cpp,1.10,1.11 global.h,1.9,1.10 gob.cpp,1.28,1.29 gob.h,1.12,1.13 goblin.cpp,1.26,1.27 init.cpp,1.13,1.14 init.h,1.5,1.6 inter.cpp,1.27,1.28 mult.cpp,1.14,1.15 palanim.cpp,1.13,1.14 parse.cpp,1.16,1.17 scenery.cpp,1.21,1.22 sound.cpp,1.14,1.15 sound.h,1.10,1.11 util.cpp,1.19,1.20 video.cpp,1.17,1.18

Eugene Sandulenko sev at users.sourceforge.net
Tue Jan 3 17:49:01 CET 2006


Update of /cvsroot/scummvm/scummvm/gob
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9928

Modified Files:
	cdrom.cpp dataio.cpp draw.cpp draw.h game.cpp global.cpp 
	global.h gob.cpp gob.h goblin.cpp init.cpp init.h inter.cpp 
	mult.cpp palanim.cpp parse.cpp scenery.cpp sound.cpp sound.h 
	util.cpp video.cpp 
Log Message:
Last chunk of underscore maddness for today


Index: cdrom.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/cdrom.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cdrom.cpp	3 Jan 2006 23:14:39 -0000	1.5
+++ cdrom.cpp	4 Jan 2006 01:48:14 -0000	1.6
@@ -143,7 +143,7 @@
 	for (int i = 0; i < ARRAYSIZE(tracks); i++)
 		if (!scumm_stricmp(_vm->_game->curTotFile, tracks[i][0])) {
 			_cdPlaying = true;
-			startTrack(tracks[i][_vm->_global->language + 1]);
+			startTrack(tracks[i][_vm->_global->_language + 1]);
 			break;
 		}
 }

Index: dataio.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/dataio.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- dataio.cpp	3 Jan 2006 23:14:39 -0000	1.12
+++ dataio.cpp	4 Jan 2006 01:48:14 -0000	1.13
@@ -30,7 +30,7 @@
 }
 
 Common::File *DataIO::file_getHandle(int16 handle) {
-	return &_vm->_global->filesHandles[handle];
+	return &_vm->_global->_filesHandles[handle];
 }
 
 int16 DataIO::file_open(const char *path, Common::File::AccessMode mode) {
@@ -58,28 +58,28 @@
 	struct ChunkDesc *dataDesc;
 
 	for (file = 0; file < MAX_DATA_FILES; file++) {
-		if (_vm->_global->dataFiles[file] == 0)
+		if (_vm->_global->_dataFiles[file] == 0)
 			return -1;
 
 		for (slot = 0; slot < MAX_SLOT_COUNT; slot++)
-			if (_vm->_global->chunkPos[file * MAX_SLOT_COUNT + slot] == -1)
+			if (_vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot] == -1)
 				break;
 
 		if (slot == MAX_SLOT_COUNT)
 			return -1;
 
-		dataDesc = _vm->_global->dataFiles[file];
-		for (chunk = 0; chunk < _vm->_global->numDataChunks[file];
+		dataDesc = _vm->_global->_dataFiles[file];
+		for (chunk = 0; chunk < _vm->_global->_numDataChunks[file];
 		    chunk++, dataDesc++) {
 			if (scumm_stricmp(chunkName, dataDesc->chunkName) != 0)
 				continue;
 
-			_vm->_global->isCurrentSlot[file * MAX_SLOT_COUNT + slot] = 0;
-			_vm->_global->chunkSize[file * MAX_SLOT_COUNT + slot] =
+			_vm->_global->_isCurrentSlot[file * MAX_SLOT_COUNT + slot] = 0;
+			_vm->_global->_chunkSize[file * MAX_SLOT_COUNT + slot] =
 			    dataDesc->size;
-			_vm->_global->chunkOffset[file * MAX_SLOT_COUNT + slot] =
+			_vm->_global->_chunkOffset[file * MAX_SLOT_COUNT + slot] =
 			    dataDesc->offset;
-			_vm->_global->chunkPos[file * MAX_SLOT_COUNT + slot] = 0;
+			_vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot] = 0;
 			return file * 10 + slot + 50;
 		}
 	}
@@ -89,7 +89,7 @@
 char DataIO::freeChunk(int16 handle) {
 	if (handle >= 50 && handle < 100) {
 		handle -= 50;
-		_vm->_global->chunkPos[(handle / 10) * MAX_SLOT_COUNT + (handle % 10)] = -1;
+		_vm->_global->_chunkPos[(handle / 10) * MAX_SLOT_COUNT + (handle % 10)] = -1;
 		return 0;
 	}
 	return 1;
@@ -106,26 +106,26 @@
 
 	file = (handle - 50) / 10;
 	slot = (handle - 50) % 10;
-	if (_vm->_global->isCurrentSlot[file * MAX_SLOT_COUNT + slot] == 0) {
+	if (_vm->_global->_isCurrentSlot[file * MAX_SLOT_COUNT + slot] == 0) {
 		for (i = 0; i < MAX_SLOT_COUNT; i++)
-			_vm->_global->isCurrentSlot[file * MAX_SLOT_COUNT + i] = 0;
+			_vm->_global->_isCurrentSlot[file * MAX_SLOT_COUNT + i] = 0;
 
 		offset =
-		    _vm->_global->chunkOffset[file * MAX_SLOT_COUNT + slot] +
-		    _vm->_global->chunkPos[file * MAX_SLOT_COUNT + slot];
-		debug(7, "seek: %ld, %ld", _vm->_global->chunkOffset[file * MAX_SLOT_COUNT + slot], _vm->_global->chunkPos[file * MAX_SLOT_COUNT + slot]);
-		file_getHandle(_vm->_global->dataFileHandles[file])->seek(offset, SEEK_SET);
+		    _vm->_global->_chunkOffset[file * MAX_SLOT_COUNT + slot] +
+		    _vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot];
+		debug(7, "seek: %ld, %ld", _vm->_global->_chunkOffset[file * MAX_SLOT_COUNT + slot], _vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot]);
+		file_getHandle(_vm->_global->_dataFileHandles[file])->seek(offset, SEEK_SET);
 	}
 
-	_vm->_global->isCurrentSlot[file * MAX_SLOT_COUNT + slot] = 1;
-	if (_vm->_global->chunkPos[file * MAX_SLOT_COUNT + slot] + size >
-	    _vm->_global->chunkSize[file * MAX_SLOT_COUNT + slot])
+	_vm->_global->_isCurrentSlot[file * MAX_SLOT_COUNT + slot] = 1;
+	if (_vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot] + size >
+	    _vm->_global->_chunkSize[file * MAX_SLOT_COUNT + slot])
 		size =
-		    _vm->_global->chunkSize[file * MAX_SLOT_COUNT + slot] -
-		    _vm->_global->chunkPos[file * MAX_SLOT_COUNT + slot];
+		    _vm->_global->_chunkSize[file * MAX_SLOT_COUNT + slot] -
+		    _vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot];
 
-	file_getHandle(_vm->_global->dataFileHandles[file])->read(buf, size);
-	_vm->_global->chunkPos[file * MAX_SLOT_COUNT + slot] += size;
+	file_getHandle(_vm->_global->_dataFileHandles[file])->read(buf, size);
+	_vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot] += size;
 	return size;
 }
 
@@ -138,13 +138,13 @@
 
 	file = (handle - 50) / 10;
 	slot = (handle - 50) % 10;
-	_vm->_global->isCurrentSlot[file * MAX_SLOT_COUNT + slot] = 0;
+	_vm->_global->_isCurrentSlot[file * MAX_SLOT_COUNT + slot] = 0;
 	if (from == SEEK_SET)
-		_vm->_global->chunkPos[file * MAX_SLOT_COUNT + slot] = pos;
+		_vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot] = pos;
 	else
-		_vm->_global->chunkPos[file * MAX_SLOT_COUNT + slot] += pos;
+		_vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot] += pos;
 
-	return _vm->_global->chunkPos[file * MAX_SLOT_COUNT + slot];
+	return _vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot];
 }
 
 int32 DataIO::getChunkSize(const char *chunkName) {
@@ -155,26 +155,26 @@
 	int32 realSize;
 
 	for (file = 0; file < MAX_DATA_FILES; file++) {
-		if (_vm->_global->dataFiles[file] == 0)
+		if (_vm->_global->_dataFiles[file] == 0)
 			return -1;
 
-		dataDesc = _vm->_global->dataFiles[file];
-		for (chunk = 0; chunk < _vm->_global->numDataChunks[file];
+		dataDesc = _vm->_global->_dataFiles[file];
+		for (chunk = 0; chunk < _vm->_global->_numDataChunks[file];
 		    chunk++, dataDesc++) {
 			if (scumm_stricmp(chunkName, dataDesc->chunkName) != 0)
 				continue;
 
 			if (dataDesc->packed == 0) {
-				_vm->_global->packedSize = -1;
+				_vm->_global->_packedSize = -1;
 				return dataDesc->size;
 			}
 
 			for (slot = 0; slot < MAX_SLOT_COUNT; slot++)
-				_vm->_global->isCurrentSlot[slot] = 0;
+				_vm->_global->_isCurrentSlot[slot] = 0;
 
-			file_getHandle(_vm->_global->dataFileHandles[file])->seek(dataDesc->offset, SEEK_SET);
-			realSize = file_getHandle(_vm->_global->dataFileHandles[file])->readUint32LE();
-			_vm->_global->packedSize = dataDesc->size;
+			file_getHandle(_vm->_global->_dataFileHandles[file])->seek(dataDesc->offset, SEEK_SET);
+			realSize = file_getHandle(_vm->_global->_dataFileHandles[file])->readUint32LE();
+			_vm->_global->_packedSize = dataDesc->size;
 			return realSize;
 		}
 	}
@@ -193,46 +193,46 @@
 		strcat(path, ".stk");
 
 	for (file = 0; file < MAX_DATA_FILES; file++)
-		if (_vm->_global->dataFiles[file] == 0)
+		if (_vm->_global->_dataFiles[file] == 0)
 			break;
 
 	if (file == MAX_DATA_FILES)
 		error("dataFileOpen: Data file slots are full\n");
-	_vm->_global->dataFileHandles[file] = file_open(path);
+	_vm->_global->_dataFileHandles[file] = file_open(path);
 
-	if (_vm->_global->dataFileHandles[file] == -1)
+	if (_vm->_global->_dataFileHandles[file] == -1)
 		error("dataFileOpen: Can't open %s data file\n", path);
 
-	_vm->_global->numDataChunks[file] = file_getHandle(_vm->_global->dataFileHandles[file])->readUint16LE();
+	_vm->_global->_numDataChunks[file] = file_getHandle(_vm->_global->_dataFileHandles[file])->readUint16LE();
 
-	debug(7, "DataChunks: %d [for %s]", _vm->_global->numDataChunks[file], path);
+	debug(7, "DataChunks: %d [for %s]", _vm->_global->_numDataChunks[file], path);
 
-	_vm->_global->dataFiles[file] = dataDesc =
+	_vm->_global->_dataFiles[file] = dataDesc =
 	    (struct ChunkDesc *)malloc(sizeof(struct ChunkDesc) *
-	    _vm->_global->numDataChunks[file]);
+	    _vm->_global->_numDataChunks[file]);
 
-	for (i = 0; i < _vm->_global->numDataChunks[file]; i++) {
-		file_getHandle(_vm->_global->dataFileHandles[file])->read(dataDesc[i].chunkName, 13);
-		dataDesc[i].size = file_getHandle(_vm->_global->dataFileHandles[file])->readUint32LE();
-		dataDesc[i].offset = file_getHandle(_vm->_global->dataFileHandles[file])->readUint32LE();
-		dataDesc[i].packed = file_getHandle(_vm->_global->dataFileHandles[file])->readByte();
+	for (i = 0; i < _vm->_global->_numDataChunks[file]; i++) {
+		file_getHandle(_vm->_global->_dataFileHandles[file])->read(dataDesc[i].chunkName, 13);
+		dataDesc[i].size = file_getHandle(_vm->_global->_dataFileHandles[file])->readUint32LE();
+		dataDesc[i].offset = file_getHandle(_vm->_global->_dataFileHandles[file])->readUint32LE();
+		dataDesc[i].packed = file_getHandle(_vm->_global->_dataFileHandles[file])->readByte();
 	}
 
-	for (i = 0; i < _vm->_global->numDataChunks[file]; i++)
+	for (i = 0; i < _vm->_global->_numDataChunks[file]; i++)
 		debug(7, "%d: %s %d", i, dataDesc[i].chunkName, dataDesc[i].size);
 
 	for (i = 0; i < MAX_SLOT_COUNT; i++)
-		_vm->_global->chunkPos[file * MAX_SLOT_COUNT + i] = -1;
+		_vm->_global->_chunkPos[file * MAX_SLOT_COUNT + i] = -1;
 
 }
 
 void DataIO::closeDataFile() {
 	int16 file;
 	for (file = MAX_DATA_FILES - 1; file >= 0; file--) {
-		if (_vm->_global->dataFiles[file] != 0) {
-			free(_vm->_global->dataFiles[file]);
-			_vm->_global->dataFiles[file] = 0;
-			file_getHandle(_vm->_global->dataFileHandles[file])->close();
+		if (_vm->_global->_dataFiles[file] != 0) {
+			free(_vm->_global->_dataFiles[file]);
+			_vm->_global->_dataFiles[file] = 0;
+			file_getHandle(_vm->_global->_dataFileHandles[file])->close();
 			return;
 		}
 	}
@@ -247,7 +247,7 @@
 	int32 sizeLeft;
 
 	realSize = getChunkSize(name);
-	if (_vm->_global->packedSize == -1 || realSize == -1)
+	if (_vm->_global->_packedSize == -1 || realSize == -1)
 		return 0;
 
 	chunk = getChunk(name);
@@ -258,13 +258,13 @@
 	if (unpackBuf == 0)
 		return 0;
 
-	packBuf = (char *)malloc(_vm->_global->packedSize);
+	packBuf = (char *)malloc(_vm->_global->_packedSize);
 	if (packBuf == 0) {
 		free(unpackBuf);
 		return 0;
 	}
 
-	sizeLeft = _vm->_global->packedSize;
+	sizeLeft = _vm->_global->_packedSize;
 	ptr = packBuf;
 	while (sizeLeft > 0x4000) {
 		readChunk(chunk, ptr, 0x4000);

Index: draw.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/draw.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- draw.cpp	4 Jan 2006 01:23:20 -0000	1.16
+++ draw.cpp	4 Jan 2006 01:48:14 -0000	1.17
@@ -257,14 +257,14 @@
 		return;
 	}
 
-	_vm->_global->doRangeClamp = 0;
+	_vm->_global->_doRangeClamp = 0;
 	for (i = 0; i < invalidatedCount; i++) {
 		_vm->_video->drawSprite(backSurface, frontSurface,
 		    invalidatedLefts[i], invalidatedTops[i],
 		    invalidatedRights[i], invalidatedBottoms[i],
 		    invalidatedLefts[i], invalidatedTops[i], 0);
 	}
-	_vm->_global->doRangeClamp = 1;
+	_vm->_global->_doRangeClamp = 1;
 
 	invalidatedCount = 0;
 	noInvalidated = 1;
@@ -272,14 +272,14 @@
 }
 
 void Draw::setPalette(void) {
-	if (_vm->_global->videoMode != 0x13)
+	if (_vm->_global->_videoMode != 0x13)
 		error("setPalette: Video mode 0x%x is not supported!\n",
-		    _vm->_global->videoMode);
+		    _vm->_global->_videoMode);
 
-	_vm->_global->pPaletteDesc->unused1 = unusedPalette1;
-	_vm->_global->pPaletteDesc->unused2 = unusedPalette2;
-	_vm->_global->pPaletteDesc->vgaPal = vgaPalette;
-	_vm->_video->setFullPalette(_vm->_global->pPaletteDesc);
+	_vm->_global->_pPaletteDesc->unused1 = unusedPalette1;
+	_vm->_global->_pPaletteDesc->unused2 = unusedPalette2;
+	_vm->_global->_pPaletteDesc->vgaPal = vgaPalette;
+	_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
 	paletteCleared = 0;
 }
 
@@ -603,16 +603,16 @@
 			if (ptr->flags & 0xfff0)
 				continue;
 
-			if (ptr->left > _vm->_global->inter_mouseX)
+			if (ptr->left > _vm->_global->_inter_mouseX)
 				continue;
 
-			if (ptr->right < _vm->_global->inter_mouseX)
+			if (ptr->right < _vm->_global->_inter_mouseX)
 				continue;
 
-			if (ptr->top > _vm->_global->inter_mouseY)
+			if (ptr->top > _vm->_global->_inter_mouseY)
 				continue;
 
-			if (ptr->bottom < _vm->_global->inter_mouseY)
+			if (ptr->bottom < _vm->_global->_inter_mouseY)
 				continue;
 
 			if ((ptr->flags & 0xf) < 3)
@@ -655,8 +655,8 @@
 			cursorAnim = cursorAnimLow[gcursorIndex];
 		}
 
-		newX = _vm->_global->inter_mouseX;
-		newY = _vm->_global->inter_mouseY;
+		newX = _vm->_global->_inter_mouseX;
+		newY = _vm->_global->_inter_mouseY;
 		if (cursorXDeltaVar != -1) {
 			newX -= (uint16)VAR_OFFSET(gcursorIndex * 4 + (cursorXDeltaVar / 4) * 4);
 			newY -= (uint16)VAR_OFFSET(gcursorIndex * 4 + (cursorYDeltaVar / 4) * 4);
@@ -681,7 +681,7 @@
 			blitInvalidated();
 			gcursorIndex = cursorIndex;
 		} else {
-			_vm->_video->waitRetrace(_vm->_global->videoMode);
+			_vm->_video->waitRetrace(_vm->_global->_videoMode);
 		}
 
 		_vm->_video->drawSprite(backSurface, frontSurface,
@@ -705,7 +705,7 @@
 	byte cmd;
 	char *palPtr;
 
-	cmd = *_vm->_global->inter_execPtr++;
+	cmd = *_vm->_global->_inter_execPtr++;
 	applyPal = 0;
 	if (cmd & 0x80)
 		cmd &= 0x7f;
@@ -715,40 +715,40 @@
 	if (cmd == 49) {
 		warning("inter_palLoad: cmd == 49 is not supported");
 		//var_B = 1;
-		for (i = 0; i < 18; i++, _vm->_global->inter_execPtr++) {
+		for (i = 0; i < 18; i++, _vm->_global->_inter_execPtr++) {
 			if (i < 2) {
 				if (applyPal == 0)
 					continue;
 
-				unusedPalette1[i] = *_vm->_global->inter_execPtr;
+				unusedPalette1[i] = *_vm->_global->_inter_execPtr;
 				continue;
 			}
 			//if (*inter_execPtr != 0)
 			//      var_B = 0;
 
-			ind1 = *_vm->_global->inter_execPtr >> 4;
-			ind2 = (*_vm->_global->inter_execPtr & 0xf);
+			ind1 = *_vm->_global->_inter_execPtr >> 4;
+			ind2 = (*_vm->_global->_inter_execPtr & 0xf);
 
 			unusedPalette1[i] =
 			    ((palLoadData1[ind1] + palLoadData2[ind2]) << 8) +
 			    (palLoadData2[ind1] + palLoadData1[ind2]);
 		}
 
-		_vm->_global->pPaletteDesc->unused1 = unusedPalette1;
+		_vm->_global->_pPaletteDesc->unused1 = unusedPalette1;
 	}
 
 	switch (cmd) {
 	case 52:
-		for (i = 0; i < 16; i++, _vm->_global->inter_execPtr += 3) {
-			vgaSmallPalette[i].red = _vm->_global->inter_execPtr[0];
-			vgaSmallPalette[i].green = _vm->_global->inter_execPtr[1];
-			vgaSmallPalette[i].blue = _vm->_global->inter_execPtr[2];
+		for (i = 0; i < 16; i++, _vm->_global->_inter_execPtr += 3) {
+			vgaSmallPalette[i].red = _vm->_global->_inter_execPtr[0];
+			vgaSmallPalette[i].green = _vm->_global->_inter_execPtr[1];
+			vgaSmallPalette[i].blue = _vm->_global->_inter_execPtr[2];
 		}
 		break;
 
 	case 50:
-		for (i = 0; i < 16; i++, _vm->_global->inter_execPtr++)
-			unusedPalette2[i] = *_vm->_global->inter_execPtr;
+		for (i = 0; i < 16; i++, _vm->_global->_inter_execPtr++)
+			unusedPalette2[i] = *_vm->_global->_inter_execPtr;
 		break;
 
 	case 53:
@@ -761,15 +761,15 @@
 		break;
 	}
 	if (!applyPal) {
-		_vm->_global->pPaletteDesc->unused2 = unusedPalette2;
-		_vm->_global->pPaletteDesc->unused1 = unusedPalette1;
+		_vm->_global->_pPaletteDesc->unused2 = unusedPalette2;
+		_vm->_global->_pPaletteDesc->unused1 = unusedPalette1;
 
-		if (_vm->_global->videoMode != 0x13)
-			_vm->_global->pPaletteDesc->vgaPal = (Video::Color *)vgaSmallPalette;
+		if (_vm->_global->_videoMode != 0x13)
+			_vm->_global->_pPaletteDesc->vgaPal = (Video::Color *)vgaSmallPalette;
 		else
-			_vm->_global->pPaletteDesc->vgaPal = (Video::Color *)vgaPalette;
+			_vm->_global->_pPaletteDesc->vgaPal = (Video::Color *)vgaPalette;
 
-		_vm->_palanim->fade((Video::PalDesc *) _vm->_global->pPaletteDesc, 0, 0);
+		_vm->_palanim->fade((Video::PalDesc *) _vm->_global->_pPaletteDesc, 0, 0);
 	}
 }
 
@@ -883,7 +883,7 @@
 			} else if (cmd == 1) {
 				val = READ_LE_UINT16(ptr2 + 18) * 4;
 
-				strcpy(buf, _vm->_global->inter_variables + val);
+				strcpy(buf, _vm->_global->_inter_variables + val);
 			} else {
 				val = READ_LE_UINT16(ptr2 + 18) * 4;
 

Index: draw.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/draw.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- draw.h	3 Jan 2006 23:14:39 -0000	1.7
+++ draw.h	4 Jan 2006 01:48:14 -0000	1.8
@@ -32,92 +32,92 @@
 #define RENDERFLAG_USEDELTAS 	0x10
 
 class Draw {
-	public:
-		typedef struct FontToSprite {
-			int8 sprite;
-			int8 base;
-			int8 width;
-			int8 height;
-			FontToSprite() : sprite(0), base(0), width(0), height() {}
-		} FontToSprite;
+public:
+	typedef struct FontToSprite {
+		int8 sprite;
+		int8 base;
+		int8 width;
+		int8 height;
+		FontToSprite() : sprite(0), base(0), width(0), height() {}
+	} FontToSprite;
 
-		int16 fontIndex;
-		int16 spriteLeft;
-		int16 spriteTop;
-		int16 spriteRight;
-		int16 spriteBottom;
-		int16 destSpriteX;
-		int16 destSpriteY;
-		int16 backColor;
-		int16 frontColor;
-		char letterToPrint;
-		FontToSprite fontToSprite[4];
-		int16 destSurface;
-		int16 sourceSurface;
-		int16 renderFlags;
-		int16 backDeltaX;
-		int16 backDeltaY;
-		Video::FontDesc *fonts[4];
-		char *textToPrint;
-		int16 transparency;
-		Video::SurfaceDesc *spritesArray[50];
+	int16 fontIndex;
+	int16 spriteLeft;
+	int16 spriteTop;
+	int16 spriteRight;
+	int16 spriteBottom;
+	int16 destSpriteX;
+	int16 destSpriteY;
+	int16 backColor;
+	int16 frontColor;
+	char letterToPrint;
+	FontToSprite fontToSprite[4];
+	int16 destSurface;
+	int16 sourceSurface;
+	int16 renderFlags;
+	int16 backDeltaX;
+	int16 backDeltaY;
+	Video::FontDesc *fonts[4];
+	char *textToPrint;
+	int16 transparency;
+	Video::SurfaceDesc *spritesArray[50];
 
-		int16 invalidatedCount;
-		int16 invalidatedTops[30];
-		int16 invalidatedLefts[30];
-		int16 invalidatedRights[30];
-		int16 invalidatedBottoms[30];
+	int16 invalidatedCount;
+	int16 invalidatedTops[30];
+	int16 invalidatedLefts[30];
+	int16 invalidatedRights[30];
+	int16 invalidatedBottoms[30];
 
-		int8 noInvalidated;
-//		int8 doFullFlip; // Never used?!?
-		int8 paletteCleared;
+	int8 noInvalidated;
+//	int8 doFullFlip; // Never used?!?
+	int8 paletteCleared;
 
-		int16 gcursorIndex;
-		int16 transparentCursor;
-		uint32 cursorTimeKey;
+	int16 gcursorIndex;
+	int16 transparentCursor;
+	uint32 cursorTimeKey;
 
-		Video::SurfaceDesc *backSurface;
-		Video::SurfaceDesc *frontSurface;
+	Video::SurfaceDesc *backSurface;
+	Video::SurfaceDesc *frontSurface;
 
-		int16 unusedPalette1[18];
-		int16 unusedPalette2[16];
-		Video::Color vgaPalette[256];
-		Video::Color vgaSmallPalette[16];
+	int16 unusedPalette1[18];
+	int16 unusedPalette2[16];
+	Video::Color vgaPalette[256];
+	Video::Color vgaSmallPalette[16];
 
-		int16 cursorX;
-		int16 cursorY;
-		int16 cursorWidth;
-		int16 cursorHeight;
+	int16 cursorX;
+	int16 cursorY;
+	int16 cursorWidth;
+	int16 cursorHeight;
 
-		int16 cursorXDeltaVar;
-		int16 cursorYDeltaVar;
+	int16 cursorXDeltaVar;
+	int16 cursorYDeltaVar;
 
-		Video::SurfaceDesc *cursorSprites;
-		Video::SurfaceDesc *cursorBack;
-		int16 cursorAnim;
-		int8 cursorAnimLow[40];
-		int8 cursorAnimHigh[40];
-		int8 cursorAnimDelays[40];
-		int8 applyPal;
+	Video::SurfaceDesc *cursorSprites;
+	Video::SurfaceDesc *cursorBack;
+	int16 cursorAnim;
+	int8 cursorAnimLow[40];
+	int8 cursorAnimHigh[40];
+	int8 cursorAnimDelays[40];
+	int8 applyPal;
 
-		int16 palLoadData1[4];
-		int16 palLoadData2[4];
+	int16 palLoadData1[4];
+	int16 palLoadData2[4];
 		
-		void invalidateRect(int16 left, int16 top, int16 right, int16 bottom);
-		void blitInvalidated(void);
-		void setPalette(void);
-		void clearPalette(void);
-		void blitCursor(void);
+	void invalidateRect(int16 left, int16 top, int16 right, int16 bottom);
+	void blitInvalidated(void);
+	void setPalette(void);
+	void clearPalette(void);
+	void blitCursor(void);
 
-		void spriteOperation(int16 operation);
-		void animateCursor(int16 cursor);
-		void interPalLoad(void);
-		void printText(void);
+	void spriteOperation(int16 operation);
+	void animateCursor(int16 cursor);
+	void interPalLoad(void);
+	void printText(void);
 
-		Draw(GobEngine *vm);
+	Draw(GobEngine *vm);
 
-	protected:
-		GobEngine *_vm;
+protected:
+	GobEngine *_vm;
 };
 
 // Draw operations

Index: game.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/game.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- game.cpp	4 Jan 2006 01:23:20 -0000	1.30
+++ game.cpp	4 Jan 2006 01:48:14 -0000	1.31
@@ -277,10 +277,10 @@
 			if ((ptr->flags & 0xff00) != 0)
 				continue;
 
-			if (_vm->_global->inter_mouseX < ptr->left
-			    || _vm->_global->inter_mouseX > ptr->right
-			    || _vm->_global->inter_mouseY < ptr->top
-			    || _vm->_global->inter_mouseY > ptr->bottom)
+			if (_vm->_global->_inter_mouseX < ptr->left
+			    || _vm->_global->_inter_mouseX > ptr->right
+			    || _vm->_global->_inter_mouseY < ptr->top
+			    || _vm->_global->_inter_mouseY > ptr->bottom)
 				continue;
 
 			if (resId != 0)
@@ -299,10 +299,10 @@
 			    && (ptr->flags & 0xf0) >> 4 != 2)
 				continue;
 
-			if (_vm->_global->inter_mouseX < ptr->left
-			    || _vm->_global->inter_mouseX > ptr->right
-			    || _vm->_global->inter_mouseY < ptr->top
-			    || _vm->_global->inter_mouseY > ptr->bottom)
+			if (_vm->_global->_inter_mouseX < ptr->left
+			    || _vm->_global->_inter_mouseX > ptr->right
+			    || _vm->_global->_inter_mouseY < ptr->top
+			    || _vm->_global->_inter_mouseY > ptr->bottom)
 				continue;
 
 			if (resId != 0)
@@ -337,7 +337,7 @@
 	right |= 0xf;
 
 	_vm->_draw->spritesArray[30 + captureCount] =
-	    _vm->_video->initSurfDesc(_vm->_global->videoMode, right - left + 1, height, 0);
+	    _vm->_video->initSurfDesc(_vm->_global->_videoMode, right - left + 1, height, 0);
 
 	_vm->_draw->sourceSurface = 21;
 	_vm->_draw->destSurface = 30 + captureCount;
@@ -413,7 +413,7 @@
 
 	id = _vm->_inter->load16();
 	if (id == -1) {
-		_vm->_global->inter_execPtr += 9;
+		_vm->_global->_inter_execPtr += 9;
 		return;
 	}
 
@@ -463,7 +463,7 @@
 		_vm->_inter->_soundEndTimeKey = 0;
 	}
 
-	if (_vm->_global->useMouse == 0)
+	if (_vm->_global->_useMouse == 0)
 		error("checkKeys: Can't work without mouse!");
 
 	_vm->_util->getMouseState(pMouseX, pMouseY, pButtons);
@@ -501,12 +501,12 @@
 		    &lastCollAreaIndex);
 
 		if (lastCollKey != 0 && (lastCollId & 0x8000) != 0) {
-			savedIP = _vm->_global->inter_execPtr;
-			_vm->_global->inter_execPtr = (char *)totFileData +
+			savedIP = _vm->_global->_inter_execPtr;
+			_vm->_global->_inter_execPtr = (char *)totFileData +
 			    collisionAreas[lastCollAreaIndex].funcEnter;
 
 			_vm->_inter->funcBlock(0);
-			_vm->_global->inter_execPtr = savedIP;
+			_vm->_global->_inter_execPtr = savedIP;
 		}
 	}
 
@@ -547,7 +547,7 @@
 			}
 		}
 
-		key = checkKeys(&_vm->_global->inter_mouseX, &_vm->_global->inter_mouseY,
+		key = checkKeys(&_vm->_global->_inter_mouseX, &_vm->_global->_inter_mouseY,
 							 &mouseButtons, handleMouse);
 
 		if (handleMouse == 0 && mouseButtons != 0) {
@@ -568,12 +568,12 @@
 
 			if (lastCollKey != 0 &&
 			    collisionAreas[lastCollAreaIndex].funcLeave != 0) {
-				savedIP = _vm->_global->inter_execPtr;
-				_vm->_global->inter_execPtr = (char *)totFileData +
+				savedIP = _vm->_global->_inter_execPtr;
+				_vm->_global->_inter_execPtr = (char *)totFileData +
 				    collisionAreas[lastCollAreaIndex].funcLeave;
 
 				_vm->_inter->funcBlock(0);
-				_vm->_global->inter_execPtr = savedIP;
+				_vm->_global->_inter_execPtr = savedIP;
 			}
 
 			lastCollKey = 0;
@@ -609,13 +609,13 @@
 
 					if (lastCollKey != 0 &&
 						collisionAreas[lastCollAreaIndex].funcLeave != 0) {
-						savedIP = _vm->_global->inter_execPtr;
-						_vm->_global->inter_execPtr =
+						savedIP = _vm->_global->_inter_execPtr;
+						_vm->_global->_inter_execPtr =
 						    (char *)totFileData +
 						    collisionAreas[lastCollAreaIndex].funcLeave;
 
 						_vm->_inter->funcBlock(0);
-						_vm->_global->inter_execPtr = savedIP;
+						_vm->_global->_inter_execPtr = savedIP;
 					}
 					lastCollKey = 0;
 					return key;
@@ -623,13 +623,13 @@
 
 				if (lastCollKey != 0 &&
 				    collisionAreas[lastCollAreaIndex].funcLeave != 0) {
-					savedIP = _vm->_global->inter_execPtr;
-					_vm->_global->inter_execPtr =
+					savedIP = _vm->_global->_inter_execPtr;
+					_vm->_global->_inter_execPtr =
 					    (char *)totFileData +
 					    collisionAreas[lastCollAreaIndex].funcLeave;
 
 					_vm->_inter->funcBlock(0);
-					_vm->_global->inter_execPtr = savedIP;
+					_vm->_global->_inter_execPtr = savedIP;
 				}
 
 				lastCollKey =
@@ -638,19 +638,19 @@
 
 				if (lastCollKey != 0
 				    && (lastCollId & 0x8000) != 0) {
-					savedIP = _vm->_global->inter_execPtr;
-					_vm->_global->inter_execPtr =
+					savedIP = _vm->_global->_inter_execPtr;
+					_vm->_global->_inter_execPtr =
 					    (char *)totFileData +
 					    collisionAreas[lastCollAreaIndex].funcEnter;
 
 					_vm->_inter->funcBlock(0);
-					_vm->_global->inter_execPtr = savedIP;
+					_vm->_global->_inter_execPtr = savedIP;
 				}
 			} else {
 
 				if (handleMouse != 0 &&
-				    (_vm->_global->inter_mouseX != _vm->_draw->cursorX
-					|| _vm->_global->inter_mouseY != _vm->_draw->cursorY)) {
+				    (_vm->_global->_inter_mouseX != _vm->_draw->cursorX
+					|| _vm->_global->_inter_mouseY != _vm->_draw->cursorY)) {
 					oldIndex = lastCollAreaIndex;
 					oldId = lastCollId;
 
@@ -662,22 +662,22 @@
 					if (key != lastCollKey) {
 						if (lastCollKey != 0
 						    && (oldId & 0x8000) != 0) {
-							savedIP = _vm->_global->inter_execPtr;
-							_vm->_global->inter_execPtr = (char *)totFileData +
+							savedIP = _vm->_global->_inter_execPtr;
+							_vm->_global->_inter_execPtr = (char *)totFileData +
 							    collisionAreas[oldIndex].funcLeave;
 
 							_vm->_inter->funcBlock(0);
-							_vm->_global->inter_execPtr = savedIP;
+							_vm->_global->_inter_execPtr = savedIP;
 						}
 
 						lastCollKey = key;
 						if (lastCollKey != 0 && (lastCollId & 0x8000) != 0) {
-							savedIP = _vm->_global->inter_execPtr;
-							_vm->_global->inter_execPtr = (char *)totFileData +
+							savedIP = _vm->_global->_inter_execPtr;
+							_vm->_global->_inter_execPtr = (char *)totFileData +
 							    collisionAreas[lastCollAreaIndex].funcEnter;
 
 							_vm->_inter->funcBlock(0);
-							_vm->_global->inter_execPtr = savedIP;
+							_vm->_global->_inter_execPtr = savedIP;
 						}
 					}
 				}
@@ -708,7 +708,7 @@
 	int16 savedKey;
 
 	if (ghandleMouse != 0 &&
-	    (_vm->_global->useMouse != 0 || forceHandleMouse != 0))
+	    (_vm->_global->_useMouse != 0 || forceHandleMouse != 0))
 		handleMouse = 1;
 	else
 		handleMouse = 0;
@@ -864,21 +864,21 @@
 			return key;
 
 		case 0x11b:	// Escape
-			if (_vm->_global->useMouse != 0)
+			if (_vm->_global->_useMouse != 0)
 				continue;
 
 			forceHandleMouse = !forceHandleMouse;
 
 			if (ghandleMouse != 0 &&
-			    (_vm->_global->useMouse != 0 || forceHandleMouse != 0))
+			    (_vm->_global->_useMouse != 0 || forceHandleMouse != 0))
 				handleMouse = 1;
 			else
 				handleMouse = 0;
 
-			if (_vm->_global->pressedKeys[1] == 0)
+			if (_vm->_global->_pressedKeys[1] == 0)
 				continue;
 
-			while (_vm->_global->pressedKeys[1] != 0);
+			while (_vm->_global->_pressedKeys[1] != 0);
 			continue;
 
 		default:
@@ -949,7 +949,7 @@
 		if ((collArea->flags & 0x0f) > 10)
 			continue;
 
-		strcpy(tempStr, _vm->_global->inter_variables + collArea->key);
+		strcpy(tempStr, _vm->_global->_inter_variables + collArea->key);
 
 		_vm->_draw->destSpriteX = collArea->left;
 		_vm->_draw->destSpriteY = collArea->top;
@@ -1009,7 +1009,7 @@
 		    collArea->right - collArea->left + 1,
 		    collArea->bottom - collArea->top + 1,
 		    inpDesc[*pCurPos].backColor, inpDesc[*pCurPos].frontColor,
-		    _vm->_global->inter_variables + collArea->key,
+		    _vm->_global->_inter_variables + collArea->key,
 		    inpDesc[*pCurPos].fontIndex, collArea->flags, &time);
 
 		if (_vm->_inter->_terminate)
@@ -1135,21 +1135,21 @@
 		pushCollisions(1);
 
 	collResId = -1;
-	_vm->_global->inter_execPtr++;
-	count = *_vm->_global->inter_execPtr++;
-	ghandleMouse = _vm->_global->inter_execPtr[0];
-	deltaTime = 1000 * (byte)_vm->_global->inter_execPtr[1];
-	descIndex2 = (byte)_vm->_global->inter_execPtr[2];
-	stackPos2 = (byte)_vm->_global->inter_execPtr[3];
-	descIndex = (byte)_vm->_global->inter_execPtr[4];
+	_vm->_global->_inter_execPtr++;
+	count = *_vm->_global->_inter_execPtr++;
+	ghandleMouse = _vm->_global->_inter_execPtr[0];
+	deltaTime = 1000 * (byte)_vm->_global->_inter_execPtr[1];
+	descIndex2 = (byte)_vm->_global->_inter_execPtr[2];
+	stackPos2 = (byte)_vm->_global->_inter_execPtr[3];
+	descIndex = (byte)_vm->_global->_inter_execPtr[4];
 
 	if (stackPos2 != 0 || descIndex != 0)
 		deltaTime /= 100;
 
 	timeVal = deltaTime;
-	_vm->_global->inter_execPtr += 6;
+	_vm->_global->_inter_execPtr += 6;
 
-	startIP = _vm->_global->inter_execPtr;
+	startIP = _vm->_global->_inter_execPtr;
 	WRITE_VAR(16, 0);
 	var_22 = 0;
 	index = 0;
@@ -1157,12 +1157,12 @@
 
 	for (curCmd = 0; curCmd < count; curCmd++) {
 		array[curCmd] = 0;
-		cmd = *_vm->_global->inter_execPtr++;
+		cmd = *_vm->_global->_inter_execPtr++;
 
 		if ((cmd & 0x40) != 0) {
 			cmd -= 0x40;
-			cmdHigh = (byte)*_vm->_global->inter_execPtr;
-			_vm->_global->inter_execPtr++;
+			cmdHigh = (byte)*_vm->_global->_inter_execPtr;
+			_vm->_global->_inter_execPtr++;
 			cmdHigh <<= 8;
 		} else {
 			cmdHigh = 0;
@@ -1197,14 +1197,14 @@
 			var_22 = 1;
 			key = _vm->_parse->parseVarIndex();
 			descArray[index].fontIndex = _vm->_inter->load16();
-			descArray[index].backColor = *_vm->_global->inter_execPtr++;
-			descArray[index].frontColor = *_vm->_global->inter_execPtr++;
+			descArray[index].backColor = *_vm->_global->_inter_execPtr++;
+			descArray[index].frontColor = *_vm->_global->_inter_execPtr++;
 
 			if (cmd < 5 || cmd > 8) {
 				descArray[index].ptr = 0;
 			} else {
-				descArray[index].ptr = _vm->_global->inter_execPtr + 2;
-				_vm->_global->inter_execPtr += _vm->_inter->load16();
+				descArray[index].ptr = _vm->_global->_inter_execPtr + 2;
+				_vm->_global->_inter_execPtr += _vm->_inter->load16();
 			}
 
 			if (left == -1)
@@ -1218,10 +1218,10 @@
 				    _vm->_draw->fonts[descArray[index].fontIndex]->
 				    itemWidth - 1, top + height - 1, cmd, key,
 				    0,
-				    _vm->_global->inter_execPtr - (char *)totFileData);
+				    _vm->_global->_inter_execPtr - (char *)totFileData);
 
-				_vm->_global->inter_execPtr += 2;
-				_vm->_global->inter_execPtr += READ_LE_UINT16(_vm->_global->inter_execPtr);
+				_vm->_global->_inter_execPtr += 2;
+				_vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr);
 			} else {
 				addNewCollision(curCmd + 0x8000, left,
 				    top,
@@ -1243,10 +1243,10 @@
 			    left + width - 1,
 			    top + height - 1,
 			    (flags << 4) + cmdHigh + 2, key,
-			    _vm->_global->inter_execPtr - (char *)totFileData, 0);
+			    _vm->_global->_inter_execPtr - (char *)totFileData, 0);
 
-			_vm->_global->inter_execPtr += 2;
-			_vm->_global->inter_execPtr += READ_LE_UINT16(_vm->_global->inter_execPtr);
+			_vm->_global->_inter_execPtr += 2;
+			_vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr);
 			break;
 
 		case 20:
@@ -1262,17 +1262,17 @@
 			    left + width - 1,
 			    top + height - 1,
 			    (flags << 4) + cmdHigh + 2, key, 0,
-			    _vm->_global->inter_execPtr - (char *)totFileData);
+			    _vm->_global->_inter_execPtr - (char *)totFileData);
 
-			_vm->_global->inter_execPtr += 2;
-			_vm->_global->inter_execPtr += READ_LE_UINT16(_vm->_global->inter_execPtr);
+			_vm->_global->_inter_execPtr += 2;
+			_vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr);
 			break;
 
 		case 0:
-			_vm->_global->inter_execPtr += 6;
-			startIP = _vm->_global->inter_execPtr;
-			_vm->_global->inter_execPtr += 2;
-			_vm->_global->inter_execPtr += READ_LE_UINT16(_vm->_global->inter_execPtr);
+			_vm->_global->_inter_execPtr += 6;
+			startIP = _vm->_global->_inter_execPtr;
+			_vm->_global->_inter_execPtr += 2;
+			_vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr);
 			key = curCmd + 0xA000;
 
 			addNewCollision(curCmd + 0x8000, left, top,
@@ -1280,10 +1280,10 @@
 			    top + height - 1,
 			    cmd + cmdHigh, key,
 			    startIP - (char *)totFileData,
-			    _vm->_global->inter_execPtr - (char *)totFileData);
+			    _vm->_global->_inter_execPtr - (char *)totFileData);
 
-			_vm->_global->inter_execPtr += 2;
-			_vm->_global->inter_execPtr += READ_LE_UINT16(_vm->_global->inter_execPtr);
+			_vm->_global->_inter_execPtr += 2;
+			_vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr);
 			break;
 
 		case 1:
@@ -1291,9 +1291,9 @@
 			array[curCmd] = _vm->_inter->load16();
 			flags = _vm->_inter->load16() & 3;
 
-			startIP = _vm->_global->inter_execPtr;
-			_vm->_global->inter_execPtr += 2;
-			_vm->_global->inter_execPtr += READ_LE_UINT16(_vm->_global->inter_execPtr);
+			startIP = _vm->_global->_inter_execPtr;
+			_vm->_global->_inter_execPtr += 2;
+			_vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr);
 			if (key == 0)
 				key = curCmd + 0xa000;
 
@@ -1302,10 +1302,10 @@
 			    top + height - 1,
 			    (flags << 4) + cmd + cmdHigh, key,
 			    startIP - (char *)totFileData,
-			    _vm->_global->inter_execPtr - (char *)totFileData);
+			    _vm->_global->_inter_execPtr - (char *)totFileData);
 
-			_vm->_global->inter_execPtr += 2;
-			_vm->_global->inter_execPtr += READ_LE_UINT16(_vm->_global->inter_execPtr);
+			_vm->_global->_inter_execPtr += 2;
+			_vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr);
 			break;
 		}
 	}
@@ -1411,15 +1411,15 @@
 
 							activeCollResId = collPtr->id;
 							activeCollIndex = i;
-							WRITE_VAR(2, _vm->_global->inter_mouseX);
-							WRITE_VAR(3, _vm->_global->inter_mouseY);
+							WRITE_VAR(2, _vm->_global->_inter_mouseX);
+							WRITE_VAR(3, _vm->_global->_inter_mouseY);
 							WRITE_VAR(4, mouseButtons);
 							WRITE_VAR(16, array[(uint16)activeCollResId & ~0x8000]);
 
 							if (collPtr->funcLeave != 0) {
 								timeKey = _vm->_util->getTimeKey();
-								savedIP = _vm->_global->inter_execPtr;
-								_vm->_global->inter_execPtr = (char *)totFileData + collPtr->funcLeave;
+								savedIP = _vm->_global->_inter_execPtr;
+								_vm->_global->_inter_execPtr = (char *)totFileData + collPtr->funcLeave;
 								shouldPushColls = 1;
 								savedCollStackSize = collStackSize;
 								_vm->_inter->funcBlock(0);
@@ -1428,7 +1428,7 @@
 									popCollisions();
 
 								shouldPushColls = 0;
-								_vm->_global->inter_execPtr = savedIP;
+								_vm->_global->_inter_execPtr = savedIP;
 								deltaTime = timeVal - (_vm->_util->getTimeKey() - timeKey);
 
 								if (deltaTime < 2)
@@ -1500,14 +1500,14 @@
 		if (collisionAreas[activeCollIndex].funcLeave != 0)
 			continue;
 
-		WRITE_VAR(2, _vm->_global->inter_mouseX);
-		WRITE_VAR(3, _vm->_global->inter_mouseY);
+		WRITE_VAR(2, _vm->_global->_inter_mouseX);
+		WRITE_VAR(3, _vm->_global->_inter_mouseY);
 		WRITE_VAR(4, mouseButtons);
 		WRITE_VAR(16, array[(uint16)activeCollResId & ~0x8000]);
 
 		if (collisionAreas[activeCollIndex].funcEnter != 0) {
-			savedIP = _vm->_global->inter_execPtr;
-			_vm->_global->inter_execPtr = (char *)totFileData +
+			savedIP = _vm->_global->_inter_execPtr;
+			_vm->_global->_inter_execPtr = (char *)totFileData +
 			    collisionAreas[activeCollIndex].
 			    funcEnter;
 
@@ -1518,7 +1518,7 @@
 			if (collStackPos != collStackSize)
 				popCollisions();
 			shouldPushColls = 0;
-			_vm->_global->inter_execPtr = savedIP;
+			_vm->_global->_inter_execPtr = savedIP;
 		}
 
 		WRITE_VAR(16, 0);
@@ -1545,20 +1545,20 @@
 
 			if ((collisionAreas[i].flags & 0x0f) > 8) {
 				strcpy(tempStr,
-				    _vm->_global->inter_variables + collisionAreas[i].key);
+				    _vm->_global->_inter_variables + collisionAreas[i].key);
 				while ((pos =
 					_vm->_util->strstr(" ", tempStr)) != 0) {
 					_vm->_util->cutFromStr(tempStr, pos - 1, 1);
 					pos = _vm->_util->strstr(" ", tempStr);
 				}
-				strcpy(_vm->_global->inter_variables + collisionAreas[i].key, tempStr);
+				strcpy(_vm->_global->_inter_variables + collisionAreas[i].key, tempStr);
 			}
 
 			if ((collisionAreas[i].flags & 0x0f) >= 5 &&
 			    (collisionAreas[i].flags & 0x0f) <= 8) {
 				str = descArray[var_24].ptr;
 
-				strcpy(tempStr, _vm->_global->inter_variables + collisionAreas[i].key);
+				strcpy(tempStr, _vm->_global->_inter_variables + collisionAreas[i].key);
 
 				if ((collisionAreas[i].flags & 0x0f) < 7)
 					_vm->_util->prepareStr(tempStr);
@@ -1598,8 +1598,8 @@
 		savedIP = (char *)totFileData +
 		    collisionAreas[activeCollIndex].funcLeave;
 
-		WRITE_VAR(2, _vm->_global->inter_mouseX);
-		WRITE_VAR(3, _vm->_global->inter_mouseY);
+		WRITE_VAR(2, _vm->_global->_inter_mouseX);
+		WRITE_VAR(3, _vm->_global->_inter_mouseY);
 		WRITE_VAR(4, mouseButtons);
 
 		if (VAR(16) == 0) {
@@ -1610,7 +1610,7 @@
 	for (curCmd = 0; curCmd < count; curCmd++) {
 		freeCollision(curCmd + 0x8000);
 	}
-	_vm->_global->inter_execPtr = savedIP;
+	_vm->_global->_inter_execPtr = savedIP;
 }
 
 void Game::prepareStart(void) {
@@ -1618,25 +1618,25 @@
 
 	clearCollisions();
 
-	_vm->_global->pPaletteDesc->unused2 = _vm->_draw->unusedPalette2;
-	_vm->_global->pPaletteDesc->unused1 = _vm->_draw->unusedPalette1;
-	_vm->_global->pPaletteDesc->vgaPal = _vm->_draw->vgaPalette;
+	_vm->_global->_pPaletteDesc->unused2 = _vm->_draw->unusedPalette2;
+	_vm->_global->_pPaletteDesc->unused1 = _vm->_draw->unusedPalette1;
+	_vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->vgaPalette;
 
-	_vm->_video->setFullPalette(_vm->_global->pPaletteDesc);
+	_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
 
-	_vm->_draw->backSurface = _vm->_video->initSurfDesc(_vm->_global->videoMode, 320, 200, 0);
+	_vm->_draw->backSurface = _vm->_video->initSurfDesc(_vm->_global->_videoMode, 320, 200, 0);
 
 	_vm->_video->fillRect(_vm->_draw->backSurface, 0, 0, 319, 199, 1);
-	_vm->_draw->frontSurface = _vm->_global->pPrimarySurfDesc;
+	_vm->_draw->frontSurface = _vm->_global->_pPrimarySurfDesc;
 	_vm->_video->fillRect(_vm->_draw->frontSurface, 0, 0, 319, 199, 1);
 
 	_vm->_util->setMousePos(152, 92);
 
 	_vm->_draw->cursorX = 152;
-	_vm->_global->inter_mouseX = 152;
+	_vm->_global->_inter_mouseX = 152;
 
 	_vm->_draw->cursorY = 92;
-	_vm->_global->inter_mouseY = 92;
+	_vm->_global->_inter_mouseY = 92;
 	_vm->_draw->invalidatedCount = 0;
 	_vm->_draw->noInvalidated = 1;
 	_vm->_draw->applyPal = 0;
@@ -1652,8 +1652,8 @@
 	}
 
 	_vm->_draw->cursorAnimLow[1] = 0;
-	_vm->_draw->cursorSprites = _vm->_video->initSurfDesc(_vm->_global->videoMode, 32, 16, 2);
-	_vm->_draw->cursorBack = _vm->_video->initSurfDesc(_vm->_global->videoMode, 16, 16, 0);
+	_vm->_draw->cursorSprites = _vm->_video->initSurfDesc(_vm->_global->_videoMode, 32, 16, 2);
+	_vm->_draw->cursorBack = _vm->_video->initSurfDesc(_vm->_global->_videoMode, 16, 16, 0);
 	_vm->_draw->renderFlags = 0;
 	_vm->_draw->backDeltaX = 0;
 	_vm->_draw->backDeltaY = 0;
@@ -1743,7 +1743,7 @@
 	oldNestLevel = _vm->_inter->_nestLevel;
 	oldBreakFrom = _vm->_inter->_breakFromLevel;
 	oldCaptureCounter = _vm->_scenery->pCaptureCounter;
-	savedIP = _vm->_global->inter_execPtr;
+	savedIP = _vm->_global->_inter_execPtr;
 
 	_vm->_inter->_nestLevel = &nestLevel;
 	_vm->_inter->_breakFromLevel = &breakFrom;
@@ -1848,23 +1848,23 @@
 			loadImFile();
 			loadExtTable();
 
-			_vm->_global->inter_animDataSize = READ_LE_UINT16((char *)totFileData + 0x38);
-			if (_vm->_global->inter_variables == 0) {
+			_vm->_global->_inter_animDataSize = READ_LE_UINT16((char *)totFileData + 0x38);
+			if (_vm->_global->_inter_variables == 0) {
 				variablesCount = READ_LE_UINT32((char *)totFileData + 0x2c);
-				_vm->_global->inter_variables = (char *)malloc(variablesCount * 4);
+				_vm->_global->_inter_variables = (char *)malloc(variablesCount * 4);
 				for (i = 0; i < variablesCount; i++)
 					WRITE_VAR(i, 0);
 			}
 
-			_vm->_global->inter_execPtr = (char *)totFileData;
-			_vm->_global->inter_execPtr += READ_LE_UINT32((char *)totFileData + 0x64);
+			_vm->_global->_inter_execPtr = (char *)totFileData;
+			_vm->_global->_inter_execPtr += READ_LE_UINT32((char *)totFileData + 0x64);
 
 			_vm->_inter->renewTimeInVars();
 
-			WRITE_VAR(13, _vm->_global->useMouse);
-			WRITE_VAR(14, _vm->_global->soundFlags);
-			WRITE_VAR(15, _vm->_global->videoMode);
-			WRITE_VAR(16, _vm->_global->language);
+			WRITE_VAR(13, _vm->_global->_useMouse);
+			WRITE_VAR(14, _vm->_global->_soundFlags);
+			WRITE_VAR(15, _vm->_global->_videoMode);
+			WRITE_VAR(16, _vm->_global->_language);
 
 			_vm->_inter->callSub(2);
 
@@ -1923,7 +1923,7 @@
 	_vm->_inter->_nestLevel = oldNestLevel;
 	_vm->_inter->_breakFromLevel = oldBreakFrom;
 	_vm->_scenery->pCaptureCounter = oldCaptureCounter;
-	_vm->_global->inter_execPtr = savedIP;
+	_vm->_global->_inter_execPtr = savedIP;
 }
 
 void Game::start(void) {

Index: global.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/global.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- global.cpp	3 Jan 2006 23:14:39 -0000	1.10
+++ global.cpp	4 Jan 2006 01:48:14 -0000	1.11
@@ -25,129 +25,129 @@
 namespace Gob {
 
 Global::Global(GobEngine *vm) : _vm(vm) {
-	useMouse = UNDEF;
-	mousePresent = UNDEF;
+	_useMouse = UNDEF;
+	_mousePresent = UNDEF;
 
-	presentCGA = UNDEF;
-	presentEGA = UNDEF;
-	presentVGA = UNDEF;
-	presentHER = UNDEF;
+	_presentCGA = UNDEF;
+	_presentEGA = UNDEF;
+	_presentVGA = UNDEF;
+	_presentHER = UNDEF;
 
-	videoMode = 0;
+	_videoMode = 0;
 
 	/* Sound */
-	presentSound = 0x8000;	/* undefined values */
-	soundFlags = 0x8000;
-	blasterPort = 0;
-	disableSoundCfg = 0;
+	_presentSound = 0x8000;	/* undefined values */
+	_soundFlags = 0x8000;
+	_blasterPort = 0;
+	_disableSoundCfg = 0;
 
-	//char playingSound = 0;
+	//char _playingSound = 0;
 
 	/* Mouse */
-	disableMouseCfg = 0;
+	_disableMouseCfg = 0;
 
-	mouseXShift = 3;
-	mouseYShift = 3;
+	_mouseXShift = 3;
+	_mouseYShift = 3;
 
-	mouseMaxCol = 320;
-	mouseMaxRow = 200;
+	_mouseMaxCol = 320;
+	_mouseMaxRow = 200;
 
 	/* Language */
-	disableLangCfg = 0x8000;
-	language = 0x8000;
+	_disableLangCfg = 0x8000;
+	_language = 0x8000;
 
 	/* Timer variables */
-	startTime = 0;
-	timer_delta = 1000;
+	_startTime = 0;
+	_timer_delta = 1000;
 
-	frameWaitTime = 0;
-	startFrameTime = 0;
+	_frameWaitTime = 0;
+	_startFrameTime = 0;
 
 	/* Timer and delays */
-	delayTime = 0;
+	_delayTime = 0;
 
 	/* Joystick */
-	useJoystick = 1;
+	_useJoystick = 1;
 
 	/* Data files */
-	packedSize = 0;
+	_packedSize = 0;
 	for (int i = 0; i < MAX_DATA_FILES; i++) {
-		dataFiles[i] = 0;
-		numDataChunks[i] = 0;
-		dataFileHandles[i] = -1;
+		_dataFiles[i] = 0;
+		_numDataChunks[i] = 0;
+		_dataFileHandles[i] = -1;
 	}
 
-	primaryWidth = 0;
-	primaryHeight = 0;
+	_primaryWidth = 0;
+	_primaryHeight = 0;
 
-	sprAllocated = 0;
+	_sprAllocated = 0;
 
-	doRangeClamp = 0;
+	_doRangeClamp = 0;
 
-	setAllPalette = 0;
+	_setAllPalette = 0;
 
-	oldMode = 3;
-	dontSetPalette = 0;
-	curPrimaryDesc = 0;
-	allocatedPrimary = 0;
-	pPrimarySurfDesc = 0;
+	_oldMode = 3;
+	_dontSetPalette = 0;
+	_curPrimaryDesc = 0;
+	_allocatedPrimary = 0;
+	_pPrimarySurfDesc = 0;
 
-	pPaletteDesc = 0;
+	_pPaletteDesc = 0;
 
-	unusedPalette1[0] = (int16)0;
-	unusedPalette1[1] = (int16)0x0b;
-	unusedPalette1[2] = (int16)0;
-	unusedPalette1[3] = (int16)0x5555;
-	unusedPalette1[4] = (int16)0xAAAA;
-	unusedPalette1[5] = (int16)0xFFFF;
-	unusedPalette1[6] = (int16)0;
-	unusedPalette1[7] = (int16)0x5555;
-	unusedPalette1[8] = (int16)0xAAAA;
-	unusedPalette1[9] = (int16)0xFFFF;
-	unusedPalette1[10] = (int16)0;
-	unusedPalette1[11] = (int16)0x5555;
-	unusedPalette1[12] = (int16)0xAAAA;
-	unusedPalette1[13] = (int16)0xFFFF;
-	unusedPalette1[14] = (int16)0;
-	unusedPalette1[15] = (int16)0x5555;
-	unusedPalette1[16] = (int16)0xAAAA;
-	unusedPalette1[17] = (int16)0xFFFF;
+	_unusedPalette1[0] = (int16)0;
+	_unusedPalette1[1] = (int16)0x0b;
+	_unusedPalette1[2] = (int16)0;
+	_unusedPalette1[3] = (int16)0x5555;
+	_unusedPalette1[4] = (int16)0xAAAA;
+	_unusedPalette1[5] = (int16)0xFFFF;
+	_unusedPalette1[6] = (int16)0;
+	_unusedPalette1[7] = (int16)0x5555;
+	_unusedPalette1[8] = (int16)0xAAAA;
+	_unusedPalette1[9] = (int16)0xFFFF;
+	_unusedPalette1[10] = (int16)0;
+	_unusedPalette1[11] = (int16)0x5555;
+	_unusedPalette1[12] = (int16)0xAAAA;
+	_unusedPalette1[13] = (int16)0xFFFF;
+	_unusedPalette1[14] = (int16)0;
+	_unusedPalette1[15] = (int16)0x5555;
+	_unusedPalette1[16] = (int16)0xAAAA;
+	_unusedPalette1[17] = (int16)0xFFFF;
 
 	for (int i = 0; i < 16 ;i++)
-		unusedPalette2[i] = i;
+		_unusedPalette2[i] = i;
 
-	vgaPalette[0].red = 0x00; vgaPalette[0].green = 0x00; vgaPalette[0].blue = 0x00;
-	vgaPalette[1].red = 0x00; vgaPalette[1].green = 0x00; vgaPalette[1].blue = 0x2a;
-	vgaPalette[2].red = 0x00; vgaPalette[2].green = 0x2a; vgaPalette[2].blue = 0x00;
-	vgaPalette[3].red = 0x00; vgaPalette[3].green = 0x2a; vgaPalette[3].blue = 0x2a;
-	vgaPalette[4].red = 0x2a; vgaPalette[4].green = 0x00; vgaPalette[4].blue = 0x00;
-	vgaPalette[5].red = 0x2a; vgaPalette[5].green = 0x00; vgaPalette[5].blue = 0x2a;
-	vgaPalette[6].red = 0x2a; vgaPalette[6].green = 0x15; vgaPalette[6].blue = 0x00;
-	vgaPalette[7].red = 0x2a; vgaPalette[7].green = 0x2a; vgaPalette[7].blue = 0x2a;
-	vgaPalette[8].red = 0x15; vgaPalette[8].green = 0x15; vgaPalette[8].blue = 0x15;
-	vgaPalette[9].red = 0x15; vgaPalette[9].green = 0x15; vgaPalette[9].blue = 0x3f;
-	vgaPalette[10].red = 0x15; vgaPalette[10].green = 0x3f; vgaPalette[10].blue = 0x15;
-	vgaPalette[11].red = 0x15; vgaPalette[11].green = 0x3f; vgaPalette[11].blue = 0x3f;
-	vgaPalette[12].red = 0x3f; vgaPalette[12].green = 0x15; vgaPalette[12].blue = 0x15;
-	vgaPalette[13].red = 0x3f; vgaPalette[13].green = 0x15; vgaPalette[13].blue = 0x3f;
-	vgaPalette[14].red = 0x3f; vgaPalette[14].green = 0x3f; vgaPalette[14].blue = 0x15;
-	vgaPalette[15].red = 0x3f; vgaPalette[15].green = 0x3f; vgaPalette[15].blue = 0x3f;
+	_vgaPalette[0].red = 0x00; _vgaPalette[0].green = 0x00; _vgaPalette[0].blue = 0x00;
+	_vgaPalette[1].red = 0x00; _vgaPalette[1].green = 0x00; _vgaPalette[1].blue = 0x2a;
+	_vgaPalette[2].red = 0x00; _vgaPalette[2].green = 0x2a; _vgaPalette[2].blue = 0x00;
+	_vgaPalette[3].red = 0x00; _vgaPalette[3].green = 0x2a; _vgaPalette[3].blue = 0x2a;
+	_vgaPalette[4].red = 0x2a; _vgaPalette[4].green = 0x00; _vgaPalette[4].blue = 0x00;
+	_vgaPalette[5].red = 0x2a; _vgaPalette[5].green = 0x00; _vgaPalette[5].blue = 0x2a;
+	_vgaPalette[6].red = 0x2a; _vgaPalette[6].green = 0x15; _vgaPalette[6].blue = 0x00;
+	_vgaPalette[7].red = 0x2a; _vgaPalette[7].green = 0x2a; _vgaPalette[7].blue = 0x2a;
+	_vgaPalette[8].red = 0x15; _vgaPalette[8].green = 0x15; _vgaPalette[8].blue = 0x15;
+	_vgaPalette[9].red = 0x15; _vgaPalette[9].green = 0x15; _vgaPalette[9].blue = 0x3f;
+	_vgaPalette[10].red = 0x15; _vgaPalette[10].green = 0x3f; _vgaPalette[10].blue = 0x15;
+	_vgaPalette[11].red = 0x15; _vgaPalette[11].green = 0x3f; _vgaPalette[11].blue = 0x3f;
+	_vgaPalette[12].red = 0x3f; _vgaPalette[12].green = 0x15; _vgaPalette[12].blue = 0x15;
+	_vgaPalette[13].red = 0x3f; _vgaPalette[13].green = 0x15; _vgaPalette[13].blue = 0x3f;
+	_vgaPalette[14].red = 0x3f; _vgaPalette[14].green = 0x3f; _vgaPalette[14].blue = 0x15;
+	_vgaPalette[15].red = 0x3f; _vgaPalette[15].green = 0x3f; _vgaPalette[15].blue = 0x3f;
 
-	debugFlag = 0;
-	inVM = 0;
-	colorCount = 16;
+	_debugFlag = 0;
+	_inVM = 0;
+	_colorCount = 16;
 
-	inter_resStr[0] = 0;
-	inter_resVal = 0;
+	_inter_resStr[0] = 0;
+	_inter_resVal = 0;
 
-	inter_variables = 0;
-	inter_execPtr = 0;
-	inter_animDataSize = 10;
+	_inter_variables = 0;
+	_inter_execPtr = 0;
+	_inter_animDataSize = 10;
 
-	inter_mouseX = 0;
-	inter_mouseY = 0;
+	_inter_mouseX = 0;
+	_inter_mouseY = 0;
 
-	tmpPalBuffer = 0;
+	_tmpPalBuffer = 0;
 }
 
 } // End of namespace Gob

Index: global.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/global.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- global.h	3 Jan 2006 23:14:39 -0000	1.9
+++ global.h	4 Jan 2006 01:48:14 -0000	1.10
@@ -65,105 +65,105 @@
 
 class Global {
 public:
-	char pressedKeys[128];
+	char _pressedKeys[128];
 
-	char useMouse;
-	int16 mousePresent;
+	char _useMouse;
+	int16 _mousePresent;
 
-	int16 presentCGA;
-	int16 presentEGA;
-	int16 presentVGA;
-	int16 presentHER;
+	int16 _presentCGA;
+	int16 _presentEGA;
+	int16 _presentVGA;
+	int16 _presentHER;
 
-	int16 videoMode;
+	int16 _videoMode;
 
-	int16 disableVideoCfg;
+	int16 _disableVideoCfg;
 
-	uint16 presentSound;
-	uint16 soundFlags;
-	int16 disableSoundCfg;
-	int16 blasterPort;
+	uint16 _presentSound;
+	uint16 _soundFlags;
+	int16 _disableSoundCfg;
+	int16 _blasterPort;
 
-	uint16 disableLangCfg;
-	uint16 language;
+	uint16 _disableLangCfg;
+	uint16 _language;
 
 	// Timer variables
-	int32 startTime;
-	int16 timer_delta;
+	int32 _startTime;
+	int16 _timer_delta;
 
-	int16 frameWaitTime;
-	int32 startFrameTime;
+	int16 _frameWaitTime;
+	int32 _startFrameTime;
 
 	// Mouse
-	int16 disableMouseCfg;
+	int16 _disableMouseCfg;
 
-	int16 mouseXShift;
-	int16 mouseYShift;
-	int16 mouseMaxCol;
-	int16 mouseMaxRow;
+	int16 _mouseXShift;
+	int16 _mouseYShift;
+	int16 _mouseMaxCol;
+	int16 _mouseMaxRow;
 
 	// Timer and delays
-	int16 delayTime;
+	int16 _delayTime;
 
 	// Joystick
-	char useJoystick;
+	char _useJoystick;
 
 	// Files
-	Common::File filesHandles[MAX_FILES];
+	Common::File _filesHandles[MAX_FILES];
 
 	// Data files
-	struct DataIO::ChunkDesc *dataFiles[MAX_DATA_FILES];
-	int16 numDataChunks[MAX_DATA_FILES];
-	int16 dataFileHandles[MAX_DATA_FILES];
-	int32 chunkPos[MAX_SLOT_COUNT * MAX_DATA_FILES];
-	int32 chunkOffset[MAX_SLOT_COUNT * MAX_DATA_FILES];
-	int32 chunkSize[MAX_SLOT_COUNT * MAX_DATA_FILES];
-	char isCurrentSlot[MAX_SLOT_COUNT * MAX_DATA_FILES];
-	int32 packedSize;
+	struct DataIO::ChunkDesc *_dataFiles[MAX_DATA_FILES];
+	int16 _numDataChunks[MAX_DATA_FILES];
+	int16 _dataFileHandles[MAX_DATA_FILES];
+	int32 _chunkPos[MAX_SLOT_COUNT * MAX_DATA_FILES];
+	int32 _chunkOffset[MAX_SLOT_COUNT * MAX_DATA_FILES];
+	int32 _chunkSize[MAX_SLOT_COUNT * MAX_DATA_FILES];
+	char _isCurrentSlot[MAX_SLOT_COUNT * MAX_DATA_FILES];
+	int32 _packedSize;
 
-	int16 sprAllocated;
+	int16 _sprAllocated;
 
-	int16 primaryWidth;
-	int16 primaryHeight;
+	int16 _primaryWidth;
+	int16 _primaryHeight;
 
-	int16 doRangeClamp;
+	int16 _doRangeClamp;
 
-	char redPalette[256];
-	char greenPalette[256];
-	char bluePalette[256];
+	char _redPalette[256];
+	char _greenPalette[256];
+	char _bluePalette[256];
 
-	int16 setAllPalette;
+	int16 _setAllPalette;
 
-	Video::SurfaceDesc *curPrimaryDesc;
-	Video::SurfaceDesc *allocatedPrimary;
-	Video::SurfaceDesc_t primarySurfDesc;
-	Video::SurfaceDesc *pPrimarySurfDesc;
+	Video::SurfaceDesc *_curPrimaryDesc;
+	Video::SurfaceDesc *_allocatedPrimary;
+	Video::SurfaceDesc_t _primarySurfDesc;
+	Video::SurfaceDesc *_pPrimarySurfDesc;
 
-	int16 oldMode;
-	char dontSetPalette;
+	int16 _oldMode;
+	char _dontSetPalette;
 
-	Video::PalDesc *pPaletteDesc;
+	Video::PalDesc *_pPaletteDesc;
 
-	int16 unusedPalette1[18];
-	int16 unusedPalette2[16];
-	Video::Color vgaPalette[16];
-	Video::PalDesc paletteStruct;
+	int16 _unusedPalette1[18];
+	int16 _unusedPalette2[16];
+	Video::Color _vgaPalette[16];
+	Video::PalDesc _paletteStruct;
 
-	int16 debugFlag;
-	int16 inVM;
-	int16 colorCount;
+	int16 _debugFlag;
+	int16 _inVM;
+	int16 _colorCount;
 
-	char inter_resStr[200];
-	int32 inter_resVal;
+	char _inter_resStr[200];
+	int32 _inter_resVal;
 
-	char *inter_variables;
-	char *inter_execPtr;
-	int16 inter_animDataSize;
+	char *_inter_variables;
+	char *_inter_execPtr;
+	int16 _inter_animDataSize;
 
-	int16 inter_mouseX;
-	int16 inter_mouseY;
+	int16 _inter_mouseX;
+	int16 _inter_mouseY;
 
-	char *tmpPalBuffer;
+	char *_tmpPalBuffer;
 
 	Global(GobEngine *vm);
 

Index: gob.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/gob.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- gob.cpp	3 Jan 2006 23:14:39 -0000	1.28
+++ gob.cpp	4 Jan 2006 01:48:14 -0000	1.29
@@ -303,30 +303,29 @@
 	if (cd_num >= 0)
 		_system->openCD(cd_num);
 
-	_global->debugFlag = 1;
-	_global->doRangeClamp = 1;
+	_global->_debugFlag = 1;
+	_global->_doRangeClamp = 1;
 
-	_global->videoMode = 0x13;
-	_snd->soundPort = 1;
-	_global->useMouse = 1;
-	_global->soundFlags = 0;
+	_global->_videoMode = 0x13;
+	_global->_useMouse = 1;
+	_global->_soundFlags = 0;
 
 	switch (Common::parseLanguage(ConfMan.get("language"))) {
 	case Common::FR_FRA:
-		_global->language = 0;
+		_global->_language = 0;
 		break;
 	case Common::DE_DEU:
-		_global->language = 1;
+		_global->_language = 1;
 		break;
 	case Common::ES_ESP:
-		_global->language = 3;
+		_global->_language = 3;
 		break;
 	case Common::IT_ITA:
-		_global->language = 4;
+		_global->_language = 4;
 		break;
 	default:
 		// Default to English
-		_global->language = 2;
+		_global->_language = 2;
 		break;
 	}
 

Index: gob.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/gob.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- gob.h	3 Jan 2006 23:14:39 -0000	1.12
+++ gob.h	4 Jan 2006 01:48:14 -0000	1.13
@@ -55,7 +55,7 @@
 class GTimer;
 class Util;
 
-#define	VAR_OFFSET(offs)		(*(uint32 *)(_vm->_global->inter_variables + (offs)))
+#define	VAR_OFFSET(offs)		(*(uint32 *)(_vm->_global->_inter_variables + (offs)))
 #define	VAR(var)			VAR_OFFSET((var) << 2)
 #define VAR_ADDRESS(var)		(&VAR(var))
 

Index: goblin.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/goblin.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- goblin.cpp	4 Jan 2006 01:23:20 -0000	1.26
+++ goblin.cpp	4 Jan 2006 01:48:14 -0000	1.27
@@ -162,10 +162,10 @@
 				if (desc != goblins[i])
 					continue;
 
-				if (_vm->_global->inter_mouseX < desc->right &&
-				    _vm->_global->inter_mouseX > desc->left &&
-				    _vm->_global->inter_mouseY < desc->bottom &&
-				    _vm->_global->inter_mouseY > desc->top) {
+				if (_vm->_global->_inter_mouseX < desc->right &&
+				    _vm->_global->_inter_mouseX > desc->left &&
+				    _vm->_global->_inter_mouseY < desc->bottom &&
+				    _vm->_global->_inter_mouseY > desc->top) {
 					index = i + 1;
 				}
 			}
@@ -1079,10 +1079,10 @@
 
 void Goblin::moveCheckSelect(int16 framesCount, Gob_Object * gobDesc, int16 *pGobIndex,
 	    int16 *nextAct) {
-	if (gobDesc->right > _vm->_global->inter_mouseX &&
-	    gobDesc->left < _vm->_global->inter_mouseX &&
-	    gobDesc->bottom > _vm->_global->inter_mouseY &&
-	    gobDesc->bottom - 10 < _vm->_global->inter_mouseY && gobAction == 0) {
+	if (gobDesc->right > _vm->_global->_inter_mouseX &&
+	    gobDesc->left < _vm->_global->_inter_mouseX &&
+	    gobDesc->bottom > _vm->_global->_inter_mouseY &&
+	    gobDesc->bottom - 10 < _vm->_global->_inter_mouseY && gobAction == 0) {
 		if (gobDesc->curLookDir & 4)
 			*nextAct = 16;
 		else
@@ -1125,14 +1125,14 @@
 		forceNextState[2] = -1;
 
 		if (action == 3) {
-			posX = _vm->_global->inter_mouseX + 6;
-			posY = _vm->_global->inter_mouseY + 7;
+			posX = _vm->_global->_inter_mouseX + 6;
+			posY = _vm->_global->_inter_mouseY + 7;
 		} else if (action == 4) {
-			posX = _vm->_global->inter_mouseX + 7;
-			posY = _vm->_global->inter_mouseY + 12;
+			posX = _vm->_global->_inter_mouseX + 7;
+			posY = _vm->_global->_inter_mouseY + 12;
 		} else {
-			posX = _vm->_global->inter_mouseX;
-			posY = _vm->_global->inter_mouseY;
+			posX = _vm->_global->_inter_mouseX;
+			posY = _vm->_global->_inter_mouseY;
 		}
 
 		moveFindItem(posX, posY);
@@ -2394,7 +2394,7 @@
 	retVarPtr = (int32 *)VAR_ADDRESS(59);
 
 	cmd = _vm->_inter->load16();
-	_vm->_global->inter_execPtr += 2;
+	_vm->_global->_inter_execPtr += 2;
 	if (cmd > 0 && cmd < 17) {
 		extraData = _vm->_inter->load16();
 		objDesc = objects[extraData];
@@ -3247,9 +3247,9 @@
 
 	default:
 		warning("interFunc: Unknown command %d!", cmd);
-		_vm->_global->inter_execPtr -= 2;
+		_vm->_global->_inter_execPtr -= 2;
 		cmd = _vm->_inter->load16();
-		_vm->_global->inter_execPtr += cmd * 2;
+		_vm->_global->_inter_execPtr += cmd * 2;
 		break;
 	}
 	return;

Index: init.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/init.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- init.cpp	3 Jan 2006 23:14:39 -0000	1.13
+++ init.cpp	4 Jan 2006 01:48:15 -0000	1.14
@@ -36,92 +36,92 @@
 
 void game_start(void);
 
-const char *Init::fontNames[] = { "jeulet1.let", "jeulet2.let", "jeucar1.let", "jeumath.let" };
+const char *Init::_fontNames[] = { "jeulet1.let", "jeulet2.let", "jeucar1.let", "jeumath.let" };
 
 Init::Init(GobEngine *vm) : _vm(vm) {
-	palDesc = 0;
+	_palDesc = 0;
 }
 
 void Init::findBestCfg(void) {
-	_vm->_global->videoMode = VIDMODE_VGA;
-	_vm->_global->useMouse = _vm->_global->mousePresent;
-	if (_vm->_global->presentSound & BLASTER_FLAG)
-		_vm->_global->soundFlags = BLASTER_FLAG | SPEAKER_FLAG | MIDI_FLAG;
-	else if (_vm->_global->presentSound & PROAUDIO_FLAG)
-		_vm->_global->soundFlags = PROAUDIO_FLAG | SPEAKER_FLAG | MIDI_FLAG;
-	else if (_vm->_global->presentSound & ADLIB_FLAG)
-		_vm->_global->soundFlags = ADLIB_FLAG | SPEAKER_FLAG | MIDI_FLAG;
-	else if (_vm->_global->presentSound & INTERSOUND_FLAG)
-		_vm->_global->soundFlags = INTERSOUND_FLAG | SPEAKER_FLAG;
-	else if (_vm->_global->presentSound & SPEAKER_FLAG)
-		_vm->_global->soundFlags = SPEAKER_FLAG;
+	_vm->_global->_videoMode = VIDMODE_VGA;
+	_vm->_global->_useMouse = _vm->_global->_mousePresent;
+	if (_vm->_global->_presentSound & BLASTER_FLAG)
+		_vm->_global->_soundFlags = BLASTER_FLAG | SPEAKER_FLAG | MIDI_FLAG;
+	else if (_vm->_global->_presentSound & PROAUDIO_FLAG)
+		_vm->_global->_soundFlags = PROAUDIO_FLAG | SPEAKER_FLAG | MIDI_FLAG;
+	else if (_vm->_global->_presentSound & ADLIB_FLAG)
+		_vm->_global->_soundFlags = ADLIB_FLAG | SPEAKER_FLAG | MIDI_FLAG;
+	else if (_vm->_global->_presentSound & INTERSOUND_FLAG)
+		_vm->_global->_soundFlags = INTERSOUND_FLAG | SPEAKER_FLAG;
+	else if (_vm->_global->_presentSound & SPEAKER_FLAG)
+		_vm->_global->_soundFlags = SPEAKER_FLAG;
 	else
-		_vm->_global->soundFlags = 0;
+		_vm->_global->_soundFlags = 0;
 }
 
 void Init::soundVideo(int32 smallHeap, int16 flag) {
-	if (_vm->_global->videoMode != 0x13 && _vm->_global->videoMode != 0)
+	if (_vm->_global->_videoMode != 0x13 && _vm->_global->_videoMode != 0)
 		error("soundVideo: Video mode 0x%x is not supported!",
-		    _vm->_global->videoMode);
+		    _vm->_global->_videoMode);
 
 	//if ((flag & 4) == 0)
 	//	_vm->_video->findVideo();
 
-	_vm->_global->mousePresent = 1;
+	_vm->_global->_mousePresent = 1;
 
-	_vm->_global->inVM = 0;
+	_vm->_global->_inVM = 0;
 
-	_vm->_global->presentSound = 0; // FIXME: sound is not supported yet
+	_vm->_global->_presentSound = 0; // FIXME: sound is not supported yet
 
-	_vm->_global->sprAllocated = 0;
+	_vm->_global->_sprAllocated = 0;
 	_vm->_gtimer->enableTimer();
 
 	// _vm->_snd->setResetTimerFlag(debugFlag); // TODO
 
-	if (_vm->_global->videoMode == 0x13)
-		_vm->_global->colorCount = 256;
+	if (_vm->_global->_videoMode == 0x13)
+		_vm->_global->_colorCount = 256;
 
-	_vm->_global->pPaletteDesc = &_vm->_global->paletteStruct;
-	_vm->_global->pPaletteDesc->vgaPal = _vm->_global->vgaPalette;
-	_vm->_global->pPaletteDesc->unused1 = _vm->_global->unusedPalette1;
-	_vm->_global->pPaletteDesc->unused2 = _vm->_global->unusedPalette2;
-	_vm->_global->pPrimarySurfDesc = &_vm->_global->primarySurfDesc;
+	_vm->_global->_pPaletteDesc = &_vm->_global->_paletteStruct;
+	_vm->_global->_pPaletteDesc->vgaPal = _vm->_global->_vgaPalette;
+	_vm->_global->_pPaletteDesc->unused1 = _vm->_global->_unusedPalette1;
+	_vm->_global->_pPaletteDesc->unused2 = _vm->_global->_unusedPalette2;
+	_vm->_global->_pPrimarySurfDesc = &_vm->_global->_primarySurfDesc;
 
-	if (_vm->_global->videoMode != 0)
-		_vm->_video->initSurfDesc(_vm->_global->videoMode, 320, 200, PRIMARY_SURFACE);
+	if (_vm->_global->_videoMode != 0)
+		_vm->_video->initSurfDesc(_vm->_global->_videoMode, 320, 200, PRIMARY_SURFACE);
 
-	if (_vm->_global->soundFlags & MIDI_FLAG) {
-		_vm->_global->soundFlags &= _vm->_global->presentSound;
-		if (_vm->_global->presentSound & ADLIB_FLAG)
-			_vm->_global->soundFlags |= MIDI_FLAG;
+	if (_vm->_global->_soundFlags & MIDI_FLAG) {
+		_vm->_global->_soundFlags &= _vm->_global->_presentSound;
+		if (_vm->_global->_presentSound & ADLIB_FLAG)
+			_vm->_global->_soundFlags |= MIDI_FLAG;
 	} else {
-		_vm->_global->soundFlags &= _vm->_global->presentSound;
+		_vm->_global->_soundFlags &= _vm->_global->_presentSound;
 	}
 }
 
 void Init::cleanup(void) {
-	if (_vm->_global->debugFlag == 0)
+	if (_vm->_global->_debugFlag == 0)
 		_vm->_gtimer->disableTimer();
 
 	_vm->_video->freeDriver();
-	if (_vm->_global->curPrimaryDesc != 0) {
-		_vm->_video->freeSurfDesc(_vm->_global->curPrimaryDesc);
-		_vm->_video->freeSurfDesc(_vm->_global->allocatedPrimary);
-		_vm->_global->allocatedPrimary = 0;
-		_vm->_global->curPrimaryDesc = 0;
+	if (_vm->_global->_curPrimaryDesc != 0) {
+		_vm->_video->freeSurfDesc(_vm->_global->_curPrimaryDesc);
+		_vm->_video->freeSurfDesc(_vm->_global->_allocatedPrimary);
+		_vm->_global->_allocatedPrimary = 0;
+		_vm->_global->_curPrimaryDesc = 0;
 	}
-	_vm->_global->pPrimarySurfDesc = 0;
-	if (_vm->_snd->cleanupFunc != 0 && _vm->_snd->playingSound != 0) {
-		(*_vm->_snd->cleanupFunc) (0);
-		_vm->_snd->cleanupFunc = 0;
+	_vm->_global->_pPrimarySurfDesc = 0;
+	if (_vm->_snd->_cleanupFunc != 0 && _vm->_snd->_playingSound != 0) {
+		(*_vm->_snd->_cleanupFunc) (0);
+		_vm->_snd->_cleanupFunc = 0;
 	}
 	_vm->_snd->speakerOff();
 
 	_vm->_dataio->closeDataFile();
 
-	if (_vm->_global->sprAllocated != 0)
+	if (_vm->_global->_sprAllocated != 0)
 		error("cleanup: Error! Allocated sprites left: %d",
-		    _vm->_global->sprAllocated);
+		    _vm->_global->_sprAllocated);
 
 	_vm->_snd->stopSound(0);
 	_vm->_util->keyboard_release();
@@ -151,8 +151,8 @@
 memAvail	= dword	ptr -6
 memBlocks	= word ptr -2*/
 
-	_vm->_global->disableVideoCfg = 0x11;
-	_vm->_global->disableMouseCfg = 0x15;
+	_vm->_global->_disableVideoCfg = 0x11;
+	_vm->_global->_disableMouseCfg = 0x15;
 	soundVideo(1000, 1);
 
 	handle2 = _vm->_dataio->openData("intro.stk");
@@ -164,23 +164,23 @@
 	_vm->_util->initInput();
 
 	_vm->_video->setHandlers();
-	_vm->_video->initPrimary(_vm->_global->videoMode);
-	_vm->_global->mouseXShift = 1;
-	_vm->_global->mouseYShift = 1;
+	_vm->_video->initPrimary(_vm->_global->_videoMode);
+	_vm->_global->_mouseXShift = 1;
+	_vm->_global->_mouseYShift = 1;
 
 	_vm->_game->totTextData = 0;
 	_vm->_game->totFileData = 0;
 	_vm->_game->totResourceTable = 0;
-	_vm->_global->inter_variables = 0;
-	palDesc = (Video::PalDesc *)malloc(12);
+	_vm->_global->_inter_variables = 0;
+	_palDesc = (Video::PalDesc *)malloc(12);
 
-	if (_vm->_global->videoMode != 0x13)
+	if (_vm->_global->_videoMode != 0x13)
 		error("initGame: Only 0x13 video mode is supported!");
 
-	palDesc->vgaPal = _vm->_draw->vgaPalette;
-	palDesc->unused1 = _vm->_draw->unusedPalette1;
-	palDesc->unused2 = _vm->_draw->unusedPalette2;
-	_vm->_video->setFullPalette(palDesc);
+	_palDesc->vgaPal = _vm->_draw->vgaPalette;
+	_palDesc->unused1 = _vm->_draw->unusedPalette1;
+	_palDesc->unused2 = _vm->_draw->unusedPalette2;
+	_vm->_video->setFullPalette(_palDesc);
 
 	for (i = 0; i < 4; i++)
 		_vm->_draw->fonts[i] = 0;
@@ -189,11 +189,11 @@
 
 	if (handle < 0) {
 		for (i = 0; i < 4; i++) {
-			handle2 = _vm->_dataio->openData(fontNames[i]);
+			handle2 = _vm->_dataio->openData(_fontNames[i]);
 			if (handle2 >= 0) {
 				_vm->_dataio->closeData(handle2);
 				_vm->_draw->fonts[i] =
-				    _vm->_util->loadFont(fontNames[i]);
+				    _vm->_util->loadFont(_fontNames[i]);
 			}
 		}
 	} else {
@@ -244,8 +244,8 @@
 		varsCount = FROM_LE_32(varsCount);
 		_vm->_dataio->closeData(handle);
 
-		_vm->_global->inter_variables = (char *)malloc(varsCount * 4);
-		memset(_vm->_global->inter_variables, 0, varsCount * 4);
+		_vm->_global->_inter_variables = (char *)malloc(varsCount * 4);
+		memset(_vm->_global->_inter_variables, 0, varsCount * 4);
 
 		strcpy(_vm->_game->curTotFile, buffer);
 
@@ -256,7 +256,7 @@
 		_vm->_cdrom->stopPlaying();
 		_vm->_cdrom->freeLICbuffer();
 
-		free(_vm->_global->inter_variables);
+		free(_vm->_global->_inter_variables);
 		free(_vm->_game->totFileData);
 		free(_vm->_game->totTextData);
 		free(_vm->_game->totResourceTable);
@@ -267,7 +267,7 @@
 			_vm->_util->freeFont(_vm->_draw->fonts[i]);
 	}
 
-	free(palDesc);
+	free(_palDesc);
 	_vm->_dataio->closeDataFile();
 	_vm->_video->initPrimary(-1);
 	cleanup();

Index: init.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/init.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- init.h	3 Jan 2006 23:14:39 -0000	1.5
+++ init.h	4 Jan 2006 01:48:15 -0000	1.6
@@ -34,8 +34,8 @@
 	Init(GobEngine *vm);
 
 protected:
-	Video::PalDesc *palDesc;
-	static const char *fontNames[4];
+	Video::PalDesc *_palDesc;
+	static const char *_fontNames[4];
 	GobEngine *_vm;
 
 	void cleanup(void);

Index: inter.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/inter.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- inter.cpp	4 Jan 2006 01:23:20 -0000	1.27
+++ inter.cpp	4 Jan 2006 01:48:15 -0000	1.28
@@ -46,16 +46,16 @@
 }
 
 int16 Inter::load16(void) {
-	int16 tmp = (int16)READ_LE_UINT16(_vm->_global->inter_execPtr);
-	_vm->_global->inter_execPtr += 2;
+	int16 tmp = (int16)READ_LE_UINT16(_vm->_global->_inter_execPtr);
+	_vm->_global->_inter_execPtr += 2;
 	return tmp;
 }
 
 void Inter::setMousePos(void) {
-	_vm->_global->inter_mouseX = _vm->_parse->parseValExpr();
-	_vm->_global->inter_mouseY = _vm->_parse->parseValExpr();
-	if (_vm->_global->useMouse != 0)
-		_vm->_util->setMousePos(_vm->_global->inter_mouseX, _vm->_global->inter_mouseY);
+	_vm->_global->_inter_mouseX = _vm->_parse->parseValExpr();
+	_vm->_global->_inter_mouseY = _vm->_parse->parseValExpr();
+	if (_vm->_global->_useMouse != 0)
+		_vm->_util->setMousePos(_vm->_global->_inter_mouseX, _vm->_global->_inter_mouseY);
 }
 
 char Inter::evalExpr(int16 *pRes) {
@@ -70,7 +70,7 @@
 
 	switch (token) {
 	case 20:
-		*pRes = _vm->_global->inter_resVal;
+		*pRes = _vm->_global->_inter_resVal;
 		break;
 
 	case 22:
@@ -91,7 +91,7 @@
 	_vm->_parse->printExpr(99);
 
 	_vm->_parse->parseExpr(99, &token);
-	if (token == 24 || (token == 20 && _vm->_global->inter_resVal != 0))
+	if (token == 24 || (token == 20 && _vm->_global->_inter_resVal != 0))
 		return 1;
 	else
 		return 0;
@@ -103,21 +103,21 @@
 	int16 result;
 	int16 varOff;
 
-	savedPos = _vm->_global->inter_execPtr;
+	savedPos = _vm->_global->_inter_execPtr;
 	varOff = _vm->_parse->parseVarIndex();
 	token = evalExpr(&result);
 	switch (savedPos[0]) {
 	case 23:
 	case 26:
-		WRITE_VAR_OFFSET(varOff, _vm->_global->inter_resVal);
+		WRITE_VAR_OFFSET(varOff, _vm->_global->_inter_resVal);
 		break;
 
 	case 25:
 	case 28:
 		if (token == 20)
-			*(_vm->_global->inter_variables + varOff) = result;
+			*(_vm->_global->_inter_variables + varOff) = result;
 		else
-			strcpy(_vm->_global->inter_variables + varOff, _vm->_global->inter_resStr);
+			strcpy(_vm->_global->_inter_variables + varOff, _vm->_global->_inter_resStr);
 		break;
 
 	}
@@ -166,14 +166,14 @@
 	}
 
 	do {
-		for (i = 0; *_vm->_global->inter_execPtr != '.' && (byte)*_vm->_global->inter_execPtr != 200;
-			 i++, _vm->_global->inter_execPtr++) {
-			buf[i] = *_vm->_global->inter_execPtr;
+		for (i = 0; *_vm->_global->_inter_execPtr != '.' && (byte)*_vm->_global->_inter_execPtr != 200;
+			 i++, _vm->_global->_inter_execPtr++) {
+			buf[i] = *_vm->_global->_inter_execPtr;
 		}
 
-		if ((byte)*_vm->_global->inter_execPtr != 200) {
-			_vm->_global->inter_execPtr++;
-			switch (*_vm->_global->inter_execPtr) {
+		if ((byte)*_vm->_global->_inter_execPtr != 200) {
+			_vm->_global->_inter_execPtr++;
+			switch (*_vm->_global->_inter_execPtr) {
 			case 23:
 			case 26:
 				sprintf(buf + i, "%d", VAR_OFFSET(_vm->_parse->parseVarIndex()));
@@ -181,16 +181,16 @@
 
 			case 25:
 			case 28:
-				sprintf(buf + i, "%s", _vm->_global->inter_variables + _vm->_parse->parseVarIndex());
+				sprintf(buf + i, "%s", _vm->_global->_inter_variables + _vm->_parse->parseVarIndex());
 				break;
 			}
-			_vm->_global->inter_execPtr++;
+			_vm->_global->_inter_execPtr++;
 		} else {
 			buf[i] = 0;
 		}
 		_vm->_draw->spriteOperation(DRAW_PRINTTEXT);
-	} while ((byte)*_vm->_global->inter_execPtr != 200);
-	_vm->_global->inter_execPtr++;
+	} while ((byte)*_vm->_global->_inter_execPtr != 200);
+	_vm->_global->_inter_execPtr++;
 }
 
 void Inter::animPalette(void) {
@@ -200,7 +200,7 @@
 	if (_animPalDir == 0)
 		return;
 
-	_vm->_video->waitRetrace(_vm->_global->videoMode);
+	_vm->_video->waitRetrace(_vm->_global->_videoMode);
 
 	if (_animPalDir == -1) {
 		col = _vm->_draw->vgaSmallPalette[_animPalLowIndex];
@@ -217,8 +217,8 @@
 		_vm->_draw->vgaSmallPalette[_animPalLowIndex] = col;
 	}
 
-	_vm->_global->pPaletteDesc->vgaPal = _vm->_draw->vgaSmallPalette;
-	_vm->_video->setFullPalette(_vm->_global->pPaletteDesc);
+	_vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->vgaSmallPalette;
+	_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
 }
 
 void Inter::animPalInit(void) {
@@ -285,12 +285,12 @@
 			count -= 0x80;
 
 		_vm->_draw->cursorSprites =
-		    _vm->_video->initSurfDesc(_vm->_global->videoMode, _vm->_draw->cursorWidth * count,
+		    _vm->_video->initSurfDesc(_vm->_global->_videoMode, _vm->_draw->cursorWidth * count,
 		    _vm->_draw->cursorHeight, 2);
 		_vm->_draw->spritesArray[23] = _vm->_draw->cursorSprites;
 
 		_vm->_draw->cursorBack =
-		    _vm->_video->initSurfDesc(_vm->_global->videoMode, _vm->_draw->cursorWidth,
+		    _vm->_video->initSurfDesc(_vm->_global->_videoMode, _vm->_draw->cursorWidth,
 		    _vm->_draw->cursorHeight, 0);
 		for (i = 0; i < 40; i++) {
 			_vm->_draw->cursorAnimLow[i] = -1;
@@ -323,7 +323,7 @@
 	byte cmd;
 	int16 i;
 
-	cmd = *_vm->_global->inter_execPtr++;
+	cmd = *_vm->_global->_inter_execPtr++;
 
 	debug(4, "drawOperations(%d)", cmd);
 
@@ -420,7 +420,7 @@
 		if (_vm->_features & GF_GOB1) {
 			// Used in gob1 CD
 			evalExpr(0);
-			_vm->_cdrom->startTrack(_vm->_global->inter_resStr);
+			_vm->_cdrom->startTrack(_vm->_global->_inter_resStr);
 		} else {
 		}
 		break;
@@ -602,8 +602,8 @@
 void Inter::manageDataFile(void) {
 	evalExpr(0);
 
-	if (_vm->_global->inter_resStr[0] != 0)
-		_vm->_dataio->openDataFile(_vm->_global->inter_resStr);
+	if (_vm->_global->_inter_resStr[0] != 0)
+		_vm->_dataio->openDataFile(_vm->_global->_inter_resStr);
 	else
 		_vm->_dataio->closeDataFile();
 }
@@ -622,7 +622,7 @@
 	offset = _vm->_parse->parseValExpr();
 
 	WRITE_VAR(1, 1);
-	handle = _vm->_dataio->openData(_vm->_global->inter_resStr, Common::File::kFileWriteMode);
+	handle = _vm->_dataio->openData(_vm->_global->_inter_resStr, Common::File::kFileWriteMode);
 
 	if (handle < 0)
 		return;
@@ -633,7 +633,7 @@
 		_vm->_dataio->seekData(handle, offset, 0);
 	}
 
-	retSize = _vm->_dataio->file_getHandle(handle)->write(_vm->_global->inter_variables + dataVar, size);
+	retSize = _vm->_dataio->file_getHandle(handle)->write(_vm->_global->_inter_variables + dataVar, size);
 
 	if (retSize == size)
 		WRITE_VAR(1, 0);
@@ -648,7 +648,7 @@
 	debug(4, "_vm->_dataio->cheackData");
 	evalExpr(0);
 	varOff = _vm->_parse->parseVarIndex();
-	handle = _vm->_dataio->openData(_vm->_global->inter_resStr);
+	handle = _vm->_dataio->openData(_vm->_global->_inter_resStr);
 
 	WRITE_VAR_OFFSET(varOff, handle);
 	if (handle >= 0)
@@ -672,7 +672,7 @@
 		_vm->_dataio->closeData(_vm->_game->extHandle);
 
 	WRITE_VAR(1, 1);
-	handle = _vm->_dataio->openData(_vm->_global->inter_resStr);
+	handle = _vm->_dataio->openData(_vm->_global->_inter_resStr);
 	if (handle >= 0) {
 		_vm->_draw->animateCursor(4);
 		if (offset < 0)
@@ -680,7 +680,7 @@
 		else
 			_vm->_dataio->seekData(handle, offset, 0);
 
-		retSize = _vm->_dataio->readData(handle, _vm->_global->inter_variables + dataVar, size);
+		retSize = _vm->_dataio->readData(handle, _vm->_global->_inter_variables + dataVar, size);
 		_vm->_dataio->closeData(handle);
 
 		if (retSize == size)
@@ -705,7 +705,7 @@
 	if (_vm->_game->extHandle >= 0)
 		_vm->_dataio->closeData(_vm->_game->extHandle);
 
-	_vm->_draw->fonts[index] = _vm->_util->loadFont(_vm->_global->inter_resStr);
+	_vm->_draw->fonts[index] = _vm->_util->loadFont(_vm->_global->_inter_resStr);
 
 	if (_vm->_game->extHandle >= 0)
 		_vm->_game->extHandle = _vm->_dataio->openData(_vm->_game->curExtFile);
@@ -725,7 +725,7 @@
 	int16 var;
 
 	var = _vm->_parse->parseVarIndex();
-	_vm->_util->prepareStr(_vm->_global->inter_variables + var);
+	_vm->_util->prepareStr(_vm->_global->_inter_variables + var);
 }
 
 void Inter::insertStr(void) {
@@ -735,7 +735,7 @@
 	strVar = _vm->_parse->parseVarIndex();
 	evalExpr(0);
 	pos = _vm->_parse->parseValExpr();
-	_vm->_util->insertStr(_vm->_global->inter_resStr, _vm->_global->inter_variables + strVar, pos);
+	_vm->_util->insertStr(_vm->_global->_inter_resStr, _vm->_global->_inter_variables + strVar, pos);
 }
 
 void Inter::cutStr(void) {
@@ -746,7 +746,7 @@
 	var = _vm->_parse->parseVarIndex();
 	pos = _vm->_parse->parseValExpr();
 	size = _vm->_parse->parseValExpr();
-	_vm->_util->cutFromStr(_vm->_global->inter_variables + var, pos, size);
+	_vm->_util->cutFromStr(_vm->_global->_inter_variables + var, pos, size);
 }
 
 void Inter::strstr(void) {
@@ -758,7 +758,7 @@
 	evalExpr(0);
 	resVar = _vm->_parse->parseVarIndex();
 
-	pos = _vm->_util->strstr(_vm->_global->inter_resStr, _vm->_global->inter_variables + strVar);
+	pos = _vm->_util->strstr(_vm->_global->_inter_resStr, _vm->_global->_inter_variables + strVar);
 	WRITE_VAR_OFFSET(resVar, pos - 1);
 }
 
@@ -771,7 +771,7 @@
 	int16 var;
 
 	var = _vm->_parse->parseVarIndex();
-	len = strlen(_vm->_global->inter_variables + var);
+	len = strlen(_vm->_global->_inter_variables + var);
 	var = _vm->_parse->parseVarIndex();
 
 	WRITE_VAR_OFFSET(var, len);
@@ -784,7 +784,7 @@
 	int32 res;
 
 	strVar = _vm->_parse->parseVarIndex();
-	strcpy(str, _vm->_global->inter_variables + strVar);
+	strcpy(str, _vm->_global->_inter_variables + strVar);
 	res = atol(str);
 
 	destVar = _vm->_parse->parseVarIndex();
@@ -871,9 +871,9 @@
 
 	flag = load16();
 	if (flag == 1)
-		_vm->_draw->spritesArray[index] = _vm->_video->initSurfDesc(_vm->_global->videoMode, width, height, 2);
+		_vm->_draw->spritesArray[index] = _vm->_video->initSurfDesc(_vm->_global->_videoMode, width, height, 2);
 	else
-		_vm->_draw->spritesArray[index] = _vm->_video->initSurfDesc(_vm->_global->videoMode, width, height, 0);
+		_vm->_draw->spritesArray[index] = _vm->_video->initSurfDesc(_vm->_global->_videoMode, width, height, 0);
 
 	_vm->_video->clearSurf(_vm->_draw->spritesArray[index]);
 }
@@ -939,7 +939,7 @@
 		return;
 
 	if (repCount < 0) {
-		if (_vm->_global->soundFlags < 2)
+		if (_vm->_global->_soundFlags < 2)
 			return;
 
 		repCount = -repCount;
@@ -969,7 +969,7 @@
 	int8 index;
 
 	id = load16();
-	index = *_vm->_global->inter_execPtr++;
+	index = *_vm->_global->_inter_execPtr++;
 	itemPtr = &_vm->_game->totResourceTable->items[id];
 	offset = itemPtr->offset;
 
@@ -1000,13 +1000,13 @@
 	_vm->_draw->destSpriteX = _vm->_parse->parseValExpr();
 	_vm->_draw->destSpriteY = _vm->_parse->parseValExpr();
 
-	_vm->_draw->transparency = _vm->_global->inter_execPtr[0];
-	_vm->_draw->destSurface = (_vm->_global->inter_execPtr[0] / 2) - 1;
+	_vm->_draw->transparency = _vm->_global->_inter_execPtr[0];
+	_vm->_draw->destSurface = (_vm->_global->_inter_execPtr[0] / 2) - 1;
 
 	if (_vm->_draw->destSurface < 0)
 		_vm->_draw->destSurface = 101;
 	_vm->_draw->transparency &= 1;
-	_vm->_global->inter_execPtr += 2;
+	_vm->_global->_inter_execPtr += 2;
 	_vm->_draw->spriteOperation(DRAW_LOADSPRITE);
 }
 
@@ -1016,14 +1016,14 @@
 	int16 i;
 
 	debug(4, "loadTot");
-	if ((*_vm->_global->inter_execPtr & 0x80) != 0) {
-		_vm->_global->inter_execPtr++;
+	if ((*_vm->_global->_inter_execPtr & 0x80) != 0) {
+		_vm->_global->_inter_execPtr++;
 		evalExpr(0);
-		strcpy(buf, _vm->_global->inter_resStr);
+		strcpy(buf, _vm->_global->_inter_resStr);
 	} else {
-		size = *_vm->_global->inter_execPtr++;
+		size = *_vm->_global->_inter_execPtr++;
 		for (i = 0; i < size; i++)
-			buf[i] = *_vm->_global->inter_execPtr++;
+			buf[i] = *_vm->_global->_inter_execPtr++;
 
 		buf[size] = 0;
 	}
@@ -1036,10 +1036,10 @@
 void Inter::storeKey(int16 key) {
 	WRITE_VAR(12, _vm->_util->getTimeKey() - _vm->_game->startTimeKey);
 
-	WRITE_VAR(2, _vm->_global->inter_mouseX);
-	WRITE_VAR(3, _vm->_global->inter_mouseY);
+	WRITE_VAR(2, _vm->_global->_inter_mouseX);
+	WRITE_VAR(3, _vm->_global->_inter_mouseY);
 	WRITE_VAR(4, _vm->_game->mouseButtons);
-	WRITE_VAR(1, _vm->_snd->playingSound);
+	WRITE_VAR(1, _vm->_snd->_playingSound);
 
 	if (key == 0x4800)
 		key = 0x0b;
@@ -1079,56 +1079,56 @@
 
 			key = 0;
 
-			if (_vm->_global->pressedKeys[0x48])
+			if (_vm->_global->_pressedKeys[0x48])
 				key |= 1;
 
-			if (_vm->_global->pressedKeys[0x50])
+			if (_vm->_global->_pressedKeys[0x50])
 				key |= 2;
 
-			if (_vm->_global->pressedKeys[0x4d])
+			if (_vm->_global->_pressedKeys[0x4d])
 				key |= 4;
 
-			if (_vm->_global->pressedKeys[0x4b])
+			if (_vm->_global->_pressedKeys[0x4b])
 				key |= 8;
 
-			if (_vm->_global->pressedKeys[0x1c])
+			if (_vm->_global->_pressedKeys[0x1c])
 				key |= 0x10;
 
-			if (_vm->_global->pressedKeys[0x39])
+			if (_vm->_global->_pressedKeys[0x39])
 				key |= 0x20;
 
-			if (_vm->_global->pressedKeys[1])
+			if (_vm->_global->_pressedKeys[1])
 				key |= 0x40;
 
-			if (_vm->_global->pressedKeys[0x1d])
+			if (_vm->_global->_pressedKeys[0x1d])
 				key |= 0x80;
 
-			if (_vm->_global->pressedKeys[0x2a])
+			if (_vm->_global->_pressedKeys[0x2a])
 				key |= 0x100;
 
-			if (_vm->_global->pressedKeys[0x36])
+			if (_vm->_global->_pressedKeys[0x36])
 				key |= 0x200;
 
-			if (_vm->_global->pressedKeys[0x38])
+			if (_vm->_global->_pressedKeys[0x38])
 				key |= 0x400;
 
-			if (_vm->_global->pressedKeys[0x3b])
+			if (_vm->_global->_pressedKeys[0x3b])
 				key |= 0x800;
 
-			if (_vm->_global->pressedKeys[0x3c])
+			if (_vm->_global->_pressedKeys[0x3c])
 				key |= 0x1000;
 
-			if (_vm->_global->pressedKeys[0x3d])
+			if (_vm->_global->_pressedKeys[0x3d])
 				key |= 0x2000;
 
-			if (_vm->_global->pressedKeys[0x3e])
+			if (_vm->_global->_pressedKeys[0x3e])
 				key |= 0x4000;
 
 			WRITE_VAR(0, key);
 			_vm->_util->waitKey();
 			return;
 		}
-		key = _vm->_game->checkKeys(&_vm->_global->inter_mouseX, &_vm->_global->inter_mouseY, &_vm->_game->mouseButtons, 0);
+		key = _vm->_game->checkKeys(&_vm->_global->_inter_mouseX, &_vm->_global->_inter_mouseY, &_vm->_game->mouseButtons, 0);
 
 		storeKey(key);
 		return;
@@ -1158,7 +1158,7 @@
 	value = VAR_OFFSET(value);
 
 	do {
-		len = *(int8*)_vm->_global->inter_execPtr++; // must be a signed char typ and char is not default signed on all platforms.
+		len = *(int8*)_vm->_global->_inter_execPtr++; // must be a signed char typ and char is not default signed on all platforms.
 
 		if (len == -5)
 			break;
@@ -1169,32 +1169,32 @@
 			if (_terminate)
 				return;
 
-			if (_vm->_global->inter_resVal == value) {
+			if (_vm->_global->_inter_resVal == value) {
 				found = 1;
 				notFound = 0;
 			}
 		}
 
 		if (found != 0)
-			*ppExec = _vm->_global->inter_execPtr;
+			*ppExec = _vm->_global->_inter_execPtr;
 
-		_vm->_global->inter_execPtr += READ_LE_UINT16(_vm->_global->inter_execPtr + 2) + 2;
+		_vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr + 2) + 2;
 		found = 0;
 	} while (len != -5);
 
 	if (len != -5)
-		_vm->_global->inter_execPtr++;
+		_vm->_global->_inter_execPtr++;
 
-	defFlag = *_vm->_global->inter_execPtr;
+	defFlag = *_vm->_global->_inter_execPtr;
 	defFlag >>= 4;
 	if (defFlag != 4)
 		return;
-	_vm->_global->inter_execPtr++;
+	_vm->_global->_inter_execPtr++;
 
 	if (notFound)
-		*ppExec = _vm->_global->inter_execPtr;
+		*ppExec = _vm->_global->_inter_execPtr;
 
-	_vm->_global->inter_execPtr += READ_LE_UINT16(_vm->_global->inter_execPtr + 2) + 2;
+	_vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr + 2) + 2;
 }
 
 void Inter::repeatUntil(void) {
@@ -1204,14 +1204,14 @@
 
 	debug(4, "repeatUntil");
 	_nestLevel[0]++;
-	blockPtr = _vm->_global->inter_execPtr;
+	blockPtr = _vm->_global->_inter_execPtr;
 
 	do {
-		_vm->_global->inter_execPtr = blockPtr;
-		size = READ_LE_UINT16(_vm->_global->inter_execPtr + 2) + 2;
+		_vm->_global->_inter_execPtr = blockPtr;
+		size = READ_LE_UINT16(_vm->_global->_inter_execPtr + 2) + 2;
 
 		funcBlock(1);
-		_vm->_global->inter_execPtr = blockPtr + size + 1;
+		_vm->_global->_inter_execPtr = blockPtr + size + 1;
 		flag = evalBoolResult();
 	} while (flag == 0 && !_breakFlag && !_terminate);
 
@@ -1232,26 +1232,26 @@
 	debug(4, "whileDo");
 	_nestLevel[0]++;
 	do {
-		savedIP = _vm->_global->inter_execPtr;
+		savedIP = _vm->_global->_inter_execPtr;
 		flag = evalBoolResult();
 
 		if (_terminate)
 			return;
 
-		blockPtr = _vm->_global->inter_execPtr;
+		blockPtr = _vm->_global->_inter_execPtr;
 
-		size = READ_LE_UINT16(_vm->_global->inter_execPtr + 2) + 2;
+		size = READ_LE_UINT16(_vm->_global->_inter_execPtr + 2) + 2;
 
 		if (flag != 0) {
 			funcBlock(1);
-			_vm->_global->inter_execPtr = savedIP;
+			_vm->_global->_inter_execPtr = savedIP;
 		} else {
-			_vm->_global->inter_execPtr += size;
+			_vm->_global->_inter_execPtr += size;
 		}
 
 		if (_breakFlag || _terminate) {
-			_vm->_global->inter_execPtr = blockPtr;
-			_vm->_global->inter_execPtr += size;
+			_vm->_global->_inter_execPtr = blockPtr;
+			_vm->_global->_inter_execPtr += size;
 			break;
 		}
 	} while (flag != 0);
@@ -1272,16 +1272,16 @@
 	char *callAddr;
 	char boolRes;
 
-	if (_vm->_global->inter_execPtr == 0)
+	if (_vm->_global->_inter_execPtr == 0)
 		return;
 
 	_breakFlag = false;
-	_vm->_global->inter_execPtr++;
-	cmdCount = *_vm->_global->inter_execPtr++;
-	_vm->_global->inter_execPtr += 2;
+	_vm->_global->_inter_execPtr++;
+	cmdCount = *_vm->_global->_inter_execPtr++;
+	_vm->_global->_inter_execPtr += 2;
 
 	if (cmdCount == 0) {
-		_vm->_global->inter_execPtr = 0;
+		_vm->_global->_inter_execPtr = 0;
 		return;
 	}
 
@@ -1290,14 +1290,14 @@
 		if (_terminate)
 			break;
 
-		cmd = (byte)*_vm->_global->inter_execPtr;
+		cmd = (byte)*_vm->_global->_inter_execPtr;
 		if ((cmd >> 4) >= 12) {
 			cmd2 = 16 - (cmd >> 4);
 			cmd &= 0xf;
 		} else
 			cmd2 = 0;
 
-		_vm->_global->inter_execPtr++;
+		_vm->_global->_inter_execPtr++;
 		counter++;
 
 		debug(4, "funcBlock(%d, %d)", cmd2, cmd);
@@ -1307,14 +1307,14 @@
 			switch (cmd >> 4) {
 			case 0:
 			case 1:
-				storedIP = _vm->_global->inter_execPtr;
-				_vm->_global->inter_execPtr = (char *)_vm->_game->totFileData + READ_LE_UINT16(_vm->_global->inter_execPtr);
+				storedIP = _vm->_global->_inter_execPtr;
+				_vm->_global->_inter_execPtr = (char *)_vm->_game->totFileData + READ_LE_UINT16(_vm->_global->_inter_execPtr);
 
 				if (counter == cmdCount && retFlag == 2)
 					return;
 
 				callSub(2);
-				_vm->_global->inter_execPtr = storedIP + 2;
+				_vm->_global->_inter_execPtr = storedIP + 2;
 				break;
 
 			case 2:
@@ -1327,14 +1327,14 @@
 
 			case 5:
 				checkSwitchTable(&callAddr);
-				storedIP = _vm->_global->inter_execPtr;
-				_vm->_global->inter_execPtr = callAddr;
+				storedIP = _vm->_global->_inter_execPtr;
+				_vm->_global->_inter_execPtr = callAddr;
 
 				if (counter == cmdCount && retFlag == 2)
 					return;
 
 				funcBlock(0);
-				_vm->_global->inter_execPtr = storedIP;
+				_vm->_global->_inter_execPtr = storedIP;
 				break;
 
 			case 6:
@@ -1352,35 +1352,35 @@
 					    && retFlag == 2)
 						return;
 
-					storedIP = _vm->_global->inter_execPtr;
+					storedIP = _vm->_global->_inter_execPtr;
 					funcBlock(0);
-					_vm->_global->inter_execPtr = storedIP;
+					_vm->_global->_inter_execPtr = storedIP;
 
-					_vm->_global->inter_execPtr += READ_LE_UINT16(_vm->_global->inter_execPtr + 2) + 2;
+					_vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr + 2) + 2;
 
-					debug(5, "cmd = %d", (int16)*_vm->_global->inter_execPtr);
-					cmd = (byte)(*_vm->_global->inter_execPtr) >> 4;
-					_vm->_global->inter_execPtr++;
+					debug(5, "cmd = %d", (int16)*_vm->_global->_inter_execPtr);
+					cmd = (byte)(*_vm->_global->_inter_execPtr) >> 4;
+					_vm->_global->_inter_execPtr++;
 					if (cmd != 12)
 						break;
 
-					_vm->_global->inter_execPtr += READ_LE_UINT16(_vm->_global->inter_execPtr + 2) + 2;
+					_vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr + 2) + 2;
 				} else {
-					_vm->_global->inter_execPtr += READ_LE_UINT16(_vm->_global->inter_execPtr + 2) + 2;
+					_vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr + 2) + 2;
 
-					debug(5, "cmd = %d", (int16)*_vm->_global->inter_execPtr);
-					cmd = (byte)(*_vm->_global->inter_execPtr) >> 4;
-					_vm->_global->inter_execPtr++;
+					debug(5, "cmd = %d", (int16)*_vm->_global->_inter_execPtr);
+					cmd = (byte)(*_vm->_global->_inter_execPtr) >> 4;
+					_vm->_global->_inter_execPtr++;
 					if (cmd != 12)
 						break;
 
 					if (counter == cmdCount && retFlag == 2)
 						return;
 
-					storedIP = _vm->_global->inter_execPtr;
+					storedIP = _vm->_global->_inter_execPtr;
 					funcBlock(0);
-					_vm->_global->inter_execPtr = storedIP;
-					_vm->_global->inter_execPtr += READ_LE_UINT16(_vm->_global->inter_execPtr + 2) + 2;
+					_vm->_global->_inter_execPtr = storedIP;
+					_vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr + 2) + 2;
 				}
 				break;
 
@@ -1429,7 +1429,7 @@
 				break;
 
 			case 15:
-				cmdCount = *_vm->_global->inter_execPtr++;
+				cmdCount = *_vm->_global->_inter_execPtr++;
 				counter = 0;
 				break;
 			}
@@ -1442,7 +1442,7 @@
 				if (retFlag != 2)
 					_breakFlag = true;
 
-				_vm->_global->inter_execPtr = 0;
+				_vm->_global->_inter_execPtr = 0;
 				return;
 
 			case 1:
@@ -1480,7 +1480,7 @@
 			case 0:
 				if (retFlag == 1) {
 					_breakFlag = true;
-					_vm->_global->inter_execPtr = 0;
+					_vm->_global->_inter_execPtr = 0;
 					return;
 				}
 
@@ -1489,7 +1489,7 @@
 
 				*_breakFromLevel = *_nestLevel;
 				_breakFlag = true;
-				_vm->_global->inter_execPtr = 0;
+				_vm->_global->_inter_execPtr = 0;
 				return;
 
 			case 1:
@@ -1590,8 +1590,8 @@
 				_vm->_draw->blitInvalidated();
 				_vm->_util->waitEndFrame();
 				animPalette();
-				storeKey(_vm->_game->checkKeys(&_vm->_global->inter_mouseX,
-					&_vm->_global->inter_mouseY, &_vm->_game->mouseButtons, 0));
+				storeKey(_vm->_game->checkKeys(&_vm->_global->_inter_mouseX,
+					&_vm->_global->_inter_mouseY, &_vm->_game->mouseButtons, 0));
 				break;
 
 			case 9:
@@ -1636,7 +1636,7 @@
 		}
 	} while (counter != cmdCount);
 
-	_vm->_global->inter_execPtr = 0;
+	_vm->_global->_inter_execPtr = 0;
 	return;
 }
 
@@ -1654,8 +1654,8 @@
 
 void Inter::callSub(int16 retFlag) {
 	int16 block;
-	while (_vm->_global->inter_execPtr != 0 && (char *)_vm->_global->inter_execPtr != _vm->_game->totFileData) {
-		block = *_vm->_global->inter_execPtr;
+	while (_vm->_global->_inter_execPtr != 0 && (char *)_vm->_global->_inter_execPtr != _vm->_game->totFileData) {
+		block = *_vm->_global->_inter_execPtr;
 		if (block == 1) {
 			funcBlock(retFlag);
 		} else if (block == 2) {
@@ -1663,7 +1663,7 @@
 		}
 	}
 
-	if ((char *)_vm->_global->inter_execPtr == _vm->_game->totFileData)
+	if ((char *)_vm->_global->_inter_execPtr == _vm->_game->totFileData)
 		_terminate = true;
 }
 

Index: mult.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/mult.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- mult.cpp	3 Jan 2006 23:14:39 -0000	1.14
+++ mult.cpp	4 Jan 2006 01:48:15 -0000	1.15
@@ -441,11 +441,11 @@
 		objects = (Mult_Object *)malloc(sizeof(Mult_Object) * objCount);
 
 		for (i = 0; i < objCount; i++) {
-			objects[i].pPosX = (int32 *)(_vm->_global->inter_variables + i * 4 + (posXVar / 4) * 4);
-			objects[i].pPosY = (int32 *)(_vm->_global->inter_variables + i * 4 + (posYVar / 4) * 4);
+			objects[i].pPosX = (int32 *)(_vm->_global->_inter_variables + i * 4 + (posXVar / 4) * 4);
+			objects[i].pPosY = (int32 *)(_vm->_global->_inter_variables + i * 4 + (posYVar / 4) * 4);
 			objects[i].pAnimData =
-			    (Mult_AnimData *) (_vm->_global->inter_variables + animDataVar +
-			    i * 4 * _vm->_global->inter_animDataSize);
+			    (Mult_AnimData *) (_vm->_global->_inter_variables + animDataVar +
+			    i * 4 * _vm->_global->_inter_animDataSize);
 
 			objects[i].pAnimData->isStatic = 1;
 			objects[i].tick = 0;
@@ -467,7 +467,7 @@
 	}
 
 	if (_vm->_anim->_animSurf == 0) {
-		_vm->_anim->_animSurf = _vm->_video->initSurfDesc(_vm->_global->videoMode,
+		_vm->_anim->_animSurf = _vm->_video->initSurfDesc(_vm->_global->_videoMode,
 		    _vm->_anim->_areaWidth, _vm->_anim->_areaHeight, 0);
 
 		_vm->_draw->spritesArray[22] = _vm->_anim->_animSurf;
@@ -480,7 +480,7 @@
 
 	debug(4, "interInitMult: x = %d, y = %d, w = %d, h = %d",
 		  _vm->_anim->_areaLeft, _vm->_anim->_areaTop, _vm->_anim->_areaWidth, _vm->_anim->_areaHeight);
-	debug(4, "    objCount = %d, animation data size = %d", objCount, _vm->_global->inter_animDataSize);
+	debug(4, "    objCount = %d, animation data size = %d", objCount, _vm->_global->_inter_animDataSize);
 }
 
 void Mult::freeMult(void) {
@@ -511,11 +511,11 @@
 
 	lmultData = (char *)objects[objIndex].pAnimData;
 	for (i = 0; i < 11; i++) {
-		if ((char)READ_LE_UINT16(_vm->_global->inter_execPtr) == (char)99) {
+		if ((char)READ_LE_UINT16(_vm->_global->_inter_execPtr) == (char)99) {
 			_vm->_inter->evalExpr(&val);
 			lmultData[i] = val;
 		} else {
-			_vm->_global->inter_execPtr++;
+			_vm->_global->_inter_execPtr++;
 		}
 	}
 }
@@ -642,9 +642,9 @@
 			frameStart = 0;
 		} else if (cmd == 3) {
 			*pStop = 0;
-			savedIP = _vm->_global->inter_execPtr;
-			_vm->_global->inter_execPtr = (char *)(&textKeys[index].index);
-			_vm->_global->inter_execPtr = savedIP;
+			savedIP = _vm->_global->_inter_execPtr;
+			_vm->_global->_inter_execPtr = (char *)(&textKeys[index].index);
+			_vm->_global->_inter_execPtr = savedIP;
 		}
 	}
 }
@@ -660,11 +660,11 @@
 	if (palKeys[palKeyIndex].cmd == -1) {
 		stop = 0;
 		doPalSubst = 0;
-		_vm->_global->pPaletteDesc->vgaPal = oldPalette;
+		_vm->_global->_pPaletteDesc->vgaPal = oldPalette;
 
-		memcpy((char *)palAnimPalette, (char *)_vm->_global->pPaletteDesc->vgaPal, 768);
+		memcpy((char *)palAnimPalette, (char *)_vm->_global->_pPaletteDesc->vgaPal, 768);
 
-		_vm->_video->setFullPalette(_vm->_global->pPaletteDesc);
+		_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
 	} else {
 		stop = 0;
 		doPalSubst = 1;
@@ -675,7 +675,7 @@
 		palAnimIndices[2] = 0;
 		palAnimIndices[3] = 0;
 
-		_vm->_global->pPaletteDesc->vgaPal = palAnimPalette;
+		_vm->_global->_pPaletteDesc->vgaPal = palAnimPalette;
 	}
 	return stop;
 }
@@ -696,27 +696,27 @@
 			continue;
 
 		palAnimRed[index] =
-		    _vm->_global->pPaletteDesc->vgaPal[palKey->subst[0][index] - 1].red;
+		    _vm->_global->_pPaletteDesc->vgaPal[palKey->subst[0][index] - 1].red;
 		palAnimGreen[index] =
-		    _vm->_global->pPaletteDesc->vgaPal[palKey->subst[0][index] - 1].green;
+		    _vm->_global->_pPaletteDesc->vgaPal[palKey->subst[0][index] - 1].green;
 		palAnimBlue[index] =
-		    _vm->_global->pPaletteDesc->vgaPal[palKey->subst[0][index] - 1].blue;
+		    _vm->_global->_pPaletteDesc->vgaPal[palKey->subst[0][index] - 1].blue;
 
 		while (1) {
 			off = palKey->subst[(palAnimIndices[index] + 1) % 16][index];
 			if (off == 0) {
 				off = palKey->subst[palAnimIndices[index]][index] - 1;
 
-				_vm->_global->pPaletteDesc->vgaPal[off].red = palAnimRed[index];
-				_vm->_global->pPaletteDesc->vgaPal[off].green = palAnimGreen[index];
-				_vm->_global->pPaletteDesc->vgaPal[off].blue = palAnimBlue[index];
+				_vm->_global->_pPaletteDesc->vgaPal[off].red = palAnimRed[index];
+				_vm->_global->_pPaletteDesc->vgaPal[off].green = palAnimGreen[index];
+				_vm->_global->_pPaletteDesc->vgaPal[off].blue = palAnimBlue[index];
 			} else {
 				off = palKey->subst[(palAnimIndices[index] + 1) % 16][index] - 1;
 				off2 = palKey->subst[palAnimIndices[index]][index] - 1;
 
-				_vm->_global->pPaletteDesc->vgaPal[off2].red = _vm->_global->pPaletteDesc->vgaPal[off].red;
-				_vm->_global->pPaletteDesc->vgaPal[off2].green = _vm->_global->pPaletteDesc->vgaPal[off].green;
-				_vm->_global->pPaletteDesc->vgaPal[off2].blue = _vm->_global->pPaletteDesc->vgaPal[off].blue;
+				_vm->_global->_pPaletteDesc->vgaPal[off2].red = _vm->_global->_pPaletteDesc->vgaPal[off].red;
+				_vm->_global->_pPaletteDesc->vgaPal[off2].green = _vm->_global->_pPaletteDesc->vgaPal[off].green;
+				_vm->_global->_pPaletteDesc->vgaPal[off2].blue = _vm->_global->_pPaletteDesc->vgaPal[off].blue;
 			}
 
 			palAnimIndices[index] = (palAnimIndices[index] + 1) % 16;
@@ -727,33 +727,33 @@
 				palAnimIndices[index] = 0;
 				off = palKey->subst[0][index] - 1;
 
-				palAnimRed[index] = _vm->_global->pPaletteDesc->vgaPal[off].red;
-				palAnimGreen[index] = _vm->_global->pPaletteDesc->vgaPal[off].green;
-				palAnimBlue[index] = _vm->_global->pPaletteDesc->vgaPal[off].blue;
+				palAnimRed[index] = _vm->_global->_pPaletteDesc->vgaPal[off].red;
+				palAnimGreen[index] = _vm->_global->_pPaletteDesc->vgaPal[off].green;
+				palAnimBlue[index] = _vm->_global->_pPaletteDesc->vgaPal[off].blue;
 			}
 			if (palAnimIndices[index] == 0)
 				break;
 		}
 	}
 
-	if (_vm->_global->colorCount == 256) {
-		_vm->_video->waitRetrace(_vm->_global->videoMode);
+	if (_vm->_global->_colorCount == 256) {
+		_vm->_video->waitRetrace(_vm->_global->_videoMode);
 
-		palPtr = _vm->_global->pPaletteDesc->vgaPal;
+		palPtr = _vm->_global->_pPaletteDesc->vgaPal;
 		for (counter = 0; counter < 16; counter++) {
 			_vm->_video->setPalElem(counter, palPtr->red, palPtr->green, palPtr->blue, 0, 0x13);
 			palPtr++;
 		}
 
-		palPtr = _vm->_global->pPaletteDesc->vgaPal;
+		palPtr = _vm->_global->_pPaletteDesc->vgaPal;
 		for (counter = 0; counter < 16; counter++) {
-			_vm->_global->redPalette[counter] = palPtr->red;
-			_vm->_global->greenPalette[counter] = palPtr->green;
-			_vm->_global->bluePalette[counter] = palPtr->blue;
+			_vm->_global->_redPalette[counter] = palPtr->red;
+			_vm->_global->_greenPalette[counter] = palPtr->green;
+			_vm->_global->_bluePalette[counter] = palPtr->blue;
 			palPtr++;
 		}
 	} else {
-		_vm->_video->setFullPalette(_vm->_global->pPaletteDesc);
+		_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
 	}
 }
 
@@ -769,15 +769,15 @@
 		stop = 0;
 		if ((fadeKey->flag & 1) == 0) {
 			if (fadeKey->fade == 0) {
-				_vm->_global->pPaletteDesc->vgaPal = fadePal[fadeKey->palIndex];
-				_vm->_video->setFullPalette(_vm->_global->pPaletteDesc);
+				_vm->_global->_pPaletteDesc->vgaPal = fadePal[fadeKey->palIndex];
+				_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
 			} else {
-				_vm->_global->pPaletteDesc->vgaPal = fadePal[fadeKey->palIndex];
-				_vm->_palanim->fade(_vm->_global->pPaletteDesc, fadeKey->fade, 0);
+				_vm->_global->_pPaletteDesc->vgaPal = fadePal[fadeKey->palIndex];
+				_vm->_palanim->fade(_vm->_global->_pPaletteDesc, fadeKey->fade, 0);
 			}
 		} else {
-			_vm->_global->pPaletteDesc->vgaPal = fadePal[fadeKey->palIndex];
-			_vm->_palanim->fade(_vm->_global->pPaletteDesc, fadeKey->fade, -1);
+			_vm->_global->_pPaletteDesc->vgaPal = fadePal[fadeKey->palIndex];
+			_vm->_palanim->fade(_vm->_global->_pPaletteDesc, fadeKey->fade, -1);
 
 			palFadingRed = (fadeKey->flag >> 1) & 1;
 			palFadingGreen = (fadeKey->flag >> 2) & 1;
@@ -821,7 +821,7 @@
 				    sndKey->freq, sndKey->channel);
 			}
 		} else {
-			if (_vm->_snd->playingSound)
+			if (_vm->_snd->_playingSound)
 				_vm->_snd->stopSound(sndKey->channel);
 		}
 	}
@@ -849,8 +849,8 @@
 		palFadingGreen = 0;
 		palFadingBlue = 0;
 
-		oldPalette = _vm->_global->pPaletteDesc->vgaPal;
-		memcpy((char *)palAnimPalette, (char *)_vm->_global->pPaletteDesc->vgaPal, 768);
+		oldPalette = _vm->_global->_pPaletteDesc->vgaPal;
+		memcpy((char *)palAnimPalette, (char *)_vm->_global->_pPaletteDesc->vgaPal, 768);
 
 		if (_vm->_anim->_animSurf == 0) {
 			_vm->_util->setFrameRate(frameRate);
@@ -887,7 +887,7 @@
 			}
 
 			_vm->_anim->_animSurf =
-			    _vm->_video->initSurfDesc(_vm->_global->videoMode, 320, 200, 0);
+			    _vm->_video->initSurfDesc(_vm->_global->_videoMode, 320, 200, 0);
 			_vm->_draw->spritesArray[22] = _vm->_anim->_animSurf;
 
 			_vm->_video->drawSprite(_vm->_draw->backSurface, _vm->_anim->_animSurf,
@@ -927,7 +927,7 @@
 		if (frame >= endFrame)
 			stopNoClear = 1;
 
-		if (_vm->_snd->playingSound)
+		if (_vm->_snd->_playingSound)
 			stop = 0;
 
 		_vm->_util->processInput();
@@ -962,7 +962,7 @@
 			animDataAllocated = 0;
 		}
 
-		if (_vm->_snd->playingSound != 0)
+		if (_vm->_snd->_playingSound != 0)
 			_vm->_snd->stopSound(10);
 
 		WRITE_VAR(57, (uint32)-1);
@@ -1110,14 +1110,14 @@
 		switch (sndKeys[i].cmd) {
 		case 1:
 		case 4:
-			sndKeys[i].resId = READ_LE_UINT16(_vm->_global->inter_execPtr);
+			sndKeys[i].resId = READ_LE_UINT16(_vm->_global->_inter_execPtr);
 
 			for (j = 0; j < i; j++) {
 				if (sndKeys[i].resId ==
 				    sndKeys[j].resId) {
 					sndKeys[i].soundIndex =
 					    sndKeys[j].soundIndex;
-					_vm->_global->inter_execPtr += 2;
+					_vm->_global->_inter_execPtr += 2;
 					break;
 				}
 			}
@@ -1130,11 +1130,11 @@
 			break;
 
 		case 3:
-			_vm->_global->inter_execPtr += 6;
+			_vm->_global->_inter_execPtr += 6;
 			break;
 
 		case 5:
-			_vm->_global->inter_execPtr += sndKeys[i].freq * 2;
+			_vm->_global->_inter_execPtr += sndKeys[i].freq * 2;
 			break;
 		}
 	}

Index: palanim.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/palanim.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- palanim.cpp	4 Jan 2006 01:23:20 -0000	1.13
+++ palanim.cpp	4 Jan 2006 01:48:15 -0000	1.14
@@ -52,29 +52,29 @@
 	char stop;
 	int16 i;
 
-	if (_vm->_global->colorCount != 256)
+	if (_vm->_global->_colorCount != 256)
 		error("fadeStep: Only 256 color mode is supported!");
 
 	if (oper == 0) {
 		stop = 1;
-		if (_vm->_global->setAllPalette) {
-			if (_vm->_global->inVM != 0)
-				error("fade: _vm->_global->inVM != 0 not supported.");
+		if (_vm->_global->_setAllPalette) {
+			if (_vm->_global->_inVM != 0)
+				error("fade: _vm->_global->_inVM != 0 not supported.");
 
 			for (i = 0; i < 256; i++) {
-				newRed = fadeColor(_vm->_global->redPalette[i], _toFadeRed[i]);
-				newGreen = fadeColor(_vm->_global->greenPalette[i], _toFadeGreen[i]);
-				newBlue = fadeColor(_vm->_global->bluePalette[i], _toFadeBlue[i]);
+				newRed = fadeColor(_vm->_global->_redPalette[i], _toFadeRed[i]);
+				newGreen = fadeColor(_vm->_global->_greenPalette[i], _toFadeGreen[i]);
+				newBlue = fadeColor(_vm->_global->_bluePalette[i], _toFadeBlue[i]);
 
-				if (_vm->_global->redPalette[i] != newRed
-				    || _vm->_global->greenPalette[i] != newGreen
-				    || _vm->_global->bluePalette[i] != newBlue) {
+				if (_vm->_global->_redPalette[i] != newRed
+				    || _vm->_global->_greenPalette[i] != newGreen
+				    || _vm->_global->_bluePalette[i] != newBlue) {
 
 					_vm->_video->setPalElem(i, newRed, newGreen, newBlue, 0, 0x13);
 
-					_vm->_global->redPalette[i] = newRed;
-					_vm->_global->greenPalette[i] = newGreen;
-					_vm->_global->bluePalette[i] = newBlue;
+					_vm->_global->_redPalette[i] = newRed;
+					_vm->_global->_greenPalette[i] = newGreen;
+					_vm->_global->_bluePalette[i] = newBlue;
 					stop = 0;
 				}
 			}
@@ -82,16 +82,16 @@
 			for (i = 0; i < 16; i++) {
 
 				_vm->_video->setPalElem(i,
-				    fadeColor(_vm->_global->redPalette[i],
+				    fadeColor(_vm->_global->_redPalette[i],
 					_toFadeRed[i]),
-				    fadeColor(_vm->_global->greenPalette[i],
+				    fadeColor(_vm->_global->_greenPalette[i],
 					_toFadeGreen[i]),
-				    fadeColor(_vm->_global->bluePalette[i],
-					_toFadeBlue[i]), -1, _vm->_global->videoMode);
+				    fadeColor(_vm->_global->_bluePalette[i],
+					_toFadeBlue[i]), -1, _vm->_global->_videoMode);
 
-				if (_vm->_global->redPalette[i] != _toFadeRed[i] ||
-				    _vm->_global->greenPalette[i] != _toFadeGreen[i] ||
-				    _vm->_global->bluePalette[i] != _toFadeBlue[i])
+				if (_vm->_global->_redPalette[i] != _toFadeRed[i] ||
+				    _vm->_global->_greenPalette[i] != _toFadeGreen[i] ||
+				    _vm->_global->_bluePalette[i] != _toFadeBlue[i])
 					stop = 0;
 			}
 		}
@@ -100,10 +100,10 @@
 		stop = 1;
 		for (i = 0; i < 16; i++) {
 			_vm->_video->setPalElem(i,
-			    fadeColor(_vm->_global->redPalette[i], _toFadeRed[i]),
-			    _vm->_global->greenPalette[i], _vm->_global->bluePalette[i], -1, _vm->_global->videoMode);
+			    fadeColor(_vm->_global->_redPalette[i], _toFadeRed[i]),
+			    _vm->_global->_greenPalette[i], _vm->_global->_bluePalette[i], -1, _vm->_global->_videoMode);
 
-			if (_vm->_global->redPalette[i] != _toFadeRed[i])
+			if (_vm->_global->_redPalette[i] != _toFadeRed[i])
 				stop = 0;
 		}
 		return stop;
@@ -111,11 +111,11 @@
 		stop = 1;
 		for (i = 0; i < 16; i++) {
 			_vm->_video->setPalElem(i,
-			    _vm->_global->redPalette[i],
-			    fadeColor(_vm->_global->greenPalette[i], _toFadeGreen[i]),
-			    _vm->_global->bluePalette[i], -1, _vm->_global->videoMode);
+			    _vm->_global->_redPalette[i],
+			    fadeColor(_vm->_global->_greenPalette[i], _toFadeGreen[i]),
+			    _vm->_global->_bluePalette[i], -1, _vm->_global->_videoMode);
 
-			if (_vm->_global->greenPalette[i] != _toFadeGreen[i])
+			if (_vm->_global->_greenPalette[i] != _toFadeGreen[i])
 				stop = 0;
 		}
 		return stop;
@@ -123,12 +123,12 @@
 		stop = 1;
 		for (i = 0; i < 16; i++) {
 			_vm->_video->setPalElem(i,
-			    _vm->_global->redPalette[i],
-			    _vm->_global->greenPalette[i],
-			    fadeColor(_vm->_global->bluePalette[i], _toFadeBlue[i]),
-			    -1, _vm->_global->videoMode);
+			    _vm->_global->_redPalette[i],
+			    _vm->_global->_greenPalette[i],
+			    fadeColor(_vm->_global->_bluePalette[i], _toFadeBlue[i]),
+			    -1, _vm->_global->_videoMode);
 
-			if (_vm->_global->bluePalette[i] != _toFadeBlue[i])
+			if (_vm->_global->_bluePalette[i] != _toFadeBlue[i])
 				stop = 0;
 		}
 		return stop;
@@ -145,13 +145,13 @@
 	else
 		_fadeValue = 2;
 
-	if (_vm->_global->colorCount < 256) {
+	if (_vm->_global->_colorCount < 256) {
 		if (palDesc != 0)
 			_vm->_video->setFullPalette(palDesc);
 		return;
 	}
 
-	if (_vm->_global->setAllPalette == 0) {
+	if (_vm->_global->_setAllPalette == 0) {
 		if (palDesc == 0) {
 			for (i = 0; i < 16; i++) {
 				_toFadeRed[i] = 0;
@@ -166,8 +166,8 @@
 			}
 		}
 	} else {
-		if (_vm->_global->inVM != 0)
-			error("fade: _vm->_global->inVM != 0 is not supported");
+		if (_vm->_global->_inVM != 0)
+			error("fade: _vm->_global->_inVM != 0 is not supported");
 
 		if (palDesc == 0) {
 			for (i = 0; i < 256; i++) {
@@ -186,8 +186,8 @@
 
 	if (allColors == 0) {
 		do {
-			if (_vm->_global->tmpPalBuffer == 0)
-				_vm->_video->waitRetrace(_vm->_global->videoMode);
+			if (_vm->_global->_tmpPalBuffer == 0)
+				_vm->_video->waitRetrace(_vm->_global->_videoMode);
 
 			stop = fadeStep(0);
 
@@ -203,17 +203,17 @@
 
 	if (allColors == 1) {
 		do {
-			_vm->_video->waitRetrace(_vm->_global->videoMode);
+			_vm->_video->waitRetrace(_vm->_global->_videoMode);
 			stop = fadeStep(1);
 		} while (stop == 0);
 
 		do {
-			_vm->_video->waitRetrace(_vm->_global->videoMode);
+			_vm->_video->waitRetrace(_vm->_global->_videoMode);
 			stop = fadeStep(2);
 		} while (stop == 0);
 
 		do {
-			_vm->_video->waitRetrace(_vm->_global->videoMode);
+			_vm->_video->waitRetrace(_vm->_global->_videoMode);
 			stop = fadeStep(3);
 		} while (stop == 0);
 
@@ -223,8 +223,8 @@
 			_vm->_util->clearPalette();
 	}
 
-	free(_vm->_global->tmpPalBuffer);
-	_vm->_global->tmpPalBuffer = 0;
+	free(_vm->_global->_tmpPalBuffer);
+	_vm->_global->_tmpPalBuffer = 0;
 }
 
 }				// End of namespace Gob

Index: parse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/parse.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- parse.cpp	3 Jan 2006 23:14:39 -0000	1.16
+++ parse.cpp	4 Jan 2006 01:48:15 -0000	1.17
@@ -39,10 +39,10 @@
 		offset = ptr - _vm->_game->totFileData;
 		break;
 	case kInterVar:
-		offset = ptr - _vm->_global->inter_variables;
+		offset = ptr - _vm->_global->_inter_variables;
 		break;
 	case kResStr:
-		offset = ptr - _vm->_global->inter_resStr;
+		offset = ptr - _vm->_global->_inter_resStr;
 		break;
 	default:
 		error("encodePtr: Unknown pointer type");
@@ -59,10 +59,10 @@
 		ptr = _vm->_game->totFileData;
 		break;
 	case kInterVar:
-		ptr = _vm->_global->inter_variables;
+		ptr = _vm->_global->_inter_variables;
 		break;
 	case kResStr:
-		ptr = _vm->_global->inter_resStr;
+		ptr = _vm->_global->_inter_resStr;
 		break;
 	default:
 		error("decodePtr: Unknown pointer type");
@@ -98,13 +98,13 @@
 		stkPos++;
 		operPtr++;
 		valPtr++;
-		operation = *_vm->_global->inter_execPtr++;
+		operation = *_vm->_global->_inter_execPtr++;
 		if (operation >= 19 && operation <= 29) {
 			switch (operation) {
 			case 19:
 				*operPtr = 20;
-				*valPtr = READ_LE_UINT32(_vm->_global->inter_execPtr);
-				_vm->_global->inter_execPtr += 4;
+				*valPtr = READ_LE_UINT32(_vm->_global->_inter_execPtr);
+				_vm->_global->_inter_execPtr += 4;
 				break;
 
 			case 20:
@@ -114,8 +114,8 @@
 
 			case 22:
 				*operPtr = 22;
-				*valPtr = encodePtr(_vm->_global->inter_execPtr, kExecPtr);
-				_vm->_global->inter_execPtr += strlen(_vm->_global->inter_execPtr) + 1;
+				*valPtr = encodePtr(_vm->_global->_inter_execPtr, kExecPtr);
+				_vm->_global->_inter_execPtr += strlen(_vm->_global->_inter_execPtr) + 1;
 				break;
 
 			case 23:
@@ -126,12 +126,12 @@
 			case 25:
 				*operPtr = 22;
 				temp = _vm->_inter->load16() * 4;
-				*valPtr = encodePtr(_vm->_global->inter_variables + temp, kInterVar);
-				if (*_vm->_global->inter_execPtr == 13) {
-					_vm->_global->inter_execPtr++;
+				*valPtr = encodePtr(_vm->_global->_inter_variables + temp, kInterVar);
+				if (*_vm->_global->_inter_execPtr == 13) {
+					_vm->_global->_inter_execPtr++;
 					temp += parseValExpr();
 					*operPtr = 20;
-					*valPtr = (uint8)*(_vm->_global->inter_variables + temp);
+					*valPtr = (uint8)*(_vm->_global->_inter_variables + temp);
 				}
 				break;
 
@@ -139,9 +139,9 @@
 			case 28:
 				*operPtr = operation - 6;
 				temp = _vm->_inter->load16();
-				dimCount = *_vm->_global->inter_execPtr++;
-				arrDescPtr = (byte *)_vm->_global->inter_execPtr;
-				_vm->_global->inter_execPtr += dimCount;
+				dimCount = *_vm->_global->_inter_execPtr++;
+				arrDescPtr = (byte *)_vm->_global->_inter_execPtr;
+				_vm->_global->_inter_execPtr += dimCount;
 				offset = 0;
 				dim = 0;
 				for (dim = 0; dim < dimCount; dim++) {
@@ -153,22 +153,22 @@
 					*valPtr = VAR(temp + offset);
 					break;
 				}
-				*valPtr = encodePtr(_vm->_global->inter_variables + temp * 4 + offset * _vm->_global->inter_animDataSize * 4, kInterVar);
-				if (*_vm->_global->inter_execPtr == 13) {
-					_vm->_global->inter_execPtr++;
+				*valPtr = encodePtr(_vm->_global->_inter_variables + temp * 4 + offset * _vm->_global->_inter_animDataSize * 4, kInterVar);
+				if (*_vm->_global->_inter_execPtr == 13) {
+					_vm->_global->_inter_execPtr++;
 					temp2 = parseValExpr();
 					*operPtr = 20;
-					*valPtr = (uint8)*(_vm->_global->inter_variables + temp * 4 + offset * 4 * _vm->_global->inter_animDataSize + temp2);
+					*valPtr = (uint8)*(_vm->_global->_inter_variables + temp * 4 + offset * 4 * _vm->_global->_inter_animDataSize + temp2);
 				}
 				break;
 
 			case 29:
-				operation = *_vm->_global->inter_execPtr++;
+				operation = *_vm->_global->_inter_execPtr++;
 				parseExpr(10, 0);
 
 				switch (operation) {
 				case 5:
-					_vm->_global->inter_resVal = _vm->_global->inter_resVal * _vm->_global->inter_resVal;
+					_vm->_global->_inter_resVal = _vm->_global->_inter_resVal * _vm->_global->_inter_resVal;
 					break;
 
 				case 0:
@@ -180,22 +180,22 @@
 					do {
 						prevPrevVal = prevVal;
 						prevVal = curVal;
-						curVal = (curVal + _vm->_global->inter_resVal / curVal) / 2;
+						curVal = (curVal + _vm->_global->_inter_resVal / curVal) / 2;
 					} while (curVal != prevVal && curVal != prevPrevVal);
-					_vm->_global->inter_resVal = curVal;
+					_vm->_global->_inter_resVal = curVal;
 					break;
 
 				case 10:
-					_vm->_global->inter_resVal = _vm->_util->getRandom(_vm->_global->inter_resVal);
+					_vm->_global->_inter_resVal = _vm->_util->getRandom(_vm->_global->_inter_resVal);
 					break;
 
 				case 7:
-					if (_vm->_global->inter_resVal < 0)
-						_vm->_global->inter_resVal = -_vm->_global->inter_resVal;
+					if (_vm->_global->_inter_resVal < 0)
+						_vm->_global->_inter_resVal = -_vm->_global->_inter_resVal;
 					break;
 				}
 				*operPtr = 20;
-				*valPtr = _vm->_global->inter_resVal;
+				*valPtr = _vm->_global->_inter_resVal;
 			}
 
 			if (stkPos > 0 && (operPtr[-1] == 1 || operPtr[-1] == 11)) {
@@ -220,11 +220,11 @@
 			switch (operPtr[-1]) {
 			case 2:
 				if (operPtr[-2] == 22) {
-					if (decodePtr(valPtr[-2]) != _vm->_global->inter_resStr) {
-						strcpy(_vm->_global->inter_resStr, decodePtr(valPtr[-2]));
-						valPtr[-2] = encodePtr(_vm->_global->inter_resStr, kResStr);
+					if (decodePtr(valPtr[-2]) != _vm->_global->_inter_resStr) {
+						strcpy(_vm->_global->_inter_resStr, decodePtr(valPtr[-2]));
+						valPtr[-2] = encodePtr(_vm->_global->_inter_resStr, kResStr);
 					}
-					strcat(_vm->_global->inter_resStr, decodePtr(valPtr[0]));
+					strcat(_vm->_global->_inter_resStr, decodePtr(valPtr[0]));
 					stkPos -= 2;
 					operPtr -= 2;
 					valPtr -= 2;
@@ -340,11 +340,11 @@
 					if (operStack[brackStart] == 20) {
 						values[brackStart] += valPtr[-1];
 					} else if (operStack[brackStart] == 22) {
-						if (decodePtr(values[brackStart]) != _vm->_global->inter_resStr) {
-							strcpy(_vm->_global->inter_resStr, decodePtr(values[brackStart]));
-							values[brackStart] = encodePtr(_vm->_global->inter_resStr, kResStr);
+						if (decodePtr(values[brackStart]) != _vm->_global->_inter_resStr) {
+							strcpy(_vm->_global->_inter_resStr, decodePtr(values[brackStart]));
+							values[brackStart] = encodePtr(_vm->_global->_inter_resStr, kResStr);
 						}
-						strcat(_vm->_global->inter_resStr, decodePtr(valPtr[-1]));
+						strcat(_vm->_global->_inter_resStr, decodePtr(valPtr[-1]));
 					}
 					stkPos -= 2;
 					operPtr -= 2;
@@ -416,11 +416,11 @@
 						if (valPtr[-3] < valPtr[-1])
 							operPtr[-3] = 24;
 					} else if (var_C == 22) {
-						if (decodePtr(valPtr[-3]) != _vm->_global->inter_resStr) {
-							strcpy(_vm->_global->inter_resStr, decodePtr(valPtr[-3]));
-							valPtr[-3] = encodePtr(_vm->_global->inter_resStr, kResStr);
+						if (decodePtr(valPtr[-3]) != _vm->_global->_inter_resStr) {
+							strcpy(_vm->_global->_inter_resStr, decodePtr(valPtr[-3]));
+							valPtr[-3] = encodePtr(_vm->_global->_inter_resStr, kResStr);
 						}
-						if (strcmp(_vm->_global->inter_resStr, decodePtr(valPtr[-1])) < 0)
+						if (strcmp(_vm->_global->_inter_resStr, decodePtr(valPtr[-1])) < 0)
 							operPtr[-3] = 24;
 					}
 					stkPos -= 2;
@@ -435,11 +435,11 @@
 						if (valPtr[-3] <= valPtr[-1])
 							operPtr[-3] = 24;
 					} else if (var_C == 22) {
-						if (decodePtr(valPtr[-3]) != _vm->_global->inter_resStr) {
-							strcpy(_vm->_global->inter_resStr, decodePtr(valPtr[-3]));
-							valPtr[-3] = encodePtr(_vm->_global->inter_resStr, kResStr);
+						if (decodePtr(valPtr[-3]) != _vm->_global->_inter_resStr) {
+							strcpy(_vm->_global->_inter_resStr, decodePtr(valPtr[-3]));
+							valPtr[-3] = encodePtr(_vm->_global->_inter_resStr, kResStr);
 						}
-						if (strcmp(_vm->_global->inter_resStr, decodePtr(valPtr[-1])) <= 0)
+						if (strcmp(_vm->_global->_inter_resStr, decodePtr(valPtr[-1])) <= 0)
 							operPtr[-3] = 24;
 					}
 					stkPos -= 2;
@@ -454,11 +454,11 @@
 						if (valPtr[-3] > valPtr[-1])
 							operPtr[-3] = 24;
 					} else if (var_C == 22) {
-						if (decodePtr(valPtr[-3]) != _vm->_global->inter_resStr) {
-							strcpy(_vm->_global->inter_resStr, decodePtr(valPtr[-3]));
-							valPtr[-3] = encodePtr(_vm->_global->inter_resStr, kResStr);
+						if (decodePtr(valPtr[-3]) != _vm->_global->_inter_resStr) {
+							strcpy(_vm->_global->_inter_resStr, decodePtr(valPtr[-3]));
+							valPtr[-3] = encodePtr(_vm->_global->_inter_resStr, kResStr);
 						}
-						if (strcmp(_vm->_global->inter_resStr, decodePtr(valPtr[-1])) > 0)
+						if (strcmp(_vm->_global->_inter_resStr, decodePtr(valPtr[-1])) > 0)
 							operPtr[-3] = 24;
 					}
 					stkPos -= 2;
@@ -473,11 +473,11 @@
 						if (valPtr[-3] >= valPtr[-1])
 							operPtr[-3] = 24;
 					} else if (var_C == 22) {
-						if (decodePtr(valPtr[-3]) != _vm->_global->inter_resStr) {
-							strcpy(_vm->_global->inter_resStr, decodePtr(valPtr[-3]));
-							valPtr[-3] = encodePtr(_vm->_global->inter_resStr, kResStr);
+						if (decodePtr(valPtr[-3]) != _vm->_global->_inter_resStr) {
+							strcpy(_vm->_global->_inter_resStr, decodePtr(valPtr[-3]));
+							valPtr[-3] = encodePtr(_vm->_global->_inter_resStr, kResStr);
 						}
-						if (strcmp(_vm->_global->inter_resStr, decodePtr(valPtr[-1])) >= 0)
+						if (strcmp(_vm->_global->_inter_resStr, decodePtr(valPtr[-1])) >= 0)
 							operPtr[-3] = 24;
 					}
 					stkPos -= 2;
@@ -492,11 +492,11 @@
 						if (valPtr[-3] == valPtr[-1])
 							operPtr[-3] = 24;
 					} else if (var_C == 22) {
-						if (decodePtr(valPtr[-3]) != _vm->_global->inter_resStr) {
-							strcpy(_vm->_global->inter_resStr, decodePtr(valPtr[-3]));
-							valPtr[-3] = encodePtr(_vm->_global->inter_resStr, kResStr);
+						if (decodePtr(valPtr[-3]) != _vm->_global->_inter_resStr) {
+							strcpy(_vm->_global->_inter_resStr, decodePtr(valPtr[-3]));
+							valPtr[-3] = encodePtr(_vm->_global->_inter_resStr, kResStr);
 						}
-						if (strcmp(_vm->_global->inter_resStr, decodePtr(valPtr[-1])) == 0)
+						if (strcmp(_vm->_global->_inter_resStr, decodePtr(valPtr[-1])) == 0)
 							operPtr[-3] = 24;
 					}
 					stkPos -= 2;
@@ -511,11 +511,11 @@
 						if (valPtr[-3] != valPtr[-1])
 							operPtr[-3] = 24;
 					} else if (var_C == 22) {
-						if (decodePtr(valPtr[-3]) != _vm->_global->inter_resStr) {
-							strcpy(_vm->_global->inter_resStr, decodePtr(valPtr[-3]));
-							valPtr[-3] = encodePtr(_vm->_global->inter_resStr, kResStr);
+						if (decodePtr(valPtr[-3]) != _vm->_global->_inter_resStr) {
+							strcpy(_vm->_global->_inter_resStr, decodePtr(valPtr[-3]));
+							valPtr[-3] = encodePtr(_vm->_global->_inter_resStr, kResStr);
 						}
-						if (strcmp(_vm->_global->inter_resStr, decodePtr(valPtr[-1])) != 0)
+						if (strcmp(_vm->_global->_inter_resStr, decodePtr(valPtr[-1])) != 0)
 							operPtr[-3] = 24;
 					}
 					stkPos -= 2;
@@ -551,7 +551,7 @@
 					} else {
 						skipExpr(arg_0);
 					}
-					operation = _vm->_global->inter_execPtr[-1];
+					operation = _vm->_global->_inter_execPtr[-1];
 					if (stkPos > 0 && operPtr[-1] == 11) {
 						if (operPtr[0] == 23)
 							operPtr[-1] = 24;
@@ -578,12 +578,12 @@
 
 			switch (operStack[0]) {
 			case 20:
-				_vm->_global->inter_resVal = values[0];
+				_vm->_global->_inter_resVal = values[0];
 				break;
 
 			case 22:
-				if (decodePtr(values[0]) != _vm->_global->inter_resStr)
-					strcpy(_vm->_global->inter_resStr, decodePtr(values[0]));
+				if (decodePtr(values[0]) != _vm->_global->_inter_resStr)
+					strcpy(_vm->_global->_inter_resStr, decodePtr(values[0]));
 				break;
 
 			case 11:
@@ -596,7 +596,7 @@
 				break;
 
 			default:
-				_vm->_global->inter_resVal = 0;
+				_vm->_global->_inter_resVal = 0;
 				if (arg_2 != 0)
 					*arg_2 = 20;
 				break;
@@ -613,11 +613,11 @@
 					if (operPtr[-3] == 20) {
 						valPtr[-3] += valPtr[-1];
 					} else if (operPtr[-3] == 22) {
-						if (decodePtr(valPtr[-3]) != _vm->_global->inter_resStr) {
-							strcpy(_vm->_global->inter_resStr, decodePtr(valPtr[-3]));
-							valPtr[-3] = encodePtr(_vm->_global->inter_resStr, kResStr);
+						if (decodePtr(valPtr[-3]) != _vm->_global->_inter_resStr) {
+							strcpy(_vm->_global->_inter_resStr, decodePtr(valPtr[-3]));
+							valPtr[-3] = encodePtr(_vm->_global->_inter_resStr, kResStr);
 						}
-						strcat(_vm->_global->inter_resStr, decodePtr(valPtr[-1]));
+						strcat(_vm->_global->_inter_resStr, decodePtr(valPtr[-1]));
 					}
 					stkPos -= 2;
 					operPtr -= 2;
@@ -648,46 +648,46 @@
 
 	num = 0;
 	while (1) {
-		operation = *_vm->_global->inter_execPtr++;
+		operation = *_vm->_global->_inter_execPtr++;
 
 		if (operation >= 19 && operation <= 29) {
 			switch (operation) {
 			case 20:
 			case 23:
-				_vm->_global->inter_execPtr += 2;
+				_vm->_global->_inter_execPtr += 2;
 				break;
 
 			case 19:
-				_vm->_global->inter_execPtr += 4;
+				_vm->_global->_inter_execPtr += 4;
 				break;
 
 			case 22:
-				_vm->_global->inter_execPtr += strlen(_vm->_global->inter_execPtr) + 1;
+				_vm->_global->_inter_execPtr += strlen(_vm->_global->_inter_execPtr) + 1;
 				break;
 
 			case 25:
-				_vm->_global->inter_execPtr += 2;
-				if (*_vm->_global->inter_execPtr == 13) {
-					_vm->_global->inter_execPtr++;
+				_vm->_global->_inter_execPtr += 2;
+				if (*_vm->_global->_inter_execPtr == 13) {
+					_vm->_global->_inter_execPtr++;
 					skipExpr(12);
 				}
 				break;
 
 			case 26:
 			case 28:
-				dimCount = _vm->_global->inter_execPtr[2];
-				_vm->_global->inter_execPtr += 3 + dimCount;	// ???
+				dimCount = _vm->_global->_inter_execPtr[2];
+				_vm->_global->_inter_execPtr += 3 + dimCount;	// ???
 				for (dim = 0; dim < dimCount; dim++)
 					skipExpr(12);
 
-				if (operation == 28 && *_vm->_global->inter_execPtr == 13) {
-					_vm->_global->inter_execPtr++;
+				if (operation == 28 && *_vm->_global->_inter_execPtr == 13) {
+					_vm->_global->_inter_execPtr++;
 					skipExpr(12);
 				}
 				break;
 
 			case 29:
-				_vm->_global->inter_execPtr++;
+				_vm->_global->_inter_execPtr++;
 				skipExpr(10);
 			}
 			continue;
@@ -747,13 +747,13 @@
 		operPtr++;
 		valPtr++;
 
-		operation = *_vm->_global->inter_execPtr++;
+		operation = *_vm->_global->_inter_execPtr++;
 		if (operation >= 19 && operation <= 29) {
 			*operPtr = 20;
 			switch (operation) {
 			case 19:
-				*valPtr = READ_LE_UINT32(_vm->_global->inter_execPtr);
-				_vm->_global->inter_execPtr += 4;
+				*valPtr = READ_LE_UINT32(_vm->_global->_inter_execPtr);
+				_vm->_global->_inter_execPtr += 4;
 				break;
 
 			case 20:
@@ -766,17 +766,17 @@
 
 			case 25:
 				temp = _vm->_inter->load16() * 4;
-				_vm->_global->inter_execPtr++;
+				_vm->_global->_inter_execPtr++;
 				temp += parseValExpr();
-				*valPtr = (uint8)*(_vm->_global->inter_variables + temp);
+				*valPtr = (uint8)*(_vm->_global->_inter_variables + temp);
 				break;
 
 			case 26:
 			case 28:
 				temp = _vm->_inter->load16();
-				dimCount = *_vm->_global->inter_execPtr++;
-				arrDesc = (byte*)_vm->_global->inter_execPtr;
-				_vm->_global->inter_execPtr += dimCount;
+				dimCount = *_vm->_global->_inter_execPtr++;
+				arrDesc = (byte*)_vm->_global->_inter_execPtr;
+				_vm->_global->_inter_execPtr += dimCount;
 				offset = 0;
 				for (dim = 0; dim < dimCount; dim++) {
 					temp2 = parseValExpr();
@@ -785,25 +785,25 @@
 				if (operation == 26) {
 					*valPtr = (uint16)VAR(temp + offset);
 				} else {
-					_vm->_global->inter_execPtr++;
+					_vm->_global->_inter_execPtr++;
 					temp2 = parseValExpr();
-					*valPtr = (uint8)*(_vm->_global->inter_variables + temp * 4 + offset * 4 * _vm->_global->inter_animDataSize + temp2);
+					*valPtr = (uint8)*(_vm->_global->_inter_variables + temp * 4 + offset * 4 * _vm->_global->_inter_animDataSize + temp2);
 				}
 				break;
 
 			case 29:
-				operation = *_vm->_global->inter_execPtr++;
+				operation = *_vm->_global->_inter_execPtr++;
 				parseExpr(10, 0);
 
 				if (operation == 5) {
-					_vm->_global->inter_resVal = _vm->_global->inter_resVal * _vm->_global->inter_resVal;
+					_vm->_global->_inter_resVal = _vm->_global->_inter_resVal * _vm->_global->_inter_resVal;
 				} else if (operation == 7) {
-					if (_vm->_global->inter_resVal < 0)
-						_vm->_global->inter_resVal = -_vm->_global->inter_resVal;
+					if (_vm->_global->_inter_resVal < 0)
+						_vm->_global->_inter_resVal = -_vm->_global->_inter_resVal;
 				} else if (operation == 10) {
-					_vm->_global->inter_resVal = _vm->_util->getRandom(_vm->_global->inter_resVal);
+					_vm->_global->_inter_resVal = _vm->_util->getRandom(_vm->_global->_inter_resVal);
 				}
-				*valPtr = _vm->_global->inter_resVal;
+				*valPtr = _vm->_global->_inter_resVal;
 				break;
 
 			}	// switch
@@ -950,15 +950,15 @@
 	int16 offset;
 	int16 val;
 
-	operation = *_vm->_global->inter_execPtr++;
+	operation = *_vm->_global->_inter_execPtr++;
 	debug(5, "var parse = %d", operation);
 	switch (operation) {
 	case 23:
 	case 25:
 		temp = _vm->_inter->load16() * 4;
-		debug(5, "oper = %d", (int16)*_vm->_global->inter_execPtr);
-		if (operation == 25 && *_vm->_global->inter_execPtr == 13) {
-			_vm->_global->inter_execPtr++;
+		debug(5, "oper = %d", (int16)*_vm->_global->_inter_execPtr);
+		if (operation == 25 && *_vm->_global->_inter_execPtr == 13) {
+			_vm->_global->_inter_execPtr++;
 			val = parseValExpr();
 			temp += val;
 			debug(5, "parse subscript = %d", val);
@@ -968,9 +968,9 @@
 	case 26:
 	case 28:
 		temp = _vm->_inter->load16() * 4;
-		dimCount = *_vm->_global->inter_execPtr++;
-		arrDesc = _vm->_global->inter_execPtr;
-		_vm->_global->inter_execPtr += dimCount;
+		dimCount = *_vm->_global->_inter_execPtr++;
+		arrDesc = _vm->_global->_inter_execPtr;
+		_vm->_global->_inter_execPtr += dimCount;
 		offset = 0;
 		for (dim = 0; dim < dimCount; dim++) {
 			temp2 = parseValExpr();
@@ -980,11 +980,11 @@
 		if (operation != 28)
 			return temp + offset;
 
-		if (*_vm->_global->inter_execPtr == 13) {
-			_vm->_global->inter_execPtr++;
+		if (*_vm->_global->_inter_execPtr == 13) {
+			_vm->_global->_inter_execPtr++;
 			temp += parseValExpr();
 		}
-		return offset * _vm->_global->inter_animDataSize + temp;
+		return offset * _vm->_global->_inter_animDataSize + temp;
 
 	default:
 		return 0;
@@ -1006,19 +1006,19 @@
 	return;
 
 	if (savedPos == 0) {
-		savedPos = _vm->_global->inter_execPtr;
+		savedPos = _vm->_global->_inter_execPtr;
 		saved = 1;
 	}
 
 	num = 0;
 	while (1) {
-		operation = *_vm->_global->inter_execPtr++;
+		operation = *_vm->_global->_inter_execPtr++;
 
 		if (operation >= 19 && operation <= 29) {
 			switch (operation) {
 			case 19:
-				debug(5, "%l", READ_LE_UINT32(_vm->_global->inter_execPtr));
-				_vm->_global->inter_execPtr += 4;
+				debug(5, "%l", READ_LE_UINT32(_vm->_global->_inter_execPtr));
+				_vm->_global->_inter_execPtr += 4;
 				break;
 
 			case 20:
@@ -1026,8 +1026,8 @@
 				break;
 
 			case 22:
-				debug(5, "\42%s\42", _vm->_global->inter_execPtr);
-				_vm->_global->inter_execPtr += strlen(_vm->_global->inter_execPtr) + 1;
+				debug(5, "\42%s\42", _vm->_global->_inter_execPtr);
+				_vm->_global->_inter_execPtr += strlen(_vm->_global->_inter_execPtr) + 1;
 				break;
 
 			case 23:
@@ -1036,8 +1036,8 @@
 
 			case 25:
 				debug(5, "(&var_%d)", _vm->_inter->load16());
-				if (*_vm->_global->inter_execPtr == 13) {
-					_vm->_global->inter_execPtr++;
+				if (*_vm->_global->_inter_execPtr == 13) {
+					_vm->_global->_inter_execPtr++;
 					debug(5, "{");
 					printExpr(12);
 //                  debug(5, "}");
@@ -1050,9 +1050,9 @@
 					debug(5, "(&");
 
 				debug(5, "var_%d[", _vm->_inter->load16());
-				dimCount = *_vm->_global->inter_execPtr++;
-				arrDesc = _vm->_global->inter_execPtr;
-				_vm->_global->inter_execPtr += dimCount;
+				dimCount = *_vm->_global->_inter_execPtr++;
+				arrDesc = _vm->_global->_inter_execPtr;
+				_vm->_global->_inter_execPtr += dimCount;
 				for (dim = 0; dim < dimCount; dim++) {
 					printExpr(12);
 					debug(5, " of %d", (int16)arrDesc[dim]);
@@ -1063,8 +1063,8 @@
 				if (operation == 28)
 					debug(5, ")");
 
-				if (operation == 28 && *_vm->_global->inter_execPtr == 13) {
-					_vm->_global->inter_execPtr++;
+				if (operation == 28 && *_vm->_global->_inter_execPtr == 13) {
+					_vm->_global->_inter_execPtr++;
 					debug(5, "{");
 					printExpr(12);
 //                  debug(5, "}");
@@ -1072,7 +1072,7 @@
 				break;
 
 			case 29:
-				func = *_vm->_global->inter_execPtr++;
+				func = *_vm->_global->_inter_execPtr++;
 				if (func == 5)
 					debug(5, "sqr(");
 				else if (func == 10)
@@ -1204,7 +1204,7 @@
 			if (arg_0 != 10 || num < 0) {
 
 				if (saved != 0) {
-					_vm->_global->inter_execPtr = savedPos;
+					_vm->_global->_inter_execPtr = savedPos;
 					savedPos = 0;
 				}
 				return;
@@ -1220,16 +1220,16 @@
 	int16 operation;
 	int16 temp;
 
-	char *pos = _vm->_global->inter_execPtr;
+	char *pos = _vm->_global->_inter_execPtr;
 
-	operation = *_vm->_global->inter_execPtr++;
+	operation = *_vm->_global->_inter_execPtr++;
 	switch (operation) {
 	case 23:
 	case 25:
 		temp = _vm->_inter->load16() * 4;
 		debug(5, "&var_%d", temp);
-		if (operation == 25 && *_vm->_global->inter_execPtr == 13) {
-			_vm->_global->inter_execPtr++;
+		if (operation == 25 && *_vm->_global->_inter_execPtr == 13) {
+			_vm->_global->_inter_execPtr++;
 			debug(5, "+");
 			printExpr(99);
 		}
@@ -1238,9 +1238,9 @@
 	case 26:
 	case 28:
 		debug(5, "&var_%d[", _vm->_inter->load16());
-		dimCount = *_vm->_global->inter_execPtr++;
-		arrDesc = _vm->_global->inter_execPtr;
-		_vm->_global->inter_execPtr += dimCount;
+		dimCount = *_vm->_global->_inter_execPtr++;
+		arrDesc = _vm->_global->_inter_execPtr;
+		_vm->_global->_inter_execPtr += dimCount;
 		for (dim = 0; dim < dimCount; dim++) {
 			printExpr(12);
 			debug(5, " of %d", (int16)arrDesc[dim]);
@@ -1249,8 +1249,8 @@
 		}
 		debug(5, "]");
 
-		if (operation == 28 && *_vm->_global->inter_execPtr == 13) {
-			_vm->_global->inter_execPtr++;
+		if (operation == 28 && *_vm->_global->_inter_execPtr == 13) {
+			_vm->_global->_inter_execPtr++;
 			debug(5, "+");
 			printExpr(99);
 		}
@@ -1261,7 +1261,7 @@
 		break;
 	}
 	debug(5, "\n");
-	_vm->_global->inter_execPtr = pos;
+	_vm->_global->_inter_execPtr = pos;
 	return;
 }
 

Index: scenery.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/scenery.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- scenery.cpp	3 Jan 2006 23:14:39 -0000	1.21
+++ scenery.cpp	4 Jan 2006 01:48:15 -0000	1.22
@@ -83,14 +83,14 @@
 
 	_vm->_inter->evalExpr(&sceneryIndex);
 	tmp = _vm->_inter->load16();
-	backsPtr = (int16 *)_vm->_global->inter_execPtr;
-	_vm->_global->inter_execPtr += tmp * 2;
+	backsPtr = (int16 *)_vm->_global->_inter_execPtr;
+	_vm->_global->_inter_execPtr += tmp * 2;
 	picsCount = _vm->_inter->load16();
 	resId = _vm->_inter->load16();
 	if (search) {
 		for (i = 0; i < 10; i++) {
 			if (staticPictCount[i] != -1 && staticResId[i] == resId) {
-				_vm->_global->inter_execPtr += 8 * staticPictCount[i];
+				_vm->_global->_inter_execPtr += 8 * staticPictCount[i];
 				return i;
 			}
 
@@ -170,7 +170,7 @@
 			spriteRefs[sprIndex] = 1;
 			spriteResId[sprIndex] = sprResId;
 			_vm->_draw->spritesArray[sprIndex] =
-			    _vm->_video->initSurfDesc(_vm->_global->videoMode, width, height, 2);
+			    _vm->_video->initSurfDesc(_vm->_global->_videoMode, width, height, 2);
 
 			_vm->_video->clearSurf(_vm->_draw->spritesArray[sprIndex]);
 			_vm->_draw->destSurface = sprIndex;
@@ -407,7 +407,7 @@
 		for (i = 0; i < 10; i++) {
 			if (animPictCount[i] != 0
 			    && animResId[i] == resId) {
-				_vm->_global->inter_execPtr += 8 * animPictCount[i];
+				_vm->_global->_inter_execPtr += 8 * animPictCount[i];
 				return i;
 			}
 
@@ -486,7 +486,7 @@
 			spriteRefs[sprIndex] = 1;
 			spriteResId[sprIndex] = sprResId;
 			_vm->_draw->spritesArray[sprIndex] =
-			    _vm->_video->initSurfDesc(_vm->_global->videoMode, width, height, 2);
+			    _vm->_video->initSurfDesc(_vm->_global->_videoMode, width, height, 2);
 
 			_vm->_video->clearSurf(_vm->_draw->spritesArray[sprIndex]);
 			_vm->_draw->destSurface = sprIndex;

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/sound.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- sound.cpp	3 Jan 2006 23:14:39 -0000	1.14
+++ sound.cpp	4 Jan 2006 01:48:15 -0000	1.15
@@ -59,21 +59,20 @@
 
 Snd::Snd(GobEngine *vm) : _vm(vm) {
 	//CleanupFuncPtr cleanupFunc;// = &snd_cleanupFuncCallback();
-	cleanupFunc = 0;
-	for (int i = 0; i < ARRAYSIZE(loopingSounds); i++)
-		loopingSounds[i] = NULL;
-	soundPort = 0;
-	playingSound = 0;
+	_cleanupFunc = 0;
+	for (int i = 0; i < ARRAYSIZE(_loopingSounds); i++)
+		_loopingSounds[i] = NULL;
+	_playingSound = 0;
 }
 
 void Snd::loopSounds(void) {
-	for (int i = 0; i < ARRAYSIZE(loopingSounds); i++) {
-		SoundDesc *snd = loopingSounds[i];
+	for (int i = 0; i < ARRAYSIZE(_loopingSounds); i++) {
+		SoundDesc *snd = _loopingSounds[i];
 		if (snd && !_vm->_mixer->isSoundHandleActive(snd->handle)) {
 			if (snd->repCount-- > 0) {
 				_vm->_mixer->playRaw(&snd->handle, snd->data, snd->size, snd->frequency, 0);
 			} else {
-				loopingSounds[i] = NULL;
+				_loopingSounds[i] = NULL;
 			}
 		}
 	}
@@ -82,14 +81,14 @@
 void Snd::setBlasterPort(int16 port) {return;}
 
 void Snd::speakerOn(int16 frequency, int32 length) {
-	speakerStream.playNote(frequency, length, _vm->_mixer->getOutputRate());
-	if (!_vm->_mixer->isSoundHandleActive(speakerHandle)) {
-		_vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &speakerHandle, &speakerStream, -1, 255, 0, false);
+	_speakerStream.playNote(frequency, length, _vm->_mixer->getOutputRate());
+	if (!_vm->_mixer->isSoundHandleActive(_speakerHandle)) {
+		_vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_speakerHandle, &_speakerStream, -1, 255, 0, false);
 	}
 }
 
 void Snd::speakerOff(void) {
-	_vm->_mixer->stopHandle(speakerHandle);
+	_vm->_mixer->stopHandle(_speakerHandle);
 }
 
 void Snd::playSample(Snd::SoundDesc *sndDesc, int16 repCount, int16 frequency) {
@@ -103,9 +102,9 @@
 	sndDesc->frequency = frequency;
 
 	if (repCount > 1) {
-		for (int i = 0; i < ARRAYSIZE(loopingSounds); i++) {
-			if (!loopingSounds[i]) {
-				loopingSounds[i] = sndDesc;
+		for (int i = 0; i < ARRAYSIZE(_loopingSounds); i++) {
+			if (!_loopingSounds[i]) {
+				_loopingSounds[i] = sndDesc;
 				return;
 			}
 		}
@@ -132,9 +131,9 @@
 void Snd::freeSoundData(Snd::SoundDesc *sndDesc) {
 	_vm->_mixer->stopHandle(sndDesc->handle);
 
-	for (int i = 0; i < ARRAYSIZE(loopingSounds); i++) {
-		if (loopingSounds[i] == sndDesc)
-			loopingSounds[i] = NULL;
+	for (int i = 0; i < ARRAYSIZE(_loopingSounds); i++) {
+		if (_loopingSounds[i] == sndDesc)
+			_loopingSounds[i] = NULL;
 	}
 
 	free(sndDesc->data);

Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/sound.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- sound.h	3 Jan 2006 23:14:39 -0000	1.10
+++ sound.h	4 Jan 2006 01:48:15 -0000	1.11
@@ -43,10 +43,9 @@
 
 	typedef void (*CleanupFuncPtr) (int16);
 
-	SoundDesc *loopingSounds[5]; // Should be enough
-	int16 soundPort;
-	char playingSound;
-	CleanupFuncPtr cleanupFunc;
+	SoundDesc *_loopingSounds[5]; // Should be enough
+	char _playingSound;
+	CleanupFuncPtr _cleanupFunc;
 
 	Snd(GobEngine *vm);
 	void speakerOn(int16 frequency, int32 length);
@@ -84,8 +83,8 @@
 		int getRate() const	{ return _rate; }
 	};
 
-	SquareWaveStream speakerStream;
-	Audio::SoundHandle speakerHandle;
+	SquareWaveStream _speakerStream;
+	Audio::SoundHandle _speakerHandle;
 
 	GobEngine *_vm;
 

Index: util.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/util.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- util.cpp	3 Jan 2006 23:14:39 -0000	1.19
+++ util.cpp	4 Jan 2006 01:48:15 -0000	1.20
@@ -183,7 +183,7 @@
 void Util::longDelay(uint16 msecs) {
 	uint32 time = g_system->getMillis() + msecs;
 	do {
-		_vm->_video->waitRetrace(_vm->_global->videoMode);
+		_vm->_video->waitRetrace(_vm->_global->_videoMode);
 		processInput();
 		delay(25);
 	} while (g_system->getMillis() < time);
@@ -194,7 +194,7 @@
 }
 
 void Util::beep(int16 freq) {
-	if (_vm->_global->soundFlags == 0)
+	if (_vm->_global->_soundFlags == 0)
 		return;
 
 	_vm->_snd->speakerOn(freq, 50);
@@ -235,31 +235,31 @@
 
 /* NOT IMPLEMENTED */
 void Util::checkJoystick() {
-	_vm->_global->useJoystick = 0;
+	_vm->_global->_useJoystick = 0;
 }
 
 void Util::setFrameRate(int16 rate) {
 	if (rate == 0)
 		rate = 1;
 
-	_vm->_global->frameWaitTime = 1000 / rate;
-	_vm->_global->startFrameTime = getTimeKey();
+	_vm->_global->_frameWaitTime = 1000 / rate;
+	_vm->_global->_startFrameTime = getTimeKey();
 }
 
 void Util::waitEndFrame() {
 	int32 time;
 
-	_vm->_video->waitRetrace(_vm->_global->videoMode);
+	_vm->_video->waitRetrace(_vm->_global->_videoMode);
 
-	time = getTimeKey() - _vm->_global->startFrameTime;
+	time = getTimeKey() - _vm->_global->_startFrameTime;
 	if (time > 1000 || time < 0) {
-		_vm->_global->startFrameTime = getTimeKey();
+		_vm->_global->_startFrameTime = getTimeKey();
 		return;
 	}
-	if (_vm->_global->frameWaitTime - time > 0) {
-		delay(_vm->_global->frameWaitTime - time);
+	if (_vm->_global->_frameWaitTime - time > 0) {
+		delay(_vm->_global->_frameWaitTime - time);
 	}
-	_vm->_global->startFrameTime = getTimeKey();
+	_vm->_global->_startFrameTime = getTimeKey();
 }
 
 int16 joy_getState() {
@@ -311,11 +311,11 @@
 	int16 i;
 	byte colors[768];
 
-	if (_vm->_global->videoMode != 0x13)
+	if (_vm->_global->_videoMode != 0x13)
 		error("clearPalette: Video mode 0x%x is not supported!",
-		    _vm->_global->videoMode);
+		    _vm->_global->_videoMode);
 
-	if (_vm->_global->setAllPalette) {
+	if (_vm->_global->_setAllPalette) {
 		for (i = 0; i < 768; i++)
 			colors[i] = 0;
 		g_system->setPalette(colors, 0, 256);
@@ -324,7 +324,7 @@
 	}
 
 	for (i = 0; i < 16; i++)
-		_vm->_video->setPalElem(i, 0, 0, 0, 0, _vm->_global->videoMode);
+		_vm->_video->setPalElem(i, 0, 0, 0, 0, _vm->_global->_videoMode);
 }
 
 void Util::insertStr(const char *str1, char *str2, int16 pos) {

Index: video.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/video.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- video.cpp	3 Jan 2006 23:14:39 -0000	1.17
+++ video.cpp	4 Jan 2006 01:48:15 -0000	1.18
@@ -36,8 +36,8 @@
 //XXX: Use this function to update the screen for now.
 //     This should be moved to a better location later on.
 void Video::waitRetrace(int16) {
-	if (_vm->_global->pPrimarySurfDesc) {
-		g_system->copyRectToScreen(_vm->_global->pPrimarySurfDesc->vidPtr, 320, 0, 0, 320, 200);
+	if (_vm->_global->_pPrimarySurfDesc) {
+		g_system->copyRectToScreen(_vm->_global->_pPrimarySurfDesc->vidPtr, 320, 0, 0, 320, 200);
 		g_system->updateScreen();
 	}
 }
@@ -91,10 +91,10 @@
 	SurfaceDesc *descPtr;
 
 	if (flags != PRIMARY_SURFACE)
-		_vm->_global->sprAllocated++;
+		_vm->_global->_sprAllocated++;
 
 	if (flags & RETURN_PRIMARY)
-		return _vm->_global->pPrimarySurfDesc;
+		return _vm->_global->_pPrimarySurfDesc;
 
 	if (vidMode != 0x13)
 		error("Video::initSurfDesc: Only VGA 0x13 mode is supported!");
@@ -109,10 +109,10 @@
 
 	if (flags & PRIMARY_SURFACE) {
 		vidMem = 0;
-		_vm->_global->primaryWidth = width;
-		_vm->_global->mouseMaxCol = width;
-		_vm->_global->primaryHeight = height;
-		_vm->_global->mouseMaxRow = height;
+		_vm->_global->_primaryWidth = width;
+		_vm->_global->_mouseMaxCol = width;
+		_vm->_global->_primaryHeight = height;
+		_vm->_global->_mouseMaxRow = height;
 		sprSize = 0;
 
 	} else {
@@ -122,7 +122,7 @@
 			someFlags += 0x80;
 	}
 	if (flags & PRIMARY_SURFACE) {
-		descPtr = _vm->_global->pPrimarySurfDesc;
+		descPtr = _vm->_global->_pPrimarySurfDesc;
 		vidMem = (byte *)malloc(320 * 200);
 	} else {
 		if (flags & DISABLE_SPR_ALLOC)
@@ -147,8 +147,8 @@
 }
 
 void Video::freeSurfDesc(SurfaceDesc * surfDesc) {
-	_vm->_global->sprAllocated--;
-	if (surfDesc != _vm->_global->pPrimarySurfDesc)
+	_vm->_global->_sprAllocated--;
+	if (surfDesc != _vm->_global->_pPrimarySurfDesc)
 		free(surfDesc);
 	else
 		free(surfDesc->vidPtr);
@@ -170,7 +170,7 @@
 	int16 destRight;
 	int16 destBottom;
 
-	if (_vm->_global->doRangeClamp) {
+	if (_vm->_global->_doRangeClamp) {
 		if (left > right) {
 			temp = left;
 			left = right;
@@ -240,7 +240,7 @@
 	    int16 color) {
 	int16 temp;
 
-	if (_vm->_global->doRangeClamp) {
+	if (_vm->_global->_doRangeClamp) {
 		if (left > right) {
 			temp = left;
 			left = right;
@@ -312,9 +312,9 @@
 	    int16 vidMode) {
 	byte pal[4];
 
-	_vm->_global->redPalette[index] = red;
-	_vm->_global->greenPalette[index] = green;
-	_vm->_global->bluePalette[index] = blue;
+	_vm->_global->_redPalette[index] = red;
+	_vm->_global->_greenPalette[index] = green;
+	_vm->_global->_bluePalette[index] = blue;
 
 	if (vidMode != 0x13)
 		error("Video::setPalElem: Video mode 0x%x is not supported!",
@@ -332,11 +332,11 @@
 	byte pal[1024];
 	int16 numcolors;
 
-	if (_vm->_global->videoMode != 0x13)
+	if (_vm->_global->_videoMode != 0x13)
 		error("Video::setPalette: Video mode 0x%x is not supported!",
-		    _vm->_global->videoMode);
+		    _vm->_global->_videoMode);
 
-	if (_vm->_global->setAllPalette)
+	if (_vm->_global->_setAllPalette)
 		numcolors = 256;
 	else
 		numcolors = 16;
@@ -356,12 +356,12 @@
 	int16 i;
 	byte pal[1024];
 
-	if (_vm->_global->setAllPalette) {
+	if (_vm->_global->_setAllPalette) {
 		colors = palDesc->vgaPal;
 		for (i = 0; i < 256; i++) {
-			_vm->_global->redPalette[i] = colors[i].red;
-			_vm->_global->greenPalette[i] = colors[i].green;
-			_vm->_global->bluePalette[i] = colors[i].blue;
+			_vm->_global->_redPalette[i] = colors[i].red;
+			_vm->_global->_greenPalette[i] = colors[i].green;
+			_vm->_global->_bluePalette[i] = colors[i].blue;
 		}
 
 		for (i = 0; i < 256; i++) {
@@ -378,36 +378,36 @@
 
 void Video::initPrimary(int16 mode) {
 	int16 old;
-	if (_vm->_global->curPrimaryDesc) {
-		Video::freeSurfDesc(_vm->_global->curPrimaryDesc);
-		Video::freeSurfDesc(_vm->_global->allocatedPrimary);
+	if (_vm->_global->_curPrimaryDesc) {
+		Video::freeSurfDesc(_vm->_global->_curPrimaryDesc);
+		Video::freeSurfDesc(_vm->_global->_allocatedPrimary);
 
-		_vm->_global->curPrimaryDesc = 0;
-		_vm->_global->allocatedPrimary = 0;
+		_vm->_global->_curPrimaryDesc = 0;
+		_vm->_global->_allocatedPrimary = 0;
 	}
 	if (mode != 0x13 && mode != 3 && mode != -1)
 		error("Video::initPrimary: Video mode 0x%x is not supported!",
 		    mode);
 
-	if (_vm->_global->videoMode != 0x13)
+	if (_vm->_global->_videoMode != 0x13)
 		error("Video::initPrimary: Video mode 0x%x is not supported!",
 		    mode);
 
-	old = _vm->_global->oldMode;
+	old = _vm->_global->_oldMode;
 	if (mode == -1)
 		mode = 3;
 
-	_vm->_global->oldMode = mode;
+	_vm->_global->_oldMode = mode;
 	if (mode != 3)
 		Video::initDriver(mode);
 
 	if (mode != 3) {
 		Video::initSurfDesc(mode, 320, 200, PRIMARY_SURFACE);
 
-		if (_vm->_global->dontSetPalette)
+		if (_vm->_global->_dontSetPalette)
 			return;
 
-		Video::setFullPalette(_vm->_global->pPaletteDesc);
+		Video::setFullPalette(_vm->_global->_pPaletteDesc);
 	}
 }
 
@@ -540,6 +540,6 @@
 	return 1;
 }
 
-void Video::setHandlers() { _vm->_global->setAllPalette = 1; }
+void Video::setHandlers() { _vm->_global->_setAllPalette = 1; }
 
 }				// End of namespace Gob





More information about the Scummvm-git-logs mailing list