[Scummvm-cvs-logs] CVS: residual actor.cpp,1.42,1.43 costume.cpp,1.27,1.28 costume.h,1.13,1.14 driver_gl.cpp,1.27,1.28 driver_tinygl.cpp,1.1,1.2 driver_tinygl.h,1.1,1.2 engine.cpp,1.62,1.63 engine.h,1.21,1.22 lua.cpp,1.95,1.96 model.cpp,1.25,1.26 scene.cpp,1.37,1.38 smush.cpp,1.59,1.60 vima.cpp,1.9,1.10

Pawel Kolodziejski aquadran at users.sourceforge.net
Wed Jan 12 15:27:09 CET 2005


Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31079/residual

Modified Files:
	actor.cpp costume.cpp costume.h driver_gl.cpp 
	driver_tinygl.cpp driver_tinygl.h engine.cpp engine.h lua.cpp 
	model.cpp scene.cpp smush.cpp vima.cpp 
Log Message:
fixed some warnings

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/actor.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- actor.cpp	12 Jan 2005 18:06:42 -0000	1.42
+++ actor.cpp	12 Jan 2005 23:26:03 -0000	1.43
@@ -411,7 +411,7 @@
 	}
 
 	if (_lookingMode) {
-		float lookAtAmt = g_engine->perSecond(_lookAtRate);
+		/*float lookAtAmt = */g_engine->perSecond(_lookAtRate);
 	}
 }
 

Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/costume.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- costume.cpp	10 Jan 2005 09:53:01 -0000	1.27
+++ costume.cpp	12 Jan 2005 23:26:04 -0000	1.28
@@ -518,7 +518,7 @@
 		g_imuse->setHookId(_soundName.c_str(), 0x80);
 		break;
 	default:
-		warning("Unknown key %d for sound %s\n", val, _soundName);
+		warning("Unknown key %d for sound %s\n", val, _soundName.c_str());
 	}
 }
 

Index: costume.h
===================================================================
RCS file: /cvsroot/scummvm/residual/costume.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- costume.h	1 Jan 2005 12:27:55 -0000	1.13
+++ costume.h	12 Jan 2005 23:26:04 -0000	1.14
@@ -52,9 +52,9 @@
 	public:
 		Component(Component *parent, int parentID);
 
-		virtual void setMatrix(Matrix4 matrix) { };
+		virtual void setMatrix(Matrix4) { };
 		virtual void init() { }
-		virtual void setKey(int /* val */) { }
+		virtual void setKey(int) { }
 		virtual void update() { }
 		virtual void setupTexture() { }
 		virtual void draw() { }

Index: driver_gl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_gl.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- driver_gl.cpp	12 Jan 2005 18:06:42 -0000	1.27
+++ driver_gl.cpp	12 Jan 2005 23:26:04 -0000	1.28
@@ -283,7 +283,7 @@
 	textures = (GLuint *)bitmap->_texIds;
 	if (textures) {
 		glDeleteTextures(bitmap->_numTex * bitmap->_numImages, textures);
-		delete[] bitmap->_texIds;
+		delete[] textures;
 	}
 }
 
@@ -438,8 +438,8 @@
 	int curTexIdx = 0;
 	for (int y = 0; y < _smushHeight; y += BITMAP_TEXTURE_SIZE) {
 		for (int x = 0; x < _smushWidth; x += BITMAP_TEXTURE_SIZE) {
-			int t_width = (x + BITMAP_TEXTURE_SIZE >= _smushWidth) ? (_smushWidth - x) : BITMAP_TEXTURE_SIZE;
-			int t_height = (y + BITMAP_TEXTURE_SIZE >= _smushHeight) ? (_smushHeight - y) : BITMAP_TEXTURE_SIZE;
+//			int t_width = (x + BITMAP_TEXTURE_SIZE >= _smushWidth) ? (_smushWidth - x) : BITMAP_TEXTURE_SIZE;
+//			int t_height = (y + BITMAP_TEXTURE_SIZE >= _smushHeight) ? (_smushHeight - y) : BITMAP_TEXTURE_SIZE;
 			glBindTexture(GL_TEXTURE_2D, _smushTexIds[curTexIdx]);
 			glBegin(GL_QUADS);
 			glTexCoord2f(0, 0);

Index: driver_tinygl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_tinygl.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- driver_tinygl.cpp	12 Jan 2005 18:06:43 -0000	1.1
+++ driver_tinygl.cpp	12 Jan 2005 23:26:04 -0000	1.2
@@ -249,8 +249,9 @@
 	}
 }
 
