aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2013-09-29 02:33:02 +0100
committerD G Turner2013-09-29 02:33:02 +0100
commit7e62442376be966369008bfb8c4f1b66786177e7 (patch)
tree0c66f0ebc91bd159452eacce1f4b5197727c9abd
parent03965ba855c510eecb0dfd653aef0cc9b67541dc (diff)
downloadscummvm-rg350-7e62442376be966369008bfb8c4f1b66786177e7.tar.gz
scummvm-rg350-7e62442376be966369008bfb8c4f1b66786177e7.tar.bz2
scummvm-rg350-7e62442376be966369008bfb8c4f1b66786177e7.zip
SWORD25: And even more fixes for Amiga OS 4 compilation.
-rw-r--r--engines/sword25/gfx/renderobject.cpp28
-rw-r--r--engines/sword25/gfx/renderobject.h8
-rw-r--r--engines/sword25/gfx/renderobjectmanager.cpp8
-rw-r--r--engines/sword25/gfx/text.cpp6
-rw-r--r--engines/sword25/gfx/text.h6
5 files changed, 28 insertions, 28 deletions
diff --git a/engines/sword25/gfx/renderobject.cpp b/engines/sword25/gfx/renderobject.cpp
index dcbfe6462b..af12f61413 100644
--- a/engines/sword25/gfx/renderobject.cpp
+++ b/engines/sword25/gfx/renderobject.cpp
@@ -219,27 +219,27 @@ Common::Rect RenderObject::calcBoundingBox() const {
return bbox;
}
-void RenderObject::calcAbsolutePos(int &x, int &y, int &z) const {
+void RenderObject::calcAbsolutePos(int32 &x, int32 &y, int32 &z) const {
x = calcAbsoluteX();
y = calcAbsoluteY();
z = calcAbsoluteZ();
}
-int RenderObject::calcAbsoluteX() const {
+int32 RenderObject::calcAbsoluteX() const {
if (_parentPtr.isValid())
return _parentPtr->getAbsoluteX() + _x;
else
return _x;
}
-int RenderObject::calcAbsoluteY() const {
+int32 RenderObject::calcAbsoluteY() const {
if (_parentPtr.isValid())
return _parentPtr->getAbsoluteY() + _y;
else
return _y;
}
-int RenderObject::calcAbsoluteZ() const {
+int32 RenderObject::calcAbsoluteZ() const {
if (_parentPtr.isValid())
return _parentPtr->getAbsoluteZ() + _z;
else
@@ -417,10 +417,10 @@ bool RenderObject::persist(OutputPersistenceBlock &writer) {
writer.write(_bbox.top);
writer.write(_bbox.right);
writer.write(_bbox.bottom);
- writer.write(_oldBbox.left);
- writer.write(_oldBbox.top);
- writer.write(_oldBbox.right);
- writer.write(_oldBbox.bottom);
+ writer.write((int32)_oldBbox.left);
+ writer.write((int32)_oldBbox.top);
+ writer.write((int32)_oldBbox.right);
+ writer.write((int32)_oldBbox.bottom);
writer.write(_oldX);
writer.write(_oldY);
writer.write(_oldZ);
@@ -455,7 +455,7 @@ bool RenderObject::unpersist(InputPersistenceBlock &reader) {
reader.read(_oldY);
reader.read(_oldZ);
reader.read(_oldVisible);
- uint parentHandle;
+ uint32 parentHandle;
reader.read(parentHandle);
_parentPtr = RenderObjectPtr<RenderObject>(parentHandle);
reader.read(_refreshForced);
@@ -470,7 +470,7 @@ bool RenderObject::persistChildren(OutputPersistenceBlock &writer) {
bool result = true;
// Kinderanzahl speichern.
- writer.write(_children.size());
+ writer.write((uint32)_children.size());
// Rekursiv alle Kinder speichern.
RENDEROBJECT_LIST::iterator it = _children.begin();
@@ -486,13 +486,13 @@ bool RenderObject::unpersistChildren(InputPersistenceBlock &reader) {
bool result = true;
// Kinderanzahl einlesen.
- uint childrenCount;
+ uint32 childrenCount;
reader.read(childrenCount);
if (!reader.isGood())
return false;
// Alle Kinder rekursiv wieder herstellen.
- for (uint i = 0; i < childrenCount; ++i) {
+ for (uint32 i = 0; i < childrenCount; ++i) {
if (!recreatePersistedRenderObject(reader).isValid())
return false;
}
@@ -504,8 +504,8 @@ RenderObjectPtr<RenderObject> RenderObject::recreatePersistedRenderObject(InputP
RenderObjectPtr<RenderObject> result;
// Typ und Handle auslesen.
- uint type;
- uint handle;
+ uint32 type;
+ uint32 handle;
reader.read(type);
reader.read(handle);
if (!reader.isGood())
diff --git a/engines/sword25/gfx/renderobject.h b/engines/sword25/gfx/renderobject.h
index 92541e83a2..7fcd3a87a3 100644
--- a/engines/sword25/gfx/renderobject.h
+++ b/engines/sword25/gfx/renderobject.h
@@ -500,17 +500,17 @@ private:
/**
@brief Berechnet die absolute Position des Objektes.
*/
- void calcAbsolutePos(int &x, int &y, int &z) const;
+ void calcAbsolutePos(int32 &x, int32 &y, int32 &z) const;
/**
@brief Berechnet die absolute Position des Objektes auf der X-Achse.
*/
- int calcAbsoluteX() const;
+ int32 calcAbsoluteX() const;
/**
@brief Berechnet die absolute Position des Objektes.
*/
- int calcAbsoluteY() const;
+ int32 calcAbsoluteY() const;
- int calcAbsoluteZ() const;
+ int32 calcAbsoluteZ() const;
/**
@brief Sortiert alle Kinderobjekte nach ihrem Renderang.
diff --git a/engines/sword25/gfx/renderobjectmanager.cpp b/engines/sword25/gfx/renderobjectmanager.cpp
index 77f944c9e0..57c8ec318f 100644
--- a/engines/sword25/gfx/renderobjectmanager.cpp
+++ b/engines/sword25/gfx/renderobjectmanager.cpp
@@ -171,7 +171,7 @@ bool RenderObjectManager::persist(OutputPersistenceBlock &writer) {
writer.write(_frameStarted);
// Referenzen auf die TimedRenderObjects persistieren.
- writer.write(_timedRenderObjects.size());
+ writer.write((uint32)_timedRenderObjects.size());
RenderObjectList::const_iterator iter = _timedRenderObjects.begin();
while (iter != _timedRenderObjects.end()) {
writer.write((*iter)->getHandle());
@@ -200,10 +200,10 @@ bool RenderObjectManager::unpersist(InputPersistenceBlock &reader) {
_timedRenderObjects.resize(0);
// Referenzen auf die TimedRenderObjects wieder herstellen.
- uint timedObjectCount;
+ uint32 timedObjectCount;
reader.read(timedObjectCount);
- for (uint i = 0; i < timedObjectCount; ++i) {
- uint handle;
+ for (uint32 i = 0; i < timedObjectCount; ++i) {
+ uint32 handle;
reader.read(handle);
_timedRenderObjects.push_back(handle);
}
diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp
index 65add60e97..8c33fa8d61 100644
--- a/engines/sword25/gfx/text.cpp
+++ b/engines/sword25/gfx/text.cpp
@@ -45,7 +45,7 @@
namespace Sword25 {
namespace {
-const uint AUTO_WRAP_THRESHOLD_DEFAULT = 300;
+const uint32 AUTO_WRAP_THRESHOLD_DEFAULT = 300;
}
Text::Text(RenderObjectPtr<RenderObject> parentPtr) :
@@ -123,7 +123,7 @@ void Text::setAutoWrap(bool autoWrap) {
}
}
-void Text::setAutoWrapThreshold(uint autoWrapThreshold) {
+void Text::setAutoWrapThreshold(uint32 autoWrapThreshold) {
if (autoWrapThreshold != _autoWrapThreshold) {
_autoWrapThreshold = autoWrapThreshold;
updateFormat();
@@ -351,7 +351,7 @@ bool Text::unpersist(InputPersistenceBlock &reader) {
reader.read(autoWrap);
setAutoWrap(autoWrap);
- uint autoWrapThreshold;
+ uint32 autoWrapThreshold;
reader.read(autoWrapThreshold);
setAutoWrapThreshold(autoWrapThreshold);
diff --git a/engines/sword25/gfx/text.h b/engines/sword25/gfx/text.h
index e82c24d93c..873eb33380 100644
--- a/engines/sword25/gfx/text.h
+++ b/engines/sword25/gfx/text.h
@@ -80,7 +80,7 @@ public:
@remark Dieses Attribut wird mit dem Wert 300 initialisiert.
@remark Eine automatische Formatierung wird nur vorgenommen, wenn diese durch einen Aufruf von SetAutoWrap() aktiviert wurde.
*/
- void setAutoWrapThreshold(uint autoWrapThreshold);
+ void setAutoWrapThreshold(uint32 autoWrapThreshold);
/**
@brief Gibt den dargestellten Text zurück.
@@ -128,7 +128,7 @@ public:
/**
@brief Gibt die Längengrenze des Textes in Pixeln zurück, ab der eine automatische Formatierung vorgenommen wird.
*/
- uint getAutoWrapThreshold() const {
+ uint32 getAutoWrapThreshold() const {
return _autoWrapThreshold;
}
@@ -146,7 +146,7 @@ private:
Common::String _font;
Common::String _text;
bool _autoWrap;
- uint _autoWrapThreshold;
+ uint32 _autoWrapThreshold;
struct Line {
Common::Rect bbox;