aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorColin Snover2016-09-30 13:09:12 -0500
committerColin Snover2016-09-30 13:54:06 -0500
commit5baff4a1e5b1635334be2c9590e1aa765a9cdcab (patch)
treecec2d02e6f23d6b715bd4da32344d4dc72665314 /engines
parentd580b64c6e23114310511c8a4c1b9fb1a939e806 (diff)
downloadscummvm-rg350-5baff4a1e5b1635334be2c9590e1aa765a9cdcab.tar.gz
scummvm-rg350-5baff4a1e5b1635334be2c9590e1aa765a9cdcab.tar.bz2
scummvm-rg350-5baff4a1e5b1635334be2c9590e1aa765a9cdcab.zip
SCI32: Fix some buildbot compiler warnings
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kfile.cpp2
-rw-r--r--engines/sci/engine/kgraphics32.cpp3
-rw-r--r--engines/sci/engine/savegame.cpp14
-rw-r--r--engines/sci/graphics/cursor32.h2
4 files changed, 9 insertions, 12 deletions
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();