diff options
author | Le Philousophe | 2019-05-30 15:44:30 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-06-01 22:43:48 +0200 |
commit | f20d33f1305ace5f7cc9c7cf9c2a299c35bc0c77 (patch) | |
tree | d81c26cebe6ee43cf01e65d442726c651ddfc6a6 | |
parent | 7ae6e1af1e2fb190cf3ae4ce82b08fb3cddb868e (diff) | |
download | scummvm-rg350-f20d33f1305ace5f7cc9c7cf9c2a299c35bc0c77.tar.gz scummvm-rg350-f20d33f1305ace5f7cc9c7cf9c2a299c35bc0c77.tar.bz2 scummvm-rg350-f20d33f1305ace5f7cc9c7cf9c2a299c35bc0c77.zip |
CRYOMNI3D: Make ignored reads explicit
-rw-r--r-- | engines/cryomni3d/font_manager.cpp | 6 | ||||
-rw-r--r-- | engines/cryomni3d/sprites.cpp | 4 | ||||
-rw-r--r-- | engines/cryomni3d/versailles/saveload.cpp | 12 | ||||
-rw-r--r-- | engines/cryomni3d/wam_parser.cpp | 18 |
4 files changed, 22 insertions, 18 deletions
diff --git a/engines/cryomni3d/font_manager.cpp b/engines/cryomni3d/font_manager.cpp index 2cf3f7bb74..9b37d27e10 100644 --- a/engines/cryomni3d/font_manager.cpp +++ b/engines/cryomni3d/font_manager.cpp @@ -61,9 +61,9 @@ void FontManager::loadFont(Common::ReadStream &font_fl) { } // 3 unknown uint16 - font_fl.readUint16BE(); - font_fl.readUint16BE(); - font_fl.readUint16BE(); + (void) font_fl.readUint16BE(); + (void) font_fl.readUint16BE(); + (void) font_fl.readUint16BE(); Font *font = new Font(); diff --git a/engines/cryomni3d/sprites.cpp b/engines/cryomni3d/sprites.cpp index 23f8c43d06..36cd439f1c 100644 --- a/engines/cryomni3d/sprites.cpp +++ b/engines/cryomni3d/sprites.cpp @@ -65,8 +65,8 @@ void Sprites::loadSprites(Common::ReadStream &spr_fl) { } // 2 unknown uint32 - spr_fl.readUint32BE(); - spr_fl.readUint32BE(); + (void) spr_fl.readUint32BE(); + (void) spr_fl.readUint32BE(); CryoCursor *cursor = new CryoCursor(); diff --git a/engines/cryomni3d/versailles/saveload.cpp b/engines/cryomni3d/versailles/saveload.cpp index a6620a39d8..afade640e9 100644 --- a/engines/cryomni3d/versailles/saveload.cpp +++ b/engines/cryomni3d/versailles/saveload.cpp @@ -235,9 +235,9 @@ bool CryOmni3DEngine_Versailles::loadGame(bool visit, uint saveNum) { in->read(saveNameC, sizeof(saveNameC)); // dummy values - in->readUint32LE(); - in->readUint32BE(); - in->readUint32BE(); + (void) in->readUint32LE(); + (void) in->readUint32BE(); + (void) in->readUint32BE(); // Dialog variables assert(_dialogsMan.size() < 200); @@ -245,7 +245,8 @@ bool CryOmni3DEngine_Versailles::loadGame(bool visit, uint saveNum) { _dialogsMan[i] = in->readByte(); } for (uint i = _dialogsMan.size(); i < 200; i++) { - in->readByte(); + // Read the remaining bytes but don't use them + (void) in->readByte(); } // Inventory @@ -287,7 +288,8 @@ bool CryOmni3DEngine_Versailles::loadGame(bool visit, uint saveNum) { *it = in->readUint32BE(); } for (uint i = _gameVariables.size(); i < 100; i++) { - in->readUint32BE(); + // Read the remaining variables but don't use them + (void) in->readUint32BE(); } delete in; diff --git a/engines/cryomni3d/wam_parser.cpp b/engines/cryomni3d/wam_parser.cpp index 75bbfb082a..8119cda47b 100644 --- a/engines/cryomni3d/wam_parser.cpp +++ b/engines/cryomni3d/wam_parser.cpp @@ -32,10 +32,11 @@ void WAMParser::loadStream(Common::ReadStream &stream) { _places.clear(); - stream.readByte(); - stream.readByte(); - stream.read(str, 16); - stream.readUint32LE(); + // These are unused and unknown values + (void) stream.readByte(); + (void) stream.readByte(); + (void) stream.read(str, 16); + (void) stream.readUint32LE(); uint nPlaces = stream.readByte(); //debug("nPlaces = %u", nPlaces); @@ -62,14 +63,14 @@ void WAMParser::loadStream(Common::ReadStream &stream) { _places.erase(oldPlace); } //debug("nPlaceId = %u", place.placeId); - stream.readUint32LE(); + (void) stream.readUint32LE(); uint nTransitions = stream.readByte(); //debug("nTransitions = %u", nTransitions); uint nZones = stream.readByte(); //debug("nZones = %u", nZones); for (uint j = 0; j < nTransitions; j++) { Transition trans; - stream.readUint32LE(); + (void) stream.readUint32LE(); uint nAnimations = stream.readByte(); for (uint k = 0; k < 8; k++) { stream.read(str, 16); @@ -78,9 +79,10 @@ void WAMParser::loadStream(Common::ReadStream &stream) { nAnimations--; } } - stream.readUint32LE(); + (void) stream.readUint32LE(); trans.dstId = stream.readUint32LE(); - stream.readByte(); + // Unused byte + (void) stream.readByte(); trans.srcAlpha = stream.readDoubleLE(); trans.srcBeta = stream.readDoubleLE(); trans.dstAlpha = stream.readDoubleLE(); |