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

kirben at users.sourceforge.net kirben at users.sourceforge.net
Tue May 15 15:01:37 CEST 2007


Revision: 26845
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26845&view=rev
Author:   kirben
Date:     2007-05-15 06:01:36 -0700 (Tue, 15 May 2007)

Log Message:
-----------
Minor cleanup.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.h
    scummvm/trunk/engines/agos/draw.cpp
    scummvm/trunk/engines/agos/gfx.cpp
    scummvm/trunk/engines/agos/script_e1.cpp
    scummvm/trunk/engines/agos/script_s1.cpp
    scummvm/trunk/engines/agos/script_s2.cpp
    scummvm/trunk/engines/agos/vga.cpp
    scummvm/trunk/engines/agos/vga.h
    scummvm/trunk/engines/agos/vga_s1.cpp

Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h	2007-05-15 11:32:11 UTC (rev 26844)
+++ scummvm/trunk/engines/agos/agos.h	2007-05-15 13:01:36 UTC (rev 26845)
@@ -788,7 +788,7 @@
 
 	void loadZone(uint zoneNum);
 
-	void animate(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x, uint y, uint palette, bool vgaScript = false);
+	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);
@@ -1044,7 +1044,7 @@
 protected:
 	bool drawImage_clip(VC10_state *state);
 
-	void drawImage_init(int16 image, uint16 palette, uint16 x, uint16 y, uint16 flags);
+	void drawImage_init(int16 image, uint16 palette, int16 x, int16 y, uint16 flags);
 
 	virtual void drawImage(VC10_state *state);
 	void drawBackGroundImage(VC10_state *state);

Modified: scummvm/trunk/engines/agos/draw.cpp
===================================================================
--- scummvm/trunk/engines/agos/draw.cpp	2007-05-15 11:32:11 UTC (rev 26844)
+++ scummvm/trunk/engines/agos/draw.cpp	2007-05-15 13:01:36 UTC (rev 26845)
@@ -258,19 +258,19 @@
 		AnimTable *animTableTmp;
 
 		animTable = animTableTmp = _screenAnim1;
-		while (animTable->srcPtr != 0) {
+		while (animTable->srcPtr) {
 			if (!(animTable->window & 8000)) {
 				memcpy(animTableTmp, animTable, sizeof(AnimTable));
 				animTableTmp++;
 			}
 			animTable++;
 		}
-		animTableTmp->id = 0;
+		animTableTmp->srcPtr = 0;
 	}
 }
 
 void AGOSEngine::saveBackGround(VgaSprite *vsp) {
-	if ((vsp->flags & 4) || !vsp->image)
+	if ((vsp->flags & kDFSkipStoreBG) || !vsp->image)
 		return;
 
 	AnimTable *animTable = _screenAnim1;

Modified: scummvm/trunk/engines/agos/gfx.cpp
===================================================================
--- scummvm/trunk/engines/agos/gfx.cpp	2007-05-15 11:32:11 UTC (rev 26844)
+++ scummvm/trunk/engines/agos/gfx.cpp	2007-05-15 13:01:36 UTC (rev 26845)
@@ -981,7 +981,7 @@
 	} while (--num);
 }
 
