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

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Sat Feb 7 02:11:52 CET 2009


Revision: 36228
          http://scummvm.svn.sourceforge.net/scummvm/?rev=36228&view=rev
Author:   Kirben
Date:     2009-02-07 01:11:51 +0000 (Sat, 07 Feb 2009)

Log Message:
-----------
Cleanup.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.h
    scummvm/trunk/engines/agos/charset-fontdata.cpp
    scummvm/trunk/engines/agos/charset.cpp
    scummvm/trunk/engines/agos/debug.cpp
    scummvm/trunk/engines/agos/detection.cpp
    scummvm/trunk/engines/agos/draw.cpp
    scummvm/trunk/engines/agos/event.cpp
    scummvm/trunk/engines/agos/gfx.cpp
    scummvm/trunk/engines/agos/icons.cpp
    scummvm/trunk/engines/agos/input.cpp
    scummvm/trunk/engines/agos/intern.h
    scummvm/trunk/engines/agos/rooms.cpp
    scummvm/trunk/engines/agos/saveload.cpp
    scummvm/trunk/engines/agos/script_pp.cpp
    scummvm/trunk/engines/agos/script_ww.cpp
    scummvm/trunk/engines/agos/string.cpp
    scummvm/trunk/engines/agos/subroutine.cpp
    scummvm/trunk/engines/agos/verb.cpp
    scummvm/trunk/engines/agos/vga.cpp
    scummvm/trunk/engines/agos/vga_ww.cpp
    scummvm/trunk/engines/agos/window.cpp

Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/agos.h	2009-02-07 01:11:51 UTC (rev 36228)
@@ -69,7 +69,7 @@
 	uint16 id;
 	uint16 data;
 	WindowBlock *window;
-	Item *item_ptr;
+	Item *itemPtr;
 	uint16 verb;
 	uint16 priority;
 	HitArea() { memset(this, 0, sizeof(*this)); }
@@ -99,17 +99,17 @@
 
 struct VgaSleepStruct {
 	uint16 ident;
-	const byte *code_ptr;
-	uint16 sprite_id;
-	uint16 cur_vga_file;
+	const byte *codePtr;
+	uint16 id;
+	uint16 zoneNum;
 	VgaSleepStruct() { memset(this, 0, sizeof(*this)); }
 };
 
 struct VgaTimerEntry {
 	int16 delay;
-	const byte *script_pointer;
-	uint16 sprite_id;
-	uint16 cur_vga_file;
+	const byte *codePtr;
+	uint16 id;
+	uint16 zoneNum;
 	uint8 type;
 	VgaTimerEntry() { memset(this, 0, sizeof(*this)); }
 };
@@ -628,7 +628,7 @@
 	Subroutine *createSubroutine(uint16 a);
 	void readSubroutine(Common::SeekableReadStream *in, Subroutine *sub);
 	SubroutineLine *createSubroutineLine(Subroutine *sub, int a);
-	void readSubroutineLine(Common::SeekableReadStream *in, SubroutineLine *new_table, Subroutine *sub);
+	void readSubroutineLine(Common::SeekableReadStream *in, SubroutineLine *newTable, Subroutine *sub);
 	byte *readSingleOpcode(Common::SeekableReadStream *in, byte *ptr);
 	void readSubroutineBlock(Common::SeekableReadStream *in);
 
@@ -704,7 +704,7 @@
 	void moveBox(uint hitarea, int x, int y);
 	bool isBoxDead(uint hitarea);
 	void undefineBox(uint hitarea);
-	void defineBox(int id, int x, int y, int width, int height, int flags, int verb, Item *item_ptr);
+	void defineBox(int id, int x, int y, int width, int height, int flags, int verb, Item *itemPtr);
 	HitArea *findEmptyHitArea();
 
 	virtual void resetVerbs();
@@ -762,8 +762,8 @@
 
 	bool loadRoomItems(uint16 item);
 
-	virtual bool loadTablesIntoMem(uint16 subr_id);
-	bool loadXTablesIntoMem(uint16 subr_id);
+	virtual bool loadTablesIntoMem(uint16 subrId);
+	bool loadXTablesIntoMem(uint16 subrId);
 	void loadTextIntoMem(uint16 stringId);
 
 	uint loadTextFile(const char *filename, byte *dst);
@@ -815,9 +815,9 @@
 	virtual void drawIcon(WindowBlock *window, uint icon, uint x, uint y);
 	virtual bool hasIcon(Item *item);
 	virtual uint itemGetIconNumber(Item *item);
-	virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr);
+	virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr);
 
-	virtual void drawIconArray(uint i, Item *item_ptr, int line, int classMask);
+	virtual void drawIconArray(uint i, Item *itemPtr, int line, int classMask);
 	void removeIconArray(uint num);
 
 	void loadIconData();
@@ -836,9 +836,9 @@
 	void loadZone(uint16 zoneNum);
 
 	void animate(uint16 windowNum, uint16 zoneNum, uint16 vgaSpriteId, int16 x, int16 y, uint16 palette, bool vgaScript = false);
-	void setImage(uint16 vga_res_id, bool vgaScript = false);
-	void setWindowImage(uint16 mode, uint16 vga_res_id);
-	void setWindowImageEx(uint16 mode, uint16 vga_res);
+	void setImage(uint16 vgaSpriteId, bool vgaScript = false);
+	void setWindowImage(uint16 mode, uint16 vgaSpriteId);
+	void setWindowImageEx(uint16 mode, uint16 vgaSpriteId);
 
 	void skipSpeech();
 
@@ -847,10 +847,10 @@
 	void printVerbOf(uint hitarea_id);
 	void showActionString(const byte *string);
 
-	virtual void printScreenText(uint vga_sprite_id, uint color, const char *string_ptr, int16 x, int16 y, int16 width);
+	virtual void printScreenText(uint vgaSpriteId, uint color, const char *stringPtr, int16 x, int16 y, int16 width);
 
-	void renderStringAmiga(uint vga_sprite_id, uint color, uint width, uint height, const char *txt);
-	void renderString(uint vga_sprite_id, uint color, uint width, uint height, const char *txt);
+	void renderStringAmiga(uint vgaSpriteId, uint color, uint width, uint height, const char *txt);
+	void renderString(uint vgaSpriteId, uint color, uint width, uint height, const char *txt);
 
 	void writeChar(WindowBlock *window, int x, int y, int offs, int val);
 
@@ -1115,7 +1115,7 @@
 	void checkScrollY(int16 y, int16 ypos);
 	void centreScroll();
 
-	void clearVideoWindow(uint16 windowNum, uint16 color);
+	virtual void clearVideoWindow(uint16 windowNum, uint16 color);
 	void clearVideoBackGround(uint16 windowNum, uint16 color);
 
 	void setPaletteSlot(uint16 srcOffs, uint8 dstOffs);
@@ -1124,17 +1124,17 @@
 	void startOverlayAnims();
 	void startAnOverlayAnim();
 
-	bool itemIsSiblingOf(uint16 val);
-	bool itemIsParentOf(uint16 a, uint16 b);
-	bool vc_maybe_skip_proc_1(uint16 a, int16 b);
+	bool ifObjectHere(uint16 val);
+	bool ifObjectAt(uint16 a, uint16 b);
+	bool ifObjectState(uint16 a, int16 b);
 
 	bool isVgaQueueEmpty();
 	void haltAnimation();
 	void restartAnimation();
-	void addVgaEvent(uint16 num, uint8 type, const byte *code_ptr, uint16 cur_sprite, uint16 curZoneNum);
+	void addVgaEvent(uint16 num, uint8 type, const byte *codePtr, uint16 curSprite, uint16 curZoneNum);
 	void deleteVgaEvent(VgaTimerEntry * vte);
 	void processVgaEvents();
-	void animateEvent(const byte *code_ptr, uint16 curZoneNum, uint16 cur_sprite);
+	void animateEvent(const byte *codePtr, uint16 curZoneNum, uint16 curSprite);
 	void scrollEvent();
 	void drawStuff(const byte *src, uint offs);
 	void playerDamageEvent(VgaTimerEntry * vte, uint dx);
