[Scummvm-cvs-logs] SF.net SVN: scummvm:[53699] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri Oct 22 04:11:51 CEST 2010


Revision: 53699
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53699&view=rev
Author:   lordhoto
Date:     2010-10-22 02:11:50 +0000 (Fri, 22 Oct 2010)

Log Message:
-----------
KYRA: More cleanup.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/items_hof.cpp
    scummvm/trunk/engines/kyra/items_lok.cpp
    scummvm/trunk/engines/kyra/items_lol.cpp
    scummvm/trunk/engines/kyra/items_mr.cpp
    scummvm/trunk/engines/kyra/items_v2.cpp
    scummvm/trunk/engines/kyra/kyra_hof.h
    scummvm/trunk/engines/kyra/kyra_lok.h
    scummvm/trunk/engines/kyra/kyra_mr.h
    scummvm/trunk/engines/kyra/kyra_v1.h
    scummvm/trunk/engines/kyra/kyra_v2.h
    scummvm/trunk/engines/kyra/lol.h

Modified: scummvm/trunk/engines/kyra/items_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/items_hof.cpp	2010-10-22 02:11:00 UTC (rev 53698)
+++ scummvm/trunk/engines/kyra/items_hof.cpp	2010-10-22 02:11:50 UTC (rev 53699)
@@ -413,12 +413,12 @@
 	return false;
 }
 
