[Scummvm-cvs-logs] scummvm master -> 7e62442376be966369008bfb8c4f1b66786177e7

digitall dgturner at iee.org
Sun Sep 29 03:30:29 CEST 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7e62442376 SWORD25: And even more fixes for Amiga OS 4 compilation.


Commit: 7e62442376be966369008bfb8c4f1b66786177e7
    https://github.com/scummvm/scummvm/commit/7e62442376be966369008bfb8c4f1b66786177e7
Author: D G Turner (digitall at scummvm.org)
Date: 2013-09-28T18:33:02-07:00

Commit Message:
SWORD25: And even more fixes for Amiga OS 4 compilation.

Changed paths:
    engines/sword25/gfx/renderobject.cpp
    engines/sword25/gfx/renderobject.h
    engines/sword25/gfx/renderobjectmanager.cpp
    engines/sword25/gfx/text.cpp
    engines/sword25/gfx/text.h



diff --git a/engines/sword25/gfx/renderobject.cpp b/engines/sword25/gfx/renderobject.cpp
index dcbfe64..af12f61 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 92541e8..7fcd3a8 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 77f944c..57c8ec3 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 65add60..8c33fa8 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 e82c24d..873eb33 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;






More information about the Scummvm-git-logs mailing list