aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2012-06-14 00:11:56 +0200
committerStrangerke2012-06-14 00:12:45 +0200
commit42a322d671a27406a9dd993f82675dda0ee4780b (patch)
treeb2da7f1959a2c38deb153340cb649eda50462de1 /engines
parent746dcf33da340702157dc7aca0f01265648189be (diff)
downloadscummvm-rg350-42a322d671a27406a9dd993f82675dda0ee4780b.tar.gz
scummvm-rg350-42a322d671a27406a9dd993f82675dda0ee4780b.tar.bz2
scummvm-rg350-42a322d671a27406a9dd993f82675dda0ee4780b.zip
TONY: Silent some CppCheck warnings
Diffstat (limited to 'engines')
-rw-r--r--engines/tony/font.cpp6
-rw-r--r--engines/tony/font.h4
-rw-r--r--engines/tony/game.cpp3
-rw-r--r--engines/tony/gfxcore.cpp16
-rw-r--r--engines/tony/inventory.cpp5
-rw-r--r--engines/tony/inventory.h1
6 files changed, 23 insertions, 12 deletions
diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp
index 122c529de3..a567fe20cd 100644
--- a/engines/tony/font.cpp
+++ b/engines/tony/font.cpp
@@ -42,6 +42,7 @@ namespace Tony {
RMFont::RMFont() {
_letter = NULL;
+ _nLetters = _fontDimx = _fontDimy = _dimx = _dimy = 0;
}
RMFont::~RMFont() {
@@ -1993,7 +1994,7 @@ void RMText::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
\****************************************************************************/
RMTextDialog::RMTextDialog() : RMText() {
- _startTime = 0;
+ _time = _startTime = 0;
_dst = RMPoint(0, 0);
_bSkipStatus = true;
@@ -2327,6 +2328,9 @@ RMDialogChoice::RMDialogChoice() {
_hUnreg = CoroScheduler.createEvent(false, false);
_bRemoveFromOT = false;
+
+ _curAdded = 0;
+ _bShow = false;
}
RMDialogChoice::~RMDialogChoice() {
diff --git a/engines/tony/font.h b/engines/tony/font.h
index daaac84a59..328d501e27 100644
--- a/engines/tony/font.h
+++ b/engines/tony/font.h
@@ -57,8 +57,8 @@ private:
class RMFontPrimitive : public RMGfxPrimitive {
public:
- RMFontPrimitive() : RMGfxPrimitive() {}
- RMFontPrimitive(RMGfxTask *task) : RMGfxPrimitive(task) {}
+ RMFontPrimitive() : RMGfxPrimitive() { _nChar = 0; }
+ RMFontPrimitive(RMGfxTask *task) : RMGfxPrimitive(task) { _nChar = 0; }
virtual ~RMFontPrimitive() { }
virtual RMGfxPrimitive *duplicate() {
return new RMFontPrimitive(*this);
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp
index 1b13fa98bf..03479d96a5 100644
--- a/engines/tony/game.cpp
+++ b/engines/tony/game.cpp
@@ -1473,6 +1473,9 @@ bool RMOptionScreen::loadThumbnailFromSaveState(int nState, byte *lpDestBuf, RMS
RMPointer::RMPointer() {
Common::fill(_pointer, _pointer + 16, (RMGfxSourceBuffer8 *)NULL);
Common::fill(_specialPointer, _specialPointer + 16, (RMItem *)NULL);
+
+ _nCurPointer = _nCurSpecialPointer = 0;
+ _nCurCustomPointer = NULL;
}
RMPointer::~RMPointer() {
diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp
index 83769ee78b..e168d2b7c9 100644
--- a/engines/tony/gfxcore.cpp
+++ b/engines/tony/gfxcore.cpp
@@ -390,16 +390,15 @@ RMGfxSourceBufferPal::~RMGfxSourceBufferPal() {
}
int RMGfxSourceBufferPal::loadPaletteWA(const byte *buf, bool bSwapped) {
- int i;
-
- if (bSwapped)
- for (i = 0; i < (1 << getBpp()); i++) {
+ if (bSwapped) {
+ for (int i = 0; i < (1 << getBpp()); i++) {
_pal[i * 3 + 0] = buf[i * 3 + 2];
_pal[i * 3 + 1] = buf[i * 3 + 1];
_pal[i * 3 + 2] = buf[i * 3 + 0];
}
- else
+ } else {
copyMemory(_pal, buf, (1 << getBpp()) * 3);
+ }
preparePalette();
@@ -1819,7 +1818,6 @@ RMGfxSourceBuffer16::~RMGfxSourceBuffer16() {
}
void RMGfxSourceBuffer16::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
- int x, y;
uint16 *buf = bigBuf;
uint16 *raw = (uint16 *)_buf;
int dimx, dimy;
@@ -1852,8 +1850,8 @@ void RMGfxSourceBuffer16::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimi
buf += y1 * bigBuf.getDimx() + x1;
if (_bTrasp0) {
- for (y = 0; y < dimy; y++) {
- for (x = 0; x < dimx;) {
+ for (int y = 0; y < dimy; y++) {
+ for (int x = 0; x < dimx;) {
while (x < dimx && raw[x] == 0)
x++;
@@ -1867,7 +1865,7 @@ void RMGfxSourceBuffer16::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimi
buf += bigBuf.getDimx();
}
} else {
- for (y = 0; y < dimy; y++) {
+ for (int y = 0; y < dimy; y++) {
Common::copy(raw, raw + dimx, buf);
buf += bigBuf.getDimx();
raw += _dimx;
diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp
index f29713adbd..76d0f0eca9 100644
--- a/engines/tony/inventory.cpp
+++ b/engines/tony/inventory.cpp
@@ -755,6 +755,11 @@ int RMInventory::loadState(byte *state) {
* RMInterface methods
\****************************************************************************/
+RMInterface::RMInterface() : RMGfxSourceBuffer8RLEByte() {
+ _bActive = _bPerorate = false;
+ _lastHotZone = -1;
+}
+
RMInterface::~RMInterface() {
}
diff --git a/engines/tony/inventory.h b/engines/tony/inventory.h
index 5bf35e6eb0..b739e16f72 100644
--- a/engines/tony/inventory.h
+++ b/engines/tony/inventory.h
@@ -169,6 +169,7 @@ protected:
int onWhichBox(RMPoint pt);
public:
+ RMInterface();
virtual ~RMInterface();
// The usual DoFrame (poll the graphics engine)