[Scummvm-cvs-logs] CVS: scummvm/sword1 logic.cpp,1.1,1.2 logic.h,1.1,1.2 menu.cpp,1.1,1.2 mouse.cpp,1.1,1.2 resman.cpp,1.1,1.2 router.cpp,1.1,1.2 screen.cpp,1.3,1.4 sound.cpp,1.3,1.4

Jonathan Gray khalek at users.sourceforge.net
Tue Dec 16 01:44:01 CET 2003


Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1:/tmp/cvs-serv20522

Modified Files:
	logic.cpp logic.h menu.cpp mouse.cpp resman.cpp router.cpp 
	screen.cpp sound.cpp 
Log Message:
compilation fixes

Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/logic.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- logic.cpp	16 Dec 2003 02:09:24 -0000	1.1
+++ logic.cpp	16 Dec 2003 09:43:08 -0000	1.2
@@ -63,7 +63,7 @@
 	_speechFinished = true;
 }
 
-void SwordLogic::newScreen(uint32 newScreen) {
+void SwordLogic::newScreen(uint32 screen) {
 	BsObject *compact = (BsObject*)_objMan->fetchObject(PLAYER);
 
 	//Tdebug("locked player");
@@ -116,7 +116,7 @@
 					compact->o_sync = 0; // syncs are only available for 1 cycle.
 				}
 
-				if (compact->o_screen == _scriptVars[SCREEN]) {
+				if ((uint32)compact->o_screen == _scriptVars[SCREEN]) {
 					if (compact->o_status & STAT_FORE)
 						_screen->addToGraphicList(0, currentId);
 					if (compact->o_status & STAT_SORT)
@@ -1529,8 +1529,8 @@
 	return SCRIPT_STOP;
 }
 
-int SwordLogic::fnSetScreen(BsObject *cpt, int32 id, int32 target, int32 newScreen, int32 c, int32 d, int32 z, int32 x) {
-	_objMan->fetchObject(target)->o_screen = newScreen;
+int SwordLogic::fnSetScreen(BsObject *cpt, int32 id, int32 target, int32 screen, int32 c, int32 d, int32 z, int32 x) {
+	_objMan->fetchObject(target)->o_screen = screen;
 	return SCRIPT_CONT;
 }
 
@@ -1540,7 +1540,7 @@
 	return SCRIPT_CONT;
 }
 
-int SwordLogic::fnCheckCD(BsObject *cpt, int32 id, int32 newScreen, int32 b, int32 c, int32 d, int32 z, int32 x) {
+int SwordLogic::fnCheckCD(BsObject *cpt, int32 id, int32 screen, int32 b, int32 c, int32 d, int32 z, int32 x) {
 	warning("fnCheckCd called");
 	// Not sure if we really have to check that here. I think we can do it in the main loop
 	// and leave a dummy here.

Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/logic.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- logic.h	16 Dec 2003 02:09:24 -0000	1.1
+++ logic.h	16 Dec 2003 09:43:08 -0000	1.2
@@ -46,7 +46,7 @@
 public:
 	SwordLogic(ObjectMan *pObjMan, ResMan *resMan, SwordScreen *pScreen, SwordMouse *pMouse, SwordSound *pSound, SwordMusic *pMusic, SwordMenu *pMenu);
 	~SwordLogic(void);
-	void newScreen(uint32 newScreen);
+	void newScreen(uint32 screen);
 	void engine(void);
 	void updateScreenParams(void);
 	void runMouseScript(BsObject *cpt, int32 scriptId);

Index: menu.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/menu.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- menu.cpp	16 Dec 2003 02:09:24 -0000	1.1
+++ menu.cpp	16 Dec 2003 09:43:08 -0000	1.2
@@ -88,7 +88,7 @@
 }
 
 void SwordMenu::buildSubjects(void) {
-	uint8 subDest = 0;
+	// uint8 subDest = 0;
 	clearMenu(MENU_BOT);
 	for (uint8 cnt = 0; cnt < 16; cnt++)
 		if (_subjects[cnt]) {

Index: mouse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/mouse.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mouse.cpp	16 Dec 2003 02:09:24 -0000	1.1
+++ mouse.cpp	16 Dec 2003 09:43:08 -0000	1.2
@@ -106,7 +106,7 @@
 
 	//-
 	int32 touchedId = 0;
-	uint16 clicked;
+	uint16 clicked = 0;
 	if (y > 40) {
 		for (uint16 priority = 0; (priority < 10) && (!touchedId); priority++) {
 			for (uint16 cnt = 0; cnt < _numObjs; cnt++) {
@@ -120,7 +120,7 @@
 				}
 			}
 		}
-		if (touchedId != SwordLogic::_scriptVars[SPECIAL_ITEM]) { //the mouse collision situation has changed in one way or another
+		if (touchedId != (int)SwordLogic::_scriptVars[SPECIAL_ITEM]) { //the mouse collision situation has changed in one way or another
 			SwordLogic::_scriptVars[SPECIAL_ITEM] = touchedId;
 			debug(9, "New special item: %X\n", touchedId);
 			if (_getOff) { // there was something else selected before, run its get-off script
@@ -128,7 +128,7 @@
 				_getOff = 0;
 			}
 			if (touchedId) { // there's something new selected, now.
-				BsObject *compact = _objMan->fetchObject(SwordLogic::_scriptVars[SPECIAL_ITEM]);
+				// BsObject *compact = _objMan->fetchObject(SwordLogic::_scriptVars[SPECIAL_ITEM]);
 
 				if	(_objList[clicked].compact->o_mouse_on)	//run its get on
 					_logic->runMouseScript(_objList[clicked].compact, _objList[clicked].compact->o_mouse_on);
@@ -195,7 +195,8 @@
 	if (_mouseStatus & 2) // locked, can't do anything
 		return ;
 	_mouseStatus = 1;
-	SwordLogic::_scriptVars[SPECIAL_ITEM] = -1;
+	// SwordLogic::_scriptVars[SPECIAL_ITEM] = -1;
+	SwordLogic::_scriptVars[SPECIAL_ITEM] = 0; // _scriptVars is unsigned...
 	_getOff = SCR_std_off;
 	setPointer(MSE_POINTER, 0);
 	_mouseCount = 3;

Index: resman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/resman.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- resman.cpp	16 Dec 2003 02:09:25 -0000	1.1
+++ resman.cpp	16 Dec 2003 09:43:08 -0000	1.2
@@ -173,7 +173,7 @@
 	if (memHandle->cond == MEM_FREED) { // memory has been freed
 		uint32 size = resLength(id);
 		_memMan->alloc(memHandle, size);
-		uint8 *dest = (uint8*)memHandle->data;
+		// uint8 *dest = (uint8*)memHandle->data;
 		File *clusFile = openClusterFile(id);
 		clusFile->seek( resOffset(id) );
 		clusFile->read( memHandle->data, size);
@@ -280,7 +280,7 @@
 void ResMan::openScriptResourceBigEndian(uint32 id) {
 	resOpen(id);
 	BsMemHandle *handle = resHandle(id);
-	uint32 totSize = handle->size;
+	// uint32 totSize = handle->size;
 	Header *head = (Header*)handle->data;
 	head->comp_length = FROM_LE_32(head->comp_length);
 	head->decomp_length = FROM_LE_32(head->decomp_length);

Index: router.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/router.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- router.cpp	16 Dec 2003 02:09:25 -0000	1.1
+++ router.cpp	16 Dec 2003 09:43:08 -0000	1.2
@@ -75,7 +75,7 @@
 		frameInfo.slowOutFrames = 0;
 	}
 	int32 routeFlag = getRoute();
-	int32 routeLength;
+	int32 routeLength = 0;
 	if (routeFlag == 1) {
 		// extract the route as nodes and the directions to go between each node
 		// route.X,route.Y and route.Dir now hold all the route infomation with
@@ -666,7 +666,7 @@
 	int32	DS;
 	int32	DD;
 	int32	temp;
-	int32	steps;
+	int32	steps = 0;
 	int32	option;
 	int32	options;
 	int32 lastDir;

Index: screen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/screen.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- screen.cpp	16 Dec 2003 06:37:12 -0000	1.3
+++ screen.cpp	16 Dec 2003 09:43:08 -0000	1.4
@@ -271,7 +271,7 @@
 
 	// TEMPORARY!
 	uint8 *bgPal = (uint8*)_resMan->openFetchRes(_roomDefTable[_currentScreen].palettes[0]);
-	uint8 *sprPal = (uint8*)_resMan->openFetchRes(_roomDefTable[_currentScreen].palettes[1]);
+	// uint8 *sprPal = (uint8*)_resMan->openFetchRes(_roomDefTable[_currentScreen].palettes[1]);
 	for (uint16 cnt = 0; cnt < 256; cnt++) {
 		_targetPalette[cnt * 4 + 0] = bgPal[cnt * 3 + 0] << 2;
 		_targetPalette[cnt * 4 + 1] = bgPal[cnt * 3 + 1] << 2;

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sound.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sound.cpp	16 Dec 2003 05:02:34 -0000	1.3
+++ sound.cpp	16 Dec 2003 09:43:08 -0000	1.4
@@ -40,7 +40,7 @@
 int SwordSound::addToQueue(int32 fxNo) {
 	bool alreadyInQueue = false;
 	for (uint8 cnt = 0; (cnt < _endOfQueue) && (!alreadyInQueue); cnt++)
-		if (_fxQueue[cnt].id == fxNo)
+		if (_fxQueue[cnt].id == (uint32)fxNo)
 			alreadyInQueue = true;
 	if (!alreadyInQueue) {
 		if (_endOfQueue == MAX_FXQ_LENGTH)
@@ -117,7 +117,7 @@
 	uint8 *sampleData = (uint8*)_resMan->fetchRes(_fxList[elem.id].sampleId);
 	for (uint16 cnt = 0; cnt < MAX_ROOMS_PER_FX; cnt++) {
 		if (_fxList[elem.id].roomVolList[cnt].roomNo) {
-			if ((_fxList[elem.id].roomVolList[cnt].roomNo == SwordLogic::_scriptVars[SCREEN]) ||
+			if ((_fxList[elem.id].roomVolList[cnt].roomNo == (int)SwordLogic::_scriptVars[SCREEN]) ||
 				(_fxList[elem.id].roomVolList[cnt].roomNo == -1)) {
 
 					uint8 volL = _fxList[elem.id].roomVolList[cnt].leftVol * 10;





More information about the Scummvm-git-logs mailing list