-void DriverTinyGL::destroyBitmap(Bitmap *bitmap) {
-}
+void DriverTinyGL::destroyBitmap(Bitmap *) { }
+
+void DriverTinyGL::drawDepthBitmap(int, int, int, int, char *) { }
 
 void DriverTinyGL::createMaterial(Material *material, const char *data, const CMap *cmap) {
 	material->_textures = new TGLuint[material->_numImages];
@@ -296,10 +297,7 @@
 
 void DriverTinyGL::destroyMaterial(Material *material) {
 	tglDeleteTextures(material->_numImages, (TGLuint *)material->_textures);
-	delete[] material->_textures;
-}
-
-void DriverTinyGL::drawDepthBitmap(int x, int y, int w, int h, char *data) {
+	delete[] (TGLuint *)material->_textures;
 }
 
 void DriverTinyGL::prepareSmushFrame(int width, int height, byte *bitmap) {
@@ -329,5 +327,5 @@
 void DriverTinyGL::loadEmergFont() {
 }
 
-void DriverTinyGL::drawEmergString(int x, int y, const char *text, const Color &fgColor) {
+void DriverTinyGL::drawEmergString(int /*x*/, int /*y*/, const char * /*text*/, const Color &/*fgColor*/) {
 }

Index: driver_tinygl.h
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_tinygl.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- driver_tinygl.h	12 Jan 2005 18:06:43 -0000	1.1
+++ driver_tinygl.h	12 Jan 2005 23:26:04 -0000	1.2
@@ -36,7 +36,7 @@
 class DriverTinyGL : public Driver {
 public:
 	DriverTinyGL(int screenW, int screenH, int screenBPP);
-	~DriverTinyGL();
+	virtual ~DriverTinyGL();
 
 	void setupCamera(float fov, float nclip, float fclip, float roll);
 	void positionCamera(Vector3d pos, Vector3d interest);

Index: engine.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/engine.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- engine.cpp	12 Jan 2005 18:06:43 -0000	1.62
+++ engine.cpp	12 Jan 2005 23:26:04 -0000	1.63
@@ -282,7 +282,7 @@
 	//bundle_dofile("patch05.bin");
 }
 
-void Engine::savegameCallback(SaveRestoreFunc func) {
+void Engine::savegameCallback() {
 	lua_Object funcParam1;
 	lua_Object funcParam2;
 	bool unk1 = false;
@@ -338,7 +338,8 @@
 	savegameGzwrite(&tag, 4);
 	savegameGzwrite(&version, 4);
 
-	savegameCallback(savegameGzwrite);
+	savegameCallback();
+
 	//Chore_Save(savegameGzwrite);
 	//Resource_Save(savegameGzwrite);
 	//Text_Save(savegameGzwrite);

Index: engine.h
===================================================================
RCS file: /cvsroot/scummvm/residual/engine.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- engine.h	10 Jan 2005 09:53:02 -0000	1.21
+++ engine.h	12 Jan 2005 23:26:04 -0000	1.22
@@ -143,7 +143,7 @@
 	void savegameRestore();
 	static void savegameGzread(void *data, int size);
 	static void savegameGzwrite(void *data, int size);
-	void savegameCallback(SaveRestoreFunc func);
+	void savegameCallback();
 
 	bool _savegameLoadRequest;
 	bool _savegameSaveRequest;

Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -d -r1.95 -r1.96
--- lua.cpp	5 Jan 2005 18:28:50 -0000	1.95
+++ lua.cpp	12 Jan 2005 23:26:04 -0000	1.96
@@ -210,12 +210,12 @@
 	lua_pushnumber(c->green());
 	lua_pushnumber(c->blue());
 }
-
+/*
 static void gc_Color() {
 	Color *c = static_cast<Color *>(lua_getuserdata(lua_getparam(1)));
 	delete c;
 }
-
+*/
 // Registry functions
 
 static void ReadRegistryValue() {
@@ -743,11 +743,6 @@
 		act->shutUp();
 }
 
-static void HardwareAccelerated() {
-	// FIXME: Are we always in HW accelerated ?
-	lua_pushnumber(true);
-}
-
 // Sector functions
 static void GetActorSector(void) {
 	Actor *act = check_actor(1);
@@ -1241,13 +1236,13 @@
 }
 
 static void StartFullscreenMovie() {
-	bool mode = getbool(2);
+	/*bool mode = */getbool(2);
 	g_engine->setMode(ENGINE_MODE_SMUSH);
 	pushbool(g_smush->play(luaL_check_string(1), 0, 0));
 }
 
 static void StartMovie() {
-	bool mode = getbool(2);
+	/*bool mode = */getbool(2);
 	int x = 0;
 	int y = 0;
 
@@ -1312,7 +1307,7 @@
 }
 
 static void FreeObjectState() {
-	ObjectState *object = check_object(1);
+	/*ObjectState *object = */check_object(1);
 	warning("State: freeObjectState(...)");
 	//scene.deleteObjectState(object);
 }
@@ -1347,18 +1342,18 @@
 	g_engine->_savegameSaveRequest = true;
 }
 
-static int SaveCallback(int tag, int value, SaveRestoreFunc saveFunc) {
+static int SaveCallback(int /*tag*/, int value, SaveRestoreFunc /*saveFunc*/) {
 	return value;
 }
 
-static int RestoreCallback(int tag, int value, SaveRestoreFunc saveFunc) {
+static int RestoreCallback(int /*tag*/, int value, SaveRestoreFunc /*saveFunc*/) {
 	return value;
 }
 
 static void BlastText() {
 	char * str = luaL_check_string(1), *key_text = NULL;
 	lua_Object table_obj = lua_getparam(2), key;
-	int x = 0, y = 0, height = 0, width = 0;
+	int x = 0, y = 0;//, height = 0, width = 0;
 	Color *fgColor = NULL;
 
 	for (;;) {
@@ -1400,7 +1395,7 @@
 static void LockFont() {
 	lua_Object param1 = lua_getparam(1);
 	if (lua_isstring(param1)) {
-		char *fontName = lua_getstring(param1);
+		/*char *fontName = */lua_getstring(param1);
 		void *result = NULL;//g_resourceloader->loadFont(fontName);
 		if (result) {
 			lua_pushusertag(result, MKID('FONT'));
@@ -1427,7 +1422,7 @@
 }
 
 static void EngineDisplay() {
-	bool mode = check_int(1) != 0;
+	/*bool mode = */check_int(1) != 0;
 	// it enable/disable updating display
 }
 
@@ -1562,7 +1557,6 @@
 STUB_FUNC(GetActorTimeScale)
 STUB_FUNC(SetActorScale)
 STUB_FUNC(SetActorColormap)
-STUB_FUNC(SearchForFileOrSwapCDs)
 STUB_FUNC(SetOffscreenTextPos)
 STUB_FUNC(SetEmergencyFont)
 STUB_FUNC(GetTranslationMode)

Index: model.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/model.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- model.cpp	12 Jan 2005 18:06:43 -0000	1.25
+++ model.cpp	12 Jan 2005 23:26:04 -0000	1.26
@@ -144,7 +144,7 @@
 		_vertices[i] = READ_LE_UINT32(data);
 		data += 4;
 	}
-	if (texPtr == NULL)
+	if (texPtr == 0)
 		_texVertices = NULL;
 	else {
 		_texVertices = new int[_numVertices];

Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/scene.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- scene.cpp	12 Jan 2005 18:06:43 -0000	1.37
+++ scene.cpp	12 Jan 2005 23:26:04 -0000	1.38
@@ -149,7 +149,10 @@
 	ts.scanString(" intensity %f", 1, &_intensity);
 	ts.scanString(" umbraangle %f", 1, &_umbraangle);
 	ts.scanString(" penumbraangle %f", 1, &_penumbraangle);
-	ts.scanString(" color %d %d %d", 3, &_color.red(), &_color.green(), &_color.blue());
+	// TODO check that
+//	ts.scanString(" color %d %d %d", 3, &_color.red(), &_color.green(), &_color.blue());
+	int red = 0, green = 0, blue = 0;
+	ts.scanString(" color %d %d %d", 3, &red, &green, &blue);
 }
 
 void Scene::Setup::setupCamera() const {
@@ -280,7 +283,7 @@
 	float distance = vector.magnitude();
 	float maxDistance = 8.0f;
 	int diffVolume = _maxVolume - _minVolume;
-	int newVolume = diffVolume * (1.0 - (distance / maxDistance));
+	int newVolume = (int)(diffVolume * (1.0 - (distance / maxDistance)));
 	newVolume += _minVolume;
 	g_imuse->setVolume(soundName, newVolume);
 

Index: smush.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/smush.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- smush.cpp	12 Jan 2005 18:06:43 -0000	1.59
+++ smush.cpp	12 Jan 2005 23:26:04 -0000	1.60
@@ -32,7 +32,7 @@
 Smush *g_smush;
 static uint16 smushDestTable[5786];
 
-void Smush::timerCallback(void *refCon) {
+void Smush::timerCallback(void *) {
 	g_smush->handleFrame();
 }
 

Index: vima.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/vima.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- vima.cpp	1 Jan 2005 10:23:16 -0000	1.9
+++ vima.cpp	12 Jan 2005 23:26:04 -0000	1.10
@@ -98,7 +98,7 @@
 	int destTableStartPos, incer;
 
 	for (destTableStartPos = 0, incer = 0; destTableStartPos < 64; destTableStartPos++, incer++) {
-		int destTablePos, imcTable1Pos;
+		unsigned int destTablePos, imcTable1Pos;
 		for (imcTable1Pos = 0, destTablePos = destTableStartPos;
 				imcTable1Pos < sizeof(imcTable1) / sizeof(imcTable1[0]); imcTable1Pos++, destTablePos += 64) {
 			int put = 0, count, tableValue;





More information about the Scummvm-git-logs mailing list