-void KyraEngine_HoF::setMouseCursor(uint16 item) {
+void KyraEngine_HoF::setMouseCursor(Item item) {
 	int shape = 0;
 	int hotX = 1;
 	int hotY = 1;
 
-	if (item != 0xFFFF) {
+	if (item != kItemNone) {
 		hotX = 8;
 		hotY = 15;
 		shape = item+64;

Modified: scummvm/trunk/engines/kyra/items_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/items_lok.cpp	2010-10-22 02:11:00 UTC (rev 53698)
+++ scummvm/trunk/engines/kyra/items_lok.cpp	2010-10-22 02:11:50 UTC (rev 53699)
@@ -173,10 +173,10 @@
 	}
 }
 
-void KyraEngine_LoK::setHandItem(uint16 item) {
+void KyraEngine_LoK::setHandItem(Item item) {
 	_screen->hideMouse();
 	setMouseItem(item);
-	_itemInHand = (Item)item;
+	_itemInHand = item;
 	_screen->showMouse();
 }
 

Modified: scummvm/trunk/engines/kyra/items_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/items_lol.cpp	2010-10-22 02:11:00 UTC (rev 53698)
+++ scummvm/trunk/engines/kyra/items_lol.cpp	2010-10-22 02:11:50 UTC (rev 53699)
@@ -270,7 +270,7 @@
 	}
 }
 
-void LoLEngine::setHandItem(uint16 itemIndex) {
+void LoLEngine::setHandItem(Item itemIndex) {
 	if (itemIndex && _itemProperties[_itemsInPlay[itemIndex].itemPropertyIndex].flags & 0x80) {
 		runItemScript(-1, itemIndex, 0x400, 0, 0);
 		if (_itemsInPlay[itemIndex].shpCurFrame_flg & 0x8000)

Modified: scummvm/trunk/engines/kyra/items_mr.cpp
===================================================================
--- scummvm/trunk/engines/kyra/items_mr.cpp	2010-10-22 02:11:00 UTC (rev 53698)
+++ scummvm/trunk/engines/kyra/items_mr.cpp	2010-10-22 02:11:50 UTC (rev 53699)
@@ -76,12 +76,12 @@
 	return itemIndex;
 }
 
-void KyraEngine_MR::setMouseCursor(uint16 item) {
+void KyraEngine_MR::setMouseCursor(Item item) {
 	int shape = 0;
 	int hotX = 1;
 	int hotY = 1;
 
-	if (item != 0xFFFF) {
+	if (item != kItemNone) {
 		hotX = 12;
 		hotY = 19;
 		shape = item+248;

Modified: scummvm/trunk/engines/kyra/items_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/items_v2.cpp	2010-10-22 02:11:00 UTC (rev 53698)
+++ scummvm/trunk/engines/kyra/items_v2.cpp	2010-10-22 02:11:50 UTC (rev 53699)
@@ -84,11 +84,11 @@
 	_itemList[index].y = 0;
 }
 
-void KyraEngine_v2::setHandItem(uint16 item) {
+void KyraEngine_v2::setHandItem(Item item) {
 	Screen *scr = screen();
 	scr->hideMouse();
 
-	if (item == 0xFFFF) {
+	if (item == kItemNone) {
 		removeHandItem();
 	} else {
 		setMouseCursor(item);

Modified: scummvm/trunk/engines/kyra/kyra_hof.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_hof.h	2010-10-22 02:11:00 UTC (rev 53698)
+++ scummvm/trunk/engines/kyra/kyra_hof.h	2010-10-22 02:11:50 UTC (rev 53699)
@@ -443,7 +443,7 @@
 	bool lineIsPassable(int x, int y);
 
 	// item
-	void setMouseCursor(uint16 item);
+	void setMouseCursor(Item item);
 
 	uint8 _itemHtDat[176];
 

Modified: scummvm/trunk/engines/kyra/kyra_lok.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_lok.h	2010-10-22 02:11:00 UTC (rev 53698)
+++ scummvm/trunk/engines/kyra/kyra_lok.h	2010-10-22 02:11:50 UTC (rev 53699)
@@ -282,7 +282,7 @@
 	void placeItemInGenericMapScene(int item, int index);
 
 	// -> mouse item
-	void setHandItem(uint16 item);
+	void setHandItem(Item item);
 	void removeHandItem();
 	void setMouseItem(Item item);
 

Modified: scummvm/trunk/engines/kyra/kyra_mr.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_mr.h	2010-10-22 02:11:00 UTC (rev 53698)
+++ scummvm/trunk/engines/kyra/kyra_mr.h	2010-10-22 02:11:50 UTC (rev 53699)
@@ -315,7 +315,7 @@
 
 	// -> hand item
 	void setItemMouseCursor();
-	void setMouseCursor(uint16 item);
+	void setMouseCursor(Item item);
 
 	// shapes
 	void initMouseShapes();

Modified: scummvm/trunk/engines/kyra/kyra_v1.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v1.h	2010-10-22 02:11:00 UTC (rev 53698)
+++ scummvm/trunk/engines/kyra/kyra_v1.h	2010-10-22 02:11:50 UTC (rev 53699)
@@ -37,6 +37,7 @@
 #include "sound/mixer.h"
 
 #include "kyra/script.h"
+#include "kyra/item.h"
 
 namespace Common {
 class SeekableReadStream;
@@ -339,7 +340,7 @@
 	// items
 	int _mouseState;
 
-	virtual void setHandItem(uint16 item) = 0;
+	virtual void setHandItem(Item item) = 0;
 	virtual void removeHandItem() = 0;
 
 	// game flags

Modified: scummvm/trunk/engines/kyra/kyra_v2.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.h	2010-10-22 02:11:00 UTC (rev 53698)
+++ scummvm/trunk/engines/kyra/kyra_v2.h	2010-10-22 02:11:50 UTC (rev 53699)
@@ -313,9 +313,9 @@
 	void resetItemList();
 	void resetItem(int index);
 
-	virtual void setMouseCursor(uint16 item) = 0;
+	virtual void setMouseCursor(Item item) = 0;
 
-	void setHandItem(uint16 item);
+	void setHandItem(Item item);
 	void removeHandItem();
 
 	// character

Modified: scummvm/trunk/engines/kyra/lol.h
===================================================================
--- scummvm/trunk/engines/kyra/lol.h	2010-10-22 02:11:00 UTC (rev 53698)
+++ scummvm/trunk/engines/kyra/lol.h	2010-10-22 02:11:50 UTC (rev 53699)
@@ -1209,7 +1209,7 @@
 	void deleteItem(int itemIndex);
 	ItemInPlay *findObject(uint16 index);
 	void runItemScript(int charNum, int item, int flags, int next, int reg4);
-	void setHandItem(uint16 itemIndex);
+	void setHandItem(Item itemIndex);
 	bool itemEquipped(int charNum, uint16 itemType);
 
 	void setItemPosition(int item, uint16 x, uint16 y, int flyingHeight, int b);


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