aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx/opengl
diff options
context:
space:
mode:
authorEugene Sandulenko2010-08-18 10:52:24 +0000
committerEugene Sandulenko2010-10-12 22:53:49 +0000
commit485ff15d23b3ae9545f5c9df794f1326185eae7a (patch)
tree9994c94429c09f152bd7c017b6f74961a26b2e87 /engines/sword25/gfx/opengl
parente71337861ffece83ca8fe254e411557249118d43 (diff)
downloadscummvm-rg350-485ff15d23b3ae9545f5c9df794f1326185eae7a.tar.gz
scummvm-rg350-485ff15d23b3ae9545f5c9df794f1326185eae7a.tar.bz2
scummvm-rg350-485ff15d23b3ae9545f5c9df794f1326185eae7a.zip
SWORD25: Mass-eliminating of BS_ prefix in fmv/ and gfx/
svn-id: r53258
Diffstat (limited to 'engines/sword25/gfx/opengl')
-rw-r--r--engines/sword25/gfx/opengl/glimage.cpp24
-rw-r--r--engines/sword25/gfx/opengl/glimage.h14
-rw-r--r--engines/sword25/gfx/opengl/glvectorimageblit.cpp2
-rw-r--r--engines/sword25/gfx/opengl/openglgfx.cpp62
-rw-r--r--engines/sword25/gfx/opengl/openglgfx.h16
-rw-r--r--engines/sword25/gfx/opengl/swimage.cpp18
-rw-r--r--engines/sword25/gfx/opengl/swimage.h12
7 files changed, 74 insertions, 74 deletions
diff --git a/engines/sword25/gfx/opengl/glimage.cpp b/engines/sword25/gfx/opengl/glimage.cpp
index a7065cc03d..cc8f813fe6 100644
--- a/engines/sword25/gfx/opengl/glimage.cpp
+++ b/engines/sword25/gfx/opengl/glimage.cpp
@@ -51,7 +51,7 @@ namespace Sword25 {
// CONSTRUCTION / DESTRUCTION
// -----------------------------------------------------------------------------
-BS_GLImage::BS_GLImage(const Common::String &Filename, bool &Result) :
+GLImage::GLImage(const Common::String &Filename, bool &Result) :
_data(0),
m_Width(0),
m_Height(0) {
@@ -60,7 +60,7 @@ BS_GLImage::BS_GLImage(const Common::String &Filename, bool &Result) :
BS_PackageManager *pPackage = static_cast<BS_PackageManager *>(BS_Kernel::GetInstance()->GetService("package"));
BS_ASSERT(pPackage);
- _backSurface = (static_cast<BS_GraphicEngine *>(BS_Kernel::GetInstance()->GetService("gfx")))->getSurface();
+ _backSurface = (static_cast<GraphicEngine *>(BS_Kernel::GetInstance()->GetService("gfx")))->getSurface();
// Datei laden
char *pFileData;
@@ -71,15 +71,15 @@ BS_GLImage::BS_GLImage(const Common::String &Filename, bool &Result) :
}
// Bildeigenschaften bestimmen
- BS_GraphicEngine::COLOR_FORMATS ColorFormat;
+ GraphicEngine::COLOR_FORMATS ColorFormat;
int Pitch;
- if (!BS_ImageLoader::ExtractImageProperties(pFileData, FileSize, ColorFormat, m_Width, m_Height)) {
+ if (!ImageLoader::ExtractImageProperties(pFileData, FileSize, ColorFormat, m_Width, m_Height)) {
BS_LOG_ERRORLN("Could not read image properties.");
return;
}
// Das Bild dekomprimieren
- if (!BS_ImageLoader::LoadImage(pFileData, FileSize, BS_GraphicEngine::CF_ABGR32, _data, m_Width, m_Height, Pitch)) {
+ if (!ImageLoader::LoadImage(pFileData, FileSize, GraphicEngine::CF_ABGR32, _data, m_Width, m_Height, Pitch)) {
BS_LOG_ERRORLN("Could not decode image.");
return;
}
@@ -93,7 +93,7 @@ BS_GLImage::BS_GLImage(const Common::String &Filename, bool &Result) :
// -----------------------------------------------------------------------------
-BS_GLImage::BS_GLImage(unsigned int Width, unsigned int Height, bool &Result) :
+GLImage::GLImage(unsigned int Width, unsigned int Height, bool &Result) :
m_Width(Width),
m_Height(Height) {
Result = false;
@@ -106,20 +106,20 @@ BS_GLImage::BS_GLImage(unsigned int Width, unsigned int Height, bool &Result) :
// -----------------------------------------------------------------------------
-BS_GLImage::~BS_GLImage() {
+GLImage::~GLImage() {
delete[] _data;
}
// -----------------------------------------------------------------------------
-bool BS_GLImage::Fill(const BS_Rect *pFillRect, unsigned int Color) {
+bool GLImage::Fill(const BS_Rect *pFillRect, unsigned int Color) {
BS_LOG_ERRORLN("Fill() is not supported.");
return false;
}
// -----------------------------------------------------------------------------
-bool BS_GLImage::SetContent(const byte *Pixeldata, uint size, unsigned int Offset, unsigned int Stride) {
+bool GLImage::SetContent(const byte *Pixeldata, uint size, 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 (size < static_cast<unsigned int>(m_Width * m_Height * 4)) {
BS_LOG_ERRORLN("PixelData vector is too small to define a 32 bit %dx%d image.", m_Width, m_Height);
@@ -140,14 +140,14 @@ bool BS_GLImage::SetContent(const byte *Pixeldata, uint size, unsigned int Offse
// -----------------------------------------------------------------------------
-unsigned int BS_GLImage::GetPixel(int X, int Y) {
+unsigned int GLImage::GetPixel(int X, int Y) {
BS_LOG_ERRORLN("GetPixel() is not supported. Returning black.");
return 0;
}
// -----------------------------------------------------------------------------
-bool BS_GLImage::Blit(int PosX, int PosY, int Flipping, BS_Rect *pPartRect, unsigned int Color, int Width, int Height) {
+bool GLImage::Blit(int PosX, int PosY, int Flipping, BS_Rect *pPartRect, unsigned int Color, int Width, int Height) {
int x1 = 0, y1 = 0;
int w = m_Width, h = m_Height;
if (pPartRect) {
@@ -177,7 +177,7 @@ bool BS_GLImage::Blit(int PosX, int PosY, int Flipping, BS_Rect *pPartRect, unsi
warning("STUB: Sprite scaling (%f x %f)", ScaleX, ScaleY);
}
- if (Flipping & (BS_Image::FLIP_V | BS_Image::FLIP_H)) {
+ if (Flipping & (Image::FLIP_V | Image::FLIP_H)) {
warning("STUB: Sprite flipping");
}
diff --git a/engines/sword25/gfx/opengl/glimage.h b/engines/sword25/gfx/opengl/glimage.h
index 678a40aff4..13276798e0 100644
--- a/engines/sword25/gfx/opengl/glimage.h
+++ b/engines/sword25/gfx/opengl/glimage.h
@@ -55,9 +55,9 @@ typedef void *GLS_Sprite;
// CLASS DEFINITION
// -----------------------------------------------------------------------------
-class BS_GLImage : public BS_Image {
+class GLImage : public Image {
public:
- BS_GLImage(const Common::String &Filename, bool &Result);
+ GLImage(const Common::String &Filename, bool &Result);
/**
@brief Erzeugt ein leeres BS_GLImage
@@ -67,8 +67,8 @@ public:
@param Result gibt dem Aufrufer bekannt, ob der Konstruktor erfolgreich ausgeführt wurde. Wenn es nach dem Aufruf false enthalten sollte,
dürfen keine Methoden am Objekt aufgerufen werden und das Objekt ist sofort zu zerstören.
*/
- BS_GLImage(unsigned int Width, unsigned int Height, bool &Result);
- virtual ~BS_GLImage();
+ GLImage(unsigned int Width, unsigned int Height, bool &Result);
+ virtual ~GLImage();
virtual int GetWidth() const {
return m_Width;
@@ -76,12 +76,12 @@ public:
virtual int GetHeight() const {
return m_Height;
}
- virtual BS_GraphicEngine::COLOR_FORMATS GetColorFormat() const {
- return BS_GraphicEngine::CF_ARGB32;
+ virtual GraphicEngine::COLOR_FORMATS GetColorFormat() const {
+ return GraphicEngine::CF_ARGB32;
}
virtual bool Blit(int PosX = 0, int PosY = 0,
- int Flipping = BS_Image::FLIP_NONE,
+ int Flipping = Image::FLIP_NONE,
BS_Rect *pPartRect = NULL,
unsigned int Color = BS_ARGB(255, 255, 255, 255),
int Width = -1, int Height = -1);
diff --git a/engines/sword25/gfx/opengl/glvectorimageblit.cpp b/engines/sword25/gfx/opengl/glvectorimageblit.cpp
index a0945ba569..7dc6dd661d 100644
--- a/engines/sword25/gfx/opengl/glvectorimageblit.cpp
+++ b/engines/sword25/gfx/opengl/glvectorimageblit.cpp
@@ -51,7 +51,7 @@ const float LINE_SCALE_FACTOR = 1.0f;
// -----------------------------------------------------------------------------
-bool BS_VectorImage::Blit(int PosX, int PosY,
+bool VectorImage::Blit(int PosX, int PosY,
int Flipping,
BS_Rect *pPartRect,
unsigned int Color,
diff --git a/engines/sword25/gfx/opengl/openglgfx.cpp b/engines/sword25/gfx/opengl/openglgfx.cpp
index 30263d7b1d..f9dda32b40 100644
--- a/engines/sword25/gfx/opengl/openglgfx.cpp
+++ b/engines/sword25/gfx/opengl/openglgfx.cpp
@@ -73,21 +73,21 @@ const Common::String B25S_EXTENSION(".b25s");
// CONSTRUCTION / DESTRUCTION
// -----------------------------------------------------------------------------
-BS_OpenGLGfx::BS_OpenGLGfx(BS_Kernel *pKernel) :
- BS_GraphicEngine(pKernel),
+OpenGLGfx::OpenGLGfx(BS_Kernel *pKernel) :
+ GraphicEngine(pKernel),
m_GLspritesInitialized(false) {
}
// -----------------------------------------------------------------------------
-BS_OpenGLGfx::~BS_OpenGLGfx() {
+OpenGLGfx::~OpenGLGfx() {
_backSurface.free();
}
// -----------------------------------------------------------------------------
BS_Service *BS_OpenGLGfx_CreateObject(BS_Kernel *pKernel) {
- return new BS_OpenGLGfx(pKernel);
+ return new OpenGLGfx(pKernel);
}
@@ -95,7 +95,7 @@ BS_Service *BS_OpenGLGfx_CreateObject(BS_Kernel *pKernel) {
// INTERFACE
// -----------------------------------------------------------------------------
-bool BS_OpenGLGfx::Init(int Width, int Height, int BitDepth, int BackbufferCount, bool Windowed) {
+bool OpenGLGfx::Init(int Width, int Height, int BitDepth, int BackbufferCount, bool Windowed) {
// Warnung ausgeben, wenn eine nicht unterstützte Bittiefe gewählt wurde.
if (BitDepth != BIT_DEPTH) {
BS_LOG_WARNINGLN("Can't use a bit depth of %d (not supported). Falling back to %d.", BitDepth, BIT_DEPTH);
@@ -127,7 +127,7 @@ bool BS_OpenGLGfx::Init(int Width, int Height, int BitDepth, int BackbufferCount
SetVsync(true);
// Layer-Manager initialisieren.
- m_RenderObjectManagerPtr.reset(new BS_RenderObjectManager(Width, Height, BackbufferCount + 1));
+ m_RenderObjectManagerPtr.reset(new RenderObjectManager(Width, Height, BackbufferCount + 1));
// Hauptpanel erstellen
m_MainPanelPtr = m_RenderObjectManagerPtr->GetTreeRoot()->AddPanel(Width, Height, BS_ARGB(0, 0, 0, 0));
@@ -139,7 +139,7 @@ bool BS_OpenGLGfx::Init(int Width, int Height, int BitDepth, int BackbufferCount
// -----------------------------------------------------------------------------
-bool BS_OpenGLGfx::StartFrame(bool UpdateAll) {
+bool OpenGLGfx::StartFrame(bool UpdateAll) {
// Berechnen, wie viel Zeit seit dem letzten Frame vergangen ist.
// Dieser Wert kann über GetLastFrameDuration() von Modulen abgefragt werden, die zeitabhängig arbeiten.
UpdateLastFrameDuration();
@@ -152,7 +152,7 @@ bool BS_OpenGLGfx::StartFrame(bool UpdateAll) {
// -----------------------------------------------------------------------------
-bool BS_OpenGLGfx::EndFrame() {
+bool OpenGLGfx::EndFrame() {
// Scene zeichnen
m_RenderObjectManagerPtr->Render();
@@ -192,19 +192,19 @@ bool BS_OpenGLGfx::EndFrame() {
// -----------------------------------------------------------------------------
-BS_RenderObjectPtr<BS_Panel> BS_OpenGLGfx::GetMainPanel() {
+RenderObjectPtr<Panel> OpenGLGfx::GetMainPanel() {
return m_MainPanelPtr;
}
// -----------------------------------------------------------------------------
-void BS_OpenGLGfx::SetVsync(bool Vsync) {
+void OpenGLGfx::SetVsync(bool Vsync) {
warning("STUB: SetVsync(%d)", Vsync);
}
// -----------------------------------------------------------------------------
-bool BS_OpenGLGfx::GetVsync() const {
+bool OpenGLGfx::GetVsync() const {
warning("STUB: GetVsync()");
return true;
@@ -212,7 +212,7 @@ bool BS_OpenGLGfx::GetVsync() const {
// -----------------------------------------------------------------------------
-bool BS_OpenGLGfx::Fill(const BS_Rect *FillRectPtr, unsigned int Color) {
+bool OpenGLGfx::Fill(const BS_Rect *FillRectPtr, unsigned int Color) {
BS_Rect Rect;
if (!FillRectPtr) {
@@ -230,7 +230,7 @@ bool BS_OpenGLGfx::Fill(const BS_Rect *FillRectPtr, unsigned int Color) {
// -----------------------------------------------------------------------------
-bool BS_OpenGLGfx::GetScreenshot(unsigned int &Width, unsigned int &Height, byte **Data) {
+bool OpenGLGfx::GetScreenshot(unsigned int &Width, unsigned int &Height, byte **Data) {
if (!ReadFramebufferContents(m_Width, m_Height, Data))
return false;
@@ -247,7 +247,7 @@ bool BS_OpenGLGfx::GetScreenshot(unsigned int &Width, unsigned int &Height, byte
// -----------------------------------------------------------------------------
-bool BS_OpenGLGfx::ReadFramebufferContents(unsigned int Width, unsigned int Height, byte **Data) {
+bool OpenGLGfx::ReadFramebufferContents(unsigned int Width, unsigned int Height, byte **Data) {
*Data = (byte *)malloc(Width * Height * 4);
return true;
@@ -255,7 +255,7 @@ bool BS_OpenGLGfx::ReadFramebufferContents(unsigned int Width, unsigned int Heig
// -----------------------------------------------------------------------------
-void BS_OpenGLGfx::ReverseRGBAComponentOrder(byte *Data, uint size) {
+void OpenGLGfx::ReverseRGBAComponentOrder(byte *Data, uint size) {
uint32 *ptr = (uint32 *)Data;
for (uint i = 0; i < size; i++) {
@@ -267,7 +267,7 @@ void BS_OpenGLGfx::ReverseRGBAComponentOrder(byte *Data, uint size) {
// -----------------------------------------------------------------------------
-void BS_OpenGLGfx::FlipImagedataVertical(unsigned int Width, unsigned int Height, byte *Data) {
+void OpenGLGfx::FlipImagedataVertical(unsigned int Width, unsigned int Height, byte *Data) {
#if 0 // TODO
vector<unsigned int> LineBuffer(Width);
@@ -285,19 +285,19 @@ void BS_OpenGLGfx::FlipImagedataVertical(unsigned int Width, unsigned int Height
// RESOURCE MANAGING
// -----------------------------------------------------------------------------
-BS_Resource *BS_OpenGLGfx::LoadResource(const Common::String &FileName) {
+BS_Resource *OpenGLGfx::LoadResource(const Common::String &FileName) {
BS_ASSERT(CanLoadResource(FileName));
// Bild für den Softwarebuffer laden
if (FileName.hasSuffix(PNG_S_EXTENSION)) {
bool Result;
- BS_SWImage *pImage = new BS_SWImage(FileName, Result);
+ SWImage *pImage = new SWImage(FileName, Result);
if (!Result) {
delete pImage;
return 0;
}
- BS_BitmapResource *pResource = new BS_BitmapResource(FileName, pImage);
+ BitmapResource *pResource = new BitmapResource(FileName, pImage);
if (!pResource->IsValid()) {
delete pResource;
return 0;
@@ -309,13 +309,13 @@ BS_Resource *BS_OpenGLGfx::LoadResource(const Common::String &FileName) {
// Sprite-Bild laden
if (FileName.hasSuffix(PNG_EXTENSION) || FileName.hasSuffix(B25S_EXTENSION)) {
bool Result;
- BS_GLImage *pImage = new BS_GLImage(FileName, Result);
+ GLImage *pImage = new GLImage(FileName, Result);
if (!Result) {
delete pImage;
return 0;
}
- BS_BitmapResource *pResource = new BS_BitmapResource(FileName, pImage);
+ BitmapResource *pResource = new BitmapResource(FileName, pImage);
if (!pResource->IsValid()) {
delete pResource;
return 0;
@@ -340,14 +340,14 @@ BS_Resource *BS_OpenGLGfx::LoadResource(const Common::String &FileName) {
}
bool Result;
- BS_VectorImage *pImage = new BS_VectorImage(pFileData, FileSize, Result);
+ VectorImage *pImage = new VectorImage(pFileData, FileSize, Result);
if (!Result) {
delete pImage;
delete [] pFileData;
return 0;
}
- BS_BitmapResource *pResource = new BS_BitmapResource(FileName, pImage);
+ BitmapResource *pResource = new BitmapResource(FileName, pImage);
if (!pResource->IsValid()) {
delete pResource;
delete [] pFileData;
@@ -360,7 +360,7 @@ BS_Resource *BS_OpenGLGfx::LoadResource(const Common::String &FileName) {
// Animation laden
if (FileName.hasSuffix(ANI_EXTENSION)) {
- BS_AnimationResource *pResource = new BS_AnimationResource(FileName);
+ AnimationResource *pResource = new AnimationResource(FileName);
if (pResource->IsValid())
return pResource;
else {
@@ -371,7 +371,7 @@ BS_Resource *BS_OpenGLGfx::LoadResource(const Common::String &FileName) {
// Font laden
if (FileName.hasSuffix(FNT_EXTENSION)) {
- BS_FontResource *pResource = new BS_FontResource(BS_Kernel::GetInstance(), FileName);
+ FontResource *pResource = new FontResource(BS_Kernel::GetInstance(), FileName);
if (pResource->IsValid())
return pResource;
else {
@@ -386,7 +386,7 @@ BS_Resource *BS_OpenGLGfx::LoadResource(const Common::String &FileName) {
// -----------------------------------------------------------------------------
-bool BS_OpenGLGfx::CanLoadResource(const Common::String &FileName) {
+bool OpenGLGfx::CanLoadResource(const Common::String &FileName) {
return FileName.hasSuffix(PNG_EXTENSION) ||
FileName.hasSuffix(ANI_EXTENSION) ||
FileName.hasSuffix(FNT_EXTENSION) ||
@@ -399,7 +399,7 @@ bool BS_OpenGLGfx::CanLoadResource(const Common::String &FileName) {
// DEBUGGING
// -----------------------------------------------------------------------------
-void BS_OpenGLGfx::DrawDebugLine(const BS_Vertex &Start, const BS_Vertex &End, unsigned int Color) {
+void OpenGLGfx::DrawDebugLine(const BS_Vertex &Start, const BS_Vertex &End, unsigned int Color) {
m_DebugLines.push_back(DebugLine(Start, End, Color));
}
@@ -407,10 +407,10 @@ void BS_OpenGLGfx::DrawDebugLine(const BS_Vertex &Start, const BS_Vertex &End, u
// PERSISTENZ
// -----------------------------------------------------------------------------
-bool BS_OpenGLGfx::Persist(BS_OutputPersistenceBlock &Writer) {
+bool OpenGLGfx::Persist(BS_OutputPersistenceBlock &Writer) {
bool result = true;
- result &= BS_GraphicEngine::Persist(Writer);
+ result &= GraphicEngine::Persist(Writer);
result &= m_RenderObjectManagerPtr->Persist(Writer);
return result;
@@ -418,10 +418,10 @@ bool BS_OpenGLGfx::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool BS_OpenGLGfx::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool OpenGLGfx::Unpersist(BS_InputPersistenceBlock &Reader) {
bool result = true;
- result &= BS_GraphicEngine::Unpersist(Reader);
+ result &= GraphicEngine::Unpersist(Reader);
result &= m_RenderObjectManagerPtr->Unpersist(Reader);
return result && Reader.IsGood();
diff --git a/engines/sword25/gfx/opengl/openglgfx.h b/engines/sword25/gfx/opengl/openglgfx.h
index b62ecf960d..4a7994a92c 100644
--- a/engines/sword25/gfx/opengl/openglgfx.h
+++ b/engines/sword25/gfx/opengl/openglgfx.h
@@ -52,19 +52,19 @@ namespace Sword25 {
class BS_Kernel;
class BS_Service;
class BS_Resource;
-class BS_Panel;
+class Panel;
class BS_Image;
-class BS_RenderObjectManager;
+class RenderObjectManager;
// -----------------------------------------------------------------------------
// CLASS DECLARATION
// -----------------------------------------------------------------------------
-class BS_OpenGLGfx : public BS_GraphicEngine {
+class OpenGLGfx : public GraphicEngine {
public:
- BS_OpenGLGfx(BS_Kernel *pKernel);
- virtual ~BS_OpenGLGfx();
+ OpenGLGfx(BS_Kernel *pKernel);
+ virtual ~OpenGLGfx();
// Interface
// ---------
@@ -72,7 +72,7 @@ public:
virtual bool StartFrame(bool UpdateAll);
virtual bool EndFrame();
- virtual BS_RenderObjectPtr<BS_Panel> GetMainPanel();
+ virtual RenderObjectPtr<Panel> GetMainPanel();
virtual void SetVsync(bool Vsync);
virtual bool GetVsync() const;
@@ -98,9 +98,9 @@ private:
bool m_GLspritesInitialized;
byte *_backBuffer;
- BS_RenderObjectPtr<BS_Panel> m_MainPanelPtr;
+ RenderObjectPtr<Panel> m_MainPanelPtr;
- std::auto_ptr<BS_RenderObjectManager> m_RenderObjectManagerPtr;
+ std::auto_ptr<RenderObjectManager> m_RenderObjectManagerPtr;
struct DebugLine {
DebugLine(const BS_Vertex &_Start, const BS_Vertex &_End, unsigned int _Color) :
diff --git a/engines/sword25/gfx/opengl/swimage.cpp b/engines/sword25/gfx/opengl/swimage.cpp
index 6fff44a75c..06308bff87 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 Common::String &Filename, bool &Result) :
+SWImage::SWImage(const Common::String &Filename, bool &Result) :
_ImageDataPtr(0),
m_Width(0),
m_Height(0) {
@@ -68,16 +68,16 @@ BS_SWImage::BS_SWImage(const Common::String &Filename, bool &Result) :
}
// Bildeigenschaften bestimmen
- BS_GraphicEngine::COLOR_FORMATS ColorFormat;
+ GraphicEngine::COLOR_FORMATS ColorFormat;
int Pitch;
- if (!BS_ImageLoader::ExtractImageProperties(pFileData, FileSize, ColorFormat, m_Width, m_Height)) {
+ if (!ImageLoader::ExtractImageProperties(pFileData, FileSize, ColorFormat, m_Width, m_Height)) {
BS_LOG_ERRORLN("Could not read image properties.");
return;
}
// Das Bild dekomprimieren
byte *pUncompressedData;
- if (!BS_ImageLoader::LoadImage(pFileData, FileSize, BS_GraphicEngine::CF_ABGR32, pUncompressedData, m_Width, m_Height, Pitch)) {
+ if (!ImageLoader::LoadImage(pFileData, FileSize, GraphicEngine::CF_ABGR32, pUncompressedData, m_Width, m_Height, Pitch)) {
BS_LOG_ERRORLN("Could not decode image.");
return;
}
@@ -93,14 +93,14 @@ BS_SWImage::BS_SWImage(const Common::String &Filename, bool &Result) :
// -----------------------------------------------------------------------------
-BS_SWImage::~BS_SWImage() {
+SWImage::~SWImage() {
delete [] _ImageDataPtr;
}
// -----------------------------------------------------------------------------
-bool BS_SWImage::Blit(int PosX, int PosY,
+bool SWImage::Blit(int PosX, int PosY,
int Flipping,
BS_Rect *pPartRect,
unsigned int Color,
@@ -111,21 +111,21 @@ bool BS_SWImage::Blit(int PosX, int PosY,
// -----------------------------------------------------------------------------
-bool BS_SWImage::Fill(const BS_Rect *pFillRect, unsigned int Color) {
+bool SWImage::Fill(const BS_Rect *pFillRect, unsigned int Color) {
BS_LOG_ERRORLN("Fill() is not supported.");
return false;
}
// -----------------------------------------------------------------------------
- bool BS_SWImage::SetContent(const byte *Pixeldata, uint size, unsigned int Offset, unsigned int Stride) {
+ bool SWImage::SetContent(const byte *Pixeldata, uint size, unsigned int Offset, unsigned int Stride) {
BS_LOG_ERRORLN("SetContent() is not supported.");
return false;
}
// -----------------------------------------------------------------------------
-unsigned int BS_SWImage::GetPixel(int X, int Y) {
+unsigned int SWImage::GetPixel(int X, int Y) {
BS_ASSERT(X >= 0 && X < m_Width);
BS_ASSERT(Y >= 0 && Y < m_Height);
diff --git a/engines/sword25/gfx/opengl/swimage.h b/engines/sword25/gfx/opengl/swimage.h
index d6e066661c..d563125d26 100644
--- a/engines/sword25/gfx/opengl/swimage.h
+++ b/engines/sword25/gfx/opengl/swimage.h
@@ -50,10 +50,10 @@ namespace Sword25 {
// CLASS DEFINITION
// -----------------------------------------------------------------------------
-class BS_SWImage : public BS_Image {
+class SWImage : public Image {
public:
- BS_SWImage(const Common::String &Filename, bool &Result);
- virtual ~BS_SWImage();
+ SWImage(const Common::String &Filename, bool &Result);
+ virtual ~SWImage();
virtual int GetWidth() const {
return m_Width;
@@ -61,12 +61,12 @@ public:
virtual int GetHeight() const {
return m_Height;
}
- virtual BS_GraphicEngine::COLOR_FORMATS GetColorFormat() const {
- return BS_GraphicEngine::CF_ARGB32;
+ virtual GraphicEngine::COLOR_FORMATS GetColorFormat() const {
+ return GraphicEngine::CF_ARGB32;
}
virtual bool Blit(int PosX = 0, int PosY = 0,
- int Flipping = BS_Image::FLIP_NONE,
+ int Flipping = Image::FLIP_NONE,
BS_Rect *pPartRect = NULL,
unsigned int Color = BS_ARGB(255, 255, 255, 255),
int Width = -1, int Height = -1);