aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/math/polygon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword25/math/polygon.cpp')
-rw-r--r--engines/sword25/math/polygon.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/sword25/math/polygon.cpp b/engines/sword25/math/polygon.cpp
index 2e7836ff77..ccefa1901e 100644
--- a/engines/sword25/math/polygon.cpp
+++ b/engines/sword25/math/polygon.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -364,20 +364,20 @@ bool Polygon::isPointInPolygon(const Vertex &point, bool edgesBelongToPolygon) c
bool Polygon::persist(OutputPersistenceBlock &writer) {
writer.write(vertexCount);
for (int i = 0; i < vertexCount; ++i) {
- writer.write(vertices[i].x);
- writer.write(vertices[i].y);
+ writer.write((int32)vertices[i].x);
+ writer.write((int32)vertices[i].y);
}
return true;
}
bool Polygon::unpersist(InputPersistenceBlock &reader) {
- int storedvertexCount;
+ int32 storedvertexCount;
reader.read(storedvertexCount);
Common::Array<Vertex> storedvertices;
for (int i = 0; i < storedvertexCount; ++i) {
- int x, y;
+ int32 x, y;
reader.read(x);
reader.read(y);
storedvertices.push_back(Vertex(x, y));