@@ -1186,8 +1186,8 @@
 
 	void dumpVideoScript(const byte *src, bool one_opcode_only);
 	virtual void dumpVgaFile(const byte *vga);
-	void dumpVgaScript(const byte *ptr, uint res, uint sprite_id);
-	void dumpVgaScriptAlways(const byte *ptr, uint res, uint sprite_id);
+	void dumpVgaScript(const byte *ptr, uint res, uint id);
+	void dumpVgaScriptAlways(const byte *ptr, uint res, uint id);
 	void dumpVgaBitmaps(const byte *vga, byte *vga1, int res);
 	void dumpSingleBitmap(int file, int image, const byte *offs, int w, int h, byte base);
 	void dumpBitmap(const char *filename, const byte *offs, int w, int h, int flags, const byte *palette, byte base);
@@ -1242,7 +1242,7 @@
 	void disableFileBoxes();
 	virtual void userGame(bool load);
 	void userGameBackSpace(WindowBlock *window, int x, byte b = 0);
-	void fileError(WindowBlock *window, bool save_error);
+	void fileError(WindowBlock *window, bool saveError);
 
 	int countSaveGames();
 
@@ -1400,7 +1400,7 @@
 	virtual void drawIcon(WindowBlock *window, uint icon, uint x, uint y);
 	virtual bool hasIcon(Item *item);
 	virtual uint itemGetIconNumber(Item *item);
-	virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr);
+	virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr);
 
 	virtual void moveDirn(Item *i, uint x);
 	virtual int canPlace(Item *x, Item *y);
@@ -1467,9 +1467,9 @@
 	virtual void addArrows(WindowBlock *window, uint8 num);
 	virtual void removeArrows(WindowBlock *window, uint num);
 
-	virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr);
+	virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr);
 
-	virtual bool loadTablesIntoMem(uint16 subr_id);
+	virtual bool loadTablesIntoMem(uint16 subrId);
 
 	virtual void moveDirn(Item *i, uint x);
 
@@ -1532,9 +1532,9 @@
 	virtual void addArrows(WindowBlock *window, uint8 num);
 	virtual void removeArrows(WindowBlock *window, uint num);
 
-	virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr);
+	virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr);
 
-	virtual void playSpeech(uint16 speech_id, uint16 vga_sprite_id);
+	virtual void playSpeech(uint16 speechId, uint16 vgaSpriteId);
 
 	virtual void listSaveGames(char *dst);
 	virtual void userGame(bool load);
@@ -1584,10 +1584,12 @@
 	virtual void drawIcon(WindowBlock *window, uint icon, uint x, uint y);
 
 	virtual void addArrows(WindowBlock *window, uint8 num);
-	virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr);
+	virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr);
 
-	virtual void playSpeech(uint16 speech_id, uint16 vga_sprite_id);
+	virtual void clearVideoWindow(uint16 windowNum, uint16 color);
 
+	virtual void playSpeech(uint16 speechId, uint16 vgaSpriteId);
+
 	virtual char *genSaveName(int slot);
 };
 
@@ -1664,7 +1666,7 @@
 	virtual void timer_proc1();
 
 	virtual void addArrows(WindowBlock *window, uint8 num);
-	virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr);
+	virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr);
 
 	virtual void resetVerbs();
 	virtual void setVerb(HitArea * ha);
@@ -1675,7 +1677,7 @@
 
 	virtual void clearName();
 
-	virtual void drawIconArray(uint i, Item *item_ptr, int line, int classMask);
+	virtual void drawIconArray(uint i, Item *itemPtr, int line, int classMask);
 
 	virtual void colorWindow(WindowBlock *window);
 
@@ -1683,7 +1685,7 @@
 
 	virtual void doOutput(const byte *src, uint len);
 
-	virtual void printScreenText(uint vga_sprite_id, uint color, const char *string_ptr, int16 x, int16 y, int16 width);
+	virtual void printScreenText(uint vgaSpriteId, uint color, const char *stringPtr, int16 x, int16 y, int16 width);
 
 	void printInteractText(uint16 num, const char *string);
 	void sendInteractText(uint16 num, const char *fmt, ...);

Modified: scummvm/trunk/engines/agos/charset-fontdata.cpp
===================================================================
--- scummvm/trunk/engines/agos/charset-fontdata.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/charset-fontdata.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -1580,7 +1580,7 @@
 	if (getGameType() == GType_FF || getGameType() == GType_PP) {
 		dst = getBackGround() + y * _dxSurfacePitch + x + window->textColumnOffset;
 		h = 13;
-		w =  feebleFontSize[chr - 32];
+		w = feebleFontSize[chr - 32];
 
 		src = feeble_windowFont + (chr - 32) * 13;
 	} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
@@ -1643,7 +1643,7 @@
 		}
 	}
 
-	color = window->text_color;
+	color = window->textColor;
 	if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW)
 		color += dst[0] & 0xF0;
 

Modified: scummvm/trunk/engines/agos/charset.cpp
===================================================================
--- scummvm/trunk/engines/agos/charset.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/charset.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -194,23 +194,23 @@
 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x04,0x38,0x40,0x82,0x08,0x40,0x00,0xB4,0x00,0x10,0x00,0x6C,0x04,0x20,0x00,0x5A,0x3C,0x00,0x40,0x82,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x00,0x07
 };
 
