diff options
author | Eugene Sandulenko | 2010-08-06 10:59:50 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 22:30:57 +0000 |
commit | a17ec87b7dd09e7b251a3f578d1f788917550451 (patch) | |
tree | c77bdbb06d39d9a200b5e0514d2aedc7f43c8e28 /engines/sword25/gfx/opengl | |
parent | 6dcf9f0ee557e692df3c70a263ca35068ff45380 (diff) | |
download | scummvm-rg350-a17ec87b7dd09e7b251a3f578d1f788917550451.tar.gz scummvm-rg350-a17ec87b7dd09e7b251a3f578d1f788917550451.tar.bz2 scummvm-rg350-a17ec87b7dd09e7b251a3f578d1f788917550451.zip |
SWORD25: Number of compilation and warning fixes
svn-id: r53219
Diffstat (limited to 'engines/sword25/gfx/opengl')
-rw-r--r-- | engines/sword25/gfx/opengl/glimage.cpp | 4 | ||||
-rw-r--r-- | engines/sword25/gfx/opengl/glimage.h | 4 | ||||
-rw-r--r-- | engines/sword25/gfx/opengl/openglgfx.cpp | 26 | ||||
-rw-r--r-- | engines/sword25/gfx/opengl/openglgfx.h | 14 | ||||
-rw-r--r-- | engines/sword25/gfx/opengl/swimage.cpp | 4 | ||||
-rw-r--r-- | engines/sword25/gfx/opengl/swimage.h | 4 |
6 files changed, 28 insertions, 28 deletions
diff --git a/engines/sword25/gfx/opengl/glimage.cpp b/engines/sword25/gfx/opengl/glimage.cpp index 80a822adcc..54d660aa7f 100644 --- a/engines/sword25/gfx/opengl/glimage.cpp +++ b/engines/sword25/gfx/opengl/glimage.cpp @@ -50,7 +50,7 @@ namespace Sword25 { // 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::Fill(const BS_Rect* pFillRect, unsigned int Color) // ----------------------------------------------------------------------------- -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) { // Überprüfen, ob PixelData ausreichend viele Pixel enthält um ein Bild der Größe Width * Height zu erzeugen if (Pixeldata.size() < static_cast<unsigned int>(m_Width * m_Height * 4)) diff --git a/engines/sword25/gfx/opengl/glimage.h b/engines/sword25/gfx/opengl/glimage.h index 62f84ef3cf..ae94473778 100644 --- a/engines/sword25/gfx/opengl/glimage.h +++ b/engines/sword25/gfx/opengl/glimage.h @@ -60,7 +60,7 @@ typedef void * GLS_Sprite; 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 @@ public: 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; } diff --git a/engines/sword25/gfx/opengl/openglgfx.cpp b/engines/sword25/gfx/opengl/openglgfx.cpp index fc8ecad261..7d97828213 100644 --- a/engines/sword25/gfx/opengl/openglgfx.cpp +++ b/engines/sword25/gfx/opengl/openglgfx.cpp @@ -72,12 +72,12 @@ namespace { 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 @@ bool BS_OpenGLGfx::EndFrame() 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::GetScreenshot(unsigned int & Width, unsigned int & Height, ve // ----------------------------------------------------------------------------- -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 @@ void BS_OpenGLGfx::FlipImagedataVertical(unsigned int Width, unsigned int Height // 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 @@ BS_Resource * BS_OpenGLGfx::LoadResource(const std::string& FileName) // ----------------------------------------------------------------------------- -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) || diff --git a/engines/sword25/gfx/opengl/openglgfx.h b/engines/sword25/gfx/opengl/openglgfx.h index c1b6143827..df0d81cb04 100644 --- a/engines/sword25/gfx/opengl/openglgfx.h +++ b/engines/sword25/gfx/opengl/openglgfx.h @@ -85,12 +85,12 @@ public: 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 @@ private: 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 diff --git a/engines/sword25/gfx/opengl/swimage.cpp b/engines/sword25/gfx/opengl/swimage.cpp index c8efd357a4..1429572767 100644 --- a/engines/sword25/gfx/opengl/swimage.cpp +++ b/engines/sword25/gfx/opengl/swimage.cpp @@ -50,7 +50,7 @@ namespace Sword25 { // 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::Fill(const BS_Rect* pFillRect, unsigned int Color) // ----------------------------------------------------------------------------- -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; diff --git a/engines/sword25/gfx/opengl/swimage.h b/engines/sword25/gfx/opengl/swimage.h index cb27a089a1..bbab7c3833 100644 --- a/engines/sword25/gfx/opengl/swimage.h +++ b/engines/sword25/gfx/opengl/swimage.h @@ -53,7 +53,7 @@ namespace Sword25 { 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 @@ public: 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; } |