aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx/opengl
diff options
context:
space:
mode:
authorEugene Sandulenko2010-09-02 17:11:45 +0000
committerEugene Sandulenko2010-10-12 23:32:32 +0000
commit06bce68860696f67f0a0ac1e9682635081918801 (patch)
treeaa64e048a3c8870f5305db8f112194ab874409d5 /engines/sword25/gfx/opengl
parent086f5961b6575c50bb386750b6e9a3ed1efdd8cd (diff)
downloadscummvm-rg350-06bce68860696f67f0a0ac1e9682635081918801.tar.gz
scummvm-rg350-06bce68860696f67f0a0ac1e9682635081918801.tar.bz2
scummvm-rg350-06bce68860696f67f0a0ac1e9682635081918801.zip
SWORD25: Comply to the code conventions for several classes
svn-id: r53310
Diffstat (limited to 'engines/sword25/gfx/opengl')
-rw-r--r--engines/sword25/gfx/opengl/glimage.cpp122
-rw-r--r--engines/sword25/gfx/opengl/glimage.h46
-rw-r--r--engines/sword25/gfx/opengl/glvectorimageblit.cpp2
-rw-r--r--engines/sword25/gfx/opengl/openglgfx.cpp40
-rw-r--r--engines/sword25/gfx/opengl/openglgfx.h8
-rw-r--r--engines/sword25/gfx/opengl/swimage.cpp50
-rw-r--r--engines/sword25/gfx/opengl/swimage.h46
7 files changed, 157 insertions, 157 deletions
diff --git a/engines/sword25/gfx/opengl/glimage.cpp b/engines/sword25/gfx/opengl/glimage.cpp
index c54f7829c0..bccd18660d 100644
--- a/engines/sword25/gfx/opengl/glimage.cpp
+++ b/engines/sword25/gfx/opengl/glimage.cpp
@@ -51,11 +51,11 @@ namespace Sword25 {
// CONSTRUCTION / DESTRUCTION
// -----------------------------------------------------------------------------
-GLImage::GLImage(const Common::String &Filename, bool &Result) :
+GLImage::GLImage(const Common::String &filename, bool &result) :
_data(0),
- m_Width(0),
- m_Height(0) {
- Result = false;
+ _width(0),
+ _height(0) {
+ result = false;
PackageManager *pPackage = static_cast<PackageManager *>(Kernel::GetInstance()->GetService("package"));
BS_ASSERT(pPackage);
@@ -64,22 +64,22 @@ GLImage::GLImage(const Common::String &Filename, bool &Result) :
// Datei laden
byte *pFileData;
- uint FileSize;
- if (!(pFileData = (byte *) pPackage->GetFile(Filename, &FileSize))) {
- BS_LOG_ERRORLN("File \"%s\" could not be loaded.", Filename.c_str());
+ uint fileSize;
+ if (!(pFileData = (byte *)pPackage->GetFile(filename, &fileSize))) {
+ BS_LOG_ERRORLN("File \"%s\" could not be loaded.", filename.c_str());
return;
}
// Bildeigenschaften bestimmen
- GraphicEngine::COLOR_FORMATS ColorFormat;
- int Pitch;
- if (!ImageLoader::ExtractImageProperties(pFileData, FileSize, ColorFormat, m_Width, m_Height)) {
+ GraphicEngine::COLOR_FORMATS colorFormat;
+ int pitch;
+ if (!ImageLoader::ExtractImageProperties(pFileData, fileSize, colorFormat, _width, _height)) {
BS_LOG_ERRORLN("Could not read image properties.");
return;
}
// Das Bild dekomprimieren
- if (!ImageLoader::LoadImage(pFileData, FileSize, GraphicEngine::CF_ARGB32, _data, m_Width, m_Height, Pitch)) {
+ if (!ImageLoader::LoadImage(pFileData, fileSize, GraphicEngine::CF_ARGB32, _data, _width, _height, pitch)) {
BS_LOG_ERRORLN("Could not decode image.");
return;
}
@@ -87,22 +87,22 @@ GLImage::GLImage(const Common::String &Filename, bool &Result) :
// Dateidaten freigeben
delete[] pFileData;
- Result = true;
+ result = true;
return;
}
// -----------------------------------------------------------------------------
-GLImage::GLImage(uint Width, uint Height, bool &Result) :
- m_Width(Width),
- m_Height(Height) {
- Result = false;
+GLImage::GLImage(uint width, uint height, bool &result) :
+ _width(width),
+ _height(height) {
+ result = false;
- _data = new byte[Width * Height * 4];
+ _data = new byte[width * height * 4];
_backSurface = (static_cast<GraphicEngine *>(Kernel::GetInstance()->GetService("gfx")))->getSurface();
- Result = true;
+ result = true;
return;
}
@@ -114,27 +114,27 @@ GLImage::~GLImage() {
// -----------------------------------------------------------------------------
-bool GLImage::Fill(const Common::Rect *pFillRect, uint Color) {
+bool GLImage::fill(const Common::Rect *pFillRect, uint color) {
BS_LOG_ERRORLN("Fill() is not supported.");
return false;
}
// -----------------------------------------------------------------------------
-bool GLImage::SetContent(const byte *Pixeldata, uint size, uint Offset, uint Stride) {
+bool GLImage::setContent(const byte *pixeldata, uint size, uint offset, uint stride) {
// Überprüfen, ob PixelData ausreichend viele Pixel enthält um ein Bild der Größe Width * Height zu erzeugen
- if (size < static_cast<uint>(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);
+ if (size < static_cast<uint>(_width * _height * 4)) {
+ BS_LOG_ERRORLN("PixelData vector is too small to define a 32 bit %dx%d image.", _width, _height);
return false;
}
- const byte *in = &Pixeldata[Offset];
+ const byte *in = &pixeldata[offset];
byte *out = _data;
- for (int i = 0; i < m_Height; i++) {
- memcpy(out, in, m_Width * 4);
- out += m_Width * 4;
- in += Stride;
+ for (int i = 0; i < _height; i++) {
+ memcpy(out, in, _width * 4);
+ out += _width * 4;
+ in += stride;
}
return true;
@@ -142,16 +142,16 @@ bool GLImage::SetContent(const byte *Pixeldata, uint size, uint Offset, uint Str
// -----------------------------------------------------------------------------
-uint GLImage::GetPixel(int X, int Y) {
+uint GLImage::getPixel(int x, int y) {
BS_LOG_ERRORLN("GetPixel() is not supported. Returning black.");
return 0;
}
// -----------------------------------------------------------------------------
-bool GLImage::Blit(int PosX, int PosY, int Flipping, Common::Rect *pPartRect, uint Color, int Width, int Height) {
+bool GLImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRect, uint color, int width, int height) {
int x1 = 0, y1 = 0;
- int w = m_Width, h = m_Height;
+ int w = _width, h = _height;
if (pPartRect) {
x1 = pPartRect->left;
y1 = pPartRect->top;
@@ -159,43 +159,43 @@ bool GLImage::Blit(int PosX, int PosY, int Flipping, Common::Rect *pPartRect, ui
h = pPartRect->bottom - pPartRect->top;
}
- debug(6, "Blit(%d, %d, %d, [%d, %d, %d, %d], %d, %d, %d)", PosX, PosY, Flipping, x1, y1, w, h, Color, Width, Height);
+ debug(6, "Blit(%d, %d, %d, [%d, %d, %d, %d], %d, %d, %d)", posX, posY, flipping, x1, y1, w, h, color, width, height);
// Skalierungen berechnen
- float ScaleX, ScaleY;
- if (Width == -1)
- Width = m_Width;
- ScaleX = (float) Width / (float) m_Width;
+ float scaleX, scaleY;
+ if (width == -1)
+ width = _width;
+ scaleX = (float)width / (float)_width;
- if (Height == -1)
- Height = m_Height;
- ScaleY = (float) Height / (float) m_Height;
+ if (height == -1)
+ height = _height;
+ scaleY = (float)height / (float)_height;
- if ((Color & 0xff000000) != 0xff000000) {
- warning("STUB: Image transparent bg color: %x", Color);
+ if ((color & 0xff000000) != 0xff000000) {
+ warning("STUB: Image transparent bg color: %x", color);
}
- int cr = (Color >> 16) & 0xff;
- int cg = (Color >> 8) & 0xff;
- int cb = (Color >> 0) & 0xff;
+ int cr = (color >> 16) & 0xff;
+ int cg = (color >> 8) & 0xff;
+ int cb = (color >> 0) & 0xff;
- if (ScaleX != 1.0 || ScaleY != 1.0) {
- warning("STUB: Sprite scaling (%f x %f)", ScaleX, ScaleY);
+ if (scaleX != 1.0 || scaleY != 1.0) {
+ warning("STUB: Sprite scaling (%f x %f)", scaleX, scaleY);
}
- if (PosX < 0) {
- w -= PosX;
- x1 = -PosX;
- PosX = 0;
+ if (posX < 0) {
+ w -= posX;
+ x1 = -posX;
+ posX = 0;
}
- if (PosY < 0) {
- h -= PosY;
- y1 = -PosY;
- PosY = 0;
+ if (posY < 0) {
+ h -= posY;
+ y1 = -posY;
+ posY = 0;
}
- w = CLIP(w, 0, MAX((int)_backSurface->w - PosX - 1, 0));
- h = CLIP(h, 0, MAX((int)_backSurface->h - PosY - 1, 0));
+ w = CLIP(w, 0, MAX((int)_backSurface->w - posX - 1, 0));
+ h = CLIP(h, 0, MAX((int)_backSurface->h - posY - 1, 0));
if (w == 0 || h == 0)
return true;
@@ -207,19 +207,19 @@ bool GLImage::Blit(int PosX, int PosY, int Flipping, Common::Rect *pPartRect, ui
// TODO: scaling
int inStep = 4;
- int inoStep = m_Width * 4;
- if (Flipping & Image::FLIP_V) {
+ int inoStep = _width * 4;
+ if (flipping & Image::FLIP_V) {
inStep = -inStep;
x1 = x1 + w - 1;
}
- if (Flipping & Image::FLIP_H) {
+ if (flipping & Image::FLIP_H) {
inoStep = -inoStep;
y1 = y1 + h - 1;
}
- byte *ino = &_data[y1 * m_Width * 4 + x1 * 4];
- byte *outo = (byte *)_backSurface->getBasePtr(PosX, PosY);
+ byte *ino = &_data[y1 * _width * 4 + x1 * 4];
+ byte *outo = (byte *)_backSurface->getBasePtr(posX, posY);
byte *in, *out;
for (int i = 0; i < h; i++) {
@@ -278,7 +278,7 @@ bool GLImage::Blit(int PosX, int PosY, int Flipping, Common::Rect *pPartRect, ui
ino += inoStep;
}
- g_system->copyRectToScreen((byte *)_backSurface->getBasePtr(PosX, PosY), _backSurface->pitch, PosX, PosY, w, h);
+ g_system->copyRectToScreen((byte *)_backSurface->getBasePtr(posX, posY), _backSurface->pitch, posX, posY, w, h);
return true;
}
diff --git a/engines/sword25/gfx/opengl/glimage.h b/engines/sword25/gfx/opengl/glimage.h
index d5986eacd9..5f019d2bc0 100644
--- a/engines/sword25/gfx/opengl/glimage.h
+++ b/engines/sword25/gfx/opengl/glimage.h
@@ -57,7 +57,7 @@ typedef void *GLS_Sprite;
class GLImage : public Image {
public:
- GLImage(const Common::String &Filename, bool &Result);
+ GLImage(const Common::String &filename, bool &result);
/**
@brief Erzeugt ein leeres BS_GLImage
@@ -67,53 +67,53 @@ 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.
*/
- GLImage(uint Width, uint Height, bool &Result);
+ GLImage(uint width, uint height, bool &result);
virtual ~GLImage();
- virtual int GetWidth() const {
- return m_Width;
+ virtual int getWidth() const {
+ return _width;
}
- virtual int GetHeight() const {
- return m_Height;
+ virtual int getHeight() const {
+ return _height;
}
- virtual GraphicEngine::COLOR_FORMATS GetColorFormat() const {
+ virtual GraphicEngine::COLOR_FORMATS getColorFormat() const {
return GraphicEngine::CF_ARGB32;
}
- virtual bool Blit(int PosX = 0, int PosY = 0,
- int Flipping = Image::FLIP_NONE,
+ virtual bool blit(int posX = 0, int posY = 0,
+ int flipping = Image::FLIP_NONE,
Common::Rect *pPartRect = NULL,
- uint Color = BS_ARGB(255, 255, 255, 255),
- int Width = -1, int Height = -1);
- virtual bool Fill(const Common::Rect *pFillRect, uint Color);
- virtual bool SetContent(const byte *Pixeldata, uint size, uint Offset = 0, uint Stride = 0);
- virtual uint GetPixel(int X, int Y);
+ uint color = BS_ARGB(255, 255, 255, 255),
+ int width = -1, int height = -1);
+ virtual bool fill(const Common::Rect *pFillRect, uint color);
+ virtual bool setContent(const byte *pixeldata, uint size, uint offset = 0, uint stride = 0);
+ virtual uint getPixel(int x, int y);
- virtual bool IsBlitSource() const {
+ virtual bool isBlitSource() const {
return true;
}
- virtual bool IsBlitTarget() const {
+ virtual bool isBlitTarget() const {
return false;
}
- virtual bool IsScalingAllowed() const {
+ virtual bool isScalingAllowed() const {
return true;
}
- virtual bool IsFillingAllowed() const {
+ virtual bool isFillingAllowed() const {
return false;
}
- virtual bool IsAlphaAllowed() const {
+ virtual bool isAlphaAllowed() const {
return true;
}
- virtual bool IsColorModulationAllowed() const {
+ virtual bool isColorModulationAllowed() const {
return true;
}
- virtual bool IsSetContentAllowed() const {
+ virtual bool isSetContentAllowed() const {
return true;
}
private:
byte *_data;
- int m_Width;
- int m_Height;
+ int _width;
+ int _height;
Graphics::Surface *_backSurface;
};
diff --git a/engines/sword25/gfx/opengl/glvectorimageblit.cpp b/engines/sword25/gfx/opengl/glvectorimageblit.cpp
index 3347d424c5..664d9c16b0 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 VectorImage::Blit(int PosX, int PosY,
+bool VectorImage::blit(int PosX, int PosY,
int Flipping,
Common::Rect *pPartRect,
uint Color,
diff --git a/engines/sword25/gfx/opengl/openglgfx.cpp b/engines/sword25/gfx/opengl/openglgfx.cpp
index ec4f1221a1..0401a99e4d 100644
--- a/engines/sword25/gfx/opengl/openglgfx.cpp
+++ b/engines/sword25/gfx/opengl/openglgfx.cpp
@@ -127,12 +127,12 @@ bool OpenGLGfx::Init(int Width, int Height, int BitDepth, int BackbufferCount, b
SetVsync(true);
// Layer-Manager initialisieren.
- m_RenderObjectManagerPtr.reset(new RenderObjectManager(Width, Height, BackbufferCount + 1));
+ _renderObjectManagerPtr.reset(new RenderObjectManager(Width, Height, BackbufferCount + 1));
// Hauptpanel erstellen
- m_MainPanelPtr = m_RenderObjectManagerPtr->GetTreeRoot()->AddPanel(Width, Height, BS_ARGB(0, 0, 0, 0));
- if (!m_MainPanelPtr.IsValid()) return false;
- m_MainPanelPtr->SetVisible(true);
+ m_MainPanelPtr = _renderObjectManagerPtr->getTreeRoot()->addPanel(Width, Height, BS_ARGB(0, 0, 0, 0));
+ if (!m_MainPanelPtr.isValid()) return false;
+ m_MainPanelPtr->setVisible(true);
return true;
}
@@ -145,7 +145,7 @@ bool OpenGLGfx::StartFrame(bool UpdateAll) {
UpdateLastFrameDuration();
// Den Layer-Manager auf den nächsten Frame vorbereiten
- m_RenderObjectManagerPtr->StartFrame();
+ _renderObjectManagerPtr->startFrame();
return true;
}
@@ -154,7 +154,7 @@ bool OpenGLGfx::StartFrame(bool UpdateAll) {
bool OpenGLGfx::EndFrame() {
// Scene zeichnen
- m_RenderObjectManagerPtr->Render();
+ _renderObjectManagerPtr->render();
g_system->updateScreen();
@@ -212,7 +212,7 @@ bool OpenGLGfx::GetVsync() const {
// -----------------------------------------------------------------------------
-bool OpenGLGfx::Fill(const Common::Rect *fillRectPtr, uint color) {
+bool OpenGLGfx::fill(const Common::Rect *fillRectPtr, uint color) {
Common::Rect rect(m_Width - 1, m_Height - 1);
if (fillRectPtr) {
@@ -297,7 +297,7 @@ Resource *OpenGLGfx::LoadResource(const Common::String &FileName) {
}
BitmapResource *pResource = new BitmapResource(FileName, pImage);
- if (!pResource->IsValid()) {
+ if (!pResource->isValid()) {
delete pResource;
return 0;
}
@@ -315,7 +315,7 @@ Resource *OpenGLGfx::LoadResource(const Common::String &FileName) {
}
BitmapResource *pResource = new BitmapResource(FileName, pImage);
- if (!pResource->IsValid()) {
+ if (!pResource->isValid()) {
delete pResource;
return 0;
}
@@ -347,20 +347,20 @@ Resource *OpenGLGfx::LoadResource(const Common::String &FileName) {
}
BitmapResource *pResource = new BitmapResource(FileName, pImage);
- if (!pResource->IsValid()) {
+ if (!pResource->isValid()) {
delete pResource;
- delete [] pFileData;
+ delete[] pFileData;
return 0;
}
- delete [] pFileData;
+ delete[] pFileData;
return pResource;
}
// Animation laden
if (FileName.hasSuffix(ANI_EXTENSION)) {
AnimationResource *pResource = new AnimationResource(FileName);
- if (pResource->IsValid())
+ if (pResource->isValid())
return pResource;
else {
delete pResource;
@@ -406,24 +406,24 @@ void OpenGLGfx::DrawDebugLine(const Vertex &Start, const Vertex &End, uint Color
// PERSISTENZ
// -----------------------------------------------------------------------------
-bool OpenGLGfx::Persist(OutputPersistenceBlock &Writer) {
+bool OpenGLGfx::persist(OutputPersistenceBlock &writer) {
bool result = true;
- result &= GraphicEngine::Persist(Writer);
- result &= m_RenderObjectManagerPtr->Persist(Writer);
+ result &= GraphicEngine::persist(writer);
+ result &= _renderObjectManagerPtr->persist(writer);
return result;
}
// -----------------------------------------------------------------------------
-bool OpenGLGfx::Unpersist(InputPersistenceBlock &Reader) {
+bool OpenGLGfx::unpersist(InputPersistenceBlock &reader) {
bool result = true;
- result &= GraphicEngine::Unpersist(Reader);
- result &= m_RenderObjectManagerPtr->Unpersist(Reader);
+ result &= GraphicEngine::unpersist(reader);
+ result &= _renderObjectManagerPtr->unpersist(reader);
- return result && Reader.IsGood();
+ return result && reader.isGood();
}
} // End of namespace Sword25
diff --git a/engines/sword25/gfx/opengl/openglgfx.h b/engines/sword25/gfx/opengl/openglgfx.h
index b3416185a0..e8f312ad28 100644
--- a/engines/sword25/gfx/opengl/openglgfx.h
+++ b/engines/sword25/gfx/opengl/openglgfx.h
@@ -77,7 +77,7 @@ public:
virtual void SetVsync(bool Vsync);
virtual bool GetVsync() const;
- virtual bool Fill(const Common::Rect *FillRectPtr = 0, uint Color = BS_RGB(0, 0, 0));
+ virtual bool fill(const Common::Rect *FillRectPtr = 0, uint Color = BS_RGB(0, 0, 0));
virtual bool GetScreenshot(uint &Width, uint &Height, byte **Data);
// Resource-Managing Methoden
@@ -91,8 +91,8 @@ public:
// Persistenz Methoden
// -------------------
- virtual bool Persist(OutputPersistenceBlock &Writer);
- virtual bool Unpersist(InputPersistenceBlock &Reader);
+ virtual bool persist(OutputPersistenceBlock &writer);
+ virtual bool unpersist(InputPersistenceBlock &reader);
private:
bool m_GLspritesInitialized;
@@ -100,7 +100,7 @@ private:
RenderObjectPtr<Panel> m_MainPanelPtr;
- Common::ScopedPtr<RenderObjectManager> m_RenderObjectManagerPtr;
+ Common::ScopedPtr<RenderObjectManager> _renderObjectManagerPtr;
struct DebugLine {
DebugLine(const Vertex &_Start, const Vertex &_End, uint _Color) :
diff --git a/engines/sword25/gfx/opengl/swimage.cpp b/engines/sword25/gfx/opengl/swimage.cpp
index 2ea6c72c27..33d7435e02 100644
--- a/engines/sword25/gfx/opengl/swimage.cpp
+++ b/engines/sword25/gfx/opengl/swimage.cpp
@@ -50,34 +50,34 @@ namespace Sword25 {
// CONSTRUCTION / DESTRUCTION
// -----------------------------------------------------------------------------
-SWImage::SWImage(const Common::String &Filename, bool &Result) :
- _ImageDataPtr(0),
- m_Width(0),
- m_Height(0) {
- Result = false;
+SWImage::SWImage(const Common::String &filename, bool &result) :
+ _imageDataPtr(0),
+ _width(0),
+ _height(0) {
+ result = false;
PackageManager *pPackage = static_cast<PackageManager *>(Kernel::GetInstance()->GetService("package"));
BS_ASSERT(pPackage);
// Datei laden
byte *pFileData;
- uint FileSize;
- if (!(pFileData = (byte *) pPackage->GetFile(Filename, &FileSize))) {
- BS_LOG_ERRORLN("File \"%s\" could not be loaded.", Filename.c_str());
+ uint fileSize;
+ if (!(pFileData = (byte *)pPackage->GetFile(filename, &fileSize))) {
+ BS_LOG_ERRORLN("File \"%s\" could not be loaded.", filename.c_str());
return;
}
// Bildeigenschaften bestimmen
- GraphicEngine::COLOR_FORMATS ColorFormat;
- int Pitch;
- if (!ImageLoader::ExtractImageProperties(pFileData, FileSize, ColorFormat, m_Width, m_Height)) {
+ GraphicEngine::COLOR_FORMATS colorFormat;
+ int pitch;
+ if (!ImageLoader::ExtractImageProperties(pFileData, fileSize, colorFormat, _width, _height)) {
BS_LOG_ERRORLN("Could not read image properties.");
return;
}
// Das Bild dekomprimieren
byte *pUncompressedData;
- if (!ImageLoader::LoadImage(pFileData, FileSize, GraphicEngine::CF_ABGR32, pUncompressedData, m_Width, m_Height, Pitch)) {
+ if (!ImageLoader::LoadImage(pFileData, fileSize, GraphicEngine::CF_ABGR32, pUncompressedData, _width, _height, pitch)) {
BS_LOG_ERRORLN("Could not decode image.");
return;
}
@@ -85,51 +85,51 @@ SWImage::SWImage(const Common::String &Filename, bool &Result) :
// Dateidaten freigeben
delete[] pFileData;
- _ImageDataPtr = (uint *) pUncompressedData;
+ _imageDataPtr = (uint *)pUncompressedData;
- Result = true;
+ result = true;
return;
}
// -----------------------------------------------------------------------------
SWImage::~SWImage() {
- delete [] _ImageDataPtr;
+ delete[] _imageDataPtr;
}
// -----------------------------------------------------------------------------
-bool SWImage::Blit(int PosX, int PosY,
- int Flipping,
+bool SWImage::blit(int posX, int posY,
+ int flipping,
Common::Rect *pPartRect,
- uint Color,
- int Width, int Height) {
+ uint color,
+ int width, int height) {
BS_LOG_ERRORLN("Blit() is not supported.");
return false;
}
// -----------------------------------------------------------------------------
-bool SWImage::Fill(const Common::Rect *pFillRect, uint Color) {
+bool SWImage::fill(const Common::Rect *pFillRect, uint color) {
BS_LOG_ERRORLN("Fill() is not supported.");
return false;
}
// -----------------------------------------------------------------------------
- bool SWImage::SetContent(const byte *Pixeldata, uint size, uint Offset, uint Stride) {
+bool SWImage::setContent(const byte *pixeldata, uint size, uint offset, uint stride) {
BS_LOG_ERRORLN("SetContent() is not supported.");
return false;
}
// -----------------------------------------------------------------------------
-uint SWImage::GetPixel(int X, int Y) {
- BS_ASSERT(X >= 0 && X < m_Width);
- BS_ASSERT(Y >= 0 && Y < m_Height);
+uint SWImage::getPixel(int x, int y) {
+ BS_ASSERT(x >= 0 && x < _width);
+ BS_ASSERT(y >= 0 && y < _height);
- return _ImageDataPtr[m_Width * Y + X];
+ return _imageDataPtr[_width * y + x];
}
} // End of namespace Sword25
diff --git a/engines/sword25/gfx/opengl/swimage.h b/engines/sword25/gfx/opengl/swimage.h
index eaf8a6cb61..caf6bdcc71 100644
--- a/engines/sword25/gfx/opengl/swimage.h
+++ b/engines/sword25/gfx/opengl/swimage.h
@@ -52,54 +52,54 @@ namespace Sword25 {
class SWImage : public Image {
public:
- SWImage(const Common::String &Filename, bool &Result);
+ SWImage(const Common::String &filename, bool &result);
virtual ~SWImage();
- virtual int GetWidth() const {
- return m_Width;
+ virtual int getWidth() const {
+ return _width;
}
- virtual int GetHeight() const {
- return m_Height;
+ virtual int getHeight() const {
+ return _height;
}
- virtual GraphicEngine::COLOR_FORMATS GetColorFormat() const {
+ virtual GraphicEngine::COLOR_FORMATS getColorFormat() const {
return GraphicEngine::CF_ARGB32;
}
- virtual bool Blit(int PosX = 0, int PosY = 0,
- int Flipping = Image::FLIP_NONE,
+ virtual bool blit(int posX = 0, int posY = 0,
+ int flipping = Image::FLIP_NONE,
Common::Rect *pPartRect = NULL,
- uint Color = BS_ARGB(255, 255, 255, 255),
- int Width = -1, int Height = -1);
- virtual bool Fill(const Common::Rect *FillRectPtr, uint Color);
- virtual bool SetContent(const byte *Pixeldata, uint size, uint Offset, uint Stride);
- virtual uint GetPixel(int X, int Y);
+ uint color = BS_ARGB(255, 255, 255, 255),
+ int width = -1, int height = -1);
+ virtual bool fill(const Common::Rect *fillRectPtr, uint color);
+ virtual bool setContent(const byte *pixeldata, uint size, uint offset, uint stride);
+ virtual uint getPixel(int x, int y);
- virtual bool IsBlitSource() const {
+ virtual bool isBlitSource() const {
return false;
}
- virtual bool IsBlitTarget() const {
+ virtual bool isBlitTarget() const {
return false;
}
- virtual bool IsScalingAllowed() const {
+ virtual bool isScalingAllowed() const {
return false;
}
- virtual bool IsFillingAllowed() const {
+ virtual bool isFillingAllowed() const {
return false;
}
- virtual bool IsAlphaAllowed() const {
+ virtual bool isAlphaAllowed() const {
return false;
}
- virtual bool IsColorModulationAllowed() const {
+ virtual bool isColorModulationAllowed() const {
return false;
}
- virtual bool IsSetContentAllowed() const {
+ virtual bool isSetContentAllowed() const {
return false;
}
private:
- uint *_ImageDataPtr;
+ uint *_imageDataPtr;
- int m_Width;
- int m_Height;
+ int _width;
+ int _height;
};
} // End of namespace Sword25