[Scummvm-cvs-logs] SF.net SVN: scummvm:[53219] scummvm/trunk/engines/sword25

sev at users.sourceforge.net sev at users.sourceforge.net
Wed Oct 13 00:30:58 CEST 2010


Revision: 53219
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53219&view=rev
Author:   sev
Date:     2010-10-12 22:30:57 +0000 (Tue, 12 Oct 2010)

Log Message:
-----------
SWORD25: Number of compilation and warning fixes

Modified Paths:
--------------
    scummvm/trunk/engines/sword25/gfx/animation.cpp
    scummvm/trunk/engines/sword25/gfx/animation.h
    scummvm/trunk/engines/sword25/gfx/animationresource.cpp
    scummvm/trunk/engines/sword25/gfx/animationresource.h
    scummvm/trunk/engines/sword25/gfx/animationtemplate.cpp
    scummvm/trunk/engines/sword25/gfx/animationtemplate.h
    scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp
    scummvm/trunk/engines/sword25/gfx/bitmap.h
    scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp
    scummvm/trunk/engines/sword25/gfx/dynamicbitmap.h
    scummvm/trunk/engines/sword25/gfx/fontresource.cpp
    scummvm/trunk/engines/sword25/gfx/fontresource.h
    scummvm/trunk/engines/sword25/gfx/graphicengine.cpp
    scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
    scummvm/trunk/engines/sword25/gfx/image/image.h
    scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp
    scummvm/trunk/engines/sword25/gfx/image/vectorimage.h
    scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.cpp
    scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.h
    scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp
    scummvm/trunk/engines/sword25/gfx/opengl/glimage.h
    scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp
    scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.h
    scummvm/trunk/engines/sword25/gfx/opengl/swimage.cpp
    scummvm/trunk/engines/sword25/gfx/opengl/swimage.h
    scummvm/trunk/engines/sword25/gfx/renderobjectmanager.h
    scummvm/trunk/engines/sword25/gfx/screenshot.h
    scummvm/trunk/engines/sword25/gfx/staticbitmap.cpp
    scummvm/trunk/engines/sword25/gfx/staticbitmap.h
    scummvm/trunk/engines/sword25/gfx/text.cpp
    scummvm/trunk/engines/sword25/gfx/text.h
    scummvm/trunk/engines/sword25/module.mk

Modified: scummvm/trunk/engines/sword25/gfx/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animation.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/animation.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -155,7 +155,7 @@
 	}
 
 	// Delete Callbacks
-	std::vector<ANIMATION_CALLBACK_DATA>::iterator it = m_DeleteCallbacks.begin();
+	Common::Array<ANIMATION_CALLBACK_DATA>::iterator it = m_DeleteCallbacks.begin();
 	for (; it != m_DeleteCallbacks.end(); it++) ((*it).Callback)((*it).Data);
 
 }
