aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sword25/fmv/yuvtorgba.cpp12
-rw-r--r--engines/sword25/gfx/image/vectorimage.cpp8
-rw-r--r--engines/sword25/gfx/image/vectorimage.h2
-rw-r--r--engines/sword25/gfx/opengl/openglgfx.cpp4
-rw-r--r--engines/sword25/gfx/screenshot.cpp8
-rw-r--r--engines/sword25/gfx/text.cpp10
-rw-r--r--engines/sword25/input/inputengine.h2
-rw-r--r--engines/sword25/input/inputengine_script.cpp2
-rw-r--r--engines/sword25/input/scummvminput.cpp2
-rw-r--r--engines/sword25/input/scummvminput.h2
-rw-r--r--engines/sword25/kernel/inputpersistenceblock.cpp8
-rw-r--r--engines/sword25/kernel/inputpersistenceblock.h8
-rw-r--r--engines/sword25/kernel/outputpersistenceblock.cpp2
-rw-r--r--engines/sword25/kernel/outputpersistenceblock.h4
-rw-r--r--engines/sword25/kernel/persistenceblock.h16
-rw-r--r--engines/sword25/kernel/scummvmwindow.cpp2
-rw-r--r--engines/sword25/script/luascript.cpp8
17 files changed, 50 insertions, 50 deletions
diff --git a/engines/sword25/fmv/yuvtorgba.cpp b/engines/sword25/fmv/yuvtorgba.cpp
index c2b9505f72..20ca610f98 100644
--- a/engines/sword25/fmv/yuvtorgba.cpp
+++ b/engines/sword25/fmv/yuvtorgba.cpp
@@ -183,12 +183,12 @@ void YUVtoBGRA::translate(th_ycbcr_buffer &YUVBuffer, const th_info &TheoraInfo,
const int *cl = &CLAMP_TAB[320];
- const unsigned char *ySrc0 = YUVBuffer[0].data;
- const unsigned char *ySrc1 = YUVBuffer[0].data + YUVBuffer[0].stride;
- const unsigned char *uSrc = YUVBuffer[1].data;
- const unsigned char *vSrc = YUVBuffer[2].data;
- unsigned char *dst0 = &PixelData[0];
- unsigned char *dst1 = &PixelData[0] + YUVBuffer[0].width * 4;
+ const byte *ySrc0 = YUVBuffer[0].data;
+ const byte *ySrc1 = YUVBuffer[0].data + YUVBuffer[0].stride;
+ const byte *uSrc = YUVBuffer[1].data;
+ const byte *vSrc = YUVBuffer[2].data;
+ byte *dst0 = &PixelData[0];
+ byte *dst1 = &PixelData[0] + YUVBuffer[0].width * 4;
for (int h = 0; h < YUVBuffer[0].height / 2; ++h) {
for (int w = 0; w < YUVBuffer[0].width / 2; ++w) {
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();
diff --git a/engines/sword25/input/inputengine.h b/engines/sword25/input/inputengine.h
index a951f93f40..f604311384 100644
--- a/engines/sword25/input/inputengine.h
+++ b/engines/sword25/input/inputengine.h
@@ -296,7 +296,7 @@ public:
*/
virtual bool UnregisterCommandCallback(CommandCallback Callback) = 0;
- virtual void ReportCharacter(unsigned char Character) = 0;
+ virtual void ReportCharacter(byte Character) = 0;
virtual void ReportCommand(KEY_COMMANDS Command) = 0;
private:
diff --git a/engines/sword25/input/inputengine_script.cpp b/engines/sword25/input/inputengine_script.cpp
index d80cc93698..ef443a62d3 100644
--- a/engines/sword25/input/inputengine_script.cpp
+++ b/engines/sword25/input/inputengine_script.cpp
@@ -244,7 +244,7 @@ static int SetMouseY(lua_State *L) {
// -----------------------------------------------------------------------------
static void TheCharacterCallback(int Character) {
- CharacterCallbackPtr->Character = static_cast<unsigned char>(Character);
+ CharacterCallbackPtr->Character = static_cast<byte>(Character);
lua_State *L = static_cast<lua_State *>(Kernel::GetInstance()->GetScript()->GetScriptObject());
CharacterCallbackPtr->InvokeCallbackFunctions(L, 1);
}
diff --git a/engines/sword25/input/scummvminput.cpp b/engines/sword25/input/scummvminput.cpp
index 0492b010d4..b1ef1c8869 100644
--- a/engines/sword25/input/scummvminput.cpp
+++ b/engines/sword25/input/scummvminput.cpp
@@ -303,7 +303,7 @@ bool ScummVMInput::UnregisterCommandCallback(CommandCallback Callback) {
// -----------------------------------------------------------------------------
-void ScummVMInput::ReportCharacter(unsigned char Character) {
+void ScummVMInput::ReportCharacter(byte Character) {
Common::List<CharacterCallback>::const_iterator CallbackIter = m_CharacterCallbacks.begin();
while (CallbackIter != m_CharacterCallbacks.end()) {
// Iterator vor dem Aufruf erhöhen und im Folgendem auf einer Kopie arbeiten.
diff --git a/engines/sword25/input/scummvminput.h b/engines/sword25/input/scummvminput.h
index c336dbf515..9bf1c45daa 100644
--- a/engines/sword25/input/scummvminput.h
+++ b/engines/sword25/input/scummvminput.h
@@ -69,7 +69,7 @@ public:
virtual bool UnregisterCharacterCallback(CallbackPtr Callback);
virtual bool RegisterCommandCallback(CallbackPtr Callback);
virtual bool UnregisterCommandCallback(CallbackPtr Callback);
- virtual void ReportCharacter(unsigned char Character);
+ virtual void ReportCharacter(byte Character);
virtual void ReportCommand(KEY_COMMANDS Command);
bool Persist(OutputPersistenceBlock &Writer);
diff --git a/engines/sword25/kernel/inputpersistenceblock.cpp b/engines/sword25/kernel/inputpersistenceblock.cpp
index 787eb78e6b..0f1eb83f63 100644
--- a/engines/sword25/kernel/inputpersistenceblock.cpp
+++ b/engines/sword25/kernel/inputpersistenceblock.cpp
@@ -47,7 +47,7 @@ namespace Sword25 {
// -----------------------------------------------------------------------------
InputPersistenceBlock::InputPersistenceBlock(const void *Data, unsigned int DataLength) :
- m_Data(static_cast<const unsigned char *>(Data), DataLength),
+ m_Data(static_cast<const byte *>(Data), DataLength),
m_ErrorState(NONE) {
m_Iter = m_Data.begin();
}
@@ -132,13 +132,13 @@ void InputPersistenceBlock::Read(Common::String &Value) {
// -----------------------------------------------------------------------------
-void InputPersistenceBlock::Read(Common::Array<unsigned char> &Value) {
+void InputPersistenceBlock::Read(Common::Array<byte> &Value) {
if (CheckMarker(BLOCK_MARKER)) {
unsigned int Size;
Read(Size);
if (CheckBlockSize(Size)) {
- Value = Common::Array<unsigned char>(m_Iter, Size);
+ Value = Common::Array<byte>(m_Iter, Size);
m_Iter += Size;
}
}
@@ -167,7 +167,7 @@ bool InputPersistenceBlock::CheckBlockSize(int Size) {
// -----------------------------------------------------------------------------
-bool InputPersistenceBlock::CheckMarker(unsigned char Marker) {
+bool InputPersistenceBlock::CheckMarker(byte Marker) {
if (!IsGood() || !CheckBlockSize(1)) return false;
if (*m_Iter++ == Marker) {
diff --git a/engines/sword25/kernel/inputpersistenceblock.h b/engines/sword25/kernel/inputpersistenceblock.h
index 2013747b92..bab8dcf9b5 100644
--- a/engines/sword25/kernel/inputpersistenceblock.h
+++ b/engines/sword25/kernel/inputpersistenceblock.h
@@ -66,7 +66,7 @@ public:
void Read(float &Value);
void Read(bool &Value);
void Read(Common::String &Value);
- void Read(Common::Array<unsigned char> &Value);
+ void Read(Common::Array<byte> &Value);
bool IsGood() const {
return m_ErrorState == NONE;
@@ -76,12 +76,12 @@ public:
}
private:
- bool CheckMarker(unsigned char Marker);
+ bool CheckMarker(byte Marker);
bool CheckBlockSize(int Size);
void RawRead(void *DestPtr, size_t Size);
- Common::Array<unsigned char> m_Data;
- Common::Array<unsigned char>::const_iterator m_Iter;
+ Common::Array<byte> m_Data;
+ Common::Array<byte>::const_iterator m_Iter;
ErrorState m_ErrorState;
};
diff --git a/engines/sword25/kernel/outputpersistenceblock.cpp b/engines/sword25/kernel/outputpersistenceblock.cpp
index 3bf2b0ae20..9965fdb9d5 100644
--- a/engines/sword25/kernel/outputpersistenceblock.cpp
+++ b/engines/sword25/kernel/outputpersistenceblock.cpp
@@ -114,7 +114,7 @@ void OutputPersistenceBlock::Write(const void *BufferPtr, size_t Size) {
// -----------------------------------------------------------------------------
-void OutputPersistenceBlock::WriteMarker(unsigned char Marker) {
+void OutputPersistenceBlock::WriteMarker(byte Marker) {
m_Data.push_back(Marker);
}
diff --git a/engines/sword25/kernel/outputpersistenceblock.h b/engines/sword25/kernel/outputpersistenceblock.h
index 3f93e28440..bc5bfad605 100644
--- a/engines/sword25/kernel/outputpersistenceblock.h
+++ b/engines/sword25/kernel/outputpersistenceblock.h
@@ -67,10 +67,10 @@ public:
}
private:
- void WriteMarker(unsigned char Marker);
+ void WriteMarker(byte Marker);
void RawWrite(const void *DataPtr, size_t Size);
- Common::Array<unsigned char> m_Data;
+ Common::Array<byte> m_Data;
};
} // End of namespace Sword25
diff --git a/engines/sword25/kernel/persistenceblock.h b/engines/sword25/kernel/persistenceblock.h
index b12c86104a..32936bd222 100644
--- a/engines/sword25/kernel/persistenceblock.h
+++ b/engines/sword25/kernel/persistenceblock.h
@@ -50,19 +50,19 @@ namespace Sword25 {
class PersistenceBlock {
public:
static unsigned int GetSInt32Size() {
- return sizeof(signed int) + sizeof(unsigned char);
+ return sizeof(signed int) + sizeof(byte);
}
static unsigned int GetUInt32Size() {
- return sizeof(unsigned int) + sizeof(unsigned char);
+ return sizeof(unsigned int) + sizeof(byte);
}
static unsigned int GetFloat32Size() {
- return sizeof(float) + sizeof(unsigned char);
+ return sizeof(float) + sizeof(byte);
}
static unsigned int GetBoolSize() {
- return sizeof(unsigned char) + sizeof(unsigned char);
+ return sizeof(byte) + sizeof(byte);
}
static unsigned int GetStringSize(const Common::String &String) {
- return static_cast<unsigned int>(sizeof(unsigned int) + String.size() + sizeof(unsigned char));
+ return static_cast<unsigned int>(sizeof(unsigned int) + String.size() + sizeof(byte));
}
protected:
@@ -98,7 +98,7 @@ protected:
private:
static bool IsBigEndian() {
unsigned int Dummy = 1;
- unsigned char *DummyPtr = reinterpret_cast<unsigned char *>(&Dummy);
+ byte *DummyPtr = reinterpret_cast<byte *>(&Dummy);
return DummyPtr[0] == 0;
}
@@ -111,7 +111,7 @@ private:
static void ReverseByteOrder(void *Ptr) {
// Reverses the byte order of the 32-bit word pointed to by Ptr
- unsigned char *CharPtr = static_cast<unsigned char *>(Ptr);
+ byte *CharPtr = static_cast<byte *>(Ptr);
Swap(CharPtr[0], CharPtr[3]);
Swap(CharPtr[1], CharPtr[2]);
}
@@ -122,7 +122,7 @@ private:
// -----------------------------------------------------------------------------
#define CTASSERT(ex) typedef char ctassert_type[(ex) ? 1 : -1]
-CTASSERT(sizeof(unsigned char) == 1);
+CTASSERT(sizeof(byte) == 1);
CTASSERT(sizeof(signed int) == 4);
CTASSERT(sizeof(unsigned int) == 4);
CTASSERT(sizeof(float) == 4);
diff --git a/engines/sword25/kernel/scummvmwindow.cpp b/engines/sword25/kernel/scummvmwindow.cpp
index 3a9fe94c62..35fd27a05c 100644
--- a/engines/sword25/kernel/scummvmwindow.cpp
+++ b/engines/sword25/kernel/scummvmwindow.cpp
@@ -247,7 +247,7 @@ LRESULT CALLBACK BS_ScummVMWindow::WindowProc(HWND hwnd, UINT uMsg, WPARAM wPara
case WM_CHAR:
{
- unsigned char theChar = static_cast<unsigned char>(wParam & 0xff);
+ byte theChar = static_cast<byte>(wParam & 0xff);
// Alle Zeichen, die keine Steuerzeichen sind, werden als Buchstaben dem Input-Service mitgeteilt.
if (theChar >= 32)
diff --git a/engines/sword25/script/luascript.cpp b/engines/sword25/script/luascript.cpp
index c6508c325f..ce63a1512d 100644
--- a/engines/sword25/script/luascript.cpp
+++ b/engines/sword25/script/luascript.cpp
@@ -439,8 +439,8 @@ bool PushPermanentsTable(lua_State *L, PERMANENT_TABLE_TYPE TableType) {
namespace {
int Chunkwriter(lua_State *L, const void *p, size_t sz, void *ud) {
- Common::Array<unsigned char> & chunkData = *reinterpret_cast<Common::Array<unsigned char> * >(ud);
- const unsigned char *buffer = reinterpret_cast<const unsigned char *>(p);
+ Common::Array<byte> & chunkData = *reinterpret_cast<Common::Array<byte> * >(ud);
+ const byte *buffer = reinterpret_cast<const byte *>(p);
while (sz--) chunkData.push_back(*buffer++) ;
@@ -461,7 +461,7 @@ bool LuaScriptEngine::Persist(OutputPersistenceBlock &Writer) {
lua_getglobal(m_State, "_G");
// Lua persists and stores the data in a Common::Array
- Common::Array<unsigned char> chunkData;
+ Common::Array<byte> chunkData;
pluto_persist(m_State, Chunkwriter, &chunkData);
// Persistenzdaten in den Writer schreiben.
@@ -569,7 +569,7 @@ bool LuaScriptEngine::Unpersist(InputPersistenceBlock &Reader) {
ClearGlobalTable(m_State, ClearExceptionsSecondPass);
// Persisted Lua data
- Common::Array<unsigned char> chunkData;
+ Common::Array<byte> chunkData;
Reader.Read(chunkData);
// Chunk-Reader initialisation. It is used with pluto_unpersist to restore read data