aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx/opengl
diff options
context:
space:
mode:
authorEugene Sandulenko2010-09-02 12:14:04 +0000
committerEugene Sandulenko2010-10-12 23:30:00 +0000
commit086f5961b6575c50bb386750b6e9a3ed1efdd8cd (patch)
tree75c532790d67ccd3b8fdc5c371a3ce3bf0705dca /engines/sword25/gfx/opengl
parent0cdb2ded85d17150cb108a5d63dd8957c29af2a5 (diff)
downloadscummvm-rg350-086f5961b6575c50bb386750b6e9a3ed1efdd8cd.tar.gz
scummvm-rg350-086f5961b6575c50bb386750b6e9a3ed1efdd8cd.tar.bz2
scummvm-rg350-086f5961b6575c50bb386750b6e9a3ed1efdd8cd.zip
SWORD25: unsigned int -> uint
svn-id: r53309
Diffstat (limited to 'engines/sword25/gfx/opengl')
-rw-r--r--engines/sword25/gfx/opengl/glimage.cpp14
-rw-r--r--engines/sword25/gfx/opengl/glimage.h10
-rw-r--r--engines/sword25/gfx/opengl/glvectorimageblit.cpp6
-rw-r--r--engines/sword25/gfx/opengl/openglgfx.cpp24
-rw-r--r--engines/sword25/gfx/opengl/openglgfx.h14
-rw-r--r--engines/sword25/gfx/opengl/swimage.cpp12
-rw-r--r--engines/sword25/gfx/opengl/swimage.h10
7 files changed, 45 insertions, 45 deletions
diff --git a/engines/sword25/gfx/opengl/glimage.cpp b/engines/sword25/gfx/opengl/glimage.cpp
index 53b7c7b7b8..c54f7829c0 100644
--- a/engines/sword25/gfx/opengl/glimage.cpp
+++ b/engines/sword25/gfx/opengl/glimage.cpp
@@ -64,7 +64,7 @@ GLImage::GLImage(const Common::String &Filename, bool &Result) :
// Datei laden
byte *pFileData;
- unsigned int FileSize;
+ uint FileSize;
if (!(pFileData = (byte *) pPackage->GetFile(Filename, &FileSize))) {
BS_LOG_ERRORLN("File \"%s\" could not be loaded.", Filename.c_str());
return;
@@ -93,7 +93,7 @@ GLImage::GLImage(const Common::String &Filename, bool &Result) :
// -----------------------------------------------------------------------------
-GLImage::GLImage(unsigned int Width, unsigned int Height, bool &Result) :
+GLImage::GLImage(uint Width, uint Height, bool &Result) :
m_Width(Width),
m_Height(Height) {
Result = false;
@@ -114,16 +114,16 @@ GLImage::~GLImage() {
// -----------------------------------------------------------------------------
-bool GLImage::Fill(const Common::Rect *pFillRect, unsigned int 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, unsigned int Offset, unsigned int 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<unsigned int>(m_Width * m_Height * 4)) {
+ 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);
return false;
}
@@ -142,14 +142,14 @@ bool GLImage::SetContent(const byte *Pixeldata, uint size, unsigned int Offset,
// -----------------------------------------------------------------------------
-unsigned int 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, unsigned int 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;
if (pPartRect) {
diff --git a/engines/sword25/gfx/opengl/glimage.h b/engines/sword25/gfx/opengl/glimage.h
index 661c4cf1e7..d5986eacd9 100644
--- a/engines/sword25/gfx/opengl/glimage.h
+++ b/engines/sword25/gfx/opengl/glimage.h
@@ -67,7 +67,7 @@ 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(unsigned int Width, unsigned int Height, bool &Result);
+ GLImage(uint Width, uint Height, bool &Result);
virtual ~GLImage();
virtual int GetWidth() const {
@@ -83,11 +83,11 @@ public:
virtual bool Blit(int PosX = 0, int PosY = 0,
int Flipping = Image::FLIP_NONE,
Common::Rect *pPartRect = NULL,
- unsigned int Color = BS_ARGB(255, 255, 255, 255),
+ uint Color = BS_ARGB(255, 255, 255, 255),
int Width = -1, int Height = -1);
- virtual bool Fill(const Common::Rect *pFillRect, unsigned int Color);
- virtual bool SetContent(const byte *Pixeldata, uint size, unsigned int Offset = 0, unsigned int Stride = 0);
- virtual unsigned int GetPixel(int X, int Y);
+ 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 {
return true;
diff --git a/engines/sword25/gfx/opengl/glvectorimageblit.cpp b/engines/sword25/gfx/opengl/glvectorimageblit.cpp
index 8a91a910a2..3347d424c5 100644
--- a/engines/sword25/gfx/opengl/glvectorimageblit.cpp
+++ b/engines/sword25/gfx/opengl/glvectorimageblit.cpp
@@ -54,7 +54,7 @@ const float LINE_SCALE_FACTOR = 1.0f;
bool VectorImage::Blit(int PosX, int PosY,
int Flipping,
Common::Rect *pPartRect,
- unsigned int Color,
+ uint Color,
int Width, int Height) {
#if 0
static BS_VectorImageRenderer VectorImageRenderer;
@@ -82,8 +82,8 @@ bool VectorImage::Blit(int PosX, int PosY,
float ScaleFactorX = (Width == - 1) ? 1 : static_cast<float>(Width) / static_cast<float>(GetWidth());
float ScaleFactorY = (Height == - 1) ? 1 : static_cast<float>(Height) / static_cast<float>(GetHeight());
- unsigned int RenderedWidth;
- unsigned int RenderedHeight;
+ uint RenderedWidth;
+ uint RenderedHeight;
if (!VectorImageRenderer.Render(*this, ScaleFactorX, ScaleFactorY, RenderedWidth, RenderedHeight, PixelData, LINE_SCALE_FACTOR)) {
BS_LOG_ERRORLN("Call to BS_VectorImageRenderer::Render() failed.");
return false;
diff --git a/engines/sword25/gfx/opengl/openglgfx.cpp b/engines/sword25/gfx/opengl/openglgfx.cpp
index 151905759c..ec4f1221a1 100644
--- a/engines/sword25/gfx/opengl/openglgfx.cpp
+++ b/engines/sword25/gfx/opengl/openglgfx.cpp
@@ -166,7 +166,7 @@ bool OpenGLGfx::EndFrame() {
Common::Array<DebugLine>::const_iterator iter = m_DebugLines.begin();
for (; iter != m_DebugLines.end(); ++iter) {
- const unsigned int &Color = (*iter).Color;
+ const uint &Color = (*iter).Color;
const BS_Vertex &Start = (*iter).Start;
const BS_Vertex &End = (*iter).End;
@@ -212,7 +212,7 @@ bool OpenGLGfx::GetVsync() const {
// -----------------------------------------------------------------------------
-bool OpenGLGfx::Fill(const Common::Rect *fillRectPtr, unsigned int color) {
+bool OpenGLGfx::Fill(const Common::Rect *fillRectPtr, uint color) {
Common::Rect rect(m_Width - 1, m_Height - 1);
if (fillRectPtr) {
@@ -229,7 +229,7 @@ bool OpenGLGfx::Fill(const Common::Rect *fillRectPtr, unsigned int color) {
// -----------------------------------------------------------------------------
-bool OpenGLGfx::GetScreenshot(unsigned int &Width, unsigned int &Height, byte **Data) {
+bool OpenGLGfx::GetScreenshot(uint &Width, uint &Height, byte **Data) {
if (!ReadFramebufferContents(m_Width, m_Height, Data))
return false;
@@ -246,7 +246,7 @@ bool OpenGLGfx::GetScreenshot(unsigned int &Width, unsigned int &Height, byte **
// -----------------------------------------------------------------------------
-bool OpenGLGfx::ReadFramebufferContents(unsigned int Width, unsigned int Height, byte **Data) {
+bool OpenGLGfx::ReadFramebufferContents(uint Width, uint Height, byte **Data) {
*Data = (byte *)malloc(Width * Height * 4);
return true;
@@ -258,7 +258,7 @@ void OpenGLGfx::ReverseRGBAComponentOrder(byte *Data, uint size) {
uint32 *ptr = (uint32 *)Data;
for (uint i = 0; i < size; i++) {
- unsigned int Pixel = *ptr;
+ uint Pixel = *ptr;
*ptr = (Pixel & 0xff00ff00) | ((Pixel >> 16) & 0xff) | ((Pixel & 0xff) << 16);
++ptr;
}
@@ -266,13 +266,13 @@ void OpenGLGfx::ReverseRGBAComponentOrder(byte *Data, uint size) {
// -----------------------------------------------------------------------------
-void OpenGLGfx::FlipImagedataVertical(unsigned int Width, unsigned int Height, byte *Data) {
+void OpenGLGfx::FlipImagedataVertical(uint Width, uint Height, byte *Data) {
#if 0 // TODO
- vector<unsigned int> LineBuffer(Width);
+ vector<uint> LineBuffer(Width);
- for (unsigned int Y = 0; Y < Height / 2; ++Y) {
- vector<unsigned int>::iterator Line1It = Data.begin() + Y * Width;
- vector<unsigned int>::iterator Line2It = Data.begin() + (Height - 1 - Y) * Width;
+ for (uint Y = 0; Y < Height / 2; ++Y) {
+ vector<uint>::iterator Line1It = Data.begin() + Y * Width;
+ vector<uint>::iterator Line2It = Data.begin() + (Height - 1 - Y) * Width;
copy(Line1It, Line1It + Width, LineBuffer.begin());
copy(Line2It, Line2It + Width, Line1It);
copy(LineBuffer.begin(), LineBuffer.end(), Line2It);
@@ -332,7 +332,7 @@ Resource *OpenGLGfx::LoadResource(const Common::String &FileName) {
// Datei laden
byte *pFileData;
- unsigned int FileSize;
+ uint FileSize;
if (!(pFileData = static_cast<byte *>(pPackage->GetFile(FileName, &FileSize)))) {
BS_LOG_ERRORLN("File \"%s\" could not be loaded.", FileName.c_str());
return 0;
@@ -398,7 +398,7 @@ bool OpenGLGfx::CanLoadResource(const Common::String &FileName) {
// DEBUGGING
// -----------------------------------------------------------------------------
-void OpenGLGfx::DrawDebugLine(const Vertex &Start, const Vertex &End, unsigned int Color) {
+void OpenGLGfx::DrawDebugLine(const Vertex &Start, const Vertex &End, uint Color) {
m_DebugLines.push_back(DebugLine(Start, End, Color));
}
diff --git a/engines/sword25/gfx/opengl/openglgfx.h b/engines/sword25/gfx/opengl/openglgfx.h
index 12c91f7d14..b3416185a0 100644
--- a/engines/sword25/gfx/opengl/openglgfx.h
+++ b/engines/sword25/gfx/opengl/openglgfx.h
@@ -77,8 +77,8 @@ public:
virtual void SetVsync(bool Vsync);
virtual bool GetVsync() const;
- virtual bool Fill(const Common::Rect *FillRectPtr = 0, unsigned int Color = BS_RGB(0, 0, 0));
- virtual bool GetScreenshot(unsigned int &Width, unsigned int &Height, byte **Data);
+ 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
// --------------------------
@@ -87,7 +87,7 @@ public:
// Debugging Methoden
// ------------------
- virtual void DrawDebugLine(const Vertex &Start, const Vertex &End, unsigned int Color);
+ virtual void DrawDebugLine(const Vertex &Start, const Vertex &End, uint Color);
// Persistenz Methoden
// -------------------
@@ -103,7 +103,7 @@ private:
Common::ScopedPtr<RenderObjectManager> m_RenderObjectManagerPtr;
struct DebugLine {
- DebugLine(const Vertex &_Start, const Vertex &_End, unsigned int _Color) :
+ DebugLine(const Vertex &_Start, const Vertex &_End, uint _Color) :
Start(_Start),
End(_End),
Color(_Color) {}
@@ -111,14 +111,14 @@ private:
Vertex Start;
Vertex End;
- unsigned int Color;
+ uint Color;
};
Common::Array<DebugLine> m_DebugLines;
- static bool ReadFramebufferContents(unsigned int Width, unsigned int Height, byte **Data);
+ static bool ReadFramebufferContents(uint Width, uint Height, byte **Data);
static void ReverseRGBAComponentOrder(byte *Data, uint size);
- static void FlipImagedataVertical(unsigned int Width, unsigned int Height, byte *Data);
+ static void FlipImagedataVertical(uint Width, uint Height, byte *Data);
};
} // End of namespace Sword25
diff --git a/engines/sword25/gfx/opengl/swimage.cpp b/engines/sword25/gfx/opengl/swimage.cpp
index 8083e2b34a..2ea6c72c27 100644
--- a/engines/sword25/gfx/opengl/swimage.cpp
+++ b/engines/sword25/gfx/opengl/swimage.cpp
@@ -61,7 +61,7 @@ SWImage::SWImage(const Common::String &Filename, bool &Result) :
// Datei laden
byte *pFileData;
- unsigned int FileSize;
+ uint FileSize;
if (!(pFileData = (byte *) pPackage->GetFile(Filename, &FileSize))) {
BS_LOG_ERRORLN("File \"%s\" could not be loaded.", Filename.c_str());
return;
@@ -85,7 +85,7 @@ SWImage::SWImage(const Common::String &Filename, bool &Result) :
// Dateidaten freigeben
delete[] pFileData;
- _ImageDataPtr = (unsigned int *) pUncompressedData;
+ _ImageDataPtr = (uint *) pUncompressedData;
Result = true;
return;
@@ -103,7 +103,7 @@ SWImage::~SWImage() {
bool SWImage::Blit(int PosX, int PosY,
int Flipping,
Common::Rect *pPartRect,
- unsigned int Color,
+ uint Color,
int Width, int Height) {
BS_LOG_ERRORLN("Blit() is not supported.");
return false;
@@ -111,21 +111,21 @@ bool SWImage::Blit(int PosX, int PosY,
// -----------------------------------------------------------------------------
-bool SWImage::Fill(const Common::Rect *pFillRect, unsigned int 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, unsigned int Offset, unsigned int Stride) {
+ bool SWImage::SetContent(const byte *Pixeldata, uint size, uint Offset, uint Stride) {
BS_LOG_ERRORLN("SetContent() is not supported.");
return false;
}
// -----------------------------------------------------------------------------
-unsigned int SWImage::GetPixel(int X, int Y) {
+uint 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 0d0d1c75c3..eaf8a6cb61 100644
--- a/engines/sword25/gfx/opengl/swimage.h
+++ b/engines/sword25/gfx/opengl/swimage.h
@@ -68,11 +68,11 @@ public:
virtual bool Blit(int PosX = 0, int PosY = 0,
int Flipping = Image::FLIP_NONE,
Common::Rect *pPartRect = NULL,
- unsigned int Color = BS_ARGB(255, 255, 255, 255),
+ uint Color = BS_ARGB(255, 255, 255, 255),
int Width = -1, int Height = -1);
- virtual bool Fill(const Common::Rect *FillRectPtr, unsigned int Color);
- virtual bool SetContent(const byte *Pixeldata, uint size, unsigned int Offset, unsigned int Stride);
- virtual unsigned int GetPixel(int X, int Y);
+ 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 {
return false;
@@ -96,7 +96,7 @@ public:
return false;
}
private:
- unsigned int *_ImageDataPtr;
+ uint *_ImageDataPtr;
int m_Width;
int m_Height;