@@ -298,7 +298,7 @@
 		if (TmpCurFrame < 0)
 		{
 			// Loop-Point Callbacks
-			std::vector<ANIMATION_CALLBACK_DATA>::iterator it = m_LoopPointCallbacks.begin();
+			Common::Array<ANIMATION_CALLBACK_DATA>::iterator it = m_LoopPointCallbacks.begin();
 			while (it != m_LoopPointCallbacks.end())
 			{
 				if (((*it).Callback)((*it).Data) == false)
@@ -317,7 +317,7 @@
 		else if (static_cast<unsigned int>(TmpCurFrame) >= animationDescriptionPtr->GetFrameCount())
 		{
 			// Loop-Point Callbacks
-			std::vector<ANIMATION_CALLBACK_DATA>::iterator it = m_LoopPointCallbacks.begin();
+			Common::Array<ANIMATION_CALLBACK_DATA>::iterator it = m_LoopPointCallbacks.begin();
 			while (it != m_LoopPointCallbacks.end())
 			{
 				if (((*it).Callback)((*it).Data) == false)
@@ -355,7 +355,7 @@
 			if (animationDescriptionPtr->GetFrame(m_CurrentFrame).Action != "")
 			{
 				// Action Callbacks
-				std::vector<ANIMATION_CALLBACK_DATA>::iterator it = m_ActionCallbacks.begin();
+				Common::Array<ANIMATION_CALLBACK_DATA>::iterator it = m_ActionCallbacks.begin();
 				while (it != m_ActionCallbacks.end())
 				{
 					if (((*it).Callback)((*it).Data) == false)
@@ -744,13 +744,13 @@
 // Persistenz
 // -----------------------------------------------------------------------------
 
-void BS_Animation::PersistCallbackVector(BS_OutputPersistenceBlock & Writer, const std::vector<ANIMATION_CALLBACK_DATA> & Vector)
+void BS_Animation::PersistCallbackVector(BS_OutputPersistenceBlock & Writer, const Common::Array<ANIMATION_CALLBACK_DATA> & Vector)
 {
 	// Anzahl an Callbacks persistieren.
 	Writer.Write(Vector.size());
 	
 	// Alle Callbacks einzeln persistieren.
-	std::vector<ANIMATION_CALLBACK_DATA>::const_iterator It = Vector.begin();
+	Common::Array<ANIMATION_CALLBACK_DATA>::const_iterator It = Vector.begin();
 	while (It != Vector.end())
 	{
 		Writer.Write(BS_CallbackRegistry::GetInstance().ResolveCallbackPointer(It->Callback));
@@ -762,7 +762,7 @@
 
 // -----------------------------------------------------------------------------
 
-void BS_Animation::UnpersistCallbackVector(BS_InputPersistenceBlock & Reader, std::vector<ANIMATION_CALLBACK_DATA> & Vector)
+void BS_Animation::UnpersistCallbackVector(BS_InputPersistenceBlock & Reader, Common::Array<ANIMATION_CALLBACK_DATA> & Vector)
 {
 	// Callbackvector leeren.
 	Vector.resize(0);

Modified: scummvm/trunk/engines/sword25/gfx/animation.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animation.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/animation.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -183,9 +183,9 @@
 		ANIMATION_CALLBACK	Callback;
 		unsigned int		Data;
 	};
-	std::vector<ANIMATION_CALLBACK_DATA> m_LoopPointCallbacks;
-	std::vector<ANIMATION_CALLBACK_DATA> m_ActionCallbacks;
-	std::vector<ANIMATION_CALLBACK_DATA> m_DeleteCallbacks;
+	Common::Array<ANIMATION_CALLBACK_DATA> m_LoopPointCallbacks;
+	Common::Array<ANIMATION_CALLBACK_DATA> m_ActionCallbacks;
+	Common::Array<ANIMATION_CALLBACK_DATA> m_DeleteCallbacks;
 
 	/**
 		@brief Lockt alle Frames.
@@ -217,8 +217,8 @@
 	int ComputeYModifier() const;
 
 	void InitMembers();
-	void PersistCallbackVector(BS_OutputPersistenceBlock & Writer, const std::vector<ANIMATION_CALLBACK_DATA> & Vector);
-	void UnpersistCallbackVector(BS_InputPersistenceBlock & Reader, std::vector<ANIMATION_CALLBACK_DATA> & Vector);
+	void PersistCallbackVector(BS_OutputPersistenceBlock & Writer, const Common::Array<ANIMATION_CALLBACK_DATA> & Vector);
+	void UnpersistCallbackVector(BS_InputPersistenceBlock & Reader, Common::Array<ANIMATION_CALLBACK_DATA> & Vector);
 	BS_AnimationDescription * GetAnimationDescription() const;
 	void InitializeAnimationResource(const Common::String &FileName);
 };

Modified: scummvm/trunk/engines/sword25/gfx/animationresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationresource.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/animationresource.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -85,13 +85,15 @@
 			BS_LOG_ERRORLN("Could not read \"%s\".", GetFileName().c_str());
 			return;
 		}
-		std::vector<char> WorkBuffer(FileSize + 1);
+		char *WorkBuffer;
+		WorkBuffer = (char *)malloc(FileSize + 1);
 		memcpy(&WorkBuffer[0], LoadBuffer, FileSize);
 		delete LoadBuffer;
 		WorkBuffer[FileSize] = '\0';
 
 		// Datei parsen
 		Doc.Parse(&WorkBuffer[0]);
+		free(WorkBuffer);
 		if (Doc.Error())
 		{
 			BS_LOG_ERRORLN("The following TinyXML-Error occured while parsing \"%s\": %s", GetFileName().c_str(), Doc.ErrorDesc());
@@ -123,10 +125,8 @@
 
 	// In das Verzeichnis der Eingabedatei wechseln, da die Dateiverweise innerhalb der XML-Datei relativ zu diesem Verzeichnis sind.
 	Common::String OldDirectory = PackagePtr->GetCurrentDirectory();
-	int LastSlash = GetFileName().rfind('/');
-	if (LastSlash != Common::String::npos)
-	{
-		Common::String Dir = GetFileName().substr(0, LastSlash);
+	if (GetFileName().contains('/')) {
+		Common::String Dir = Common::String(GetFileName().c_str(), strrchr(GetFileName().c_str(), '/'));
 		PackagePtr->ChangeDirectory(Dir);
 	}
 
@@ -214,7 +214,7 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_AnimationResource::ParseFrameTag(TiXmlElement& FrameTag, Frame& Frame, BS_PackageManager& PackageManager)
+bool BS_AnimationResource::ParseFrameTag(TiXmlElement& FrameTag, Frame& Frame_, BS_PackageManager& PackageManager)
 {
 	const char* FileString = FrameTag.Attribute("file");
 	if (!FileString)
@@ -222,8 +222,8 @@
 		BS_LOG_ERRORLN("<frame> tag without file attribute occurred in \"%s\".", GetFileName().c_str());
 		return false;
 	}
-	Frame.FileName = PackageManager.GetAbsolutePath(FileString);
-	if (Frame.FileName == "")
+	Frame_.FileName = PackageManager.GetAbsolutePath(FileString);
+	if (Frame_.FileName == "")
 	{
 		BS_LOG_ERRORLN("Could not create absolute path for file specified in <frame> tag in \"%s\": \"%s\".", GetFileName().c_str(), FileString);
 		return false;
@@ -231,7 +231,7 @@
 
 	const char* ActionString = FrameTag.Attribute("action");
 	if (ActionString)
-		Frame.Action = ActionString;
+		Frame_.Action = ActionString;
 
 	const char* HotspotxString = FrameTag.Attribute("hotspotx");
 	const char* HotspotyString = FrameTag.Attribute("hotspoty");
@@ -242,41 +242,41 @@
 						 !HotspotyString ? "hotspoty" : "hotspotx",
 						 GetFileName().c_str());
 
-	Frame.HotspotX = 0;
-	if (HotspotxString && !BS_String::ToInt(Common::String(HotspotxString), Frame.HotspotX))
+	Frame_.HotspotX = 0;
+	if (HotspotxString && !BS_String::ToInt(Common::String(HotspotxString), Frame_.HotspotX))
 		BS_LOG_WARNINGLN("Illegal hotspotx value (\"%s\") in frame tag in \"%s\". Assuming default (\"%s\").",
-						 HotspotxString,GetFileName().c_str(), Frame.HotspotX);
+						 HotspotxString,GetFileName().c_str(), Frame_.HotspotX);
 
-	Frame.HotspotY = 0;
-	if (HotspotyString && !BS_String::ToInt(Common::String(HotspotyString), Frame.HotspotY))
+	Frame_.HotspotY = 0;
+	if (HotspotyString && !BS_String::ToInt(Common::String(HotspotyString), Frame_.HotspotY))
 		BS_LOG_WARNINGLN("Illegal hotspoty value (\"%s\") in frame tag in \"%s\". Assuming default (\"%s\").",
-						 HotspotyString, GetFileName().c_str(), Frame.HotspotY);
+						 HotspotyString, GetFileName().c_str(), Frame_.HotspotY);
 
 	const char* FlipVString = FrameTag.Attribute("flipv");
 	if (FlipVString)
 	{
-	if (!BS_String::ToBool(Common::String(FlipVString), Frame.FlipV))
+	if (!BS_String::ToBool(Common::String(FlipVString), Frame_.FlipV))
 		{
 			BS_LOG_WARNINGLN("Illegal flipv value (\"%s\") in <frame> tag in \"%s\". Assuming default (\"false\").",
 							 FlipVString, GetFileName().c_str());
-			Frame.FlipV = false;
+			Frame_.FlipV = false;
 		}
 	}
 	else
-		Frame.FlipV = false;
+		Frame_.FlipV = false;
 
 	const char* FlipHString = FrameTag.Attribute("fliph");
 	if (FlipHString)
 	{
-	if (!BS_String::ToBool(FlipHString, Frame.FlipH))
+	if (!BS_String::ToBool(FlipHString, Frame_.FlipH))
 		{
 			BS_LOG_WARNINGLN("Illegal fliph value (\"%s\") in <frame> tag in \"%s\". Assuming default (\"false\").",
 							 FlipHString, GetFileName().c_str());
-			Frame.FlipH = false;
+			Frame_.FlipH = false;
 		}
 	}
 	else
-		Frame.FlipH = false;
+		Frame_.FlipH = false;
 
 	return true;
 }
@@ -291,7 +291,7 @@
 
 bool BS_AnimationResource::PrecacheAllFrames() const
 {
-	std::vector<Frame>::const_iterator Iter = m_Frames.begin();
+	Common::Array<Frame>::const_iterator Iter = m_Frames.begin();
 	for (; Iter != m_Frames.end(); ++Iter)
 	{
 		if (!BS_Kernel::GetInstance()->GetResourceManager()->PrecacheResource((*Iter).FileName))
@@ -316,7 +316,7 @@
 	m_ColorModulationAllowed = true;
 
 	// Alle Frame durchgehen und alle Features deaktivieren, die auch nur von einem Frame nicht unterst\xFCtzt werden.
-	std::vector<Frame>::const_iterator Iter = m_Frames.begin();
+	Common::Array<Frame>::const_iterator Iter = m_Frames.begin();
 	for (; Iter != m_Frames.end(); ++Iter)
 	{
 		BS_BitmapResource* pBitmap;

Modified: scummvm/trunk/engines/sword25/gfx/animationresource.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationresource.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/animationresource.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -48,6 +48,8 @@
 #include <vector>
 #include "sword25/kernel/memlog_on.h"
 
+class TiXmlElement;
+
 namespace Sword25 {
 
 // -----------------------------------------------------------------------------
@@ -56,7 +58,6 @@
 
 class BS_Kernel;
 class BS_PackageManager;
-class TiXmlElement;
 
 // -----------------------------------------------------------------------------
 // Class Definition
@@ -83,7 +84,7 @@
 private:
 	bool							m_Valid;
 
-	std::vector<Frame>				m_Frames;
+	Common::Array<Frame>				m_Frames;
 
 	//@{
 	/** @name Dokument-Parser Methoden */

Modified: scummvm/trunk/engines/sword25/gfx/animationtemplate.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationtemplate.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/animationtemplate.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -253,7 +253,7 @@
 	Writer.Write(m_Frames.size());
 
 	// Frames einzeln persistieren.
-	std::vector<const Frame>::const_iterator Iter = m_Frames.begin();
+	Common::Array<const Frame>::const_iterator Iter = m_Frames.begin();
 	while (Iter != m_Frames.end())
 	{
 		Writer.Write(Iter->HotspotX);

Modified: scummvm/trunk/engines/sword25/gfx/animationtemplate.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationtemplate.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/animationtemplate.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -113,7 +113,7 @@
 	virtual bool Unpersist(BS_InputPersistenceBlock & Reader);
 
 private:
-	std::vector<const Frame>	m_Frames;
+	Common::Array<const Frame>	m_Frames;
 	BS_AnimationResource *		m_SourceAnimationPtr;
 	bool						m_Valid;
 

Modified: scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -32,8 +32,6 @@
  *
  */
 
-namespace Sword25 {
-
 // -----------------------------------------------------------------------------
 // Logging
 // -----------------------------------------------------------------------------
@@ -49,6 +47,8 @@
 #include "sword25/gfx/animationtemplateregistry.h"
 #include "sword25/gfx/animationtemplate.h"
 
+namespace Sword25 {
+
 // -----------------------------------------------------------------------------
 // Implementation
 // -----------------------------------------------------------------------------

Modified: scummvm/trunk/engines/sword25/gfx/bitmap.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/bitmap.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/bitmap.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -161,7 +161,7 @@
 		@return Gibt false zur\xFCck, falls der Aufruf fehlgeschlagen ist.
 		@remark Ein Aufruf dieser Methode ist nur erlaubt, wenn IsSetContentAllowed() true zur\xFCckgibt.
 	*/
-	virtual bool	SetContent(const std::vector<unsigned char> & Pixeldata, unsigned int Offset = 0, unsigned int Stride = 0) = 0;
+	virtual bool	SetContent(const byte *Pixeldata, unsigned int Offset = 0, unsigned int Stride = 0) = 0;
 
 	virtual bool	IsScalingAllowed() const = 0;
 	virtual bool	IsAlphaAllowed() const = 0;

Modified: scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -132,7 +132,7 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_DynamicBitmap::SetContent(const std::vector<unsigned char> & Pixeldata, unsigned int Offset, unsigned int Stride)
+bool BS_DynamicBitmap::SetContent(const byte *Pixeldata, unsigned int Offset, unsigned int Stride)
 {
 	return m_Image->SetContent(Pixeldata, Offset, Stride);
 }
@@ -199,8 +199,9 @@
 	BS_LOG_WARNINGLN("Unpersisting a BS_DynamicBitmap. Bitmap contents are missing.");
 
 	// Bild mit durchsichtigen Bilddaten initialisieren.
-	std::vector<unsigned char> TransparentImageData(m_Width * m_Height * 4);
+	byte *TransparentImageData = (byte *)calloc(m_Width * m_Height * 4, 1);
 	m_Image->SetContent(TransparentImageData);
+	free(TransparentImageData);
 
 	Result &= BS_RenderObject::UnpersistChildren(Reader);
 

Modified: scummvm/trunk/engines/sword25/gfx/dynamicbitmap.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/dynamicbitmap.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/dynamicbitmap.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -63,7 +63,7 @@
 
 	virtual unsigned int GetPixel(int X, int Y) const;
 
-	virtual bool	SetContent(const std::vector<unsigned char> & Pixeldata, unsigned int Offset, unsigned int Stride);
+	virtual bool	SetContent(const byte *Pixeldata, unsigned int Offset, unsigned int Stride);
 
 	virtual bool	IsScalingAllowed() const;
 	virtual bool	IsAlphaAllowed() const;

Modified: scummvm/trunk/engines/sword25/gfx/fontresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/fontresource.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/fontresource.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -166,7 +166,8 @@
 	}
 
 	// Daten kopieren und NULL-terminieren
-	std::vector<char> WorkBuffer(FileSize + 1);
+	char *WorkBuffer;
+	WorkBuffer = (char *)malloc(FileSize + 1);
 	memcpy(&WorkBuffer[0], LoadBuffer, FileSize);
 	delete LoadBuffer;
 	WorkBuffer[FileSize] = '\0';
@@ -174,6 +175,8 @@
 	// Daten parsen
 	Doc.Parse(&WorkBuffer[0]);
 
+	free(WorkBuffer);
+
 	return !Doc.Error();
 }
 
@@ -224,37 +227,40 @@
 		return false;
 	}
 
+	int tmp;
+
 	// Left Attribut auslesen
-	const char * LeftString = Tag.Attribute("left");
-	if (!LeftString || !BS_String::ToInt(Common::String(LeftString), Rect.left) || Rect.left < 0)
-	{
+	const char *LeftString = Tag.Attribute("left");
+	if (!LeftString || !BS_String::ToInt(Common::String(LeftString), tmp) || tmp < 0) {
 		BS_LOG_ERRORLN("Illegal or missing left attribute in <character> tag in \"%s\".", GetFileName().c_str());
 		return false;
 	}
+	Rect.left = tmp;
 
 	// Right Attribut auslesen
 	const char * RightString = Tag.Attribute("right");
-	if (!RightString || !BS_String::ToInt(RightString, Rect.right) || Rect.right < 0)
-	{
+	if (!RightString || !BS_String::ToInt(RightString, tmp) || tmp < 0) {
 		BS_LOG_ERRORLN("Illegal or missing right attribute in <character> tag in \"%s\".", GetFileName().c_str());
 		return false;
 	}
+	Rect.right = tmp;
 
 	// Top Attribut auslesen
 	const char * TopString = Tag.Attribute("top");
-	if (!TopString || !BS_String::ToInt(TopString, Rect.top) || Rect.top < 0)
-	{
+	if (!TopString || !BS_String::ToInt(TopString, tmp) || tmp < 0) {
 		BS_LOG_ERRORLN("Illegal or missing top attribute in <character> tag in \"%s\".", GetFileName().c_str());
 		return false;
 	}
+	Rect.top = tmp;
 
 	// Bottom Attribut auslesen
 	const char * BottomString = Tag.Attribute("bottom");
-	if (!BottomString || !BS_String::ToInt(BottomString, Rect.bottom) || Rect.bottom < 0)
+	if (!BottomString || !BS_String::ToInt(BottomString, tmp) || tmp < 0)
 	{
 		BS_LOG_ERRORLN("Illegal or missing bottom attribute in <character> tag in \"%s\".", GetFileName().c_str());
 		return false;
 	}
+	Rect.bottom = tmp;
 
 	return true;
 }

Modified: scummvm/trunk/engines/sword25/gfx/fontresource.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/fontresource.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/fontresource.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -43,6 +43,9 @@
 #include "sword25/kernel/resource.h"
 #include "sword25/math/rect.h"
 
+class TiXmlDocument;
+class TiXmlElement;
+
 namespace Sword25 {
 
 // -----------------------------------------------------------------------------
@@ -50,8 +53,6 @@
 // -----------------------------------------------------------------------------
 
 class BS_Kernel;
-class TiXmlDocument;
-class TiXmlElement;
 
 // -----------------------------------------------------------------------------
 // Klassendefinition

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -42,43 +42,39 @@
 #include "sword25/kernel/memlog_on.h"
 #include "sword25/kernel/inputpersistenceblock.h"
 #include "sword25/kernel/outputpersistenceblock.h"
+#include "sword25/gfx/graphicengine.h"
 
+namespace Lua {
 extern "C"
 {
 #include "sword25/util/lua/lua.h"
 #include "sword25/util/lua/lauxlib.h"
 }
 
+}
+
 namespace Sword25 {
 
 using namespace std;
+using namespace Lua;
 
-// -----------------------------------------------------------------------------
-// Constants
-// -----------------------------------------------------------------------------
-
 static const unsigned int FRAMETIME_SAMPLE_COUNT = 5;		// Anzahl der Framezeiten \xFCber die, die Framezeit gemittelt wird
 
-// Includes
-// -----------------------------------------------------------------------------
-
-#include "sword25/gfx/graphicengine.h"
-
-// -----------------------------------------------------------------------------
-
 BS_GraphicEngine::BS_GraphicEngine(BS_Kernel * pKernel) : 
 	m_Width(0),
 	m_Height(0),
 	m_BitDepth(0),
 	m_Windowed(0),
-	m_LastTimeStamp(9223372036854775807), // max. BS_INT64 um beim ersten Aufruf von _UpdateLastFrameDuration() einen Reset zu erzwingen
+	m_LastTimeStamp((uint64)-1), // max. BS_INT64 um beim ersten Aufruf von _UpdateLastFrameDuration() einen Reset zu erzwingen
 	m_LastFrameDuration(0),
 	m_TimerActive(true),
-	m_FrameTimeSamples(FRAMETIME_SAMPLE_COUNT, 0),
 	m_FrameTimeSampleSlot(0),
 	m_RepaintedPixels(0),
 	BS_ResourceService(pKernel)
 {
+	for (int i = 0; i < FRAMETIME_SAMPLE_COUNT; i++)
+		m_FrameTimeSamples[i] = 0;
+
 	if (!RegisterScriptBindings())
 		BS_LOG_ERRORLN("Script bindings could not be registered.");
 	else
@@ -99,7 +95,7 @@
 	m_FrameTimeSampleSlot = (m_FrameTimeSampleSlot + 1) % FRAMETIME_SAMPLE_COUNT;
 
 	// Die Framezeit wird \xFCber mehrere Frames gemittelt um Ausreisser zu eliminieren
-	std::vector<unsigned int>::const_iterator it = m_FrameTimeSamples.begin();
+	Common::Array<unsigned int>::const_iterator it = m_FrameTimeSamples.begin();
 	unsigned int Sum = *it;
 	for (it++; it != m_FrameTimeSamples.end(); it++) Sum += *it;
 	m_LastFrameDuration = Sum / FRAMETIME_SAMPLE_COUNT;
@@ -116,7 +112,7 @@
 	{
 		unsigned int Width;
 		unsigned int Height;
-		vector<unsigned int> Data;
+		Common::Array<unsigned int> Data;
 		if (!GraphicEngine.GetScreenshot(Width, Height, Data))
 		{
 			BS_LOG_ERRORLN("Call to GetScreenshot() failed. Cannot save screenshot.");

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -96,9 +96,9 @@
 	{
 		CallbackfunctionRegisterer()
 		{
-			BS_CallbackRegistry::GetInstance().RegisterCallbackFunction("LuaLoopPointCB", AnimationLoopPointCallback);
-			BS_CallbackRegistry::GetInstance().RegisterCallbackFunction("LuaActionCB", AnimationActionCallback);
-			BS_CallbackRegistry::GetInstance().RegisterCallbackFunction("LuaDeleteCB", AnimationDeleteCallback);
+			BS_CallbackRegistry::GetInstance().RegisterCallbackFunction("LuaLoopPointCB", (void (*)(int))AnimationLoopPointCallback);
+			BS_CallbackRegistry::GetInstance().RegisterCallbackFunction("LuaActionCB", (void (*)(int))AnimationActionCallback);
+			BS_CallbackRegistry::GetInstance().RegisterCallbackFunction("LuaDeleteCB", (void (*)(int))AnimationDeleteCallback);
 		}
 	};
 	static CallbackfunctionRegisterer Instance;
@@ -275,12 +275,12 @@
 
 static const luaL_reg ANIMATION_TEMPLATE_METHODS[] =
 {
-	"AddFrame", AT_AddFrame,
-	"SetFrame", AT_SetFrame,
-	"SetAnimationType", AT_SetAnimationType,
-	"SetFPS", AT_SetFPS,
-	"__gc", AT_Finalize,
-	0, 0,
+	{"AddFrame", AT_AddFrame},
+	{"SetFrame", AT_SetFrame},
+	{"SetAnimationType", AT_SetAnimationType},
+	{"SetFPS", AT_SetFPS},
+	{"__gc", AT_Finalize},
+	{0, 0}
 };
 
 // -----------------------------------------------------------------------------
@@ -546,26 +546,26 @@
 
 static const luaL_reg GFX_FUNCTIONS[] =
 {
-	"Init", Init,
-	"StartFrame", StartFrame,
-	"EndFrame", EndFrame,
-	"DrawDebugLine", DrawDebugLine,
-	"SetVsync", SetVsync,
-	"GetDisplayWidth", GetDisplayWidth,
-	"GetDisplayHeight", GetDisplayHeight,
-	"GetBitDepth", GetBitDepth,
-	"IsVsync", IsVsync,
-	"IsWindowed", IsWindowed,
-	"GetFPSCount", GetFPSCount,
-	"GetLastFrameDuration", GetLastFrameDuration,
-	"StopMainTimer", StopMainTimer,
-	"ResumeMainTimer", ResumeMainTimer,
-	"GetSecondaryFrameDuration", GetSecondaryFrameDuration,
-	"SaveScreenshot", SaveScreenshot,
-	"NewAnimationTemplate", NewAnimationTemplate,
-	"GetRepaintedPixels", GetRepaintedPixels,
-	"SaveThumbnailScreenshot", SaveThumbnailScreenshot,
-	0, 0,	
+	{"Init", Init},
+	{"StartFrame", StartFrame},
+	{"EndFrame", EndFrame},
+	{"DrawDebugLine", DrawDebugLine},
+	{"SetVsync", SetVsync},
+	{"GetDisplayWidth", GetDisplayWidth},
+	{"GetDisplayHeight", GetDisplayHeight},
+	{"GetBitDepth", GetBitDepth},
+	{"IsVsync", IsVsync},
+	{"IsWindowed", IsWindowed},
+	{"GetFPSCount", GetFPSCount},
+	{"GetLastFrameDuration", GetLastFrameDuration},
+	{"StopMainTimer", StopMainTimer},
+	{"ResumeMainTimer", ResumeMainTimer},
+	{"GetSecondaryFrameDuration", GetSecondaryFrameDuration},
+	{"SaveScreenshot", SaveScreenshot},
+	{"NewAnimationTemplate", NewAnimationTemplate},
+	{"GetRepaintedPixels", GetRepaintedPixels},
+	{"SaveThumbnailScreenshot", SaveThumbnailScreenshot},
+	{0, 0}
 };
 
 // -----------------------------------------------------------------------------
@@ -850,24 +850,24 @@
 
 static const luaL_reg RENDEROBJECT_METHODS[] =
 {
-	"AddAnimation", RO_AddAnimation,
-	"AddText", RO_AddText,
-	"AddBitmap", RO_AddBitmap,
-	"AddPanel", RO_AddPanel,
-	"SetPos", RO_SetPos,
-	"SetX", RO_SetX,
-	"SetY", RO_SetY,
-	"SetZ", RO_SetZ,
-	"SetVisible", RO_SetVisible,
-	"GetX", RO_GetX,
-	"GetY", RO_GetY,
-	"GetZ", RO_GetZ,
-	"GetAbsoluteX", RO_GetAbsoluteX,
-	"GetAbsoluteY", RO_GetAbsoluteY,
-	"GetWidth", RO_GetWidth,
-	"GetHeight", RO_GetHeight,
-	"IsVisible", RO_IsVisible,
-	0, 0,
+	{"AddAnimation", RO_AddAnimation},
+	{"AddText", RO_AddText},
+	{"AddBitmap", RO_AddBitmap},
+	{"AddPanel", RO_AddPanel},
+	{"SetPos", RO_SetPos},
+	{"SetX", RO_SetX},
+	{"SetY", RO_SetY},
+	{"SetZ", RO_SetZ},
+	{"SetVisible", RO_SetVisible},
+	{"GetX", RO_GetX},
+	{"GetY", RO_GetY},
+	{"GetZ", RO_GetZ},
+	{"GetAbsoluteX", RO_GetAbsoluteX},
+	{"GetAbsoluteY", RO_GetAbsoluteY},
+	{"GetWidth", RO_GetWidth},
+	{"GetHeight", RO_GetHeight},
+	{"IsVisible", RO_IsVisible},
+	{0, 0}
 };
 
 // -----------------------------------------------------------------------------
@@ -929,10 +929,10 @@
 
 static const luaL_reg PANEL_METHODS[] =
 {
-	"GetColor", P_GetColor,
-	"SetColor", P_SetColor,
-	"Remove", P_Remove,
-	0, 0,
+	{"GetColor", P_GetColor},
+	{"SetColor", P_SetColor},
+	{"Remove", P_Remove},
+	{0, 0}
 };
 
 // -----------------------------------------------------------------------------
@@ -1144,25 +1144,25 @@
 
 static const luaL_reg BITMAP_METHODS[] =
 {
-	"SetAlpha", B_SetAlpha,
-	"SetTintColor", B_SetTintColor,
-	"SetScaleFactor", B_SetScaleFactor,
-	"SetScaleFactorX", B_SetScaleFactorX,
-	"SetScaleFactorY", B_SetScaleFactorY,
-	"SetFlipH", B_SetFlipH,
-	"SetFlipV", B_SetFlipV,
-	"GetAlpha", B_GetAlpha,
-	"GetTintColor", B_GetTintColor,
-	"GetScaleFactorX", B_GetScaleFactorX,
-	"GetScaleFactorY", B_GetScaleFactorY,
-	"IsFlipH", B_IsFlipH,
-	"IsFlipV", B_IsFlipV,
-	"GetPixel", B_GetPixel,
-	"IsScalingAllowed", B_IsScalingAllowed,
-	"IsAlphaAllowed", B_IsAlphaAllowed,
-	"IsTintingAllowed", B_IsTintingAllowed,
-	"Remove", B_Remove,
-	0, 0,
+	{"SetAlpha", B_SetAlpha},
+	{"SetTintColor", B_SetTintColor},
+	{"SetScaleFactor", B_SetScaleFactor},
+	{"SetScaleFactorX", B_SetScaleFactorX},
+	{"SetScaleFactorY", B_SetScaleFactorY},
+	{"SetFlipH", B_SetFlipH},
+	{"SetFlipV", B_SetFlipV},
+	{"GetAlpha", B_GetAlpha},
+	{"GetTintColor", B_GetTintColor},
+	{"GetScaleFactorX", B_GetScaleFactorX},
+	{"GetScaleFactorY", B_GetScaleFactorY},
+	{"IsFlipH", B_IsFlipH},
+	{"IsFlipV", B_IsFlipV},
+	{"GetPixel", B_GetPixel},
+	{"IsScalingAllowed", B_IsScalingAllowed},
+	{"IsAlphaAllowed", B_IsAlphaAllowed},
+	{"IsTintingAllowed", B_IsTintingAllowed},
+	{"Remove", B_Remove},
+	{0, 0}
 };
 
 // -----------------------------------------------------------------------------
@@ -1507,32 +1507,32 @@
 
 static const luaL_reg ANIMATION_METHODS[] =
 {
-	"Play", A_Play,
-	"Pause", A_Pause,
-	"Stop", A_Stop,
-	"SetFrame", A_SetFrame,
-	"SetAlpha", A_SetAlpha,
-	"SetTintColor", A_SetTintColor,
-	"SetScaleFactor", A_SetScaleFactor,
-	"SetScaleFactorX", A_SetScaleFactorX,
-	"SetScaleFactorY", A_SetScaleFactorY,
-	"GetScaleFactorX", A_GetScaleFactorX,
-	"GetScaleFactorY", A_GetScaleFactorY,
-	"GetAnimationType", A_GetAnimationType,
-	"GetFPS", A_GetFPS,
-	"GetFrameCount", A_GetFrameCount,
-	"IsScalingAllowed", A_IsScalingAllowed,
-	"IsAlphaAllowed", A_IsAlphaAllowed,
-	"IsTintingAllowed", A_IsTintingAllowed,
-	"GetCurrentFrame", A_GetCurrentFrame,
-	"GetCurrentAction", A_GetCurrentAction,
-	"IsPlaying", A_IsPlaying,
-	"RegisterLoopPointCallback", A_RegisterLoopPointCallback,
-	"UnregisterLoopPointCallback", A_UnregisterLoopPointCallback,
-	"RegisterActionCallback", A_RegisterActionCallback,
-	"UnregisterActionCallback", A_UnregisterActionCallback,
-	"Remove", A_Remove,
-	0, 0,
+	{"Play", A_Play},
+	{"Pause", A_Pause},
+	{"Stop", A_Stop},
+	{"SetFrame", A_SetFrame},
+	{"SetAlpha", A_SetAlpha},
+	{"SetTintColor", A_SetTintColor},
+	{"SetScaleFactor", A_SetScaleFactor},
+	{"SetScaleFactorX", A_SetScaleFactorX},
+	{"SetScaleFactorY", A_SetScaleFactorY},
+	{"GetScaleFactorX", A_GetScaleFactorX},
+	{"GetScaleFactorY", A_GetScaleFactorY},
+	{"GetAnimationType", A_GetAnimationType},
+	{"GetFPS", A_GetFPS},
+	{"GetFrameCount", A_GetFrameCount},
+	{"IsScalingAllowed", A_IsScalingAllowed},
+	{"IsAlphaAllowed", A_IsAlphaAllowed},
+	{"IsTintingAllowed", A_IsTintingAllowed},
+	{"GetCurrentFrame", A_GetCurrentFrame},
+	{"GetCurrentAction", A_GetCurrentAction},
+	{"IsPlaying", A_IsPlaying},
+	{"RegisterLoopPointCallback", A_RegisterLoopPointCallback},
+	{"UnregisterLoopPointCallback", A_UnregisterLoopPointCallback},
+	{"RegisterActionCallback", A_RegisterActionCallback},
+	{"UnregisterActionCallback", A_UnregisterActionCallback},
+	{"Remove", A_Remove},
+	{0, 0}
 };
 
 // -----------------------------------------------------------------------------
@@ -1691,20 +1691,20 @@
 
 static const luaL_reg TEXT_METHODS[] =
 {
-	"SetFont", T_SetFont,
-	"SetText", T_SetText,
-	"SetAlpha", T_SetAlpha,
-	"SetColor", T_SetColor,
-	"SetAutoWrap", T_SetAutoWrap,
-	"SetAutoWrapThreshold", T_SetAutoWrapThreshold,
-	"GetText", T_GetText,
-	"GetFont", T_GetFont,
-	"GetAlpha", T_GetAlpha,
-	"GetColor", T_GetColor,
-	"IsAutoWrap", T_IsAutoWrap,
-	"GetAutoWrapThreshold", T_GetAutoWrapThreshold,
-	"Remove", T_Remove,
-	0, 0,
+	{"SetFont", T_SetFont},
+	{"SetText", T_SetText},
+	{"SetAlpha", T_SetAlpha},
+	{"SetColor", T_SetColor},
+	{"SetAutoWrap", T_SetAutoWrap},
+	{"SetAutoWrapThreshold", T_SetAutoWrapThreshold},
+	{"GetText", T_GetText},
+	{"GetFont", T_GetFont},
+	{"GetAlpha", T_GetAlpha},
+	{"GetColor", T_GetColor},
+	{"IsAutoWrap", T_IsAutoWrap},
+	{"GetAutoWrapThreshold", T_GetAutoWrapThreshold},
+	{"Remove", T_Remove},
+	{0, 0}
 };
 
 // -----------------------------------------------------------------------------

Modified: scummvm/trunk/engines/sword25/gfx/image/image.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/image.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/image/image.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -167,7 +167,7 @@
 		@return Gibt false zur\xFCck, falls der Aufruf fehlgeschlagen ist.
 		@remark Ein Aufruf dieser Methode ist nur erlaubt, wenn IsSetContentAllowed() true zur\xFCckgibt.
 	*/
-	virtual bool SetContent(const std::vector<unsigned char> & Pixeldata, unsigned int Offset, unsigned int Stride) = 0;
+	virtual bool SetContent(const byte *Pixeldata, unsigned int Offset, unsigned int Stride) = 0;
 
 	/**
 		@brief Liest einen Pixel des Bildes.

Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -581,7 +581,7 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_VectorImage::SetContent(const std::vector<unsigned char> & Pixeldata, unsigned int Offset, unsigned int Stride)
+bool BS_VectorImage::SetContent(const byte *Pixeldata, unsigned int Offset, unsigned int Stride)
 {
 	BS_LOG_ERRORLN("SetContent() is not supported.");
 	return 0;

Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimage.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimage.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimage.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -123,9 +123,9 @@
 	};
 
 	agg::path_storage				m_Paths;
-	std::vector<BS_VectorPathInfo>	m_PathInfos;
-	std::vector<LineStyleType>		m_LineStyles;
-	std::vector<agg::rgba8>			m_FillStyles;
+	Common::Array<BS_VectorPathInfo>	m_PathInfos;
+	Common::Array<LineStyleType>		m_LineStyles;
+	Common::Array<agg::rgba8>			m_FillStyles;
 	BS_Rect							m_BoundingBox;
 };
 
@@ -164,7 +164,7 @@
 	virtual bool IsAlphaAllowed() const { return true; }
 	virtual bool IsColorModulationAllowed() const { return true; }
 	virtual bool IsSetContentAllowed() const { return false; }
-	virtual bool SetContent(const std::vector<unsigned char> & Pixeldata, unsigned int Offset, unsigned int Stride);
+	virtual bool SetContent(const byte *Pixeldata, unsigned int Offset, unsigned int Stride);
 	virtual bool Blit(int PosX = 0, int PosY = 0,
 					  int Flipping = FLIP_NONE,
 					  BS_Rect* pPartRect = NULL,
@@ -177,7 +177,7 @@
 	bool ParseDefineShape(unsigned int ShapeType, SWFBitStream & bs);
 	bool ParseStyles(unsigned int ShapeType, SWFBitStream & bs, unsigned int & NumFillBits, unsigned int & NumLineBits);
 
-	std::vector<BS_VectorImageElement>	m_Elements;
+	Common::Array<BS_VectorImageElement>	m_Elements;
 	BS_Rect								m_BoundingBox;
 };
 

Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -132,7 +132,7 @@
 bool BS_VectorImageRenderer::Render(const BS_VectorImage & VectorImage,
 									float ScaleFactorX, float ScaleFactorY,
 									unsigned int & Width, unsigned int & Height,
-									std::vector<char> & ImageData,
+									Common::Array<char> & ImageData,
 									float LineScaleFactor,
 									bool NoAlphaShapes)
 {

Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -69,7 +69,7 @@
 	bool Render(const BS_VectorImage & VectorImage,
 				float ScaleFactorX, float ScaleFactorY, 
 				unsigned int & Width, unsigned int & Height,
-				std::vector<char> & ImageData,
+				Common::Array<char> & ImageData,
 				float LineScaleFactor = 1.0f,
 				bool NoAlphaShapes = false);
 

Modified: scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -50,7 +50,7 @@
 // CONSTRUCTION / DESTRUCTION
 // -----------------------------------------------------------------------------
 
-BS_GLImage::BS_GLImage(const std::string & Filename, bool & Result) :
+BS_GLImage::BS_GLImage(const Common::String & Filename, bool & Result) :
 	m_Sprite(0),
 	m_Width(0),
 	m_Height(0)
@@ -148,7 +148,7 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_GLImage::SetContent(const std::vector<unsigned char> & Pixeldata, unsigned int Offset, unsigned int Stride)
+bool BS_GLImage::SetContent(const byte *Pixeldata, unsigned int Offset, unsigned int Stride)
 {
 	// \xDCberpr\xFCfen, ob PixelData ausreichend viele Pixel enth\xE4lt um ein Bild der Gr\xF6\xDFe Width * Height zu erzeugen
 	if (Pixeldata.size() < static_cast<unsigned int>(m_Width * m_Height * 4))

Modified: scummvm/trunk/engines/sword25/gfx/opengl/glimage.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/glimage.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/opengl/glimage.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -60,7 +60,7 @@
 class BS_GLImage : public BS_Image
 {
 public:
-	BS_GLImage(const std::string & Filename, bool & Result);
+	BS_GLImage(const Common::String & Filename, bool & Result);
 
 	/**
 		@brief Erzeugt ein leeres BS_GLImage
@@ -83,7 +83,7 @@
 					  unsigned int Color = BS_ARGB(255, 255, 255, 255),
 					  int Width = -1, int Height = -1);
 	virtual bool Fill(const BS_Rect* pFillRect, unsigned int Color);
-	virtual bool SetContent(const std::vector<unsigned char> & Pixeldata, unsigned int Offset = 0, unsigned int Stride = 0);
+	virtual bool SetContent(const byte *Pixeldata, unsigned int Offset = 0, unsigned int Stride = 0);
 	virtual unsigned int GetPixel(int X, int Y);
 
 	virtual bool IsBlitSource() const				{ return true; }

Modified: scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -72,12 +72,12 @@
 {
 	const unsigned int BIT_DEPTH = 32;
 	const unsigned int BACKBUFFER_COUNT = 1;
-	const std::string PNG_EXTENSION(".png");
-	const std::string PNG_S_EXTENSION("_s.png");
-	const std::string ANI_EXTENSION("_ani.xml");
-	const std::string FNT_EXTENSION("_fnt.xml");
-	const std::string SWF_EXTENSION(".swf");
-	const std::string B25S_EXTENSION(".b25s");
+	const Common::String PNG_EXTENSION(".png");
+	const Common::String PNG_S_EXTENSION("_s.png");
+	const Common::String ANI_EXTENSION("_ani.xml");
+	const Common::String FNT_EXTENSION("_fnt.xml");
+	const Common::String SWF_EXTENSION(".swf");
+	const Common::String B25S_EXTENSION(".b25s");
 }
 
 
@@ -195,7 +195,7 @@
 		glEnable(GL_LINE_SMOOTH);
 		glBegin(GL_LINES);
 
-		std::vector<DebugLine>::const_iterator iter = m_DebugLines.begin();
+		Common::Array<DebugLine>::const_iterator iter = m_DebugLines.begin();
 		for (; iter != m_DebugLines.end(); ++iter)
 		{
 			const unsigned int & Color = (*iter).Color;
@@ -303,7 +303,7 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_OpenGLGfx::ReadFramebufferContents(unsigned int Width, unsigned int Height, std::vector<unsigned int> & Data)
+bool BS_OpenGLGfx::ReadFramebufferContents(unsigned int Width, unsigned int Height, Common::Array<unsigned int> & Data)
 {
 	Data.resize(Width * Height);
 	glReadPixels(0, 0, Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, &Data[0]);
@@ -350,17 +350,17 @@
 // RESOURCE MANAGING
 // -----------------------------------------------------------------------------
 
-static bool DoesStringEndWith(const std::string & String, const std::string & OtherString)
+static bool DoesStringEndWith(const Common::String & String, const std::string & OtherString)
 {
-	std::string::size_type StringPos = String.rfind(OtherString);
-	if (StringPos == std::string::npos) return false;
+	Common::String::size_type StringPos = String.rfind(OtherString);
+	if (StringPos == Common::String::npos) return false;
 
 	return StringPos + OtherString.size() == String.size();
 }
 
 // -----------------------------------------------------------------------------
 
-BS_Resource * BS_OpenGLGfx::LoadResource(const std::string& FileName)
+BS_Resource * BS_OpenGLGfx::LoadResource(const Common::String& FileName)
 {
 	BS_ASSERT(CanLoadResource(FileName));
 
@@ -476,7 +476,7 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_OpenGLGfx::CanLoadResource(const std::string& FileName)
+bool BS_OpenGLGfx::CanLoadResource(const Common::String& FileName)
 {
 	return DoesStringEndWith(FileName, PNG_EXTENSION) ||
 		   DoesStringEndWith(FileName, ANI_EXTENSION) ||

Modified: scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -85,12 +85,12 @@
 	virtual bool		GetVsync() const;
 
 	virtual bool		Fill(const BS_Rect* FillRectPtr = 0, unsigned int Color = BS_RGB(0, 0, 0));
-	virtual bool		GetScreenshot(unsigned int & Width, unsigned int & Height, std::vector<unsigned int> & Data);
+	virtual bool		GetScreenshot(unsigned int & Width, unsigned int & Height, Common::Array<unsigned int> & Data);
 
 	// Resource-Managing Methoden
 	// --------------------------
-	virtual BS_Resource*	LoadResource(const std::string& FileName);
-	virtual bool			CanLoadResource(const std::string& FileName);
+	virtual BS_Resource*	LoadResource(const Common::String& FileName);
+	virtual bool			CanLoadResource(const Common::String& FileName);
 
 	// Debugging Methoden
 	// ------------------
@@ -121,11 +121,11 @@
 		unsigned int	Color;
 	};
 
-	std::vector<DebugLine> m_DebugLines;
+	Common::Array<DebugLine> m_DebugLines;
 
-	static bool ReadFramebufferContents(unsigned int Width, unsigned int Height, std::vector<unsigned int> & Data);
-	static void ReverseRGBAComponentOrder(std::vector<unsigned int> & Data);
-	static void FlipImagedataVertical(unsigned int Width, unsigned int Height, std::vector<unsigned int> & Data);
+	static bool ReadFramebufferContents(unsigned int Width, unsigned int Height, Common::Array<unsigned int> & Data);
+	static void ReverseRGBAComponentOrder(Common::Array<unsigned int> & Data);
+	static void FlipImagedataVertical(unsigned int Width, unsigned int Height, Common::Array<unsigned int> & Data);
 };
 
 } // End of namespace Sword25

Modified: scummvm/trunk/engines/sword25/gfx/opengl/swimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/swimage.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/opengl/swimage.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -50,7 +50,7 @@
 // CONSTRUCTION / DESTRUCTION
 // -----------------------------------------------------------------------------
 
-BS_SWImage::BS_SWImage(const std::string & Filename, bool & Result) :
+BS_SWImage::BS_SWImage(const Common::String & Filename, bool & Result) :
 	_ImageDataPtr(0),
 	m_Width(0),
 	m_Height(0)
@@ -125,7 +125,7 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_SWImage::SetContent(const std::vector<unsigned char> & Pixeldata, unsigned int Offset, unsigned int Stride)
+bool BS_SWImage::SetContent(const byte *Pixeldata, unsigned int Offset, unsigned int Stride)
 {
 	BS_LOG_ERRORLN("SetContent() is not supported.");
 	return false;

Modified: scummvm/trunk/engines/sword25/gfx/opengl/swimage.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/swimage.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/opengl/swimage.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -53,7 +53,7 @@
 class BS_SWImage : public BS_Image
 {
 public:
-	BS_SWImage(const std::string & Filename, bool & Result);
+	BS_SWImage(const Common::String & Filename, bool & Result);
 	virtual ~BS_SWImage();
 
 	virtual int GetWidth() const { return m_Width; }
@@ -66,7 +66,7 @@
 					  unsigned int Color = BS_ARGB(255, 255, 255, 255),
 					  int Width = -1, int Height = -1);
 	virtual bool Fill(const BS_Rect* FillRectPtr, unsigned int Color);
-	virtual bool SetContent(const std::vector<unsigned char> & Pixeldata, unsigned int Offset, unsigned int Stride);
+	virtual bool SetContent(const byte *Pixeldata, unsigned int Offset, unsigned int Stride);
 	virtual unsigned int GetPixel(int X, int Y);
 
 	virtual bool IsBlitSource() const				{ return false; }

Modified: scummvm/trunk/engines/sword25/gfx/renderobjectmanager.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/renderobjectmanager.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/renderobjectmanager.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -119,7 +119,7 @@
 
 private:
 	bool m_FrameStarted;
-	typedef std::vector<BS_RenderObjectPtr<BS_TimedRenderObject> > RenderObjectList;
+	typedef Common::Array<BS_RenderObjectPtr<BS_TimedRenderObject> > RenderObjectList;
 	RenderObjectList m_TimedRenderObjects;
 
 	// RenderObject-Tree Variablen

Modified: scummvm/trunk/engines/sword25/gfx/screenshot.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/screenshot.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/screenshot.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -54,8 +54,8 @@
 class BS_Screenshot
 {
 public:
-	static bool SaveToFile(unsigned int Width, unsigned int Height, const std::vector<unsigned int> & Data, const Common::String & Filename);
-	static bool SaveThumbnailToFile(unsigned int Width, unsigned int Height, const std::vector<unsigned int> & Data, const Common::String & Filename);
+	static bool SaveToFile(unsigned int Width, unsigned int Height, const Common::Array<unsigned int> & Data, const Common::String & Filename);
+	static bool SaveThumbnailToFile(unsigned int Width, unsigned int Height, const Common::Array<unsigned int> & Data, const Common::String & Filename);
 };
 
 } // End of namespace Sword25

Modified: scummvm/trunk/engines/sword25/gfx/staticbitmap.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/staticbitmap.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/staticbitmap.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -163,7 +163,7 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_StaticBitmap::SetContent(const std::vector<unsigned char> & Pixeldata, unsigned int Offset, unsigned int Stride)
+bool BS_StaticBitmap::SetContent(const byte *Pixeldata, unsigned int Offset, unsigned int Stride)
 {
 	BS_LOG_ERRORLN("SetContent() ist not supported with this object.");
 	return false;

Modified: scummvm/trunk/engines/sword25/gfx/staticbitmap.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/staticbitmap.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/staticbitmap.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -64,7 +64,7 @@
 
 	virtual unsigned int GetPixel(int X, int Y) const;
 
-	virtual bool	SetContent(const std::vector<unsigned char> & Pixeldata, unsigned int Offset, unsigned int Stride);
+	virtual bool	SetContent(const byte *Pixeldata, unsigned int Offset, unsigned int Stride);
 
 	virtual bool	IsScalingAllowed() const;
 	virtual bool	IsAlphaAllowed() const;

Modified: scummvm/trunk/engines/sword25/gfx/text.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/text.cpp	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/text.cpp	2010-10-12 22:30:57 UTC (rev 53219)
@@ -192,7 +192,7 @@
 	BS_ASSERT(GfxPtr);
 
 	bool Result = true;
-	std::vector<LINE>::iterator Iter = m_Lines.begin();
+	Common::Array<LINE>::iterator Iter = m_Lines.begin();
 	for (; Iter != m_Lines.end(); ++Iter)
 	{
 		// Feststellen, ob \xFCberhaupt Buchstaben der aktuellen Zeile vom Update betroffen sind.
@@ -328,7 +328,7 @@
 
 		// Bounding-Box der einzelnen Zeilen relativ zur ersten festlegen (vor allem zentrieren).
 		m_Height = 0;
-		std::vector<LINE>::iterator Iter = m_Lines.begin();
+		Common::Array<LINE>::iterator Iter = m_Lines.begin();
 		for (; Iter != m_Lines.end(); ++Iter)
 		{
 			BS_Rect & BBox = (*Iter).BBox;

Modified: scummvm/trunk/engines/sword25/gfx/text.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/text.h	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/gfx/text.h	2010-10-12 22:30:57 UTC (rev 53219)
@@ -162,7 +162,7 @@
 		Common::String	Text;
 	};
 
-	std::vector<LINE>	m_Lines;
+	Common::Array<LINE>	m_Lines;
 
 	void UpdateFormat();
 	void UpdateMetrics(BS_FontResource & FontResource);

Modified: scummvm/trunk/engines/sword25/module.mk
===================================================================
--- scummvm/trunk/engines/sword25/module.mk	2010-10-12 22:29:37 UTC (rev 53218)
+++ scummvm/trunk/engines/sword25/module.mk	2010-10-12 22:30:57 UTC (rev 53219)
@@ -18,6 +18,15 @@
 	gfx/framecounter.o \
 	gfx/graphicengine.o \
 	gfx/graphicengine_script.o \
+	gfx/panel.o \
+	gfx/renderobject.o \
+	gfx/renderobjectmanager.o \
+	gfx/renderobjectptr.o \
+	gfx/renderobjectregistry.o \
+	gfx/screenshot.o \
+	gfx/staticbitmap.o \
+	gfx/text.o \
+	gfx/timedrenderobject.o \
 	gfx/image/b25sloader.o \
 	gfx/image/imageloader.o \
 	gfx/image/pngloader.o \
@@ -27,15 +36,6 @@
 	gfx/opengl/glvectorimageblit.o \
 	gfx/opengl/openglgfx.o \
 	gfx/opengl/swimage.o \
-	gfx/panel.o \
-	gfx/renderobject.o \
-	gfx/renderobjectmanager.o \
-	gfx/renderobjectptr.o \
-	gfx/renderobjectregistry.o \
-	gfx/screenshot.o \
-	gfx/staticbitmap.o \
-	gfx/text.o \
-	gfx/timedrenderobject.o \
 	input/inputengine.o \
 	input/inputengine_script.o \
 	input/stdwininput.o \


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list