[Scummvm-cvs-logs] CVS: residual font.cpp,1.1,1.2 textobject.cpp,1.20,1.21 textobject.h,1.9,1.10
Joost Peters
joostp at users.sourceforge.net
Sun Mar 20 07:49:24 CET 2005
- Previous message: [Scummvm-cvs-logs] CVS: residual driver.h,1.5,1.6 driver_gl.cpp,1.39,1.40 driver_gl.h,1.18,1.19 driver_tinygl.cpp,1.9,1.10 driver_tinygl.h,1.5,1.6 textobject.cpp,1.19,1.20
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/sdl graphics.cpp,1.33,1.34 sdl-common.h,1.76,1.77
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15093
Modified Files:
font.cpp textobject.cpp textobject.h
Log Message:
fix warnings
Index: font.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/font.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- font.cpp 18 Mar 2005 19:54:39 -0000 1.1
+++ font.cpp 20 Mar 2005 15:48:58 -0000 1.2
@@ -24,7 +24,7 @@
#include <cstring>
#include <SDL_endian.h>
-Font::Font(const char *filename, const char *data, int len) :
+Font::Font(const char *filename, const char *data, int /*len*/) :
Resource(filename) {
_numChars = READ_LE_UINT32(data);
@@ -44,7 +44,7 @@
_charIndex = (uint16 *)malloc(sizeof(_charIndex) * _numChars);
if (!_charIndex)
error("Could not load font %s. Out of memory\n", filename);
- for (int i = 0; i < _numChars; ++i) {
+ for (uint i = 0; i < _numChars; ++i) {
_charIndex[i] = READ_LE_UINT16(data + 2 * i);
}
@@ -54,7 +54,7 @@
_charHeaders = (CharHeader *)malloc(sizeof(CharHeader) * _numChars);
if (!_charHeaders)
error("Could not load font %s. Out of memory\n", filename);
- for (int i = 0; i < _numChars; ++i) {
+ for (uint i = 0; i < _numChars; ++i) {
_charHeaders[i].offset = READ_LE_UINT32(data);
// 1 unknown byte before the startingLine, and 2 afterwards are skipped
_charHeaders[i].unknown = READ_LE_UINT32(data + 4);
Index: textobject.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/textobject.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- textobject.cpp 20 Mar 2005 14:03:08 -0000 1.20
+++ textobject.cpp 20 Mar 2005 15:48:58 -0000 1.21
@@ -24,9 +24,9 @@
std::string parseMsgText(const char *msg, char *msgId);
TextObject::TextObject() :
- _created(false), _x(0), _y(0), _width(0), _height(0), _textBitmap(NULL),
- _bitmapWidth(0), _bitmapHeight(0), _textObjectHandle(NULL), _justify(0),
- _font(NULL), _text(NULL) {
+ _created(false), _x(0), _y(0), _width(0), _height(0), _justify(0),
+ _font(NULL), _text(NULL), _textBitmap(NULL), _bitmapWidth(0),
+ _bitmapHeight(0), _textObjectHandle(NULL) {
memset(_textID, 0, 10);
_fgColor._vals[0] = 0;
_fgColor._vals[1] = 0;
@@ -64,7 +64,7 @@
for (int i = 0; msg[i] != '\0'; ++i) {
_bitmapWidth += _font->getCharLogicalWidth(msg[i]) + _font->getCharStartingCol(msg[i]);
- int h = _font->getCharHeight(msg[i]) + _font->getCharStartingLine(msg[i]);
+ uint h = _font->getCharHeight(msg[i]) + _font->getCharStartingLine(msg[i]);
if (h > _bitmapHeight)
_bitmapHeight = h;
}
@@ -76,7 +76,7 @@
// Fill bitmap
int offset = 0;
- for (int line = 0; line < _bitmapHeight; ++line) {
+ for (uint line = 0; line < _bitmapHeight; ++line) {
for (int c = 0; msg[c] != '\0'; ++c) {
uint32 charWidth = _font->getCharWidth(msg[c]);
uint32 charLogicalWidth = _font->getCharLogicalWidth(msg[c]);
Index: textobject.h
===================================================================
RCS file: /cvsroot/scummvm/residual/textobject.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- textobject.h 20 Mar 2005 13:51:40 -0000 1.9
+++ textobject.h 20 Mar 2005 15:48:58 -0000 1.10
@@ -57,13 +57,13 @@
bool _created;
Color _fgColor;
int _x, _y;
- int _width, _height;
+ uint _width, _height;
int _justify;
Font *_font;
char *_text;
char _textID[32];
uint8 *_textBitmap;
- int _bitmapHeight, _bitmapWidth;
+ uint _bitmapWidth, _bitmapHeight;
Driver::TextObjectHandle *_textObjectHandle;
};
- Previous message: [Scummvm-cvs-logs] CVS: residual driver.h,1.5,1.6 driver_gl.cpp,1.39,1.40 driver_gl.h,1.18,1.19 driver_tinygl.cpp,1.9,1.10 driver_tinygl.h,1.5,1.6 textobject.cpp,1.19,1.20
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/sdl graphics.cpp,1.33,1.34 sdl-common.h,1.76,1.77
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list