-void AGOSEngine::animate(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x, uint y, uint palette, bool vgaScript) {
+void AGOSEngine::animate(uint16 windowNum, uint16 zoneNum, uint16 vgaSpriteId, int16 x, int16 y, uint16 palette, bool vgaScript) {
 	VgaSprite *vsp;
 	VgaPointersEntry *vpe;
 	byte *p, *pp;

Modified: scummvm/trunk/engines/agos/script_e1.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_e1.cpp	2007-05-15 11:32:11 UTC (rev 26844)
+++ scummvm/trunk/engines/agos/script_e1.cpp	2007-05-15 13:01:36 UTC (rev 26845)
@@ -750,11 +750,11 @@
 
 void AGOSEngine_Elvira1::oe1_animate() {
 	// 226: animate
-	uint vgaSpriteId = getVarOrWord();
-	uint windowNum = getVarOrByte();
-	uint x = getVarOrWord();
-	uint y = getVarOrWord();
-	uint palette = getVarOrWord();
+	uint16 vgaSpriteId = getVarOrWord();
+	uint16 windowNum = getVarOrByte();
+	int16 x = getVarOrWord();
+	int16 y = getVarOrWord();
+	uint16 palette = getVarOrWord();
 
 	_lockWord |= 0x40;
 	animate(windowNum, vgaSpriteId / 100, vgaSpriteId, x, y, palette);

Modified: scummvm/trunk/engines/agos/script_s1.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_s1.cpp	2007-05-15 11:32:11 UTC (rev 26844)
+++ scummvm/trunk/engines/agos/script_s1.cpp	2007-05-15 13:01:36 UTC (rev 26845)
@@ -289,11 +289,11 @@
 
 void AGOSEngine_Simon1::os1_animate() {
 	// 98: animate
-	uint vgaSpriteId = getVarOrWord();
-	uint windowNum = getVarOrByte();
-	uint x = getVarOrWord();
-	uint y = getVarOrWord();
-	uint palette = (getVarOrWord() & 15);
+	uint16 vgaSpriteId = getVarOrWord();
+	uint16 windowNum = getVarOrByte();
+	int16 x = getVarOrWord();
+	int16 y = getVarOrWord();
+	uint16 palette = (getVarOrWord() & 15);
 
 	if (getFeatures() & GF_TALKIE && vgaSpriteId >= 400) {
 		_lastVgaWaitFor = 0;

Modified: scummvm/trunk/engines/agos/script_s2.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_s2.cpp	2007-05-15 11:32:11 UTC (rev 26844)
+++ scummvm/trunk/engines/agos/script_s2.cpp	2007-05-15 13:01:36 UTC (rev 26845)
@@ -307,12 +307,12 @@
 
 void AGOSEngine_Simon2::os2_animate() {
 	// 98: start vga
-	uint zoneNum = getVarOrWord();
-	uint vgaSpriteId = getVarOrWord();
-	uint windowNum = getVarOrByte();
-	uint x = getVarOrWord();
-	uint y = getVarOrWord();
-	uint palette = (getVarOrWord() & 15);
+	uint16 zoneNum = getVarOrWord();
+	uint16 vgaSpriteId = getVarOrWord();
+	uint16 windowNum = getVarOrByte();
+	int16 x = getVarOrWord();
+	int16 y = getVarOrWord();
+	uint16 palette = (getVarOrWord() & 15);
 
 	_lockWord |= 0x40;
 	animate(windowNum, zoneNum, vgaSpriteId, x, y, palette);

Modified: scummvm/trunk/engines/agos/vga.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga.cpp	2007-05-15 11:32:11 UTC (rev 26844)
+++ scummvm/trunk/engines/agos/vga.cpp	2007-05-15 13:01:36 UTC (rev 26845)
@@ -403,7 +403,8 @@
 }
 
 void AGOSEngine::vc3_loadSprite() {
-	uint16 windowNum, zoneNum, palette, x, y, vgaSpriteId;
+	uint16 windowNum, zoneNum, palette, vgaSpriteId;
+	int16 x, y;
 	byte *old_file_1;
 
 	if (getGameType() == GType_PP && getBitFlag(100)) {
@@ -608,7 +609,7 @@
 	drawImage_init(image, palette, x, y, flags);
 }
 
-void AGOSEngine::drawImage_init(int16 image, uint16 palette, uint16 x, uint16 y, uint16 flags) {
+void AGOSEngine::drawImage_init(int16 image, uint16 palette, int16 x, int16 y, uint16 flags) {
 	if (image == 0)
 		return;
 

Modified: scummvm/trunk/engines/agos/vga.h
===================================================================
--- scummvm/trunk/engines/agos/vga.h	2007-05-15 11:32:11 UTC (rev 26844)
+++ scummvm/trunk/engines/agos/vga.h	2007-05-15 13:01:36 UTC (rev 26845)
@@ -101,7 +101,7 @@
 enum DrawFlags {
 	kDFFlip           = 0x1,
 	kDFNonTrans       = 0x2,
-	kDFUseFrontBuf    = 0x4,
+	kDFSkipStoreBG    = 0x4,
 	kDFCompressed     = 0x8,
 	kDFCompressedFlip = 0x10,
 	kDFMasked         = 0x20,

Modified: scummvm/trunk/engines/agos/vga_s1.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga_s1.cpp	2007-05-15 11:32:11 UTC (rev 26844)
+++ scummvm/trunk/engines/agos/vga_s1.cpp	2007-05-15 13:01:36 UTC (rev 26845)
@@ -216,7 +216,7 @@
 	vsp->image = vcReadVarOrWord();
 	vsp->x += vcReadNextWord();
 	vsp->y += vcReadNextWord();
-	vsp->flags = kDFMasked | kDFUseFrontBuf;
+	vsp->flags = kDFMasked | kDFSkipStoreBG;
 
 	vsp->windowNum |= 0x8000;
 	dirtyBackGround();


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