diff options
author | Eugene Sandulenko | 2010-08-18 12:58:45 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 23:07:29 +0000 |
commit | 3fb0e9383b7da395d2d715c6f1abeb0252cac229 (patch) | |
tree | 48c0b3fdda51cb1cea6b55232d3262dabff17cd2 /engines/sword25/gfx | |
parent | b01994a53bbc96da907a4c28934e644184291017 (diff) | |
download | scummvm-rg350-3fb0e9383b7da395d2d715c6f1abeb0252cac229.tar.gz scummvm-rg350-3fb0e9383b7da395d2d715c6f1abeb0252cac229.tar.bz2 scummvm-rg350-3fb0e9383b7da395d2d715c6f1abeb0252cac229.zip |
SWORD25: Removed last traces of STL
svn-id: r53262
Diffstat (limited to 'engines/sword25/gfx')
24 files changed, 21 insertions, 88 deletions
diff --git a/engines/sword25/gfx/animation.cpp b/engines/sword25/gfx/animation.cpp index 71670a59c5..e996f42383 100644 --- a/engines/sword25/gfx/animation.cpp +++ b/engines/sword25/gfx/animation.cpp @@ -32,8 +32,6 @@ * */ -#include <memory> - #include "sword25/gfx/animation.h" #include "sword25/kernel/kernel.h" diff --git a/engines/sword25/gfx/animation.h b/engines/sword25/gfx/animation.h index cc09246f96..d9d97605fd 100644 --- a/engines/sword25/gfx/animation.h +++ b/engines/sword25/gfx/animation.h @@ -39,10 +39,6 @@ #include "sword25/kernel/common.h" #include "sword25/gfx/timedrenderobject.h" -#include "sword25/kernel/memlog_off.h" -#include <vector> -#include "sword25/kernel/memlog_on.h" - namespace Sword25 { // Forward declarations diff --git a/engines/sword25/gfx/animationresource.h b/engines/sword25/gfx/animationresource.h index 8e1c36ef0f..2bc052c39c 100644 --- a/engines/sword25/gfx/animationresource.h +++ b/engines/sword25/gfx/animationresource.h @@ -44,10 +44,6 @@ #include "sword25/gfx/animationdescription.h" #include "sword25/gfx/animation.h" -#include "sword25/kernel/memlog_off.h" -#include <vector> -#include "sword25/kernel/memlog_on.h" - class TiXmlElement; namespace Sword25 { diff --git a/engines/sword25/gfx/animationtemplate.h b/engines/sword25/gfx/animationtemplate.h index 1a5e8813a9..6576aac7aa 100644 --- a/engines/sword25/gfx/animationtemplate.h +++ b/engines/sword25/gfx/animationtemplate.h @@ -43,10 +43,6 @@ #include "sword25/kernel/persistable.h" #include "sword25/gfx/animationdescription.h" -#include "sword25/kernel/memlog_off.h" -#include <vector> -#include "sword25/kernel/memlog_on.h" - namespace Sword25 { // ----------------------------------------------------------------------------- diff --git a/engines/sword25/gfx/animationtemplateregistry.cpp b/engines/sword25/gfx/animationtemplateregistry.cpp index ee0713d13a..ef47c51650 100644 --- a/engines/sword25/gfx/animationtemplateregistry.cpp +++ b/engines/sword25/gfx/animationtemplateregistry.cpp @@ -49,13 +49,7 @@ namespace Sword25 { -// ----------------------------------------------------------------------------- -// Implementation -// ----------------------------------------------------------------------------- - -std::auto_ptr<AnimationTemplateRegistry> AnimationTemplateRegistry::m_InstancePtr; - -// ----------------------------------------------------------------------------- +Common::ScopedPtr<AnimationTemplateRegistry> AnimationTemplateRegistry::m_InstancePtr; void AnimationTemplateRegistry::LogErrorLn(const char *Message) const { BS_LOG_ERRORLN(Message); diff --git a/engines/sword25/gfx/animationtemplateregistry.h b/engines/sword25/gfx/animationtemplateregistry.h index 0aaa0d3728..b4bdeff5ab 100644 --- a/engines/sword25/gfx/animationtemplateregistry.h +++ b/engines/sword25/gfx/animationtemplateregistry.h @@ -43,9 +43,7 @@ #include "sword25/kernel/persistable.h" #include "sword25/kernel/objectregistry.h" -#include "sword25/kernel/memlog_off.h" -#include <memory> -#include "sword25/kernel/memlog_on.h" +#include "common/ptr.h" namespace Sword25 { @@ -73,7 +71,7 @@ private: virtual void LogErrorLn(const char *Message) const; virtual void LogWarningLn(const char *Message) const; - static std::auto_ptr<AnimationTemplateRegistry> m_InstancePtr; + static Common::ScopedPtr<AnimationTemplateRegistry> m_InstancePtr; }; } // End of namespace Sword25 diff --git a/engines/sword25/gfx/bitmapresource.cpp b/engines/sword25/gfx/bitmapresource.cpp index 0db6110fad..299642af22 100644 --- a/engines/sword25/gfx/bitmapresource.cpp +++ b/engines/sword25/gfx/bitmapresource.cpp @@ -32,8 +32,6 @@ * */ -#include <memory> - #include "sword25/gfx/bitmapresource.h" #include "sword25/kernel/kernel.h" #include "sword25/gfx/graphicengine.h" diff --git a/engines/sword25/gfx/dynamicbitmap.cpp b/engines/sword25/gfx/dynamicbitmap.cpp index ad35b34962..a6ebf638c3 100644 --- a/engines/sword25/gfx/dynamicbitmap.cpp +++ b/engines/sword25/gfx/dynamicbitmap.cpp @@ -41,8 +41,6 @@ #include "sword25/package/packagemanager.h" #include "sword25/kernel/inputpersistenceblock.h" -#include <vector> - namespace Sword25 { // ----------------------------------------------------------------------------- diff --git a/engines/sword25/gfx/dynamicbitmap.h b/engines/sword25/gfx/dynamicbitmap.h index 76fa585c8a..a8b2d476a8 100644 --- a/engines/sword25/gfx/dynamicbitmap.h +++ b/engines/sword25/gfx/dynamicbitmap.h @@ -40,14 +40,12 @@ // Includes // ----------------------------------------------------------------------------- -#include "sword25/kernel/memlog_off.h" -#include <memory> -#include "sword25/kernel/memlog_on.h" - #include "sword25/kernel/common.h" #include "sword25/gfx/bitmap.h" #include "sword25/gfx/opengl/glimage.h" +#include "common/ptr.h" + namespace Sword25 { // ----------------------------------------------------------------------------- @@ -81,7 +79,7 @@ private: bool CreateGLImage(unsigned int Width, unsigned int Height); - std::auto_ptr<GLImage> m_Image; + Common::ScopedPtr<GLImage> m_Image; }; } // End of namespace Sword25 diff --git a/engines/sword25/gfx/fontresource.cpp b/engines/sword25/gfx/fontresource.cpp index a398c0a6d6..cdd6f886d3 100644 --- a/engines/sword25/gfx/fontresource.cpp +++ b/engines/sword25/gfx/fontresource.cpp @@ -38,8 +38,6 @@ // Includes // ----------------------------------------------------------------------------- -#include <memory> - #include "sword25/kernel/kernel.h" #include "sword25/kernel/string.h" #include "sword25/package/packagemanager.h" diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp index d51157e4ac..9aab74f820 100644 --- a/engines/sword25/gfx/graphicengine.cpp +++ b/engines/sword25/gfx/graphicengine.cpp @@ -36,10 +36,6 @@ #include "sword25/gfx/image/image.h" #include "sword25/gfx/screenshot.h" -#include "sword25/kernel/memlog_off.h" -#include <memory> -#include <vector> -#include "sword25/kernel/memlog_on.h" #include "sword25/kernel/inputpersistenceblock.h" #include "sword25/kernel/outputpersistenceblock.h" #include "sword25/gfx/graphicengine.h" diff --git a/engines/sword25/gfx/graphicengine_script.cpp b/engines/sword25/gfx/graphicengine_script.cpp index 67cbf31889..5c88ce8924 100644 --- a/engines/sword25/gfx/graphicengine_script.cpp +++ b/engines/sword25/gfx/graphicengine_script.cpp @@ -36,9 +36,6 @@ // Includes // ----------------------------------------------------------------------------- -#include <algorithm> -#include <string> - #include "sword25/kernel/common.h" #include "sword25/kernel/kernel.h" #include "sword25/kernel/callbackregistry.h" @@ -84,8 +81,8 @@ protected: } }; -std::auto_ptr<LuaCallback> LoopPointCallbackPtr; -std::auto_ptr<ActionCallback> ActionCallbackPtr; +Common::ScopedPtr<LuaCallback> LoopPointCallbackPtr; +Common::ScopedPtr<ActionCallback> ActionCallbackPtr; // ------------------------------------------------------------------------- diff --git a/engines/sword25/gfx/image/b25sloader.cpp b/engines/sword25/gfx/image/b25sloader.cpp index ea3266969c..38e70102b4 100644 --- a/engines/sword25/gfx/image/b25sloader.cpp +++ b/engines/sword25/gfx/image/b25sloader.cpp @@ -36,11 +36,6 @@ // Includes // ----------------------------------------------------------------------------- -#include <string> -#include <sstream> -#include <algorithm> -using namespace std; - #include "sword25/gfx/image/b25sloader.h" #include "sword25/gfx/image/pngloader.h" @@ -52,6 +47,7 @@ namespace Sword25 { namespace { unsigned int FindEmbeddedPNG(const char *FileDataPtr, unsigned int FileSize) { +#if 0 // Einen Stringstream mit dem Anfang der Datei intialisieren. 512 Byte sollten hierfür genügen. istringstream StringStream(string(FileDataPtr, FileDataPtr + min(static_cast<unsigned int>(512), FileSize))); @@ -66,6 +62,9 @@ unsigned int FindEmbeddedPNG(const char *FileDataPtr, unsigned int FileSize) { // Offset zum PNG innerhalb des Spielstandes berechnen und zurückgeben. return static_cast<unsigned int>(StringStream.tellg()) + CompressedGamedataSize + 1; } +#else + warning("STUB:FindEmbeddedPNG()"); +#endif return 0; } diff --git a/engines/sword25/gfx/image/image.h b/engines/sword25/gfx/image/image.h index 1b7b2f2694..dbf5a7f31d 100644 --- a/engines/sword25/gfx/image/image.h +++ b/engines/sword25/gfx/image/image.h @@ -43,9 +43,6 @@ #define SWORD25_IMAGE_H // Includes -#include "sword25/kernel/memlog_off.h" -#include <vector> -#include "sword25/kernel/memlog_on.h" #include "sword25/kernel/common.h" #include "sword25/math/rect.h" #include "sword25/gfx/graphicengine.h" diff --git a/engines/sword25/gfx/image/imageloader.cpp b/engines/sword25/gfx/image/imageloader.cpp index 450bd1b8fb..af16c5cb2f 100644 --- a/engines/sword25/gfx/image/imageloader.cpp +++ b/engines/sword25/gfx/image/imageloader.cpp @@ -40,7 +40,7 @@ namespace Sword25 { #define BS_LOG_PREFIX "IMAGELOADER" // Statische Elemente der Klasse BS_ImageLoader intialisieren. -std::list<ImageLoader *> ImageLoader::_ImageLoaderList; +Common::List<ImageLoader *> ImageLoader::_ImageLoaderList; bool ImageLoader::_ImageLoaderListInitialized = false; // Lade Methode @@ -113,7 +113,7 @@ void ImageLoader::_DeinitializeLoaderList() { ImageLoader *ImageLoader::_FindSuitableImageLoader(const char *pFileData, unsigned int FileSize) { // Alle BS_ImageLoader-Objekte durchgehen, bis eins gefunden wurde, dass das Bild laden kann - std::list<ImageLoader *>::iterator Iter = _ImageLoaderList.begin(); + Common::List<ImageLoader *>::iterator Iter = _ImageLoaderList.begin(); for (; Iter != _ImageLoaderList.end(); ++Iter) { // Falls ein geeigneter BS-ImageLoader gefunden wurde, wird er zurückgegeben. if ((*Iter)->IsCorrectImageFormat(pFileData, FileSize)) { diff --git a/engines/sword25/gfx/image/imageloader.h b/engines/sword25/gfx/image/imageloader.h index c626fc20a7..0ed896dba2 100644 --- a/engines/sword25/gfx/image/imageloader.h +++ b/engines/sword25/gfx/image/imageloader.h @@ -47,11 +47,6 @@ #include "sword25/kernel/common.h" #include "sword25/gfx/graphicengine.h" -// Die folgenden Header vertragen sich nicht mit der Memoryleak-Detection, daher wird sie kurzzeitig deaktiviert -#include "sword25/kernel/memlog_off.h" -#include <list> -#include "sword25/kernel/memlog_on.h" - namespace Sword25 { /** @@ -356,7 +351,7 @@ private: */ static ImageLoader *_FindSuitableImageLoader(const char *pFileData, unsigned int FileSize); - static std::list<ImageLoader *> _ImageLoaderList; // Die Liste aller BS_ImageLoader-Objekte + static Common::List<ImageLoader *> _ImageLoaderList; // Die Liste aller BS_ImageLoader-Objekte static bool _ImageLoaderListInitialized; // Gibt an, ob die Liste schon intialisiert wurde }; diff --git a/engines/sword25/gfx/image/vectorimage.h b/engines/sword25/gfx/image/vectorimage.h index 6fa98e57d1..b61db91581 100644 --- a/engines/sword25/gfx/image/vectorimage.h +++ b/engines/sword25/gfx/image/vectorimage.h @@ -44,7 +44,6 @@ #include "sword25/math/rect.h" #if 0 -#include <vector> #include "agg_path_storage.h" #endif diff --git a/engines/sword25/gfx/opengl/openglgfx.h b/engines/sword25/gfx/opengl/openglgfx.h index 5b480491c5..6615c540df 100644 --- a/engines/sword25/gfx/opengl/openglgfx.h +++ b/engines/sword25/gfx/opengl/openglgfx.h @@ -100,7 +100,7 @@ private: RenderObjectPtr<Panel> m_MainPanelPtr; - std::auto_ptr<RenderObjectManager> m_RenderObjectManagerPtr; + Common::ScopedPtr<RenderObjectManager> m_RenderObjectManagerPtr; struct DebugLine { DebugLine(const Vertex &_Start, const Vertex &_End, unsigned int _Color) : diff --git a/engines/sword25/gfx/renderobject.cpp b/engines/sword25/gfx/renderobject.cpp index e6b7e2eee9..3b9d3970d3 100644 --- a/engines/sword25/gfx/renderobject.cpp +++ b/engines/sword25/gfx/renderobject.cpp @@ -34,8 +34,6 @@ #include "sword25/gfx/renderobject.h" -#include <algorithm> - #include "sword25/kernel/outputpersistenceblock.h" #include "sword25/kernel/inputpersistenceblock.h" diff --git a/engines/sword25/gfx/renderobjectmanager.h b/engines/sword25/gfx/renderobjectmanager.h index 76bb4639ec..dd959b6826 100644 --- a/engines/sword25/gfx/renderobjectmanager.h +++ b/engines/sword25/gfx/renderobjectmanager.h @@ -46,10 +46,6 @@ #define SWORD25_RENDEROBJECTMANAGER_H // Includes -#include "sword25/kernel/memlog_off.h" -#include <vector> -#include "sword25/kernel/memlog_on.h" - #include "sword25/kernel/common.h" #include "sword25/gfx/renderobjectptr.h" #include "sword25/kernel/persistable.h" diff --git a/engines/sword25/gfx/renderobjectregistry.cpp b/engines/sword25/gfx/renderobjectregistry.cpp index 5082fe0e30..13ee59c455 100644 --- a/engines/sword25/gfx/renderobjectregistry.cpp +++ b/engines/sword25/gfx/renderobjectregistry.cpp @@ -38,6 +38,8 @@ #include "sword25/gfx/renderobjectregistry.h" +#include "common/ptr.h" + namespace Sword25 { // ----------------------------------------------------------------------------- @@ -46,13 +48,7 @@ namespace Sword25 { #define BS_LOG_PREFIX "RENDEROBJECTREGISTRY" -// ----------------------------------------------------------------------------- -// Implementation -// ----------------------------------------------------------------------------- - -std::auto_ptr<RenderObjectRegistry> RenderObjectRegistry::m_InstancePtr; - -// ----------------------------------------------------------------------------- +Common::ScopedPtr<RenderObjectRegistry> RenderObjectRegistry::m_InstancePtr; void RenderObjectRegistry::LogErrorLn(const char *Message) const { BS_LOG_ERRORLN(Message); diff --git a/engines/sword25/gfx/renderobjectregistry.h b/engines/sword25/gfx/renderobjectregistry.h index ff2ba57316..cf736346b4 100644 --- a/engines/sword25/gfx/renderobjectregistry.h +++ b/engines/sword25/gfx/renderobjectregistry.h @@ -42,9 +42,7 @@ #include "sword25/kernel/common.h" #include "sword25/kernel/objectregistry.h" -#include "sword25/kernel/memlog_off.h" -#include <memory> -#include "sword25/kernel/memlog_on.h" +#include "common/ptr.h" namespace Sword25 { @@ -71,7 +69,7 @@ private: virtual void LogErrorLn(const char *Message) const; virtual void LogWarningLn(const char *Message) const; - static std::auto_ptr<RenderObjectRegistry> m_InstancePtr; + static Common::ScopedPtr<RenderObjectRegistry> m_InstancePtr; }; } // End of namespace Sword25 diff --git a/engines/sword25/gfx/screenshot.h b/engines/sword25/gfx/screenshot.h index 11edc47962..3105f2e8a2 100644 --- a/engines/sword25/gfx/screenshot.h +++ b/engines/sword25/gfx/screenshot.h @@ -40,10 +40,6 @@ // ----------------------------------------------------------------------------- #include "sword25/kernel/common.h" -#include "sword25/kernel/memlog_off.h" -#include <string> -#include <vector> -#include "sword25/kernel/memlog_on.h" namespace Sword25 { diff --git a/engines/sword25/gfx/text.h b/engines/sword25/gfx/text.h index 5e9d8d887f..bf74f5caf2 100644 --- a/engines/sword25/gfx/text.h +++ b/engines/sword25/gfx/text.h @@ -43,10 +43,6 @@ #include "sword25/math/rect.h" #include "sword25/gfx/renderobject.h" -#include "sword25/kernel/memlog_off.h" -#include <vector> -#include "sword25/kernel/memlog_on.h" - namespace Sword25 { // ----------------------------------------------------------------------------- |