[Scummvm-cvs-logs] SF.net SVN: scummvm: [26201] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sun Mar 18 11:30:52 CET 2007


Revision: 26201
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26201&view=rev
Author:   peres001
Date:     2007-03-18 03:30:51 -0700 (Sun, 18 Mar 2007)

Log Message:
-----------
- made loadPointer return a new StaticCnv instead of accepting a parameter. 
- adjusted Gfx code handling mouse pointers.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/disk.cpp
    scummvm/trunk/engines/parallaction/disk.h
    scummvm/trunk/engines/parallaction/graphics.cpp
    scummvm/trunk/engines/parallaction/graphics.h

Modified: scummvm/trunk/engines/parallaction/disk.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk.cpp	2007-03-18 10:25:46 UTC (rev 26200)
+++ scummvm/trunk/engines/parallaction/disk.cpp	2007-03-18 10:30:51 UTC (rev 26201)
@@ -307,8 +307,10 @@
 }
 
 
-void Disk::loadPointer(StaticCnv* cnv) {
+StaticCnv* Disk::loadPointer() {
+	StaticCnv* cnv = new StaticCnv;
 	loadExternalStaticCnv("pointer", cnv);
+	return cnv;
 }
 
 void Disk::loadFont(const char* name, Cnv* cnv) {

Modified: scummvm/trunk/engines/parallaction/disk.h
===================================================================
--- scummvm/trunk/engines/parallaction/disk.h	2007-03-18 10:25:46 UTC (rev 26200)
+++ scummvm/trunk/engines/parallaction/disk.h	2007-03-18 10:30:51 UTC (rev 26201)
@@ -107,7 +107,7 @@
 	Script* loadScript(const char* name);
 	Cnv* loadTalk(const char *name);
 	void loadObjects(const char *name, Cnv *cnv);
-	void loadPointer(StaticCnv* cnv);
+	StaticCnv* loadPointer();
 	StaticCnv* loadHead(const char* name);
 	void loadFont(const char* name, Cnv* cnv);
 	void loadStatic(const char* name, StaticCnv* cnv);

Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp	2007-03-18 10:25:46 UTC (rev 26200)
+++ scummvm/trunk/engines/parallaction/graphics.cpp	2007-03-18 10:30:51 UTC (rev 26201)
@@ -51,7 +51,6 @@
 
 bool		Gfx::_proportionalFont = false;
 Point		Gfx::_labelPosition[2] = { { 0, 0 }, { 0, 0 } };
-StaticCnv	Gfx::_mouseComposedArrow;
 byte *		Gfx::_buffers[];
 
 #define PALETTE_BACKUP	PALETTE_SIZE
@@ -458,7 +457,7 @@
 
 void Gfx::initMouse(uint16 arg_0) {
 
-	_vm->_disk->loadPointer(&_mouseComposedArrow);
+	_mouseComposedArrow = _vm->_disk->loadPointer();
 
 	byte temp[16*16];
 	memcpy(temp, _mouseArrow, 16*16);
@@ -485,17 +484,12 @@
 		g_system->showMouse(true);
 
 	} else {
-
 		// inventory item pointer
-		StaticCnv mouse_pointer;
-		memcpy(&mouse_pointer, &_mouseComposedArrow, sizeof(StaticCnv));
-		byte *v8 = mouse_pointer._data0;
+		byte *v8 = _mouseComposedArrow->_data0;
 
-	// FIXME: target offseting is not clear
+		// FIXME: target offseting is not clear
 		extractInventoryGraphics(index, v8 + 7 + 32 * 7);
-
 		g_system->setMouseCursor(v8, 32, 32, 0, 0, 0);
-
 	}
 
 	return;

Modified: scummvm/trunk/engines/parallaction/graphics.h
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.h	2007-03-18 10:25:46 UTC (rev 26200)
+++ scummvm/trunk/engines/parallaction/graphics.h	2007-03-18 10:30:51 UTC (rev 26201)
@@ -149,7 +149,7 @@
 	static byte *		_buffers[NUM_BUFFERS];
 
 	static byte			_mouseArrow[256];
-	static StaticCnv	_mouseComposedArrow;
+	StaticCnv			*_mouseComposedArrow;
 
 	Cnv					_font;
 


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