From 6dcf9f0ee557e692df3c70a263ca35068ff45380 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Aug 2010 10:59:35 +0000 Subject: SWORD25: std::string -> Common::String in gfx/ svn-id: r53218 --- engines/sword25/gfx/animation.cpp | 10 +++++----- engines/sword25/gfx/animation.h | 6 +++--- engines/sword25/gfx/animationresource.cpp | 16 ++++++++-------- engines/sword25/gfx/animationresource.h | 2 +- engines/sword25/gfx/animationtemplate.cpp | 8 ++++---- engines/sword25/gfx/animationtemplate.h | 6 +++--- engines/sword25/gfx/bitmapresource.cpp | 2 +- engines/sword25/gfx/bitmapresource.h | 2 +- engines/sword25/gfx/fontresource.cpp | 16 ++++++++-------- engines/sword25/gfx/fontresource.h | 10 +++++----- engines/sword25/gfx/graphicengine.cpp | 6 +++--- engines/sword25/gfx/graphicengine_script.cpp | 2 +- engines/sword25/gfx/renderobject.cpp | 6 +++--- engines/sword25/gfx/screenshot.h | 4 ++-- engines/sword25/gfx/staticbitmap.cpp | 6 +++--- engines/sword25/gfx/staticbitmap.h | 6 +++--- engines/sword25/gfx/text.h | 14 +++++++------- 17 files changed, 61 insertions(+), 61 deletions(-) diff --git a/engines/sword25/gfx/animation.cpp b/engines/sword25/gfx/animation.cpp index 30b8bd76db..a2b2051c59 100644 --- a/engines/sword25/gfx/animation.cpp +++ b/engines/sword25/gfx/animation.cpp @@ -57,7 +57,7 @@ namespace Sword25 { // Konstruktion / Destruktion // -------------------------- -BS_Animation::BS_Animation(BS_RenderObjectPtr ParentPtr, const std::string & FileName) : +BS_Animation::BS_Animation(BS_RenderObjectPtr ParentPtr, const Common::String & FileName) : BS_TimedRenderObject(ParentPtr, BS_RenderObject::TYPE_ANIMATION) { // Das BS_RenderObject konnte nicht erzeugt werden, daher muss an dieser Stelle abgebrochen werden. @@ -109,7 +109,7 @@ BS_Animation::BS_Animation(BS_InputPersistenceBlock & Reader, BS_RenderObjectPtr // ----------------------------------------------------------------------------- -void BS_Animation::InitializeAnimationResource(const std::string &FileName) +void BS_Animation::InitializeAnimationResource(const Common::String &FileName) { // Die Resource wird für die gesamte Lebensdauer des Animations-Objektes gelockt. BS_Resource * ResourcePtr = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(FileName); @@ -633,7 +633,7 @@ void BS_Animation::SetScaleFactorY(float ScaleFactorY) // ----------------------------------------------------------------------------- -const std::string & BS_Animation::GetCurrentAction() const +const Common::String & BS_Animation::GetCurrentAction() const { BS_AnimationDescription * animationDescriptionPtr = GetAnimationDescription(); BS_ASSERT(animationDescriptionPtr); @@ -776,7 +776,7 @@ void BS_Animation::UnpersistCallbackVector(BS_InputPersistenceBlock & Reader, st { ANIMATION_CALLBACK_DATA CallbackData; - std::string CallbackFunctionName; + Common::String CallbackFunctionName; Reader.Read(CallbackFunctionName); CallbackData.Callback = reinterpret_cast(BS_CallbackRegistry::GetInstance().ResolveCallbackFunction(CallbackFunctionName)); @@ -861,7 +861,7 @@ bool BS_Animation::Unpersist(BS_InputPersistenceBlock & Reader) Reader.Read(Marker); if (Marker == 0) { - std::string ResourceFilename; + Common::String ResourceFilename; Reader.Read(ResourceFilename); InitializeAnimationResource(ResourceFilename); } diff --git a/engines/sword25/gfx/animation.h b/engines/sword25/gfx/animation.h index 2221501bfa..606cd9485e 100644 --- a/engines/sword25/gfx/animation.h +++ b/engines/sword25/gfx/animation.h @@ -58,7 +58,7 @@ class BS_Animation : public BS_TimedRenderObject friend class BS_RenderObject; private: - BS_Animation(BS_RenderObjectPtr ParentPtr, const std::string & FileName); + BS_Animation(BS_RenderObjectPtr ParentPtr, const Common::String & FileName); BS_Animation(BS_RenderObjectPtr ParentPtr, const BS_AnimationTemplate & Template); BS_Animation(BS_InputPersistenceBlock & Reader, BS_RenderObjectPtr ParentPtr, unsigned int Handle); @@ -145,7 +145,7 @@ public: bool IsAlphaAllowed() const; bool IsColorModulationAllowed() const; unsigned int GetCurrentFrame() const { return m_CurrentFrame; } - const std::string & GetCurrentAction() const ; + const Common::String & GetCurrentAction() const ; bool IsRunning() const { return m_Running; } typedef bool (*ANIMATION_CALLBACK)(unsigned int); @@ -220,7 +220,7 @@ private: void PersistCallbackVector(BS_OutputPersistenceBlock & Writer, const std::vector & Vector); void UnpersistCallbackVector(BS_InputPersistenceBlock & Reader, std::vector & Vector); BS_AnimationDescription * GetAnimationDescription() const; - void InitializeAnimationResource(const std::string &FileName); + void InitializeAnimationResource(const Common::String &FileName); }; } // End of namespace Sword25 diff --git a/engines/sword25/gfx/animationresource.cpp b/engines/sword25/gfx/animationresource.cpp index 912867e604..25c63a74aa 100644 --- a/engines/sword25/gfx/animationresource.cpp +++ b/engines/sword25/gfx/animationresource.cpp @@ -65,7 +65,7 @@ namespace // Construction / Destruction // ----------------------------------------------------------------------------- -BS_AnimationResource::BS_AnimationResource(const std::string& FileName) : +BS_AnimationResource::BS_AnimationResource(const Common::String& FileName) : BS_Resource(FileName, BS_Resource::TYPE_ANIMATION), m_Valid(false) { @@ -122,11 +122,11 @@ BS_AnimationResource::BS_AnimationResource(const std::string& FileName) : m_MillisPerFrame = 1000000 / m_FPS; // In das Verzeichnis der Eingabedatei wechseln, da die Dateiverweise innerhalb der XML-Datei relativ zu diesem Verzeichnis sind. - std::string OldDirectory = PackagePtr->GetCurrentDirectory(); + Common::String OldDirectory = PackagePtr->GetCurrentDirectory(); int LastSlash = GetFileName().rfind('/'); - if (LastSlash != std::string::npos) + if (LastSlash != Common::String::npos) { - std::string Dir = GetFileName().substr(0, LastSlash); + Common::String Dir = GetFileName().substr(0, LastSlash); PackagePtr->ChangeDirectory(Dir); } @@ -184,7 +184,7 @@ bool BS_AnimationResource::ParseAnimationTag(TiXmlElement& AnimationTag, int& FP if (FPSString = AnimationTag.Attribute("fps")) { int TempFPS; - if (!BS_String::ToInt(std::string(FPSString), TempFPS) || TempFPS < MIN_FPS || TempFPS > MAX_FPS) + if (!BS_String::ToInt(Common::String(FPSString), TempFPS) || TempFPS < MIN_FPS || TempFPS > MAX_FPS) { BS_LOG_WARNINGLN("Illegal fps value (\"%s\") in tag in \"%s\". Assuming default (\"%d\"). " "The fps value has to be between %d and %d.", @@ -243,19 +243,19 @@ bool BS_AnimationResource::ParseFrameTag(TiXmlElement& FrameTag, Frame& Frame, B GetFileName().c_str()); Frame.HotspotX = 0; - if (HotspotxString && !BS_String::ToInt(std::string(HotspotxString), Frame.HotspotX)) + 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); Frame.HotspotY = 0; - if (HotspotyString && !BS_String::ToInt(std::string(HotspotyString), Frame.HotspotY)) + 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); const char* FlipVString = FrameTag.Attribute("flipv"); if (FlipVString) { - if (!BS_String::ToBool(std::string(FlipVString), Frame.FlipV)) + if (!BS_String::ToBool(Common::String(FlipVString), Frame.FlipV)) { BS_LOG_WARNINGLN("Illegal flipv value (\"%s\") in tag in \"%s\". Assuming default (\"false\").", FlipVString, GetFileName().c_str()); diff --git a/engines/sword25/gfx/animationresource.h b/engines/sword25/gfx/animationresource.h index 3d6e3e49f3..f37931b9d9 100644 --- a/engines/sword25/gfx/animationresource.h +++ b/engines/sword25/gfx/animationresource.h @@ -65,7 +65,7 @@ class TiXmlElement; class BS_AnimationResource : public BS_Resource, public BS_AnimationDescription { public: - BS_AnimationResource(const std::string & FileName); + BS_AnimationResource(const Common::String & FileName); virtual ~BS_AnimationResource(); virtual const Frame & GetFrame(unsigned int Index) const { BS_ASSERT(Index < m_Frames.size()); return m_Frames[Index]; } diff --git a/engines/sword25/gfx/animationtemplate.cpp b/engines/sword25/gfx/animationtemplate.cpp index 1594ed61f1..4ed604467b 100644 --- a/engines/sword25/gfx/animationtemplate.cpp +++ b/engines/sword25/gfx/animationtemplate.cpp @@ -53,7 +53,7 @@ namespace Sword25 { // Konstruktion / Destruktion // ----------------------------------------------------------------------------- -unsigned int BS_AnimationTemplate::Create(const std::string & SourceAnimation) +unsigned int BS_AnimationTemplate::Create(const Common::String & SourceAnimation) { BS_AnimationTemplate * AnimationTemplatePtr = new BS_AnimationTemplate(SourceAnimation); @@ -104,7 +104,7 @@ unsigned int BS_AnimationTemplate::Create(BS_InputPersistenceBlock & Reader, uns // ----------------------------------------------------------------------------- -BS_AnimationTemplate::BS_AnimationTemplate(const std::string & SourceAnimation) +BS_AnimationTemplate::BS_AnimationTemplate(const Common::String & SourceAnimation) { // Objekt registrieren. BS_AnimationTemplateRegistry::GetInstance().RegisterObject(this); @@ -158,7 +158,7 @@ BS_AnimationTemplate::BS_AnimationTemplate(BS_InputPersistenceBlock & Reader, un // ----------------------------------------------------------------------------- -BS_AnimationResource * BS_AnimationTemplate::RequestSourceAnimation(const std::string & SourceAnimation) const +BS_AnimationResource * BS_AnimationTemplate::RequestSourceAnimation(const Common::String & SourceAnimation) const { BS_ResourceManager * RMPtr = BS_Kernel::GetInstance()->GetResourceManager(); BS_Resource * ResourcePtr; @@ -300,7 +300,7 @@ bool BS_AnimationTemplate::Unpersist(BS_InputPersistenceBlock & Reader) } // Die Animations-Resource wird für die gesamte Lebensdauer des Objektes gelockt - std::string SourceAnimation; + Common::String SourceAnimation; Reader.Read(SourceAnimation); m_SourceAnimationPtr = RequestSourceAnimation(SourceAnimation); diff --git a/engines/sword25/gfx/animationtemplate.h b/engines/sword25/gfx/animationtemplate.h index 2b3e078085..a39d0b9788 100644 --- a/engines/sword25/gfx/animationtemplate.h +++ b/engines/sword25/gfx/animationtemplate.h @@ -62,13 +62,13 @@ class BS_AnimationResource; class BS_AnimationTemplate : public BS_AnimationDescription { public: - static unsigned int Create(const std::string & SourceAnimation); + static unsigned int Create(const Common::String & SourceAnimation); static unsigned int Create(const BS_AnimationTemplate & Other); static unsigned int Create(BS_InputPersistenceBlock & Reader, unsigned int Handle); BS_AnimationTemplate * ResolveHandle(unsigned int Handle) const; private: - BS_AnimationTemplate(const std::string & SourceAnimation); + BS_AnimationTemplate(const Common::String & SourceAnimation); BS_AnimationTemplate(const BS_AnimationTemplate & Other); BS_AnimationTemplate(BS_InputPersistenceBlock & Reader, unsigned int Handle); @@ -117,7 +117,7 @@ private: BS_AnimationResource * m_SourceAnimationPtr; bool m_Valid; - BS_AnimationResource * RequestSourceAnimation(const std::string & SourceAnimation) const; + BS_AnimationResource * RequestSourceAnimation(const Common::String & SourceAnimation) const; bool ValidateSourceIndex(unsigned int Index) const; bool ValidateDestIndex(unsigned int Index) const; }; diff --git a/engines/sword25/gfx/bitmapresource.cpp b/engines/sword25/gfx/bitmapresource.cpp index ead5d79633..6113db96c9 100644 --- a/engines/sword25/gfx/bitmapresource.cpp +++ b/engines/sword25/gfx/bitmapresource.cpp @@ -47,7 +47,7 @@ namespace Sword25 { // Konstruktion / Destruktion // -------------------------- -BS_BitmapResource::BS_BitmapResource(const std::string & Filename, BS_Image * pImage) : +BS_BitmapResource::BS_BitmapResource(const Common::String & Filename, BS_Image * pImage) : m_Valid(false), m_pImage(pImage), BS_Resource(Filename, BS_Resource::TYPE_BITMAP) diff --git a/engines/sword25/gfx/bitmapresource.h b/engines/sword25/gfx/bitmapresource.h index 4f9fb2be83..4e6e305bed 100644 --- a/engines/sword25/gfx/bitmapresource.h +++ b/engines/sword25/gfx/bitmapresource.h @@ -68,7 +68,7 @@ public: FLIP_VH = FLIP_H | FLIP_V }; - BS_BitmapResource(const std::string & Filename, BS_Image * pImage); + BS_BitmapResource(const Common::String & Filename, BS_Image * pImage); virtual ~BS_BitmapResource(); /** diff --git a/engines/sword25/gfx/fontresource.cpp b/engines/sword25/gfx/fontresource.cpp index 0252becc21..3ba3765b91 100644 --- a/engines/sword25/gfx/fontresource.cpp +++ b/engines/sword25/gfx/fontresource.cpp @@ -60,7 +60,7 @@ static const unsigned int DEFAULT_GAPWIDTH = 1; // Konstruktion / Destruktion // ----------------------------------------------------------------------------- -BS_FontResource::BS_FontResource(BS_Kernel* pKernel, const std::string& FileName) : +BS_FontResource::BS_FontResource(BS_Kernel* pKernel, const Common::String& FileName) : _pKernel(pKernel), _Valid(false), BS_Resource(FileName, BS_Resource::TYPE_FONT) @@ -82,7 +82,7 @@ BS_FontResource::BS_FontResource(BS_Kernel* pKernel, const std::string& FileName } // Font-Tag parsen - std::string BitmapFileName; + Common::String BitmapFileName; if (!_ParseFontTag(*pElement, BitmapFileName, _LineHeight, _GapWidth)) { BS_LOG_ERRORLN("An error occurred while parsing tag in \"%s\".", GetFileName().c_str()); @@ -148,7 +148,7 @@ BS_FontResource::BS_FontResource(BS_Kernel* pKernel, const std::string& FileName // ----------------------------------------------------------------------------- -bool BS_FontResource::_ParseXMLDocument(const std::string & FileName, TiXmlDocument & Doc) const +bool BS_FontResource::_ParseXMLDocument(const Common::String & FileName, TiXmlDocument & Doc) const { // Pointer auf den Package-Manager bekommen BS_ASSERT(_pKernel); @@ -179,7 +179,7 @@ bool BS_FontResource::_ParseXMLDocument(const std::string & FileName, TiXmlDocum // ----------------------------------------------------------------------------- -bool BS_FontResource::_ParseFontTag(TiXmlElement & Tag, std::string & BitmapFileName, int & Lineheight, int & GapWidth) const +bool BS_FontResource::_ParseFontTag(TiXmlElement & Tag, Common::String & BitmapFileName, int & Lineheight, int & GapWidth) const { // Bitmap Attribut auslesen const char * BitmapString = Tag.Attribute("bitmap"); @@ -192,7 +192,7 @@ bool BS_FontResource::_ParseFontTag(TiXmlElement & Tag, std::string & BitmapFile // Lineheight Attribut auslesen const char * LineheightString = Tag.Attribute("lineheight"); - if (!LineheightString || !BS_String::ToInt(std::string(LineheightString), Lineheight) || Lineheight < 0) + if (!LineheightString || !BS_String::ToInt(Common::String(LineheightString), Lineheight) || Lineheight < 0) { BS_LOG_WARNINGLN("Illegal or missing lineheight attribute in tag in \"%s\". Assuming default (\"%d\").", GetFileName().c_str(), DEFAULT_LINEHEIGHT); @@ -202,7 +202,7 @@ bool BS_FontResource::_ParseFontTag(TiXmlElement & Tag, std::string & BitmapFile // Gap Attribut auslesen const char * GapString = Tag.Attribute("gap"); - if (!GapString || !BS_String::ToInt(std::string(GapString), GapWidth) || GapWidth < 0) + if (!GapString || !BS_String::ToInt(Common::String(GapString), GapWidth) || GapWidth < 0) { BS_LOG_WARNINGLN("Illegal or missing gap attribute in tag in \"%s\". Assuming default (\"%d\").", GetFileName().c_str(), DEFAULT_GAPWIDTH); @@ -218,7 +218,7 @@ bool BS_FontResource::_ParseCharacterTag(TiXmlElement & Tag, int & Code, BS_Rect { // Code Attribut auslesen const char * CodeString = Tag.Attribute("code"); - if (!CodeString || !BS_String::ToInt(std::string(CodeString), Code) || Code < 0 || Code >= 256) + if (!CodeString || !BS_String::ToInt(Common::String(CodeString), Code) || Code < 0 || Code >= 256) { BS_LOG_ERRORLN("Illegal or missing code attribute in tag in \"%s\".", GetFileName().c_str()); return false; @@ -226,7 +226,7 @@ bool BS_FontResource::_ParseCharacterTag(TiXmlElement & Tag, int & Code, BS_Rect // Left Attribut auslesen const char * LeftString = Tag.Attribute("left"); - if (!LeftString || !BS_String::ToInt(std::string(LeftString), Rect.left) || Rect.left < 0) + if (!LeftString || !BS_String::ToInt(Common::String(LeftString), Rect.left) || Rect.left < 0) { BS_LOG_ERRORLN("Illegal or missing left attribute in tag in \"%s\".", GetFileName().c_str()); return false; diff --git a/engines/sword25/gfx/fontresource.h b/engines/sword25/gfx/fontresource.h index 826a14522f..dff0cee085 100644 --- a/engines/sword25/gfx/fontresource.h +++ b/engines/sword25/gfx/fontresource.h @@ -66,7 +66,7 @@ public: @param FileName der Dateiname der zu ladenen Resource @remark Wenn der Konstruktor erfolgreich ausgeführt werden konnte gibt die Methode IsValid true zurück. */ - BS_FontResource(BS_Kernel * pKernel, const std::string & FileName); + BS_FontResource(BS_Kernel * pKernel, const Common::String & FileName); /** @brief Gibt true zurück, wenn das Objekt korrekt initialisiert wurde. @@ -99,12 +99,12 @@ public: /** @brief Gibt den Dateinamen der Charactermap zurück. */ - const std::string & GetCharactermapFileName() const { return _BitmapFileName; } + const Common::String & GetCharactermapFileName() const { return _BitmapFileName; } private: BS_Kernel * _pKernel; bool _Valid; - std::string _BitmapFileName; + Common::String _BitmapFileName; int _LineHeight; int _GapWidth; BS_Rect _CharacterRects[256]; @@ -113,8 +113,8 @@ private: // Hilfsmethoden // ----------------------------------------------------------------------------- - bool _ParseXMLDocument(const std::string & FileName, TiXmlDocument & Doc) const; - bool _ParseFontTag(TiXmlElement & Tag, std::string & BitmapFileName, int & LineHeight, int & GapWidth) const; + bool _ParseXMLDocument(const Common::String & FileName, TiXmlDocument & Doc) const; + bool _ParseFontTag(TiXmlElement & Tag, Common::String & BitmapFileName, int & LineHeight, int & GapWidth) const; bool _ParseCharacterTag(TiXmlElement & Tag, int & Code, BS_Rect & Rect) const; }; diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp index cd35718d5e..f8a3a1a44a 100644 --- a/engines/sword25/gfx/graphicengine.cpp +++ b/engines/sword25/gfx/graphicengine.cpp @@ -112,7 +112,7 @@ void BS_GraphicEngine::UpdateLastFrameDuration() namespace { - bool DoSaveScreenshot(BS_GraphicEngine & GraphicEngine, const std::string & Filename, bool Thumbnail) + bool DoSaveScreenshot(BS_GraphicEngine & GraphicEngine, const Common::String & Filename, bool Thumbnail) { unsigned int Width; unsigned int Height; @@ -134,14 +134,14 @@ namespace // ----------------------------------------------------------------------------- -bool BS_GraphicEngine::SaveScreenshot(const std::string & Filename) +bool BS_GraphicEngine::SaveScreenshot(const Common::String & Filename) { return DoSaveScreenshot(*this, Filename, false); } // ----------------------------------------------------------------------------- -bool BS_GraphicEngine::SaveThumbnailScreenshot( const std::string & Filename ) +bool BS_GraphicEngine::SaveThumbnailScreenshot( const Common::String & Filename ) { return DoSaveScreenshot(*this, Filename, true); } diff --git a/engines/sword25/gfx/graphicengine_script.cpp b/engines/sword25/gfx/graphicengine_script.cpp index 34a464169e..3ce41f34e7 100644 --- a/engines/sword25/gfx/graphicengine_script.cpp +++ b/engines/sword25/gfx/graphicengine_script.cpp @@ -77,7 +77,7 @@ namespace public: ActionCallback(lua_State * L) : BS_LuaCallback(L) {}; - std::string Action; + Common::String Action; protected: virtual int PreFunctionInvokation(lua_State * L) diff --git a/engines/sword25/gfx/renderobject.cpp b/engines/sword25/gfx/renderobject.cpp index a3ef8a90a2..12b7c5dfca 100644 --- a/engines/sword25/gfx/renderobject.cpp +++ b/engines/sword25/gfx/renderobject.cpp @@ -332,7 +332,7 @@ void BS_RenderObject::SetVisible(bool Visible) // Objekterzeuger // ----------------------------------------------------------------------------- -BS_RenderObjectPtr BS_RenderObject::AddAnimation(const std::string& Filename) +BS_RenderObjectPtr BS_RenderObject::AddAnimation(const Common::String& Filename) { BS_RenderObjectPtr AniPtr(new BS_Animation(this, Filename)); if (AniPtr.IsValid() && AniPtr->GetInitSuccess()) @@ -361,7 +361,7 @@ BS_RenderObjectPtr BS_RenderObject::AddAnimation(const BS_Animatio // ----------------------------------------------------------------------------- -BS_RenderObjectPtr BS_RenderObject::AddBitmap(const std::string& Filename) +BS_RenderObjectPtr BS_RenderObject::AddBitmap(const Common::String& Filename) { BS_RenderObjectPtr BitmapPtr(new BS_StaticBitmap(this, Filename)); if (BitmapPtr.IsValid() && BitmapPtr->GetInitSuccess()) @@ -403,7 +403,7 @@ BS_RenderObjectPtr BS_RenderObject::AddPanel(int Width, int Height, un // ----------------------------------------------------------------------------- -BS_RenderObjectPtr BS_RenderObject::AddText(const std::string & Font, const std::string & Text) +BS_RenderObjectPtr BS_RenderObject::AddText(const Common::String & Font, const std::string & Text) { BS_RenderObjectPtr TextPtr(new BS_Text(this)); if (TextPtr.IsValid() && TextPtr->GetInitSuccess() && TextPtr->SetFont(Font)) diff --git a/engines/sword25/gfx/screenshot.h b/engines/sword25/gfx/screenshot.h index 08280a2ce3..f1e8bbde10 100644 --- a/engines/sword25/gfx/screenshot.h +++ b/engines/sword25/gfx/screenshot.h @@ -54,8 +54,8 @@ namespace Sword25 { class BS_Screenshot { public: - static bool SaveToFile(unsigned int Width, unsigned int Height, const std::vector & Data, const std::string & Filename); - static bool SaveThumbnailToFile(unsigned int Width, unsigned int Height, const std::vector & Data, const std::string & Filename); + static bool SaveToFile(unsigned int Width, unsigned int Height, const std::vector & Data, const Common::String & Filename); + static bool SaveThumbnailToFile(unsigned int Width, unsigned int Height, const std::vector & Data, const Common::String & Filename); }; } // End of namespace Sword25 diff --git a/engines/sword25/gfx/staticbitmap.cpp b/engines/sword25/gfx/staticbitmap.cpp index 6257e016f7..21544b8b3c 100644 --- a/engines/sword25/gfx/staticbitmap.cpp +++ b/engines/sword25/gfx/staticbitmap.cpp @@ -54,7 +54,7 @@ namespace Sword25 { // Konstruktion / Destruktion // ----------------------------------------------------------------------------- -BS_StaticBitmap::BS_StaticBitmap(BS_RenderObjectPtr ParentPtr, const std::string& Filename) : +BS_StaticBitmap::BS_StaticBitmap(BS_RenderObjectPtr ParentPtr, const Common::String& Filename) : BS_Bitmap(ParentPtr, TYPE_STATICBITMAP) { // Das BS_Bitmap konnte nicht erzeugt werden, daher muss an dieser Stelle abgebrochen werden. @@ -73,7 +73,7 @@ BS_StaticBitmap::BS_StaticBitmap(BS_InputPersistenceBlock & Reader, BS_RenderObj // ----------------------------------------------------------------------------- -bool BS_StaticBitmap::InitBitmapResource(const std::string & Filename) +bool BS_StaticBitmap::InitBitmapResource(const Common::String & Filename) { // Bild-Resource laden BS_Resource* ResourcePtr = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(Filename); @@ -225,7 +225,7 @@ bool BS_StaticBitmap::Unpersist(BS_InputPersistenceBlock & Reader) bool Result = true; Result &= BS_Bitmap::Unpersist(Reader); - std::string ResourceFilename; + Common::String ResourceFilename; Reader.Read(ResourceFilename); Result &= InitBitmapResource(ResourceFilename); diff --git a/engines/sword25/gfx/staticbitmap.h b/engines/sword25/gfx/staticbitmap.h index c6c67ff2c0..51e51f843b 100644 --- a/engines/sword25/gfx/staticbitmap.h +++ b/engines/sword25/gfx/staticbitmap.h @@ -56,7 +56,7 @@ private: /** @remark Filename muss absoluter Pfad sein */ - BS_StaticBitmap(BS_RenderObjectPtr ParentPtr, const std::string& Filename); + BS_StaticBitmap(BS_RenderObjectPtr ParentPtr, const Common::String& Filename); BS_StaticBitmap(BS_InputPersistenceBlock & Reader, BS_RenderObjectPtr ParentPtr, unsigned int Handle); public: @@ -78,9 +78,9 @@ protected: virtual bool DoRender(); private: - std::string m_ResourceFilename; + Common::String m_ResourceFilename; - bool InitBitmapResource(const std::string & Filename); + bool InitBitmapResource(const Common::String & Filename); }; } // End of namespace Sword25 diff --git a/engines/sword25/gfx/text.h b/engines/sword25/gfx/text.h index e311209858..4f4d76c72c 100644 --- a/engines/sword25/gfx/text.h +++ b/engines/sword25/gfx/text.h @@ -71,13 +71,13 @@ public: @param Font der Dateiname der Fontdatei. @return Gibt false zurück, wenn der Font nicht gefunden wurde. */ - bool SetFont(const std::string & Font); + bool SetFont(const Common::String & Font); /** @brief Setzt den darzustellenden Text. @param Text der darzustellende Text */ - void SetText(const std::string & Text); + void SetText(const Common::String & Text); /** @brief Setzt den Alphawert des Textes. @@ -105,12 +105,12 @@ public: /** @brief Gibt den dargestellten Text zurück. */ - const std::string & GetText() { return m_Text; } + const Common::String & GetText() { return m_Text; } /** @brief Gibt den Namen das momentan benutzten Fonts zurück. */ - const std::string & GetFont() { return m_Font; } + const Common::String & GetFont() { return m_Font; } /** @brief Setzt die Farbe des Textes. @@ -151,15 +151,15 @@ private: BS_Text(BS_InputPersistenceBlock & Reader, BS_RenderObjectPtr ParentPtr, unsigned int Handle); unsigned int m_ModulationColor; - std::string m_Font; - std::string m_Text; + Common::String m_Font; + Common::String m_Text; bool m_AutoWrap; unsigned int m_AutoWrapThreshold; struct LINE { BS_Rect BBox; - std::string Text; + Common::String Text; }; std::vector m_Lines; -- cgit v1.2.3