diff options
author | Eugene Sandulenko | 2010-09-02 11:54:44 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 23:26:48 +0000 |
commit | 0cdb2ded85d17150cb108a5d63dd8957c29af2a5 (patch) | |
tree | 8d3d48b7ad1c0fd1888b90a8ad2e8b86de0393b5 /engines/sword25/gfx | |
parent | 56878b0e62d65aae1b0eba76a2ca2553fbaf1288 (diff) | |
download | scummvm-rg350-0cdb2ded85d17150cb108a5d63dd8957c29af2a5.tar.gz scummvm-rg350-0cdb2ded85d17150cb108a5d63dd8957c29af2a5.tar.bz2 scummvm-rg350-0cdb2ded85d17150cb108a5d63dd8957c29af2a5.zip |
SWORD25: unsigned char -> byte
svn-id: r53308
Diffstat (limited to 'engines/sword25/gfx')
-rw-r--r-- | engines/sword25/gfx/image/vectorimage.cpp | 8 | ||||
-rw-r--r-- | engines/sword25/gfx/image/vectorimage.h | 2 | ||||
-rw-r--r-- | engines/sword25/gfx/opengl/openglgfx.cpp | 4 | ||||
-rw-r--r-- | engines/sword25/gfx/screenshot.cpp | 8 | ||||
-rw-r--r-- | engines/sword25/gfx/text.cpp | 10 |
5 files changed, 16 insertions, 16 deletions
diff --git a/engines/sword25/gfx/image/vectorimage.cpp b/engines/sword25/gfx/image/vectorimage.cpp index c72cad54f9..7976599e2e 100644 --- a/engines/sword25/gfx/image/vectorimage.cpp +++ b/engines/sword25/gfx/image/vectorimage.cpp @@ -60,7 +60,7 @@ namespace Sword25 { class VectorImage::SWFBitStream { public: - SWFBitStream(const unsigned char *pData, unsigned int DataSize) : + SWFBitStream(const byte *pData, unsigned int DataSize) : m_Pos(pData), m_End(pData + DataSize), m_WordMask(0) {} @@ -141,8 +141,8 @@ public: } private: - const unsigned char *m_Pos; - const unsigned char *m_End; + const byte *m_Pos; + const byte *m_End; byte m_Word; unsigned int m_WordMask; @@ -224,7 +224,7 @@ Common::Rect CalculateBoundingBox(const VectorImageElement &vectorImageElement) // Konstruktion // ----------------------------------------------------------------------------- -VectorImage::VectorImage(const unsigned char *pFileData, unsigned int FileSize, bool &Success) { +VectorImage::VectorImage(const byte *pFileData, unsigned int FileSize, bool &Success) { Success = false; // Bitstream-Objekt erzeugen diff --git a/engines/sword25/gfx/image/vectorimage.h b/engines/sword25/gfx/image/vectorimage.h index c17f98a3d5..42d5c4ad4e 100644 --- a/engines/sword25/gfx/image/vectorimage.h +++ b/engines/sword25/gfx/image/vectorimage.h @@ -162,7 +162,7 @@ private: class VectorImage : public Image { public: - VectorImage(const unsigned char *pFileData, unsigned int FileSize, bool &Success); + VectorImage(const byte *pFileData, unsigned int FileSize, bool &Success); unsigned int GetElementCount() const { return m_Elements.size(); diff --git a/engines/sword25/gfx/opengl/openglgfx.cpp b/engines/sword25/gfx/opengl/openglgfx.cpp index 4affeaee19..151905759c 100644 --- a/engines/sword25/gfx/opengl/openglgfx.cpp +++ b/engines/sword25/gfx/opengl/openglgfx.cpp @@ -331,9 +331,9 @@ Resource *OpenGLGfx::LoadResource(const Common::String &FileName) { BS_ASSERT(pPackage); // Datei laden - unsigned char *pFileData; + byte *pFileData; unsigned int FileSize; - if (!(pFileData = static_cast<unsigned char *>(pPackage->GetFile(FileName, &FileSize)))) { + if (!(pFileData = static_cast<byte *>(pPackage->GetFile(FileName, &FileSize)))) { BS_LOG_ERRORLN("File \"%s\" could not be loaded.", FileName.c_str()); return 0; } diff --git a/engines/sword25/gfx/screenshot.cpp b/engines/sword25/gfx/screenshot.cpp index 383f1f8fb8..f48e73b1f6 100644 --- a/engines/sword25/gfx/screenshot.cpp +++ b/engines/sword25/gfx/screenshot.cpp @@ -46,15 +46,15 @@ namespace Sword25 { // ----------------------------------------------------------------------------- struct RGB_PIXEL { - RGB_PIXEL(unsigned char _Red, unsigned char _Green, unsigned char _Blue) : + RGB_PIXEL(byte _Red, byte _Green, byte _Blue) : Red(_Red), Green(_Green), Blue(_Blue) {}; - unsigned char Red; - unsigned char Green; - unsigned char Blue; + byte Red; + byte Green; + byte Blue; }; bool Screenshot::SaveToFile(unsigned int Width, unsigned int Height, const byte *Data, const Common::String &Filename) { diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp index bb24cba25b..dfbf723910 100644 --- a/engines/sword25/gfx/text.cpp +++ b/engines/sword25/gfx/text.cpp @@ -183,7 +183,7 @@ bool Text::DoRender() { int CurX = m_AbsoluteX + (*Iter).BBox.left; int CurY = m_AbsoluteY + (*Iter).BBox.top; for (unsigned int i = 0; i < (*Iter).Text.size(); ++i) { - Common::Rect CurRect = FontPtr->GetCharacterRect((unsigned char)(*Iter).Text[i]); + Common::Rect CurRect = FontPtr->GetCharacterRect((byte)(*Iter).Text[i]); Common::Rect RenderRect(CurX, CurY, CurX + CurRect.width(), CurY + CurRect.height()); int RenderX = CurX + (RenderRect.left - RenderRect.left); @@ -258,9 +258,9 @@ void Text::UpdateFormat() { TempLineWidth = 0; LastSpace = 0; for (j = i; j < m_Text.size(); ++j) { - if ((unsigned char)m_Text[j] == ' ') LastSpace = j; + if ((byte)m_Text[j] == ' ') LastSpace = j; - const Common::Rect &CurCharRect = FontPtr->GetCharacterRect((unsigned char)m_Text[j]); + const Common::Rect &CurCharRect = FontPtr->GetCharacterRect((byte)m_Text[j]); TempLineWidth += CurCharRect.width(); TempLineWidth += FontPtr->GetGapWidth(); @@ -275,7 +275,7 @@ void Text::UpdateFormat() { for (j = i; j < LastSpace; ++j) { m_Lines[CurLine].Text += m_Text[j]; - const Common::Rect &CurCharRect = FontPtr->GetCharacterRect((unsigned char)m_Text[j]); + const Common::Rect &CurCharRect = FontPtr->GetCharacterRect((byte)m_Text[j]); CurLineWidth += CurCharRect.width(); CurLineWidth += FontPtr->GetGapWidth(); if ((unsigned int) CurCharRect.height() > CurLineHeight) CurLineHeight = CurCharRect.height(); @@ -322,7 +322,7 @@ void Text::UpdateMetrics(FontResource &FontResource) { m_Height = 0; for (unsigned int i = 0; i < m_Text.size(); ++i) { - const Common::Rect &CurRect = FontResource.GetCharacterRect((unsigned char)m_Text[i]); + const Common::Rect &CurRect = FontResource.GetCharacterRect((byte)m_Text[i]); m_Width += CurRect.width(); if (i != m_Text.size() - 1) m_Width += FontResource.GetGapWidth(); if (m_Height < CurRect.height()) m_Height = CurRect.height(); |