From 5baff4a1e5b1635334be2c9590e1aa765a9cdcab Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Fri, 30 Sep 2016 13:09:12 -0500 Subject: SCI32: Fix some buildbot compiler warnings --- engines/sci/engine/kfile.cpp | 2 +- engines/sci/engine/kgraphics32.cpp | 3 --- engines/sci/engine/savegame.cpp | 14 +++++++------- engines/sci/graphics/cursor32.h | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 2d2f885b05..76cae6c4c1 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -534,7 +534,7 @@ reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) { #ifdef ENABLE_SCI32 if (getSciVersion() >= SCI_VERSION_2) { if (!success) { - return make_reg(0, -1); + return SIGNAL_REG; } return make_reg(0, bytesWritten); diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 49215b27f4..b8dc3e45b8 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -75,10 +75,7 @@ reg_t kBaseSetter32(EngineState *s, int argc, reg_t *argv) { CelObjView celObj(viewId, loopNo, celNo); const int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth; - const int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight; - const Ratio scaleX(scriptWidth, celObj._scaledWidth); - const Ratio scaleY(scriptHeight, celObj._scaledHeight); int16 brLeft; diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 36c35e47ea..4153b8e1af 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -667,32 +667,32 @@ void ArrayTable::saveLoadWithSerializer(Common::Serializer &ser) { } void SciArray::saveLoadWithSerializer(Common::Serializer &s) { - uint16 size; + uint16 savedSize; if (s.isSaving()) { - size = _size; + savedSize = _size; } s.syncAsByte(_type); s.syncAsByte(_elementSize); - s.syncAsUint16LE(size); + s.syncAsUint16LE(savedSize); if (s.isLoading()) { - resize(size); + resize(savedSize); } switch (_type) { case kArrayTypeByte: case kArrayTypeString: - s.syncBytes((byte *)_data, size); + s.syncBytes((byte *)_data, savedSize); break; case kArrayTypeInt16: - for (int i = 0; i < size; ++i) { + for (int i = 0; i < savedSize; ++i) { s.syncAsUint16LE(((int16 *)_data)[i]); } break; case kArrayTypeID: - for (int i = 0; i < size; ++i) { + for (int i = 0; i < savedSize; ++i) { syncWithSerializer(s, ((reg_t *)_data)[i]); } break; diff --git a/engines/sci/graphics/cursor32.h b/engines/sci/graphics/cursor32.h index 88a75beb7f..00a8b9baa4 100644 --- a/engines/sci/graphics/cursor32.h +++ b/engines/sci/graphics/cursor32.h @@ -31,7 +31,7 @@ namespace Sci { -class GfxCursor32 : Common::Serializable { +class GfxCursor32 : public Common::Serializable { public: GfxCursor32(); ~GfxCursor32(); -- cgit v1.2.3