[Scummvm-cvs-logs] scummvm master -> dd7b1399f3a64a2cdcfb225f62bbfb7ed90889cf

eriktorbjorn eriktorbjorn at telia.com
Sun Jul 3 07:22:49 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
dd7b1399f3 SWORD2: Silence "variable set but not used" GCC warnings


Commit: dd7b1399f3a64a2cdcfb225f62bbfb7ed90889cf
    https://github.com/scummvm/scummvm/commit/dd7b1399f3a64a2cdcfb225f62bbfb7ed90889cf
Author: eriktorbjorn (eriktorbjorn at users.sourceforge.net)
Date: 2011-07-02T22:20:40-07:00

Commit Message:
SWORD2: Silence "variable set but not used" GCC warnings

Changed paths:
    engines/sword2/controls.cpp
    engines/sword2/render.cpp



diff --git a/engines/sword2/controls.cpp b/engines/sword2/controls.cpp
index 6ce447a..3611294 100644
--- a/engines/sword2/controls.cpp
+++ b/engines/sword2/controls.cpp
@@ -477,6 +477,8 @@ void Widget::createSurfaceImage(int state, uint32 res, int x, int y, uint32 pc)
 
 	// Points to just after frame header, ie. start of sprite data
 	_sprites[state].data = frame + FrameHeader::size();
+	_sprites[state].colorTable = colTablePtr;
+	_sprites[state].isText = false;
 
 	_vm->_screen->createSurface(&_sprites[state], &_surfaces[state]._surface);
 	_surfaces[state]._original = true;
diff --git a/engines/sword2/render.cpp b/engines/sword2/render.cpp
index 1e068d6..8bf9d92 100644
--- a/engines/sword2/render.cpp
+++ b/engines/sword2/render.cpp
@@ -699,8 +699,6 @@ int32 Screen::initializePsxBackgroundLayer(byte *parallax) {
  */
 
 int32 Screen::initializePsxParallaxLayer(byte *parallax) {
-	uint16 plxXres, plxYres;
-	uint16 xTiles, yTiles;
 	uint16 i, j, k;
 	byte *data;
 	byte *dst;
@@ -714,10 +712,10 @@ int32 Screen::initializePsxParallaxLayer(byte *parallax) {
 		return RD_OK;
 	}
 
-	plxXres = READ_LE_UINT16(parallax);
-	plxYres = READ_LE_UINT16(parallax + 2);
-	xTiles = READ_LE_UINT16(parallax + 4);
-	yTiles = READ_LE_UINT16(parallax + 6);
+	// uint16 plxXres = READ_LE_UINT16(parallax);
+	// uint16 plxYres = READ_LE_UINT16(parallax + 2);
+	uint16 xTiles = READ_LE_UINT16(parallax + 4);
+	uint16 yTiles = READ_LE_UINT16(parallax + 6);
 
 	// Beginning of parallax table composed by uint32,
 	// if word is 0, corresponding tile contains no data and must be skipped,






More information about the Scummvm-git-logs mailing list