diff options
author | Eugene Sandulenko | 2013-09-29 10:15:24 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-29 10:15:24 +0300 |
commit | 2333041fdf370670e02c51d93342839bbec676d4 (patch) | |
tree | 90be4d783467f3cbc0b16de3703a30a7f5e18128 | |
parent | e6ba26ff0dc2bfdb4a748bf5811bfde2e16ab2b8 (diff) | |
download | scummvm-rg350-2333041fdf370670e02c51d93342839bbec676d4.tar.gz scummvm-rg350-2333041fdf370670e02c51d93342839bbec676d4.tar.bz2 scummvm-rg350-2333041fdf370670e02c51d93342839bbec676d4.zip |
SWORD25: Specify integer size
-rw-r--r-- | engines/sword25/math/region.cpp | 2 | ||||
-rw-r--r-- | engines/sword25/math/walkregion.cpp | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/engines/sword25/math/region.cpp b/engines/sword25/math/region.cpp index f391a577ab..b6ebaee23f 100644 --- a/engines/sword25/math/region.cpp +++ b/engines/sword25/math/region.cpp @@ -67,7 +67,7 @@ uint Region::create(REGION_TYPE type) { uint Region::create(InputPersistenceBlock &reader, uint handle) { // Read type - uint type; + uint32 type; reader.read(type); // Depending on the type, create a new BS_Region or BS_WalkRegion object diff --git a/engines/sword25/math/walkregion.cpp b/engines/sword25/math/walkregion.cpp index bace4d54bc..6c53446913 100644 --- a/engines/sword25/math/walkregion.cpp +++ b/engines/sword25/math/walkregion.cpp @@ -328,20 +328,20 @@ bool WalkRegion::persist(OutputPersistenceBlock &writer) { result &= Region::persist(writer); // Persist the nodes - writer.write(_nodes.size()); + writer.write((uint32)_nodes.size()); Common::Array<Vertex>::const_iterator it = _nodes.begin(); while (it != _nodes.end()) { - writer.write(it->x); - writer.write(it->y); + writer.write((int32)it->x); + writer.write((int32)it->y); ++it; } // Persist the visibility matrix - writer.write(_visibilityMatrix.size()); + writer.write((uint32)_visibilityMatrix.size()); Common::Array< Common::Array<int> >::const_iterator rowIter = _visibilityMatrix.begin(); while (rowIter != _visibilityMatrix.end()) { - writer.write(rowIter->size()); - Common::Array<int>::const_iterator colIter = rowIter->begin(); + writer.write((uint32)rowIter->size()); + Common::Array<int32>::const_iterator colIter = rowIter->begin(); while (colIter != rowIter->end()) { writer.write(*colIter); ++colIter; @@ -360,7 +360,7 @@ bool WalkRegion::unpersist(InputPersistenceBlock &reader) { // this point only the additional data from BS_WalkRegion needs to be loaded // Node load - uint nodeCount; + uint32 nodeCount; reader.read(nodeCount); _nodes.clear(); _nodes.resize(nodeCount); @@ -372,16 +372,16 @@ bool WalkRegion::unpersist(InputPersistenceBlock &reader) { } // Visibility matrix load - uint rowCount; + uint32 rowCount; reader.read(rowCount); _visibilityMatrix.clear(); _visibilityMatrix.resize(rowCount); Common::Array< Common::Array<int> >::iterator rowIter = _visibilityMatrix.begin(); while (rowIter != _visibilityMatrix.end()) { - uint colCount; + uint32 colCount; reader.read(colCount); rowIter->resize(colCount); - Common::Array<int>::iterator colIter = rowIter->begin(); + Common::Array<int32>::iterator colIter = rowIter->begin(); while (colIter != rowIter->end()) { reader.read(*colIter); ++colIter; |