-void AGOSEngine::renderStringAmiga(uint vga_sprite_id, uint color, uint width, uint height, const char *txt) {
+void AGOSEngine::renderStringAmiga(uint vgaSpriteId, uint color, uint width, uint height, const char *txt) {
 	VgaPointersEntry *vpe = &_vgaBufferPointers[2];
 	byte *p, *dst, *dst_org, chr;
 	uint count;
 
-	if (vga_sprite_id >= 100) {
-		vga_sprite_id -= 100;
+	if (vgaSpriteId >= 100) {
+		vgaSpriteId -= 100;
 		vpe++;
 	}
 
 	dst = vpe->vgaFile2;
 
 	count = 2000;
-	if (vga_sprite_id == 1)
+	if (vgaSpriteId == 1)
 		count *= 2;
 
-	p = dst + vga_sprite_id * 8;
+	p = dst + vgaSpriteId * 8;
 	WRITE_BE_UINT16(p + 4, height);
 	WRITE_BE_UINT16(p + 6, width);
 	dst += READ_BE_UINT32(p);
@@ -278,29 +278,29 @@
 	}
 }
 
-void AGOSEngine::renderString(uint vga_sprite_id, uint color, uint width, uint height, const char *txt) {
+void AGOSEngine::renderString(uint vgaSpriteId, uint color, uint width, uint height, const char *txt) {
 	VgaPointersEntry *vpe = &_vgaBufferPointers[2];
 	byte *src, *dst, *p, *dst_org, chr;
 	const int textHeight = (getGameType() == GType_FF || getGameType() == GType_PP) ? 15: 10;
 	uint count = 0;
 
-	if (vga_sprite_id >= 100) {
-		vga_sprite_id -= 100;
+	if (vgaSpriteId >= 100) {
+		vgaSpriteId -= 100;
 		vpe++;
 	}
 
 	src = dst = vpe->vgaFile2;
 
 	if (getGameType() == GType_FF || getGameType() == GType_PP) {
-		if (vga_sprite_id == 1)
+		if (vgaSpriteId == 1)
 			count = 45000;
 	} else {
 		count = 4000;
-		if (vga_sprite_id == 1)
+		if (vgaSpriteId == 1)
 			count *= 2;
 	}
 
-	p = dst + vga_sprite_id * 8;
+	p = dst + vgaSpriteId * 8;
 
 	if (getGameType() == GType_FF || getGameType() == GType_PP) {
 		WRITE_LE_UINT16(p + 4, height);

Modified: scummvm/trunk/engines/agos/debug.cpp
===================================================================
--- scummvm/trunk/engines/agos/debug.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/debug.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -284,13 +284,13 @@
 	} while (!one_opcode_only);
 }
 
-void AGOSEngine::dumpVgaScript(const byte *ptr, uint res, uint sprite_id) {
-	dumpVgaScriptAlways(ptr, res, sprite_id);
+void AGOSEngine::dumpVgaScript(const byte *ptr, uint res, uint id) {
+	dumpVgaScriptAlways(ptr, res, id);
 }
 
-void AGOSEngine::dumpVgaScriptAlways(const byte *ptr, uint res, uint sprite_id) {
+void AGOSEngine::dumpVgaScriptAlways(const byte *ptr, uint res, uint id) {
 	printf("; address=%x, vgafile=%d  vgasprite=%d\n",
-					(unsigned int)(ptr - _vgaBufferPointers[res].vgaFile1), res, sprite_id);
+					(unsigned int)(ptr - _vgaBufferPointers[res].vgaFile1), res, id);
 	dumpVideoScript(ptr, false);
 	printf("; end\n");
 }

Modified: scummvm/trunk/engines/agos/detection.cpp
===================================================================
--- scummvm/trunk/engines/agos/detection.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/detection.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -57,10 +57,10 @@
 	{"simon1dos", "simon1", Common::kPlatformPC},
 	{"simon1talkie", "simon1", Common::kPlatformPC},
 	{"simon1win", "simon1", Common::kPlatformWindows},
-	{"simon2dos", "simon2",  Common::kPlatformPC},
+	{"simon2dos", "simon2", Common::kPlatformPC},
 	{"simon2talkie", "simon2", Common::kPlatformPC},
 	{"simon2mac", "simon2", Common::kPlatformMacintosh},
-	{"simon2win", "simon2",  Common::kPlatformWindows},
+	{"simon2win", "simon2", Common::kPlatformWindows},
 	{0, 0, Common::kPlatformUnknown}
 };
 

Modified: scummvm/trunk/engines/agos/draw.cpp
===================================================================
--- scummvm/trunk/engines/agos/draw.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/draw.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -166,7 +166,7 @@
 			_wallOn--;
 
 			VC10_state state;
-			state.srcPtr  = getBackGround() + 3 * _screenWidth + 3 * 16;
+			state.srcPtr = getBackGround() + 3 * _screenWidth + 3 * 16;
 			state.height = state.draw_height = 127;
 			state.width = state.draw_width = 14;
 			state.y = 0;
@@ -449,7 +449,7 @@
 		_windowNum = animTable->windowNum & ~0x8000;
 
 		VC10_state state;
-		state.srcPtr  = animTable->srcPtr;
+		state.srcPtr = animTable->srcPtr;
 		state.height = state.draw_height = animTable->height;
 		state.width = state.draw_width = animTable->width;
 		state.y = animTable->y;
@@ -559,9 +559,9 @@
 						continue;
 				} else {
 					dha = _hitAreas;
-					while (dha != ha && dha->item_ptr != ha->item_ptr)
+					while (dha != ha && dha->itemPtr != ha->itemPtr)
 						++dha;
-					if (dha != ha && dha->item_ptr == ha->item_ptr)
+					if (dha != ha && dha->itemPtr == ha->itemPtr)
 						continue;
 				}
 

Modified: scummvm/trunk/engines/agos/event.cpp
===================================================================
--- scummvm/trunk/engines/agos/event.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/event.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -160,7 +160,7 @@
 	bool result = false;
 
 	while (vte->delay) {
-		if (vte->cur_vga_file == _variableArray[999] && vte->sprite_id >= 100) {
+		if (vte->zoneNum == _variableArray[999] && vte->id >= 100) {
 			result = true;
 			break;
 		}
@@ -195,7 +195,7 @@
 	// Check picture queue
 }
 
-void AGOSEngine::addVgaEvent(uint16 num, uint8 type, const byte *code_ptr, uint16 cur_sprite, uint16 curZoneNum) {
+void AGOSEngine::addVgaEvent(uint16 num, uint8 type, const byte *codePtr, uint16 curSprite, uint16 curZoneNum) {
 	VgaTimerEntry *vte;
 
 	_lockWord |= 1;
@@ -204,9 +204,9 @@
 	}
 
 	vte->delay = num;
-	vte->script_pointer = code_ptr;
-	vte->sprite_id = cur_sprite;
-	vte->cur_vga_file = curZoneNum;
+	vte->codePtr = codePtr;
+	vte->id = curSprite;
+	vte->zoneNum = curZoneNum;
 	vte->type = type;
 
 	_lockWord &= ~1;
@@ -235,9 +235,9 @@
 	while (vte->delay) {
 		vte->delay -= _vgaBaseDelay;
 		if (vte->delay <= 0) {
-			uint16 curZoneNum = vte->cur_vga_file;
-			uint16 cur_sprite = vte->sprite_id;
-			const byte *script_ptr = vte->script_pointer;
+			uint16 curZoneNum = vte->zoneNum;
+			uint16 curSprite = vte->id;
+			const byte *script_ptr = vte->codePtr;
 
 			switch (vte->type) {
 			case ANIMATE_INT:
@@ -248,7 +248,7 @@
 			case ANIMATE_EVENT:
 				_nextVgaTimerToProcess = vte + 1;
 				deleteVgaEvent(vte);
-				animateEvent(script_ptr, curZoneNum, cur_sprite);
+				animateEvent(script_ptr, curZoneNum, curSprite);
 				vte = _nextVgaTimerToProcess;
 				break;
 			case SCROLL_EVENT:
@@ -274,10 +274,10 @@
 	}
 }
 
-void AGOSEngine::animateEvent(const byte *code_ptr, uint16 curZoneNum, uint16 cur_sprite) {
+void AGOSEngine::animateEvent(const byte *codePtr, uint16 curZoneNum, uint16 curSprite) {
 	VgaPointersEntry *vpe;
 
-	_vgaCurSpriteId = cur_sprite;
+	_vgaCurSpriteId = curSprite;
 
 	_vgaCurZoneNum = curZoneNum;
 	_zoneNumber = curZoneNum;
@@ -287,7 +287,7 @@
 	_curVgaFile2 = vpe->vgaFile2;
 	_curSfxFile = vpe->sfxFile;
 
-	_vcPtr = code_ptr;
+	_vcPtr = codePtr;
 
 	runVgaScript();
 }

Modified: scummvm/trunk/engines/agos/gfx.cpp
===================================================================
--- scummvm/trunk/engines/agos/gfx.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/gfx.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -244,14 +244,14 @@
 
 	xscale = ((w * factor) / 2);
 
-	dstRect.left   = (int16)(x - xscale);
+	dstRect.left = (int16)(x - xscale);
 	if (dstRect.left > _screenWidth - 1)
 		return;
-	dstRect.top    = (int16)(y - (h * factor));
+	dstRect.top = (int16)(y - (h * factor));
 	if (dstRect.top > _screenHeight - 1)
 		return;
 
-	dstRect.right  = (int16)(x + xscale);
+	dstRect.right = (int16)(x + xscale);
 	dstRect.bottom = y;
 
 	_feebleRect = dstRect;
@@ -381,7 +381,7 @@
 
 			if (state->flags & kDFMasked) {
 				if (getGameType() == GType_FF && !getBitFlag(81)) {
-					if (state->x  > _feebleRect.right) {
+					if (state->x > _feebleRect.right) {
 						return;
 					}
 					if (state->y > _feebleRect.bottom) {
@@ -826,7 +826,7 @@
 		byte *dst = dstPtr;
 
 		h = 0;
-		if (state->flags & kDFNonTrans)  {
+		if (state->flags & kDFNonTrans) {
 			do {
 				byte colors = *src;
 				color = (colors / 16);
@@ -902,7 +902,7 @@
 			xoffs = (vlut[0] * 2 + state->x) * 8;
 			yoffs = vlut[1] + state->y;
 		}
-	} else {
+	} else if (getGameType() == GType_ELVIRA1) {
 		if (_windowNum == 6) {
 			state->surf_addr = _window6BackScn;
 			state->surf_pitch = 48;
@@ -1158,14 +1158,14 @@
 	}
 }
 
-void AGOSEngine::setImage(uint16 vga_res_id, bool vgaScript) {
+void AGOSEngine::setImage(uint16 vgaSpriteId, bool vgaScript) {
 	uint zoneNum;
 	VgaPointersEntry *vpe;
 	byte *bb, *b;
 	uint16 count;
 	const byte *vc_ptr_org;
 
-	zoneNum = vga_res_id / 100;
+	zoneNum = vgaSpriteId / 100;
 
 	for (;;) {
 		vpe = &_vgaBufferPointers[zoneNum];
@@ -1198,22 +1198,22 @@
 		b = bb + READ_LE_UINT16(&((VgaFileHeader2_Feeble *) b)->imageTable);
 
 		while (count--) {
-			if (READ_LE_UINT16(&((ImageHeader_Feeble *) b)->id) == vga_res_id)
+			if (READ_LE_UINT16(&((ImageHeader_Feeble *) b)->id) == vgaSpriteId)
 				break;
 			b += sizeof(ImageHeader_Feeble);
 		}
-		assert(READ_LE_UINT16(&((ImageHeader_Feeble *) b)->id) == vga_res_id);
+		assert(READ_LE_UINT16(&((ImageHeader_Feeble *) b)->id) == vgaSpriteId);
 	} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
 		b = bb + READ_BE_UINT16(bb + 4);
 		count = READ_BE_UINT16(&((VgaFileHeader2_Common *) b)->imageCount);
 		b = bb + READ_BE_UINT16(&((VgaFileHeader2_Common *) b)->imageTable);
 
 		while (count--) {
-			if (READ_BE_UINT16(&((ImageHeader_Simon *) b)->id) == vga_res_id)
+			if (READ_BE_UINT16(&((ImageHeader_Simon *) b)->id) == vgaSpriteId)
 				break;
 			b += sizeof(ImageHeader_Simon);
 		}
-		assert(READ_BE_UINT16(&((ImageHeader_Simon *) b)->id) == vga_res_id);
+		assert(READ_BE_UINT16(&((ImageHeader_Simon *) b)->id) == vgaSpriteId);
 
 		if (!vgaScript)
 			clearVideoWindow(_windowNum, READ_BE_UINT16(&((ImageHeader_Simon *) b)->color));
@@ -1225,11 +1225,11 @@
 		b = bb + READ_BE_UINT16(&((VgaFileHeader2_Common *) b)->imageTable);
 
 		while (count--) {
-			if (READ_BE_UINT16(&((ImageHeader_WW *) b)->id) == vga_res_id)
+			if (READ_BE_UINT16(&((ImageHeader_WW *) b)->id) == vgaSpriteId)
 				break;
 			b += sizeof(ImageHeader_WW);
 		}
-		assert(READ_BE_UINT16(&((ImageHeader_WW *) b)->id) == vga_res_id);
+		assert(READ_BE_UINT16(&((ImageHeader_WW *) b)->id) == vgaSpriteId);
 
 		if (!vgaScript)
 			clearVideoWindow(_windowNum, READ_BE_UINT16(&((ImageHeader_WW *) b)->color));
@@ -1237,11 +1237,11 @@
 
 	if (_startVgaScript) {
 		if (getGameType() == GType_FF || getGameType() == GType_PP) {
-			dumpVgaScript(_curVgaFile1 + READ_LE_UINT16(&((ImageHeader_Feeble*)b)->scriptOffs), zoneNum, vga_res_id);
+			dumpVgaScript(_curVgaFile1 + READ_LE_UINT16(&((ImageHeader_Feeble*)b)->scriptOffs), zoneNum, vgaSpriteId);
 		} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
-			dumpVgaScript(_curVgaFile1 + READ_BE_UINT16(&((ImageHeader_Simon*)b)->scriptOffs), zoneNum, vga_res_id);
+			dumpVgaScript(_curVgaFile1 + READ_BE_UINT16(&((ImageHeader_Simon*)b)->scriptOffs), zoneNum, vgaSpriteId);
 		} else {
-			dumpVgaScript(_curVgaFile1 + READ_BE_UINT16(&((ImageHeader_WW*)b)->scriptOffs), zoneNum, vga_res_id);
+			dumpVgaScript(_curVgaFile1 + READ_BE_UINT16(&((ImageHeader_WW*)b)->scriptOffs), zoneNum, vgaSpriteId);
 		}
 	}
 
@@ -1259,7 +1259,7 @@
 	_vcPtr = vc_ptr_org;
 }
 
-void AGOSEngine::setWindowImageEx(uint16 mode, uint16 vga_res) {
+void AGOSEngine::setWindowImageEx(uint16 mode, uint16 vgaSpriteId) {
 	_window3Flag = 0;
 
 	if (mode == 4) {
@@ -1284,19 +1284,19 @@
 
 	if (getGameType() != GType_PP && getGameType() != GType_FF) {
 		if (getGameType() == GType_WW && (mode == 6 || mode == 8 || mode == 9)) {
-			setWindowImage(mode, vga_res);
+			setWindowImage(mode, vgaSpriteId);
 		} else {
 			while (_copyScnFlag && !shouldQuit())
 				delay(1);
 
-			setWindowImage(mode, vga_res);
+			setWindowImage(mode, vgaSpriteId);
 		}
 	} else {
-		setWindowImage(mode, vga_res);
+		setWindowImage(mode, vgaSpriteId);
 	}
 }
 
-void AGOSEngine::setWindowImage(uint16 mode, uint16 vga_res_id) {
+void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId) {
 	uint16 updateWindow;
 
 	_windowNum = updateWindow = mode;
@@ -1328,7 +1328,7 @@
 		}
 	}
 
-	setImage(vga_res_id);
+	setImage(vgaSpriteId);
 
 	if (getGameType() == GType_FF || getGameType() == GType_PP) {
 		fillBackGroundFromBack();
@@ -1408,7 +1408,7 @@
 				_lockWord &= ~0x20;
 				return;
 			}
-		} else {
+		} else if (getGameType() == GType_ELVIRA1) {
 			if (updateWindow == 6) {
 				_window6Flag = 1;
 				src = _window6BackScn;

Modified: scummvm/trunk/engines/agos/icons.cpp
===================================================================
--- scummvm/trunk/engines/agos/icons.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/icons.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -356,7 +356,7 @@
 		removeIconArray(num);
 
 	window->iconPtr=(IconBlock *)malloc(sizeof(IconBlock));
-        window->iconPtr->itemRef = itemRef;
+	window->iconPtr->itemRef = itemRef;
 	window->iconPtr->upArrow = -1;
 	window->iconPtr->downArrow = -1;
 	window->iconPtr->line = line;
@@ -536,12 +536,12 @@
 	}
 }
 
-uint AGOSEngine_Feeble::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr) {
+uint AGOSEngine_Feeble::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr) {
 	HitArea *ha = findEmptyHitArea();
 
 	ha->x = x;
 	ha->y = y;
-	ha->item_ptr = item_ptr;
+	ha->itemPtr = itemPtr;
 	ha->width = 45;
 	ha->height = 44;
 	ha->flags = kBFBoxInUse | kBFBoxItem;
@@ -552,12 +552,12 @@
 	return ha - _hitAreas;
 }
 
-uint AGOSEngine_Simon2::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr) {
+uint AGOSEngine_Simon2::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr) {
 	HitArea *ha = findEmptyHitArea();
 
 	ha->x = x + 110;
 	ha->y = window->y + y;
-	ha->item_ptr = item_ptr;
+	ha->itemPtr = itemPtr;
 	ha->width = 20;
 	ha->height = 20;
 	ha->flags = kBFDragBox | kBFBoxInUse | kBFBoxItem;
@@ -568,12 +568,12 @@
 	return ha - _hitAreas;
 }
 
-uint AGOSEngine_Simon1::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr) {
+uint AGOSEngine_Simon1::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr) {
 	HitArea *ha = findEmptyHitArea();
 
 	ha->x = (x + window->x) * 8;
 	ha->y = y * 25 + window->y;
-	ha->item_ptr = item_ptr;
+	ha->itemPtr = itemPtr;
 	ha->width = 24;
 	ha->height = 24;
 	ha->flags = kBFDragBox | kBFBoxInUse | kBFBoxItem;
@@ -584,12 +584,12 @@
 	return ha - _hitAreas;
 }
 
-uint AGOSEngine_Waxworks::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr) {
+uint AGOSEngine_Waxworks::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr) {
 	HitArea *ha = findEmptyHitArea();
 
 	ha->x = (x + window->x) * 8;
 	ha->y = y * 20 + window->y;
-	ha->item_ptr = item_ptr;
+	ha->itemPtr = itemPtr;
 	ha->width = 24;
 	ha->height = 20;
 	ha->flags = kBFDragBox | kBFBoxInUse | kBFBoxItem;
@@ -600,12 +600,12 @@
 	return ha - _hitAreas;
 }
 
-uint AGOSEngine_Elvira2::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr) {
+uint AGOSEngine_Elvira2::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr) {
 	HitArea *ha = findEmptyHitArea();
 
 	ha->x = (x + window->x) * 8;
 	ha->y = y * 8 + window->y;
-	ha->item_ptr = item_ptr;
+	ha->itemPtr = itemPtr;
 	ha->width = 24;
 	ha->height = 24;
 	ha->id = 0x7FFD;
@@ -622,12 +622,12 @@
 	return ha - _hitAreas;
 }
 
-uint AGOSEngine::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr) {
+uint AGOSEngine::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr) {
 	HitArea *ha = findEmptyHitArea();
 
 	ha->x = (x + window->x) * 8;
 	ha->y = y * 8 + window->y;
-	ha->item_ptr = item_ptr;
+	ha->itemPtr = itemPtr;
 	ha->width = 24;
 	ha->height = 24;
 	ha->flags = kBFDragBox | kBFBoxInUse | kBFBoxItem;

Modified: scummvm/trunk/engines/agos/input.cpp
===================================================================
--- scummvm/trunk/engines/agos/input.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/input.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -152,8 +152,8 @@
 			inventoryUp(_lastHitArea->window);
 		} else if (_lastHitArea->id == 0x7FFC) {
 			inventoryDown(_lastHitArea->window);
-		} else if (_lastHitArea->item_ptr != NULL) {
-			_hitAreaObjectItem = _lastHitArea->item_ptr;
+		} else if (_lastHitArea->itemPtr != NULL) {
+			_hitAreaObjectItem = _lastHitArea->itemPtr;
 			setVerbText(_lastHitArea);
 			break;
 		}
@@ -218,7 +218,7 @@
 		if (!_lastHitArea3 && _dragMode) {
 			ha = _lastClickRem;
 
-			if (ha == 0 || ha->item_ptr == NULL || !(ha->flags & kBFDragBox)) {
+			if (ha == 0 || ha->itemPtr == NULL || !(ha->flags & kBFDragBox)) {
 				_dragFlag = 0;
 				_dragMode = 0;
 				_dragCount = 0;
@@ -226,7 +226,7 @@
 				continue;
 			}
 
-			_hitAreaSubjectItem = ha->item_ptr;
+			_hitAreaSubjectItem = ha->itemPtr;
 			_verbHitArea = 500;
 
 			do {
@@ -250,7 +250,7 @@
 			boxController(_mouse.x, _mouse.y, 1);
 
 			if (_currentBox != NULL) {
-				_hitAreaObjectItem = _currentBox->item_ptr;
+				_hitAreaObjectItem = _currentBox->itemPtr;
 				setVerbText(ha);
 			}
 
@@ -299,10 +299,10 @@
 					waitForSync(34);
 				}
 			}
-			if (ha->item_ptr && (!ha->verb || _verbHitArea ||
-					(_hitAreaSubjectItem != ha->item_ptr && (ha->flags & kBFBoxItem)))
+			if (ha->itemPtr && (!ha->verb || _verbHitArea ||
+					(_hitAreaSubjectItem != ha->itemPtr && (ha->flags & kBFBoxItem)))
 				) {
-				_hitAreaSubjectItem = ha->item_ptr;
+				_hitAreaSubjectItem = ha->itemPtr;
 				id = setVerbText(ha);
 				_nameLocked = 0;
 				displayName(ha);
@@ -313,21 +313,21 @@
 				}
 
 				if (getGameType() == GType_WW)
-					doMenuStrip(menuFor_ww(ha->item_ptr, id));
+					doMenuStrip(menuFor_ww(ha->itemPtr, id));
 				else if (getGameType() == GType_ELVIRA2)
-					doMenuStrip(menuFor_e2(ha->item_ptr));
+					doMenuStrip(menuFor_e2(ha->itemPtr));
 				else if (getGameType() == GType_ELVIRA1)
-					lightMenuStrip(getUserFlag1(ha->item_ptr, 6));
+					lightMenuStrip(getUserFlag1(ha->itemPtr, 6));
 			} else {
 				if (ha->verb) {
 					if (getGameType() == GType_WW && _mouseCursor && _mouseCursor < 4) {
-						_hitAreaSubjectItem = ha->item_ptr;
+						_hitAreaSubjectItem = ha->itemPtr;
 						break;
 					}
 
 					_verbHitArea = ha->verb & 0xBFFF;
 					if (ha->verb & 0x4000) {
-						_hitAreaSubjectItem = ha->item_ptr;
+						_hitAreaSubjectItem = ha->itemPtr;
 						break;
 					}
 					if (_hitAreaSubjectItem != NULL)

Modified: scummvm/trunk/engines/agos/intern.h
===================================================================
--- scummvm/trunk/engines/agos/intern.h	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/intern.h	2009-02-07 01:11:51 UTC (rev 36228)
@@ -158,7 +158,7 @@
 	int16 textColumn, textRow;
 	int16 scrollY;
 	uint16 textColumnOffset, textLength, textMaxLength;
-	uint8 fill_color, text_color;
+	uint8 fillColor, textColor;
 	IconBlock *iconPtr;
 	WindowBlock() { memset(this, 0, sizeof(*this)); }
 	~WindowBlock() { free (iconPtr); }

Modified: scummvm/trunk/engines/agos/rooms.cpp
===================================================================
--- scummvm/trunk/engines/agos/rooms.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/rooms.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -51,7 +51,7 @@
 
 	SubRoom *subRoom = (SubRoom *)findChildOfType(item, kRoomType);
 	if (subRoom == NULL)
-	    return 0;
+		return 0;
 
 	d <<= 1;
 	mask <<= d;
@@ -95,7 +95,7 @@
 
 	r = (SubRoom *)findChildOfType(i, kRoomType);
 	if (r == NULL)
-	    return;
+		return;
 	d1 = d;
 	while (d > y) {
 		if (getDoorState(i, y) == 0)
@@ -109,7 +109,7 @@
 		return;
 	r1 = (SubRoom *)findChildOfType(j, kRoomType);
 	if (r1 == NULL)
-	    return;
+		return;
 	d = getBackExit(d);
 	d1 = d;
 	y = 0;
@@ -321,7 +321,7 @@
 
 	sr = (SubSuperRoom *)findChildOfType(i, kSuperRoomType);
 	if (sr == NULL)
-	    return 0;
+		return 0;
 
 	d <<= 1;
 	mask <<= d;

Modified: scummvm/trunk/engines/agos/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agos/saveload.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/saveload.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -878,8 +878,8 @@
 	byte old_text;
 
 	windowPutChar(window, x, b);
-	old_text = window->text_color;
-	window->text_color = window->fill_color;
+	old_text = window->textColor;
+	window->textColor = window->fillColor;
 
 	if (_language == Common::HB_ISR) {
 		x = 128;
@@ -891,14 +891,14 @@
 
 	windowPutChar(window, x);
 
-	window->text_color = old_text;
+	window->textColor = old_text;
 	windowPutChar(window, 8);
 }
 
-void AGOSEngine::fileError(WindowBlock *window, bool save_error) {
+void AGOSEngine::fileError(WindowBlock *window, bool saveError) {
 	const char *message1, *message2;
 
-	if (save_error) {
+	if (saveError) {
 		switch (_language) {
 		case Common::RU_RUS:
 			if (getGameType() == GType_SIMON2) {

Modified: scummvm/trunk/engines/agos/script_pp.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_pp.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/script_pp.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -300,7 +300,7 @@
 	getNextWord();
 	if (_clockStopped != 0)
 		_gameTime += getTime() - _clockStopped;
-	_clockStopped  = 0;
+	_clockStopped = 0;
 	_system->setFeatureState(OSystem::kFeatureIconifyWindow, true);
 }
 

Modified: scummvm/trunk/engines/agos/script_ww.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_ww.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/script_ww.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -393,12 +393,12 @@
 }
 
 void AGOSEngine_Waxworks::oww_boxMessage() {
-	// 184:  print message to box
+	// 184: print message to box
 	boxTextMessage((const char *)getStringPtrByID(getNextStringID()));
 }
 
 void AGOSEngine_Waxworks::oww_boxMsg() {
-	// 185:  print msg to box
+	// 185: print msg to box
 	boxTextMsg((const char *)getStringPtrByID(getNextStringID()));
 }
 

Modified: scummvm/trunk/engines/agos/string.cpp
===================================================================
--- scummvm/trunk/engines/agos/string.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/string.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -114,7 +114,7 @@
 }
 
 const byte *AGOSEngine::getStringPtrByID(uint16 stringId, bool upperCase) {
-	const byte *string_ptr;
+	const byte *stringPtr;
 	byte *dst;
 
 	_freeStringSlot ^= 1;
@@ -129,11 +129,11 @@
 		strcpy((char *)dst, (const char *)_textBuffer);
 	} else {
 		if (stringId < 0x8000) {
-			string_ptr = _stringTabPtr[stringId];
+			stringPtr = _stringTabPtr[stringId];
 		} else {
-			string_ptr = getLocalStringByID(stringId);
+			stringPtr = getLocalStringByID(stringId);
 		}
-		strcpy((char *)dst, (const char *)string_ptr);
+		strcpy((char *)dst, (const char *)stringPtr);
 	}
 
 	if (upperCase && *dst) {
@@ -576,7 +576,7 @@
 		height += textHeight;
 		y -= textHeight;
 		if (y < 2)
-		    y = 2;
+			y = 2;
 		string = string2;
 	}
 
@@ -758,7 +758,7 @@
 		if ((_lineCounts[0] <= 96) && (checkFit(_linePtrs[0], 48, 3))) {
 			if (_lineCounts[1] <= 48) {
 				if (_lineCounts[2] <= 48)
-				    return 5;
+					return 5;
 			}
 			return 6;
 		}
@@ -794,7 +794,7 @@
 			return 5;
 	default:
 		return 6;
-    }
+	}
 }
 
 

Modified: scummvm/trunk/engines/agos/subroutine.cpp
===================================================================
--- scummvm/trunk/engines/agos/subroutine.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/subroutine.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -288,7 +288,7 @@
 	return _gameFile;
 }
 
-bool AGOSEngine::loadTablesIntoMem(uint16 subr_id) {
+bool AGOSEngine::loadTablesIntoMem(uint16 subrId) {
 	byte *p;
 	uint16 min_num, max_num, file_num;
 	File *in;
@@ -305,7 +305,7 @@
 	p += 6;
 
 	while (min_num) {
-		if ((subr_id >= min_num) && (subr_id <= max_num)) {
+		if ((subrId >= min_num) && (subrId <= max_num)) {
 			_subroutineList = _subroutineListOrg;
 			_tablesHeapPtr = _tablesHeapPtrOrg;
 			_tablesHeapCurPos = _tablesHeapCurPosOrg;
@@ -333,11 +333,11 @@
 		p += 6;
 	}
 
-	debug(1,"loadTablesIntoMem: didn't find %d", subr_id);
+	debug(1,"loadTablesIntoMem: didn't find %d", subrId);
 	return 0;
 }
 
-bool AGOSEngine_Waxworks::loadTablesIntoMem(uint16 subr_id) {
+bool AGOSEngine_Waxworks::loadTablesIntoMem(uint16 subrId) {
 	byte *p;
 	int i;
 	uint min_num, max_num;
@@ -365,7 +365,7 @@
 
 			max_num = READ_BE_UINT16(p); p += 2;
 
-			if (subr_id >= min_num && subr_id <= max_num) {
+			if (subrId >= min_num && subrId <= max_num) {
 				_subroutineList = _subroutineListOrg;
 				_tablesHeapPtr = _tablesHeapPtrOrg;
 				_tablesHeapCurPos = _tablesHeapCurPosOrg;
@@ -395,11 +395,11 @@
 		}
 	}
 
-	debug(1,"loadTablesIntoMem: didn't find %d", subr_id);
+	debug(1,"loadTablesIntoMem: didn't find %d", subrId);
 	return 0;
 }
 
-bool AGOSEngine::loadXTablesIntoMem(uint16 subr_id) {
+bool AGOSEngine::loadXTablesIntoMem(uint16 subrId) {
 	byte *p;
 	int i;
 	uint min_num, max_num;
@@ -426,7 +426,7 @@
 			max_num = READ_BE_UINT16(p);
 			p += 2;
 
-			if (subr_id >= min_num && subr_id <= max_num) {
+			if (subrId >= min_num && subrId <= max_num) {
 				_subroutineList = _xsubroutineListOrg;
 				_tablesHeapPtr = _xtablesHeapPtrOrg;
 				_tablesHeapCurPos = _xtablesHeapCurPosOrg;
@@ -450,7 +450,7 @@
 		}
 	}
 
-	debug(1,"loadXTablesIntoMem: didn't find %d", subr_id);
+	debug(1,"loadXTablesIntoMem: didn't find %d", subrId);
 	return 0;
 }
 
@@ -696,7 +696,7 @@
 
 byte *AGOSEngine::readSingleOpcode(Common::SeekableReadStream *in, byte *ptr) {
 	int i, l;
-	const char *string_ptr;
+	const char *stringPtr;
 	uint16 opcode, val;
 
 	const char *const *table;
@@ -728,15 +728,15 @@
 		opcode = *ptr++;
 	}
 
-	string_ptr = table[opcode];
-	if (!string_ptr)
+	stringPtr = table[opcode];
+	if (!stringPtr)
 		error("Unable to locate opcode table. Perhaps you are using the wrong game target?");
 
 	for (;;) {
-		if (string_ptr[i] == ' ')
+		if (stringPtr[i] == ' ')
 			return ptr;
 
-		l = string_ptr[i++];
+		l = stringPtr[i++];
 
 		switch (l) {
 		case 'F':

Modified: scummvm/trunk/engines/agos/verb.cpp
===================================================================
--- scummvm/trunk/engines/agos/verb.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/verb.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -319,7 +319,7 @@
 	const uint len = (getGameType() == GType_WW) ? 29 : 53;
 
 	window = _windowArray[1];
-	if (window == NULL || window->text_color == 0)
+	if (window == NULL || window->textColor == 0)
 		return;
 
 	// Arisme : hack for long strings in the French version
@@ -407,7 +407,7 @@
 		return;
 
 	window = _windowArray[1];
-	if (window != NULL && window->text_color != 0)
+	if (window != NULL && window->textColor != 0)
 		clearWindow(window);
 
 	_lastNameOn = NULL;
@@ -496,7 +496,7 @@
 	return (ha->flags & kBFBoxDead) == 0;
 }
 
-void AGOSEngine::defineBox(int id, int x, int y, int width, int height, int flags, int verb, Item *item_ptr) {
+void AGOSEngine::defineBox(int id, int x, int y, int width, int height, int flags, int verb, Item *itemPtr) {
 	HitArea *ha;
 	undefineBox(id);
 
@@ -508,7 +508,7 @@
 	ha->flags = flags | kBFBoxInUse;
 	ha->id = ha->priority = id;
 	ha->verb = verb;
-	ha->item_ptr = item_ptr;
+	ha->itemPtr = itemPtr;
 
 	if (getGameType() == GType_FF && (ha->flags & kBFHyperBox)) {
 		ha->data = _hyperLink;
@@ -770,7 +770,7 @@
 
 	if ((getGameType() == GType_WW) && (_mouseCursor == 0 || _mouseCursor >= 4)) {
 		uint verb = best_ha->verb & 0x3FFF;
-		if  (verb >= 239 && verb <= 242) {
+		if (verb >= 239 && verb <= 242) {
 			uint cursor = verb - 235;
 			if (_mouseCursor != cursor) {
 				_mouseCursor = cursor;
@@ -831,7 +831,7 @@
 	if (ha->flags & kBFTextBox) {
 		result = printTextOf(ha->flags / 256, x, y);
 	} else {
-		result = printNameOf(ha->item_ptr, x, y);
+		result = printNameOf(ha->itemPtr, x, y);
 	}
 
 	if (result)
@@ -903,17 +903,17 @@
 	do {
 		for (i = 0; i != w; ++i) {
 			color = src[i];
-			if (getGameType() == GType_WW)  {
+			if (getGameType() == GType_WW) {
 				if (!(color & 0xF) || (color & 0xF) == 10) {
 					color ^= 10;
 					src[i] = color;
 				}
-			} else if (getGameType() == GType_ELVIRA2)  {
+			} else if (getGameType() == GType_ELVIRA2) {
 				if (!(color & 1)) {
 					color ^= 2;
 					src[i] = color;
 				}
-			} else if (getGameType() == GType_ELVIRA1)  {
+			} else if (getGameType() == GType_ELVIRA1) {
 				if (color & 1) {
 					color ^= 2;
 					src[i] = color;

Modified: scummvm/trunk/engines/agos/vga.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/vga.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -176,7 +176,7 @@
 	}
 }
 
-bool AGOSEngine::itemIsSiblingOf(uint16 a) {
+bool AGOSEngine::ifObjectHere(uint16 a) {
 	Item *item;
 
 	CHECK_BOUNDS(a, _objectArray);
@@ -188,7 +188,7 @@
 	return me()->parent == item->parent;
 }
 
-bool AGOSEngine::itemIsParentOf(uint16 a, uint16 b) {
+bool AGOSEngine::ifObjectAt(uint16 a, uint16 b) {
 	Item *item_a, *item_b;
 
 	CHECK_BOUNDS(a, _objectArray);
@@ -203,7 +203,7 @@
 	return derefItem(item_a->parent) == item_b;
 }
 
-bool AGOSEngine::vc_maybe_skip_proc_1(uint16 a, int16 b) {
+bool AGOSEngine::ifObjectState(uint16 a, int16 b) {
 	Item *item;
 
 	CHECK_BOUNDS(a, _objectArray);
@@ -449,26 +449,26 @@
 }
 
 void AGOSEngine::vc6_ifObjectHere() {
-	if (!itemIsSiblingOf(vcReadNextWord()))
+	if (!ifObjectHere(vcReadNextWord()))
 		vcSkipNextInstruction();
 }
 
 void AGOSEngine::vc7_ifObjectNotHere() {
-	if (itemIsSiblingOf(vcReadNextWord()))
+	if (ifObjectHere(vcReadNextWord()))
 		vcSkipNextInstruction();
 }
 
 void AGOSEngine::vc8_ifObjectIsAt() {
 	uint16 a = vcReadNextWord();
 	uint16 b = vcReadNextWord();
-	if (!itemIsParentOf(a, b))
+	if (!ifObjectAt(a, b))
 		vcSkipNextInstruction();
 }
 
 void AGOSEngine::vc9_ifObjectStateIs() {
 	uint16 a = vcReadNextWord();
 	uint16 b = vcReadNextWord();
-	if (!vc_maybe_skip_proc_1(a, b))
+	if (!ifObjectState(a, b))
 		vcSkipNextInstruction();
 }
 
@@ -743,7 +743,7 @@
 	uint16 id = vcReadNextWord();
 	while (vfs->ident != 0) {
 		if (vfs->ident == id) {
-			addVgaEvent(_vgaBaseDelay, ANIMATE_EVENT, vfs->code_ptr, vfs->sprite_id, vfs->cur_vga_file);
+			addVgaEvent(_vgaBaseDelay, ANIMATE_EVENT, vfs->codePtr, vfs->id, vfs->zoneNum);
 			vfs_tmp = vfs;
 			do {
 				memcpy(vfs_tmp, vfs_tmp + 1, sizeof(VgaSleepStruct));
@@ -766,9 +766,9 @@
 		vfs++;
 
 	vfs->ident = vcReadNextWord();
-	vfs->code_ptr = _vcPtr;
-	vfs->sprite_id = _vgaCurSpriteId;
-	vfs->cur_vga_file = _vgaCurZoneNum;
+	vfs->codePtr = _vcPtr;
+	vfs->id = _vgaCurSpriteId;
+	vfs->zoneNum = _vgaCurZoneNum;
 
 	_vcPtr = (byte *)&_vc_get_out_of_code;
 }
@@ -777,7 +777,7 @@
 	VgaSleepStruct *vfs = _waitEndTable, *vfs_tmp;
 	while (vfs->ident != 0) {
 		if (vfs->ident == _vgaCurSpriteId) {
-			addVgaEvent(_vgaBaseDelay, ANIMATE_EVENT, vfs->code_ptr, vfs->sprite_id, vfs->cur_vga_file);
+			addVgaEvent(_vgaBaseDelay, ANIMATE_EVENT, vfs->codePtr, vfs->id, vfs->zoneNum);
 			vfs_tmp = vfs;
 			do {
 				memcpy(vfs_tmp, vfs_tmp + 1, sizeof(VgaSleepStruct));
@@ -798,9 +798,9 @@
 
 	if (isSpriteLoaded(id, id / 100)) {
 		vfs->ident = id;
-		vfs->code_ptr = _vcPtr;
-		vfs->sprite_id = _vgaCurSpriteId;
-		vfs->cur_vga_file = _vgaCurZoneNum;
+		vfs->codePtr = _vcPtr;
+		vfs->id = _vgaCurSpriteId;
+		vfs->zoneNum = _vgaCurZoneNum;
 		_vcPtr = (byte *)&_vc_get_out_of_code;
 	}
 }
@@ -1031,7 +1031,7 @@
 		if (vte->type == ANIMATE_INT) {
 			vte++;
 		// For animated heart in Elvira 2
-		} else if (getGameType() == GType_ELVIRA2 && vte->sprite_id == 100) {
+		} else if (getGameType() == GType_ELVIRA2 && vte->id == 100) {
 			vte++;
 		} else {
 			vte2 = vte;
@@ -1133,6 +1133,23 @@
 	}
 }
 
+void AGOSEngine_Simon2::clearVideoWindow(uint16 num, uint16 color) {
+	const uint16 *vlut = &_videoWindows[num * 4];
+	uint16 xoffs = vlut[0] * 16;
+	uint16 yoffs = vlut[1];
+	uint16 dstWidth = _videoWindows[18] * 16;
+	byte *dst = _window4BackScn + xoffs + yoffs * dstWidth;
+
+	setMoveRect(0, 0, vlut[2] * 16, vlut[3]);
+
+	for (uint h = 0; h < vlut[3]; h++) {
+		memset(dst, color, vlut[2] * 16);
+		dst += dstWidth;
+	}
+
+	_window4Flag = 1;
+}
+
 void AGOSEngine::clearVideoWindow(uint16 num, uint16 color) {
 	if (getGameType() == GType_ELVIRA1) {
 		if (num == 2 || num == 6)
@@ -1145,12 +1162,16 @@
 			return;
 	}
 
-	if (getGameType() == GType_SIMON2) {
+	if (getGameType() == GType_ELVIRA1 && num == 3) {
+		Graphics::Surface *screen = _system->lockScreen();
+		memset((byte *)screen->pixels, color, _screenWidth * _screenHeight);
+		 _system->unlockScreen();
+	} else if (num == 4) {
 		const uint16 *vlut = &_videoWindows[num * 4];
-		uint16 xoffs = vlut[0] * 16;
-		uint16 yoffs = vlut[1];
+		uint16 xoffs = (vlut[0] - _videoWindows[16]) * 16;
+		uint16 yoffs = (vlut[1] - _videoWindows[17]);
 		uint16 dstWidth = _videoWindows[18] * 16;
-		byte *dst =  _window4BackScn + xoffs + yoffs * dstWidth;
+		byte *dst = _window4BackScn + xoffs + yoffs * dstWidth;
 
 		setMoveRect(0, 0, vlut[2] * 16, vlut[3]);
 
@@ -1160,27 +1181,6 @@
 		}
 
 		_window4Flag = 1;
-	} else {
-		if (getGameType() == GType_ELVIRA1 && num == 3) {
-			Graphics::Surface *screen = _system->lockScreen();
-			memset((byte *)screen->pixels, color, _screenWidth * _screenHeight);
-			 _system->unlockScreen();
-		} else if (num == 4) {
-			const uint16 *vlut = &_videoWindows[num * 4];
-			uint16 xoffs = (vlut[0] - _videoWindows[16]) * 16;
-			uint16 yoffs = (vlut[1] - _videoWindows[17]);
-			uint16 dstWidth = _videoWindows[18] * 16;
-			byte *dst =  _window4BackScn + xoffs + yoffs * dstWidth;
-
-			setMoveRect(0, 0, vlut[2] * 16, vlut[3]);
-
-			for (uint h = 0; h < vlut[3]; h++) {
-				memset(dst, color, vlut[2] * 16);
-				dst += dstWidth;
-			}
-
-			_window4Flag = 1;
-		}
 	}
 }
 
@@ -1262,7 +1262,6 @@
 	int16 value = vcReadVar(var) + vcReadNextWord();
 
 	if (getGameType() == GType_SIMON2 && var == 15 && !getBitFlag(80)) {
-
 		if ((_scrollCount < 0) || (_scrollCount == 0 && _scrollFlag == 0)) {
 			_scrollCount = 0;
 			if (value - _scrollX >= 30) {
@@ -1280,7 +1279,6 @@
 	int16 value = vcReadVar(var) - vcReadNextWord();
 
 	if (getGameType() == GType_SIMON2 && var == 15 && !getBitFlag(80)) {
-
 		if ((_scrollCount > 0) || (_scrollCount == 0 && _scrollFlag == 0)) {
 			_scrollCount = 0;
 			if ((uint16)(value - _scrollX) < 11) {
@@ -1296,7 +1294,6 @@
 void AGOSEngine::vc42_delayIfNotEQ() {
 	uint16 val = vcReadVar(vcReadNextWord());
 	if (val != vcReadNextWord()) {
-
 		addVgaEvent(_frameCount + 1, ANIMATE_EVENT, _vcPtr - 4, _vgaCurSpriteId, _vgaCurZoneNum);
 		_vcPtr = (byte *)&_vc_get_out_of_code;
 	}

Modified: scummvm/trunk/engines/agos/vga_ww.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga_ww.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/vga_ww.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -64,7 +64,7 @@
 
 		vte = _vgaTimerList;
 		while (vte->delay) {
-			if (vte->sprite_id == _vgaCurSpriteId && vte->cur_vga_file == _vgaCurZoneNum) {
+			if (vte->id == _vgaCurSpriteId && vte->zoneNum == _vgaCurZoneNum) {
 				deleteVgaEvent(vte);
 				break;
 			}
@@ -93,7 +93,7 @@
 
 	vfs = _waitSyncTable;
 	while (vfs->ident != 0) {
-		if (vfs->sprite_id == _vgaCurSpriteId && vfs->cur_vga_file == _vgaCurZoneNum) {
+		if (vfs->id == _vgaCurSpriteId && vfs->zoneNum == _vgaCurZoneNum) {
 			while (vfs->ident != 0) {
 				memcpy(vfs, vfs + 1, sizeof(VgaSleepStruct));
 				vfs++;
@@ -109,7 +109,7 @@
 
 		vte = _vgaTimerList;
 		while (vte->delay) {
-			if (vte->sprite_id == _vgaCurSpriteId && vte->cur_vga_file == _vgaCurZoneNum) {
+			if (vte->id == _vgaCurSpriteId && vte->zoneNum == _vgaCurZoneNum) {
 				deleteVgaEvent(vte);
 				break;
 			}

Modified: scummvm/trunk/engines/agos/window.cpp
===================================================================
--- scummvm/trunk/engines/agos/window.cpp	2009-02-07 00:23:53 UTC (rev 36227)
+++ scummvm/trunk/engines/agos/window.cpp	2009-02-07 01:11:51 UTC (rev 36228)
@@ -61,8 +61,8 @@
 	window->width = w;
 	window->height = h;
 	window->flags = flags;
-	window->fill_color = fillColor;
-	window->text_color = textColor;
+	window->fillColor = fillColor;
+	window->textColor = textColor;
 	window->textColumn = 0;
 	window->textColumnOffset = 0;
 	window->textRow = 0;
@@ -77,8 +77,8 @@
 	if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW)
 		clearWindow(window);
 
-	if (getGameType() == GType_SIMON1 && getPlatform() == Common::kPlatformAmiga && window->fill_color == 225)
-		window->fill_color = (getFeatures() & GF_32COLOR) ? 17 : 241;
+	if (getGameType() == GType_SIMON1 && getPlatform() == Common::kPlatformAmiga && window->fillColor == 225)
+		window->fillColor = (getFeatures() & GF_32COLOR) ? 17 : 241;
 
 	return window;
 }
@@ -130,8 +130,8 @@
 
 	for (h = 0; h < window->height; h++) {
 		for (w = 0; w < window->width; w++) {
-			if (dst[w] == 113  || dst[w] == 116 || dst[w] == 252)
-				dst[w] = window->fill_color;
+			if (dst[w] == 113 || dst[w] == 116 || dst[w] == 252)
+				dst[w] = window->fillColor;
 		}
 		dst += _screenWidth;
 	}
@@ -146,7 +146,7 @@
 	h = window->height * 8;
 
 	if (getGameType() == GType_ELVIRA2 && window->y == 146) {
-		if (window->fill_color == 1) {
+		if (window->fillColor == 1) {
 			_displayPalette[33 * 4 + 0] = 48 * 4;
 			_displayPalette[33 * 4 + 1] = 40 * 4;
 			_displayPalette[33 * 4 + 2] = 32 * 4;
@@ -171,7 +171,7 @@
 	Graphics::Surface *screen = _system->lockScreen();
 	byte *dst = (byte *)screen->pixels + y * _screenWidth + x;
 
-	uint8 color = window->fill_color;
+	uint8 color = window->fillColor;
 	if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW)
 		color += dst[0] & 0xF0;
 
@@ -256,13 +256,13 @@
 	WindowBlock *window = _windowArray[_curWindow];
 
 	if ((getFeatures() & GF_32COLOR) && color != 0) {
-		if (window->fill_color == 17)
+		if (window->fillColor == 17)
 			color = 25;
 		else
 			color = 220;
 	}
 
-	window->text_color = color;
+	window->textColor = color;
 }
 
 void AGOSEngine::sendWindow(uint a) {
@@ -323,13 +323,13 @@
 
 	// Clear background of first digit
 	window->textColumnOffset = offs;
-	window->text_color = 0;
+	window->textColor = 0;
 	windowDrawChar(window, x * 8, y, 129);
 
 	if (val != -1) {
 		// Print first digit
 		chr = val / 10 + 48;
-		window->text_color = 15;
+		window->textColor = 15;
 		windowDrawChar(window, x * 8, y, chr);
 	}
 
@@ -341,13 +341,13 @@
 
 	// Clear background of second digit
 	window->textColumnOffset = offs;
-	window->text_color = 0;
+	window->textColor = 0;
 	windowDrawChar(window, x * 8, y, 129);
 
 	if (val != -1) {
 		// Print second digit
 		chr = val % 10 + 48;
-		window->text_color = 15;
+		window->textColor = 15;
 		windowDrawChar(window, x * 8, y, chr);
 	}
 }


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




More information about the Scummvm-git-logs mailing list