[Scummvm-cvs-logs] SF.net SVN: scummvm: [22063] scummvm/trunk/engines/simon

kirben at users.sourceforge.net kirben at users.sourceforge.net
Thu Apr 20 17:27:21 CEST 2006


Revision: 22063
Author:   kirben
Date:     2006-04-20 17:26:18 -0700 (Thu, 20 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22063&view=rev

Log Message:
-----------
Add back debug function

Modified Paths:
--------------
    scummvm/trunk/engines/simon/simon.cpp
    scummvm/trunk/engines/simon/simon.h
Modified: scummvm/trunk/engines/simon/simon.cpp
===================================================================
--- scummvm/trunk/engines/simon/simon.cpp	2006-04-21 00:18:23 UTC (rev 22062)
+++ scummvm/trunk/engines/simon/simon.cpp	2006-04-21 00:26:18 UTC (rev 22063)
@@ -2628,9 +2628,6 @@
 		_vgaCurSpriteId = vsp->id;
 		_vgaCurSpritePriority = vsp->priority;
 
-		if (_drawImagesDebug && vsp->image)
-			fprintf(_dumpFile, "id:%5d image:%3d base-color:%3d x:%3d y:%3d flags:%x\n",
-							vsp->id, vsp->image, vsp->palette, vsp->x, vsp->y, vsp->flags);
 		params[0] = readUint16Wrapper(&vsp->image);
 		params[1] = readUint16Wrapper(&vsp->palette);
 		params[2] = readUint16Wrapper(&vsp->x);
@@ -2655,6 +2652,44 @@
 	_vcPtr = vc_ptr_org;
 }
 
+void SimonEngine::animateSpritesDebug() {
+	VgaSprite *vsp;
+	VgaPointersEntry *vpe;
+	const byte *vc_ptr_org = _vcPtr;
+	uint16 params[5];							// parameters to vc10_draw
+
+	if (_paletteFlag == 2)
+		_paletteFlag = 1;
+
+	vsp = _vgaSprites;
+	while (vsp->id != 0) {
+		vsp->windowNum &= 0x7FFF;
+
+		vpe = &_vgaBufferPointers[vsp->zoneNum];
+		_curVgaFile1 = vpe->vgaFile1;
+		_curVgaFile2 = vpe->vgaFile2;
+		_curSfxFile = vpe->sfxFile;
+		_windowNum = vsp->windowNum;
+		_vgaCurSpriteId = vsp->id;
+
+		if (vsp->image)
+			fprintf(_dumpFile, "id:%5d image:%3d base-color:%3d x:%3d y:%3d flags:%x\n",
+							vsp->id, vsp->image, vsp->palette, vsp->x, vsp->y, vsp->flags);
+		params[0] = readUint16Wrapper(&vsp->image);
+		params[1] = readUint16Wrapper(&vsp->palette);
+		params[2] = readUint16Wrapper(&vsp->x);
+		params[3] = readUint16Wrapper(&vsp->y);
+		params[4] = readUint16Wrapper(&vsp->flags);
+		_vcPtr = (const byte *)params;
+		vc10_draw();
+
+		vsp++;
+	}
+
+	_updateScreen++;
+	_vcPtr = vc_ptr_org;
+}
+
 void SimonEngine::scrollScreen() {
 	byte *dst = getFrontBuf();
 	const byte *src;
@@ -2743,6 +2778,8 @@
 	}
 
 	animateSprites();
+	if (_drawImagesDebug)
+		animateSpritesDebug();
 
 	if (_copyPartialMode == 1) {
 		fillBackFromFront(80, 46, 208 - 80, 94 - 46);

Modified: scummvm/trunk/engines/simon/simon.h
===================================================================
--- scummvm/trunk/engines/simon/simon.h	2006-04-21 00:18:23 UTC (rev 22062)
+++ scummvm/trunk/engines/simon/simon.h	2006-04-21 00:26:18 UTC (rev 22063)
@@ -1064,6 +1064,7 @@
 	void timer_proc1();
 
 	void animateSprites();
+	void animateSpritesDebug();
 
 	void dx_clear_surfaces(uint num_lines);
 	void dx_update_screen_and_palette();


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