[Scummvm-cvs-logs] CVS: scummvm/sky logic.cpp,1.3,1.4

Pawel Kolodziejski aquadran at users.sourceforge.net
Fri Apr 25 10:40:26 CEST 2003


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv26799

Modified Files:
	logic.cpp 
Log Message:
fixed few warnings

Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/logic.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- logic.cpp	25 Apr 2003 17:12:40 -0000	1.3
+++ logic.cpp	25 Apr 2003 17:39:43 -0000	1.4
@@ -229,7 +229,7 @@
 
 void SkyLogic::checkModuleLoaded(uint32 moduleNo) {
 	if (!_moduleList[moduleNo])
-		_moduleList[moduleNo] = (uint16 *)_skyDisk->loadFile(moduleNo + f_module_0, NULL);
+		_moduleList[moduleNo] = (uint16 *)_skyDisk->loadFile((uint8)moduleNo + f_module_0, NULL);
 }
 
 void SkyLogic::push(uint32 a) {
@@ -407,8 +407,8 @@
 	// Bit 12-15 - Module number
 	// Bit 16-31 - Script offset (if any)
 
-	uint16 scriptNo = scr & 0xffff;
-	uint16 moduleNo = (scr & 0xff00) >> 12;
+	uint16 scriptNo = (uint8)(scr & 0xffff);
+	uint16 moduleNo = (uint8)((scr & 0xff00) >> 12);
 	printf("scriptNo: %d, moduleNo: %d\n", scriptNo, moduleNo);
 	uint16 *scriptData = _moduleList[moduleNo]; // get module address
 
@@ -562,7 +562,7 @@
 			// pop a value into a compact
 			s = *scriptData++;
 			tmp = (uint16 *)SkyCompact::getCompactElem(compact, s);
-			*tmp = pop();
+			*tmp = (uint8)pop();
 			break;
 		case 17: // is_equal
 			a = pop();
@@ -606,8 +606,8 @@
 uint32 SkyLogic::fnAr(uint32 x, uint32 y, uint32 c) {
 	_compact->downFlag = 1; // assume failure in-case logic is interupted by speech (esp Joey)
 
-	_compact->extCompact->arTargetX = x;
-	_compact->extCompact->arTargetY = y;
+	_compact->extCompact->arTargetX = (uint8)x;
+	_compact->extCompact->arTargetY = (uint8)y;
 	_compact->logic = L_AR; // Set to AR mode
 
 	_compact->xcood &= 0xfff8;
@@ -680,7 +680,7 @@
 }
 
 uint32 SkyLogic::fnGetTo(uint32 targetPlaceId, uint32 mode, uint32 c) {
-	_compact->upFlag = mode; // save mode for action script
+	_compact->upFlag = (uint8)mode; // save mode for action script
 	_compact->mode += 4; // next level up
 	Compact *compact2 = SkyState::fetchCompact(_compact->place);
 	uint16 *getToTable = compact2->getToTable;





More information about the Scummvm-git-logs mailing list