aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword25/kernel')
-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
6 files changed, 20 insertions, 20 deletions
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)