[Scummvm-cvs-logs] CVS: residual actor.cpp,1.58,1.59 costume.cpp,1.31,1.32 costume.h,1.17,1.18 debug.cpp,1.8,1.9 debug.h,1.11,1.12 driver.h,1.12,1.13 driver_gl.cpp,1.55,1.56 driver_gl.h,1.25,1.26 driver_tinygl.cpp,1.22,1.23 driver_tinygl.h,1.12,1.13 engine.cpp,1.82,1.83 primitives.cpp,1.4,1.5 scene.cpp,1.44,1.45 scene.h,1.29,1.30 smush.cpp,1.65,1.66 textobject.cpp,1.29,1.30
Pawel Kolodziejski
aquadran at users.sourceforge.net
Wed Aug 10 01:35:49 CEST 2005
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12418/residual
Modified Files:
actor.cpp costume.cpp costume.h debug.cpp debug.h driver.h
driver_gl.cpp driver_gl.h driver_tinygl.cpp driver_tinygl.h
engine.cpp primitives.cpp scene.cpp scene.h smush.cpp
textobject.cpp
Log Message:
fix warnings, cleanup code
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/actor.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- actor.cpp 8 Aug 2005 07:05:45 -0000 1.58
+++ actor.cpp 10 Aug 2005 08:33:45 -0000 1.59
@@ -32,12 +32,12 @@
#include <cstring>
Actor::Actor(const char *name) :
- _name(name), _talkColor(255, 255, 255), _pos(0, 0, 0),
+ _name(name), _setName(""), _talkColor(255, 255, 255), _pos(0, 0, 0),
// Some actors don't set walk and turn rates, so we default the
// _turnRate so Doug at the cat races can turn and we set the
// _walkRate so Glottis at the demon beaver entrance can walk
_pitch(0), _yaw(0), _roll(0), _walkRate(1.0f), _turnRate(100.0f),
- _reflectionAngle(80), _setName(""),
+ _reflectionAngle(80),
_visible(true), _lipSynch(NULL), _turning(false), _walking(false),
_restCostume(NULL), _restChore(-1),
_walkCostume(NULL), _walkChore(-1), _walkedLast(false), _walkedCur(false),
@@ -588,7 +588,7 @@
}
// "Undraw objects" (handle objects for actors that may not be on screen)
-void Actor::undraw(bool visible) {
+void Actor::undraw(bool /*visible*/) {
if (!talking() || !g_imuse->isVoicePlaying())
shutUp();
}
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/costume.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- costume.cpp 21 Jul 2005 15:16:33 -0000 1.31
+++ costume.cpp 10 Aug 2005 08:33:45 -0000 1.32
@@ -124,7 +124,7 @@
~ModelComponent();
Model::HierNode *hierarchy() { return _hier; }
-void draw();
+ void draw();
protected:
char *_colormap;
@@ -206,8 +206,8 @@
}
ModelComponent::ModelComponent(Costume::Component *parent, int parentID, const char *filename, char *tag) :
- Costume::Component(parent, parentID, tag), _filename(filename), _obj(NULL), _cmap(NULL),
- _colormap(DEFAULT_COLORMAP), _hier(NULL) {
+ Costume::Component(parent, parentID, tag), _colormap(DEFAULT_COLORMAP), _filename(filename),
+ _obj(NULL), _cmap(NULL), _hier(NULL) {
const char *comma = std::strchr(filename, ',');
// Can be called with a comma and a numeric parameter afterward, but
@@ -626,7 +626,7 @@
}
Costume::Costume(const char *filename, const char *data, int len, Costume *prevCost) :
- _fname(filename), _colormap(DEFAULT_COLORMAP) {
+ _colormap(DEFAULT_COLORMAP), _fname(filename) {
TextSplitter ts(data, len);
ts.expectString("costume v0.1");
@@ -729,7 +729,7 @@
}
// Should initialize the status variables so the chore can't play unexpectedly
-Costume::Chore::Chore() : _playing(false), _hasPlayed(false), _looping(false), _currTime(-1) {
+Costume::Chore::Chore() : _hasPlayed(false), _playing(false), _looping(false), _currTime(-1) {
}
void Costume::Chore::load(Costume *owner, TextSplitter &ts) {
Index: costume.h
===================================================================
RCS file: /cvsroot/scummvm/residual/costume.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- costume.h 21 Jul 2005 15:16:34 -0000 1.17
+++ costume.h 10 Aug 2005 08:33:45 -0000 1.18
@@ -47,11 +47,7 @@
continue;
// Needs to handle Main Models (pigeons) and normal Models
// (when Manny climbs the rope)
- if (
-std::memcmp(_components[i]->tag(), "mmdl", 4) == 0
- ||
-std::memcmp(_components[i]->tag(), "mat ", 4) == 0
-)
+ if (std::memcmp(_components[i]->tag(), "mmdl", 4) == 0 || std::memcmp(_components[i]->tag(), "mat ", 4) == 0)
_components[i]->setMapName(_colormap);
}
}
Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/debug.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- debug.cpp 2 Jan 2005 14:05:31 -0000 1.8
+++ debug.cpp 10 Aug 2005 08:33:45 -0000 1.9
@@ -106,3 +106,34 @@
exit(1);
}
+
+const char *debug_levels[] = {
+ "NONE",
+ "NORMAL",
+ "WARN",
+ "ERROR",
+ "FUNC",
+ "BITMAP",
+ "MODEL",
+ "STUB",
+ "SMUSH",
+ "IMUSE",
+ "CHORE",
+ "ALL"
+};
+
+const char *debug_descriptions[] = {
+ "No debug messages will be printed (default)",
+ "\"Normal\" debug messages will be printed",
+ "Warning debug messages will be printed",
+ "Error debug messages will be printed",
+ "Function (normal and stub) debug messages will be printed",
+ "Bitmap debug messages will be printed",
+ "Model debug messages will be printed",
+ "Stub (missing function) debug messages will be printed",
+ "SMUSH (video) debug messages will be printed",
+ "IMUSE (audio) debug messages will be printed",
+ "Chore debug messages will be printed",
+ "All debug messages will be printed",
+};
+
Index: debug.h
===================================================================
RCS file: /cvsroot/scummvm/residual/debug.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- debug.h 17 Jul 2005 23:40:21 -0000 1.11
+++ debug.h 10 Aug 2005 08:33:45 -0000 1.12
@@ -35,34 +35,9 @@
DEBUG_ALL
};
extern enDebugLevels debugLevel;
-static const char *debug_levels[] = {
- "NONE",
- "NORMAL",
- "WARN",
- "ERROR",
- "FUNC",
- "BITMAP",
- "MODEL",
- "STUB",
- "SMUSH",
- "IMUSE",
- "CHORE",
- "ALL"
-};
-static const char *debug_descriptions[] = {
- "No debug messages will be printed (default)",
- "\"Normal\" debug messages will be printed",
- "Warning debug messages will be printed",
- "Error debug messages will be printed",
- "Function (normal and stub) debug messages will be printed",
- "Bitmap debug messages will be printed",
- "Model debug messages will be printed",
- "Stub (missing function) debug messages will be printed",
- "SMUSH (video) debug messages will be printed",
- "IMUSE (audio) debug messages will be printed",
- "Chore debug messages will be printed",
- "All debug messages will be printed",
-};
+extern const char *debug_levels[];
+extern const char *debug_descriptions[];
+
// Hacky toggles for experimental / debug code (defined/set in main.cpp)
extern bool ZBUFFER_GLOBAL, SHOWFPS_GLOBAL;
Index: driver.h
===================================================================
RCS file: /cvsroot/scummvm/residual/driver.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- driver.h 5 May 2005 21:23:17 -0000 1.12
+++ driver.h 10 Aug 2005 08:33:45 -0000 1.13
@@ -33,6 +33,7 @@
class Driver {
public:
Driver() { ; }
+ virtual ~Driver() { ; }
Driver(int screenW, int screenH, int screenBPP, bool fullscreen = false) {
_screenWidth = screenW;
_screenHeight = screenH;
Index: driver_gl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_gl.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- driver_gl.cpp 17 Jul 2005 23:40:21 -0000 1.55
+++ driver_gl.cpp 10 Aug 2005 08:33:45 -0000 1.56
@@ -699,7 +699,7 @@
delete[] (GLuint *)handle->texIds;
}
-Bitmap *DriverGL::getScreenshot(int w, int h) {
+Bitmap *DriverGL::getScreenshot(int /*w*/, int /*h*/) {
return NULL;
}
Index: driver_gl.h
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_gl.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- driver_gl.h 5 May 2005 21:23:17 -0000 1.25
+++ driver_gl.h 10 Aug 2005 08:33:45 -0000 1.26
@@ -66,8 +66,8 @@
void drawBitmap();
Bitmap *getScreenshot(int w, int h);
- void enableDim(int x, int y, int w, int h) { _dim = true; }
- void disableDim(int x, int y, int w, int h) { _dim = false; }
+ void enableDim(int /*x*/, int /*y*/, int /*w*/, int /*h*/) { _dim = true; }
+ void disableDim(int /*x*/, int /*y*/, int /*w*/, int /*h*/) { _dim = false; }
void drawEmergString(int x, int y, const char *text, const Color &fgColor);
void loadEmergFont();
Index: driver_tinygl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_tinygl.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- driver_tinygl.cpp 10 Aug 2005 05:30:58 -0000 1.22
+++ driver_tinygl.cpp 10 Aug 2005 08:33:45 -0000 1.23
@@ -533,7 +533,7 @@
int y1 = primitive->getY1();
int y2 = primitive->getY2();
float m = (y2 - y1) / (x2 - x1);
- int b = -m * x1 + y1;
+ int b = (int)(-m * x1 + y1);
Color color = primitive->getColor();
uint16 c = ((color.red() & 0xF8) << 8) | ((color.green() & 0xFC) << 3) | (color.blue() >> 3);
Index: driver_tinygl.h
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_tinygl.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- driver_tinygl.h 5 May 2005 21:23:17 -0000 1.12
+++ driver_tinygl.h 10 Aug 2005 08:33:45 -0000 1.13
@@ -68,8 +68,8 @@
void drawBitmap();
Bitmap *getScreenshot(int w, int h);
- void enableDim(int x, int y, int w, int h) { _dim = true; }
- void disableDim(int x, int y, int w, int h) { _dim = false; }
+ void enableDim(int /*x*/, int /*y*/, int /*w*/, int /*h*/) { _dim = true; }
+ void disableDim(int /*x*/, int /*y*/, int /*w*/, int /*h*/) { _dim = false; }
void drawEmergString(int x, int y, const char *text, const Color &fgColor);
void loadEmergFont();
Index: engine.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/engine.cpp,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- engine.cpp 10 Aug 2005 05:30:58 -0000 1.82
+++ engine.cpp 10 Aug 2005 08:33:45 -0000 1.83
@@ -534,7 +534,7 @@
return;
}
// Change the locking status
- scene->locked = lockStatus;
+ scene->_locked = lockStatus;
}
void Engine::setScene(const char *name) {
@@ -553,7 +553,7 @@
registerScene(_currScene);
_currScene->setSoundParameters(20, 127);
// should delete the old scene after creating the new one
- if (lastScene != NULL && !lastScene->locked) {
+ if (lastScene != NULL && !lastScene->_locked) {
removeScene(lastScene);
delete lastScene;
}
@@ -566,7 +566,7 @@
_currScene = scene;
_currScene->setSoundParameters(20, 127);
// should delete the old scene after setting the new one
- if (lastScene != NULL && !lastScene->locked) {
+ if (lastScene != NULL && !lastScene->_locked) {
removeScene(lastScene);
delete lastScene;
}
Index: primitives.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/primitives.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- primitives.cpp 5 May 2005 21:23:17 -0000 1.4
+++ primitives.cpp 10 Aug 2005 08:33:45 -0000 1.5
@@ -53,7 +53,7 @@
_type = 1;
}
-void PrimitiveObject::createBitmap(Bitmap *bitmap, int x, int y, bool transparent) {
+void PrimitiveObject::createBitmap(Bitmap *bitmap, int x, int y, bool /*transparent*/) {
_type = 2;
_bitmap = bitmap;
_bitmap->setX(x);
Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/scene.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- scene.cpp 17 Jul 2005 23:40:21 -0000 1.44
+++ scene.cpp 10 Aug 2005 08:33:45 -0000 1.45
@@ -31,7 +31,7 @@
#include <cmath>
Scene::Scene(const char *name, const char *buf, int len) :
- _name(name), locked(false) {
+ _locked(false), _name(name) {
TextSplitter ts(buf, len);
char tempBuf[256];
Index: scene.h
===================================================================
RCS file: /cvsroot/scummvm/residual/scene.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- scene.h 17 Jul 2005 23:40:21 -0000 1.29
+++ scene.h 10 Aug 2005 08:33:45 -0000 1.30
@@ -121,7 +121,7 @@
float _intensity, _umbraangle, _penumbraangle;
};
- bool locked;
+ bool _locked;
private:
Index: smush.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/smush.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- smush.cpp 8 Aug 2005 07:05:58 -0000 1.65
+++ smush.cpp 10 Aug 2005 08:33:45 -0000 1.66
@@ -157,8 +157,8 @@
_file.read(data, size);
anno = (char *)data;
if (strncmp(anno, ANNO_HEADER, sizeof(ANNO_HEADER)-1) == 0) {
- char *annoData = anno + sizeof(ANNO_HEADER);
-
+ //char *annoData = anno + sizeof(ANNO_HEADER);
+
// Examples:
// Water streaming around boat from Manny's balcony
// MakeAnim animation type 'Bl16' parameters: 10000;12000;100;1;0;0;0;0;25;0;
Index: textobject.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/textobject.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- textobject.cpp 10 Aug 2005 05:30:58 -0000 1.29
+++ textobject.cpp 10 Aug 2005 08:33:45 -0000 1.30
@@ -29,9 +29,8 @@
TextObject::TextObject() :
_created(false), _x(0), _y(0), _width(0), _height(0), _justify(0),
- _font(NULL), _textBitmap(NULL), _bitmapWidthPtr(NULL),
- _bitmapHeightPtr(NULL), _disabled(false), _textObjectHandle(NULL),
- _numberLines(1) {
+ _numberLines(1), _disabled(false), _font(NULL), _textBitmap(NULL),
+ _bitmapWidthPtr(NULL), _bitmapHeightPtr(NULL), _textObjectHandle(NULL) {
memset(_textID, 0, sizeof(_textID));
_fgColor._vals[0] = 0;
_fgColor._vals[1] = 0;
More information about the Scummvm-git-logs
mailing list