aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sludge/backdrop.cpp28
-rw-r--r--engines/sludge/backdrop.h12
-rw-r--r--engines/sludge/bg_effects.cpp16
-rw-r--r--engines/sludge/builtin.cpp20
-rw-r--r--engines/sludge/fileset.cpp12
-rw-r--r--engines/sludge/fileset.h4
-rw-r--r--engines/sludge/fonttext.cpp2
-rw-r--r--engines/sludge/freeze.cpp4
-rw-r--r--engines/sludge/graphics.cpp4
-rw-r--r--engines/sludge/graphics.h2
-rw-r--r--engines/sludge/language.cpp8
-rw-r--r--engines/sludge/language.h6
-rw-r--r--engines/sludge/loadsave.cpp14
-rw-r--r--engines/sludge/moreio.cpp20
-rw-r--r--engines/sludge/moreio.h4
-rw-r--r--engines/sludge/movie.cpp32
-rw-r--r--engines/sludge/objtypes.h4
-rw-r--r--engines/sludge/people.cpp10
-rw-r--r--engines/sludge/people.h8
-rw-r--r--engines/sludge/savedata.cpp12
-rw-r--r--engines/sludge/sludger.cpp30
-rw-r--r--engines/sludge/sludger.h8
-rw-r--r--engines/sludge/sound.cpp6
-rw-r--r--engines/sludge/sound.h2
-rw-r--r--engines/sludge/sprites.cpp18
-rw-r--r--engines/sludge/sprites.h10
-rw-r--r--engines/sludge/statusba.h6
-rw-r--r--engines/sludge/thumbnail.cpp4
-rw-r--r--engines/sludge/transition.cpp4
-rw-r--r--engines/sludge/utf8.cpp2
-rw-r--r--engines/sludge/variable.cpp6
-rw-r--r--engines/sludge/variable.h6
32 files changed, 162 insertions, 162 deletions
diff --git a/engines/sludge/backdrop.cpp b/engines/sludge/backdrop.cpp
index 8ab4c6f04e..bda9f5544e 100644
--- a/engines/sludge/backdrop.cpp
+++ b/engines/sludge/backdrop.cpp
@@ -70,9 +70,9 @@ int lightMapMode = LIGHTMAPMODE_PIXEL;
parallaxLayer *parallaxStuff = NULL;
int cameraPX = 0, cameraPY = 0;
-unsigned int sceneWidth, sceneHeight;
+uint sceneWidth, sceneHeight;
int lightMapNumber;
-unsigned int currentBlankColour = TS_ARGB(255, 0, 0, 0);
+uint currentBlankColour = TS_ARGB(255, 0, 0, 0);
extern int cameraX, cameraY;
extern float cameraZoom;
@@ -147,14 +147,14 @@ bool snapshot() {
}
bool restoreSnapshot(Common::SeekableReadStream *stream) {
- unsigned int picWidth = stream->readUint16BE();
- unsigned int picHeight = stream->readUint16BE();
+ uint picWidth = stream->readUint16BE();
+ uint picHeight = stream->readUint16BE();
if ((picWidth != winWidth) || (picHeight != winHeight))
return false;
- unsigned int t1, t2, n;
- unsigned short c;
+ uint t1, t2, n;
+ uint16 c;
#if 0
GLubyte *target;
if (!NPOT_textures) {
@@ -170,7 +170,7 @@ bool restoreSnapshot(Common::SeekableReadStream *stream) {
for (t2 = 0; t2 < winHeight; t2++) {
t1 = 0;
while (t1 < winWidth) {
- c = (unsigned short)stream->readUint16BE();
+ c = (uint16)stream->readUint16BE();
if (c & 32) {
n = stream->readByte() + 1;
c -= 32;
@@ -416,11 +416,11 @@ void hardScroll(int distance) {
setPixelCoords(true);
- unsigned int xoffset = 0;
+ uint xoffset = 0;
while (xoffset < sceneWidth) {
int w = (sceneWidth - xoffset < viewportWidth) ? sceneWidth - xoffset : viewportWidth;
- unsigned int yoffset = 0;
+ uint yoffset = 0;
while (yoffset < sceneHeight) {
int h = (sceneHeight - yoffset < viewportHeight) ? sceneHeight - yoffset : viewportHeight;
@@ -457,11 +457,11 @@ void hardScroll(int distance) {
#endif
}
-void drawVerticalLine(unsigned int x, unsigned int y1, unsigned int y2) {
+void drawVerticalLine(uint x, uint y1, uint y2) {
drawLine(x, y1, x, y2);
}
-void drawHorizontalLine(unsigned int x1, unsigned int y, unsigned int x2) {
+void drawHorizontalLine(uint x1, uint y, uint x2) {
drawLine(x1, y, x2, y);
}
@@ -652,7 +652,7 @@ void reloadParallaxTextures() {
#endif
}
-bool loadParallax(unsigned short v, unsigned short fracX, unsigned short fracY) {
+bool loadParallax(uint16 v, uint16 fracX, uint16 fracY) {
setResourceForFatal(v);
if (!openFileFromNum(v))
return fatal("Can't open parallax image");
@@ -1055,7 +1055,7 @@ void saveCoreHSI(Common::WriteStream *stream, GLuint texture, int w, int h) {
setPixelCoords(false);
int x, y, lookAhead;
- unsigned short int *fromHere, *lookPointer;
+ uint16 *fromHere, *lookPointer;
stream->writeUint16BE(w);
stream->writeUint16BE(h);
@@ -1101,7 +1101,7 @@ void saveParallaxRecursive(parallaxLayer *me, Common::WriteStream *stream) {
}
}
-bool getRGBIntoStack(unsigned int x, unsigned int y, stackHandler *sH) {
+bool getRGBIntoStack(uint x, uint y, stackHandler *sH) {
#if 0
if (x >= sceneWidth || y >= sceneHeight) {
return fatal("Co-ordinates are outside current scene!");
diff --git a/engines/sludge/backdrop.h b/engines/sludge/backdrop.h
index 216b656678..dbab0dfa8d 100644
--- a/engines/sludge/backdrop.h
+++ b/engines/sludge/backdrop.h
@@ -35,14 +35,14 @@ enum {
LIGHTMAPMODE_NUM
};
-extern unsigned int winWidth, winHeight, sceneWidth, sceneHeight;
+extern uint winWidth, winHeight, sceneWidth, sceneHeight;
extern int lightMapMode;
struct parallaxLayer {
Graphics::Surface surface;
int speedX, speedY;
bool wrapS, wrapT;
- unsigned short fileNum, fractionX, fractionY;
+ uint16 fileNum, fractionX, fractionY;
int cameraX, cameraY;
parallaxLayer *next;
parallaxLayer *prev;
@@ -63,10 +63,10 @@ void saveCoreHSI(Common::WriteStream *stream, GLuint texture, int w, int h);
#endif
bool loadHSI(Common::SeekableReadStream *stream, int, int, bool);
bool mixHSI(Common::SeekableReadStream *stream, int x = 0, int y = 0);
-void drawHorizontalLine(unsigned int, unsigned int, unsigned int);
-void drawVerticalLine(unsigned int, unsigned int, unsigned int);
+void drawHorizontalLine(uint, uint, uint);
+void drawVerticalLine(uint, uint, uint);
void hardScroll(int distance);
-bool getRGBIntoStack(unsigned int x, unsigned int y, stackHandler *sH);
+bool getRGBIntoStack(uint x, uint y, stackHandler *sH);
// Also the light map stuff
@@ -78,7 +78,7 @@ extern Graphics::Surface lightMap;
// And background parallax scrolling
void killParallax();
-bool loadParallax(unsigned short v, unsigned short fracX, unsigned short fracY);
+bool loadParallax(uint16 v, uint16 fracX, uint16 fracY);
void saveParallaxRecursive(parallaxLayer *me, Common::WriteStream *fp);
void reloadParallaxTextures();
diff --git a/engines/sludge/bg_effects.cpp b/engines/sludge/bg_effects.cpp
index 69299158c6..916c8e3248 100644
--- a/engines/sludge/bg_effects.cpp
+++ b/engines/sludge/bg_effects.cpp
@@ -32,7 +32,7 @@
namespace Sludge {
#if 0
-//extern unsigned short int * * backDropImage;
+//extern uint16 * * backDropImage;
extern GLuint backdropTextureName;
#endif
@@ -147,7 +147,7 @@ void blur_loadSettings(Common::SeekableReadStream *stream) {
s_matrixEffectBase = stream->readUint32LE();
if (blur_allocateMemoryForEffect()) {
- size_t bytes_read = stream->read(s_matrixEffectData, sizeof(int) * s_matrixEffectWidth * s_matrixEffectHeight);
+ uint bytes_read = stream->read(s_matrixEffectData, sizeof(int) * s_matrixEffectWidth * s_matrixEffectHeight);
if (bytes_read != sizeof(int) * s_matrixEffectWidth * s_matrixEffectHeight && stream->err()) {
debug("Reading error in blur_loadSettings.");
}
@@ -254,7 +254,7 @@ static inline int clampi(int i, int min, int max) {
return (i >= max) ? max : ((i <= min) ? min : i);
}
-static inline void blur_createSourceLine(unsigned char *createLine, unsigned char *fromLine, int overlapOnLeft, int width) {
+static inline void blur_createSourceLine(byte *createLine, byte *fromLine, int overlapOnLeft, int width) {
int miniX;
memcpy(createLine + overlapOnLeft * 4, fromLine, width * 4);
@@ -274,13 +274,13 @@ static inline void blur_createSourceLine(unsigned char *createLine, unsigned cha
bool blurScreen() {
#if 0
if (s_matrixEffectWidth && s_matrixEffectHeight && s_matrixEffectDivide && s_matrixEffectData) {
- unsigned char *thisLine;
+ byte *thisLine;
int y, x;
bool ok = true;
int overlapOnLeft = s_matrixEffectWidth / 2;
int overlapAbove = s_matrixEffectHeight / 2;
- unsigned char **sourceLine = new unsigned char *[s_matrixEffectHeight];
+ byte **sourceLine = new byte *[s_matrixEffectHeight];
if (!checkNew(sourceLine))
return false;
@@ -296,7 +296,7 @@ bool blurScreen() {
saveTexture(backdropTextureName, backdropTexture);
for (y = 0; y < s_matrixEffectHeight; y++) {
- sourceLine[y] = new unsigned char[(s_matrixEffectWidth - 1 + picWidth) * 4];
+ sourceLine[y] = new byte[(s_matrixEffectWidth - 1 + picWidth) * 4];
ok &= (sourceLine[y] != NULL);
}
@@ -313,7 +313,7 @@ bool blurScreen() {
//-------------------------
// Scroll source lines
//-------------------------
- unsigned char *tempLine = sourceLine[0];
+ byte *tempLine = sourceLine[0];
for (int miniY = 0; miniY < s_matrixEffectHeight - 1; miniY++) {
sourceLine[miniY] = sourceLine[miniY + 1];
}
@@ -330,7 +330,7 @@ bool blurScreen() {
int totalBlue = 0;
int *matrixElement = s_matrixEffectData;
for (int miniY = 0; miniY < s_matrixEffectHeight; ++miniY) {
- unsigned char *pixel = &sourceLine[miniY][x * 4];
+ byte *pixel = &sourceLine[miniY][x * 4];
for (int miniX = 0; miniX < s_matrixEffectWidth; ++miniX) {
totalRed += pixel[0] * *matrixElement;
diff --git a/engines/sludge/builtin.cpp b/engines/sludge/builtin.cpp
index 299ef35cf7..1226b1a0f0 100644
--- a/engines/sludge/builtin.cpp
+++ b/engines/sludge/builtin.cpp
@@ -66,13 +66,13 @@ variable *launchResult = NULL;
extern int lastFramesPerSecond, thumbWidth, thumbHeight;
extern bool allowAnyFilename;
extern bool captureAllKeys;
-extern short fontSpace;
+extern int16 fontSpace;
extern eventHandlers *currentEvents;
extern variableStack *noStack;
extern statusStuff *nowStatus;
extern screenRegion *overRegion;
extern HWND hMainWindow;
-extern unsigned int sceneWidth, sceneHeight;
+extern uint sceneWidth, sceneHeight;
extern int numBIFNames, numUserFunc;
extern char builtInFunctionNames[][25];
@@ -86,13 +86,13 @@ extern GLuint backdropTextureName;
#endif
extern float speechSpeed;
-extern unsigned char brightnessLevel;
-extern unsigned char fadeMode;
-extern unsigned short saveEncoding;
+extern byte brightnessLevel;
+extern byte fadeMode;
+extern uint16 saveEncoding;
extern frozenStuffStruct *frozenStuff;
-extern unsigned int currentBlankColour;
-extern unsigned int languageID;
-extern unsigned char currentBurnR, currentBurnG, currentBurnB;
+extern uint currentBlankColour;
+extern uint languageID;
+extern byte currentBurnR, currentBurnG, currentBurnB;
int paramNum[] = { -1, 0, 1, 1, -1, -1, 1, 3, 4, 1, 0, 0, 8, -1, // SAY->MOVEMOUSE
-1, 0, 0, -1, -1, 1, 1, 1, 1, 4, 1, 1, 2, 1,// FOCUS->REMOVEREGION
@@ -1633,7 +1633,7 @@ builtIn(setScale) {
if (!getValueType(val1, SVT_INT, fun->stack->thisVar))
return BR_ERROR;
trimStack(fun->stack);
- setScale((short int)val1, (short int)val2);
+ setScale((int16)val1, (int16)val2);
return BR_CONTINUE;
}
@@ -1898,7 +1898,7 @@ builtIn(alignStatus) {
if (!getValueType(val, SVT_INT, fun->stack->thisVar))
return BR_ERROR;
trimStack(fun->stack);
- nowStatus->alignStatus = (short)val;
+ nowStatus->alignStatus = (int16)val;
return BR_CONTINUE;
}
diff --git a/engines/sludge/fileset.cpp b/engines/sludge/fileset.cpp
index c138bb5a89..35b9d3b06b 100644
--- a/engines/sludge/fileset.cpp
+++ b/engines/sludge/fileset.cpp
@@ -74,7 +74,7 @@ bool openObjectSlice(int num) {
return sliceBusy = true;
}
-unsigned int openFileFromNum(int num) {
+uint openFileFromNum(int num) {
// FILE * dbug = fopen ("debuggy.txt", "at");
if (sliceBusy) {
@@ -124,16 +124,16 @@ char *convertString(char *s) {
}
}
- size_t len1 = strlen(s) + 1;
- size_t len2 = 65535;
- size_t iconv_value =
+ uint len1 = strlen(s) + 1;
+ uint len2 = 65535;
+ uint iconv_value =
#ifdef _WIN32
iconv(convert, (const char **) tmp1, &len1, tmp2, &len2);
#else
iconv(convert, (char **) tmp1, &len1, tmp2, &len2);
#endif
- if (iconv_value == (size_t) - 1) {
+ if (iconv_value == (uint) - 1) {
switch (errno) {
/* See "man 3 iconv" for an explanation. */
case EILSEQ:
@@ -190,7 +190,7 @@ void finishAccess() {
int32_t startIndex;
-void setFileIndices(Common::File *fp, int numLanguages, unsigned int skipBefore) {
+void setFileIndices(Common::File *fp, int numLanguages, uint skipBefore) {
if (fp) {
// Keep hold of the file handle, and let things get at it
bigDataFile = fp;
diff --git a/engines/sludge/fileset.h b/engines/sludge/fileset.h
index 2dec0d3d4c..61ab417570 100644
--- a/engines/sludge/fileset.h
+++ b/engines/sludge/fileset.h
@@ -28,9 +28,9 @@ namespace Sludge {
extern Common::File *bigDataFile;
-void setFileIndices(Common::File *fp, int, unsigned int);
+void setFileIndices(Common::File *fp, int, uint);
-unsigned int openFileFromNum(int num);
+uint openFileFromNum(int num);
bool openSubSlice(int num);
bool openObjectSlice(int num);
char *getNumberedString(int value);
diff --git a/engines/sludge/fonttext.cpp b/engines/sludge/fonttext.cpp
index b0324d301d..161c357ba0 100644
--- a/engines/sludge/fonttext.cpp
+++ b/engines/sludge/fonttext.cpp
@@ -33,7 +33,7 @@ namespace Sludge {
spriteBank theFont;
int fontHeight = 0, numFontColours, loadedFontNum;
Common::U32String fontOrderString;
-short fontSpace = -1;
+int16 fontSpace = -1;
uint32 *fontTable = NULL;
uint fontTableSize = 0;
diff --git a/engines/sludge/freeze.cpp b/engines/sludge/freeze.cpp
index 2f8015787b..deaa4eb7d1 100644
--- a/engines/sludge/freeze.cpp
+++ b/engines/sludge/freeze.cpp
@@ -51,12 +51,12 @@ extern eventHandlers *currentEvents;
extern personaAnimation *mouseCursorAnim;
extern int mouseCursorFrameNum;
extern int cameraX, cameraY;
-extern unsigned int sceneWidth, sceneHeight;
+extern uint sceneWidth, sceneHeight;
extern float cameraZoom;
extern zBufferData zBuffer;
extern bool backdropExists;
frozenStuffStruct *frozenStuff = NULL;
-extern unsigned int sceneWidth, sceneHeight;
+extern uint sceneWidth, sceneHeight;
Graphics::Surface freezeSurface;
void shufflePeople();
diff --git a/engines/sludge/graphics.cpp b/engines/sludge/graphics.cpp
index dbcb691d29..7211979d0f 100644
--- a/engines/sludge/graphics.cpp
+++ b/engines/sludge/graphics.cpp
@@ -33,7 +33,7 @@
namespace Sludge {
-unsigned int winWidth, winHeight;
+uint winWidth, winHeight;
int viewportHeight, viewportWidth;
int viewportOffsetX = 0, viewportOffsetY = 0;
@@ -45,7 +45,7 @@ extern int specialSettings;
void setMovieViewport();
-extern unsigned int sceneWidth, sceneHeight;
+extern uint sceneWidth, sceneHeight;
extern zBufferData zBuffer;
extern int lightMapNumber;
diff --git a/engines/sludge/graphics.h b/engines/sludge/graphics.h
index c03d1947ab..463d3842ec 100644
--- a/engines/sludge/graphics.h
+++ b/engines/sludge/graphics.h
@@ -26,7 +26,7 @@
namespace Sludge {
-extern unsigned int winWidth, winHeight;
+extern uint winWidth, winHeight;
extern int viewportHeight, viewportWidth;
extern int viewportOffsetX, viewportOffsetY;
extern int realWinWidth, realWinHeight;
diff --git a/engines/sludge/language.cpp b/engines/sludge/language.cpp
index ebf4367f3e..b7a45ed9dc 100644
--- a/engines/sludge/language.cpp
+++ b/engines/sludge/language.cpp
@@ -36,7 +36,7 @@ int *languageTable;
char **languageName;
settingsStruct gameSettings;
-unsigned int stringToInt(char *s) {
+uint stringToInt(char *s) {
int i = 0;
bool negative = false;
for (;;) {
@@ -103,7 +103,7 @@ void readIniFile(const char *filename) {
char lineSoFar[257] = "";
char secondSoFar[257] = "";
- unsigned char here = 0;
+ byte here = 0;
char readChar = ' ';
bool keepGoing = true;
bool doingSecond = false;
@@ -186,7 +186,7 @@ void makeLanguageTable(Common::File *table) {
if (!checkNew(languageName))
return;
- for (unsigned int i = 0; i <= gameSettings.numLanguages; i++) {
+ for (uint i = 0; i <= gameSettings.numLanguages; i++) {
languageTable[i] = i ? table->readUint16BE() : 0;
debug(kSludgeDebugDataLoad, "languageTable %i: %i", i, languageTable[i]);
languageName[i] = 0;
@@ -202,7 +202,7 @@ void makeLanguageTable(Common::File *table) {
int getLanguageForFileB() {
int indexNum = -1;
- for (unsigned int i = 0; i <= gameSettings.numLanguages; i++) {
+ for (uint i = 0; i <= gameSettings.numLanguages; i++) {
if (languageTable[i] == gameSettings.languageID)
indexNum = i;
}
diff --git a/engines/sludge/language.h b/engines/sludge/language.h
index 85d50bbb26..c38ac7cbca 100644
--- a/engines/sludge/language.h
+++ b/engines/sludge/language.h
@@ -29,10 +29,10 @@
namespace Sludge {
struct settingsStruct {
- unsigned int languageID;
- unsigned int numLanguages;
+ uint languageID;
+ uint numLanguages;
bool userFullScreen;
- unsigned int refreshRate;
+ uint refreshRate;
int antiAlias;
bool fixedPixels;
bool noStartWindow;
diff --git a/engines/sludge/loadsave.cpp b/engines/sludge/loadsave.cpp
index e9daa9b6b0..41e0cdba0d 100644
--- a/engines/sludge/loadsave.cpp
+++ b/engines/sludge/loadsave.cpp
@@ -67,17 +67,17 @@ extern char *fontOrderString; // " " "
extern FILETIME fileTime; // In sludger.cpp
extern int speechMode; // " " "
extern int lightMapNumber; // In backdrop.cpp
-extern unsigned int sceneWidth, sceneHeight; // " " "
+extern uint sceneWidth, sceneHeight; // " " "
extern int cameraX, cameraY; // " " "
extern float cameraZoom;
-extern unsigned char brightnessLevel; // " " "
-extern short fontSpace; // in textfont.cpp
-extern unsigned char fadeMode; // In transition.cpp
+extern byte brightnessLevel; // " " "
+extern int16 fontSpace; // in textfont.cpp
+extern byte fadeMode; // In transition.cpp
extern bool captureAllKeys;
extern bool allowAnyFilename;
-extern unsigned short saveEncoding; // in savedata.cpp
-extern unsigned char currentBurnR, currentBurnG, currentBurnB;
-extern unsigned int currentBlankColour; // in backdrop.cpp
+extern uint16 saveEncoding; // in savedata.cpp
+extern byte currentBurnR, currentBurnG, currentBurnB;
+extern uint currentBlankColour; // in backdrop.cpp
extern parallaxLayer *parallaxStuff; // "
extern int lightMapMode; // "
extern int languageNum;
diff --git a/engines/sludge/moreio.cpp b/engines/sludge/moreio.cpp
index f76b919e1b..138f709d79 100644
--- a/engines/sludge/moreio.cpp
+++ b/engines/sludge/moreio.cpp
@@ -65,7 +65,7 @@ char *readString(Common::SeekableReadStream *stream) {
float floatSwap(float f) {
union {
float f;
- unsigned char b[4];
+ byte b[4];
} dat1, dat2;
dat1.f = f;
@@ -78,7 +78,7 @@ float floatSwap(float f) {
float getFloat(Common::SeekableReadStream *stream) {
float f;
- size_t bytes_read = stream->read(&f, sizeof(float));
+ uint bytes_read = stream->read(&f, sizeof(float));
if (bytes_read != sizeof(float) && stream->err()) {
debug("Reading error in getFloat.\n");
}
@@ -97,8 +97,8 @@ void putFloat(float f, Common::WriteStream *stream) {
stream->write(&f, sizeof(float));
}
-short shortSwap(short s) {
- unsigned char b1, b2;
+int16 shortSwap(int16 s) {
+ byte b1, b2;
b1 = s & 255;
b2 = (s >> 8) & 255;
@@ -106,10 +106,10 @@ short shortSwap(short s) {
return (b1 << 8) + b2;
}
-short getSigned(Common::SeekableReadStream *stream) {
- short f;
- size_t bytes_read = stream->read(&f, sizeof(short));
- if (bytes_read != sizeof(short) && stream->err()) {
+int16 getSigned(Common::SeekableReadStream *stream) {
+ int16 f;
+ uint bytes_read = stream->read(&f, sizeof(int16));
+ if (bytes_read != sizeof(int16) && stream->err()) {
debug("Reading error in getSigned.\n");
}
#ifdef __BIG_ENDIAN__
@@ -118,11 +118,11 @@ short getSigned(Common::SeekableReadStream *stream) {
return f;
}
-void putSigned(short f, Common::WriteStream *stream) {
+void putSigned(int16 f, Common::WriteStream *stream) {
#ifdef __BIG_ENDIAN__
f = shortSwap(f);
#endif
- stream->write(&f, sizeof(short));
+ stream->write(&f, sizeof(int16));
}
char *encodeFilename(char *nameIn) {
diff --git a/engines/sludge/moreio.h b/engines/sludge/moreio.h
index 7ca59ec1e1..5cf01a2986 100644
--- a/engines/sludge/moreio.h
+++ b/engines/sludge/moreio.h
@@ -27,12 +27,12 @@ namespace Sludge {
// Read
char *readString(Common::SeekableReadStream *stream);
float getFloat(Common::SeekableReadStream *stream);
-short getSigned(Common::SeekableReadStream *stream);
+int16 getSigned(Common::SeekableReadStream *stream);
// Write
void writeString(char *s, Common::WriteStream *stream);
void putFloat(float f, Common::WriteStream *stream);
-void putSigned(short f, Common::WriteStream *stream);
+void putSigned(int16 f, Common::WriteStream *stream);
char *encodeFilename(char *nameIn);
char *decodeFilename(char *nameIn);
diff --git a/engines/sludge/movie.cpp b/engines/sludge/movie.cpp
index 2d431e8f60..da6eb7f203 100644
--- a/engines/sludge/movie.cpp
+++ b/engines/sludge/movie.cpp
@@ -69,7 +69,7 @@ float movieAspect = 1.6;
#if 0
typedef struct audioBuffers {
char *buffer;
- unsigned int size;
+ uint size;
audioBuffers *next;
Uint32 time_ms;
}audioBuffers;
@@ -120,7 +120,7 @@ void audio_queue_init(audioQueue *q) {
q->cond = SDL_CreateCond();
}
-int audio_queue_put(audioQueue *q, char *buffer, unsigned int size, long long time_ms) {
+int audio_queue_put(audioQueue *q, char *buffer, uint size, long long time_ms) {
audioBuffers *audioBuf = new audioBuffers;
if (!audioBuf)
@@ -275,10 +275,10 @@ void setMovieViewport() {
}
}
-static uint64_t xiph_lace_value(unsigned char **np) {
+static uint64_t xiph_lace_value(byte **np) {
uint64_t lace;
uint64_t value;
- unsigned char *p = *np;
+ byte *p = *np;
lace = *p++;
value = lace;
@@ -300,8 +300,8 @@ bool fakeAudio = false;
// send audio to audio device...
ALuint feedAudio(void *userdata, ALubyte *data, ALuint length) {
static char *buffer = NULL;
- static unsigned int bufOffset = 0;
- static unsigned int bufSize = 0;
+ static uint bufOffset = 0;
+ static uint bufSize = 0;
ALuint got = 0;
int bufLen;
@@ -443,8 +443,8 @@ int playMovie(int fileNumber) {
audioBitDepth = pAudioTrack->GetBitDepth();
audioSampleRate = pAudioTrack->GetSamplingRate();
- size_t audioHeaderSize;
- const unsigned char *audioHeader = pAudioTrack->GetCodecPrivate(audioHeaderSize);
+ uint audioHeaderSize;
+ const byte *audioHeader = pAudioTrack->GetCodecPrivate(audioHeaderSize);
if (audioHeaderSize < 1) {
warning("Strange audio track in movie.");
@@ -452,9 +452,9 @@ int playMovie(int fileNumber) {
continue;
}
- unsigned char *p = (unsigned char *)audioHeader;
+ byte *p = (byte *)audioHeader;
- unsigned int count = *p++ + 1;
+ uint count = *p++ + 1;
if (count != 3) {
warning("Strange audio track in movie.");
audioTrack = -1;
@@ -529,7 +529,7 @@ int playMovie(int fileNumber) {
if (vpx_codec_dec_init(&codec, interface, NULL, 0))
die_codec(&codec, "Failed to initialize decoder for movie.");
- unsigned char *frame = new unsigned char[256 * 1024];
+ byte *frame = new byte[256 * 1024];
if (! checkNew(frame)) return false;
const mkvparser::Cluster *pCluster = pSegment->GetFirst();
@@ -647,7 +647,7 @@ int playMovie(int fileNumber) {
if (size > sizeof(frame)) {
if (frame) delete [] frame;
- frame = new unsigned char[size];
+ frame = new byte[size];
if (! checkNew(frame)) return 0;
}
/*
@@ -673,7 +673,7 @@ int playMovie(int fileNumber) {
if (img->fmt != VPX_IMG_FMT_I420)
fatal("Movie error. The movie is not in I420 colour format, which is the only one I can hanlde at the moment.");
- unsigned int y;
+ uint y;
GLubyte *ytex = NULL;
GLubyte *utex = NULL;
@@ -688,7 +688,7 @@ int playMovie(int fileNumber) {
}
- unsigned char *buf = img->planes[0];
+ byte *buf = img->planes[0];
for (y = 0; y < img->d_h; y++) {
memcpy(ytex + y * img->d_w, buf, img->d_w);
buf += img->stride[0];
@@ -762,7 +762,7 @@ int playMovie(int fileNumber) {
vorbis_fpu_setround(&fpu);
for (i = 0; i < audioChannels; i++) { /* It's faster in this order */
float *src = pcm[i];
- short *dest = ((short *)buffer) + i;
+ int16 *dest = ((int16 *)buffer) + i;
for (j = 0; j < numSamples; j++) {
val = vorbis_ftoi(src[j] * 32768.f);
if (val > 32767)val = 32767;
@@ -778,7 +778,7 @@ int playMovie(int fileNumber) {
vorbis_fpu_setround(&fpu);
for (i = 0; i < audioChannels; i++) {
float *src = pcm[i];
- short *dest = ((short *)buffer) + i;
+ int16 *dest = ((int16 *)buffer) + i;
for (j = 0; j < numSamples; j++) {
val = vorbis_ftoi(src[j] * 32768.f);
if (val > 32767)val = 32767;
diff --git a/engines/sludge/objtypes.h b/engines/sludge/objtypes.h
index 0bd785a1e3..f11160614e 100644
--- a/engines/sludge/objtypes.h
+++ b/engines/sludge/objtypes.h
@@ -32,10 +32,10 @@ struct objectType {
char *screenName;
int objectNum;
objectType *next;
- unsigned char r, g, b;
+ byte r, g, b;
int numCom;
int speechGap, walkSpeed, wrapSpeech, spinSpeed;
- unsigned short int flags;
+ uint16 flags;
combination *allCombis;
};
diff --git a/engines/sludge/people.cpp b/engines/sludge/people.cpp
index 43adbd9d98..1a032847ed 100644
--- a/engines/sludge/people.cpp
+++ b/engines/sludge/people.cpp
@@ -57,8 +57,8 @@ extern flor *currentFloor;
extern inputType input;
onScreenPerson *allPeople = NULL;
-short int scaleHorizon = 75;
-short int scaleDivide = 150;
+int16 scaleHorizon = 75;
+int16 scaleDivide = 150;
extern screenRegion *allScreenRegions;
#define TF_max(a, b) ((a > b) ? a : b)
@@ -225,7 +225,7 @@ bool setPersonExtra(int thisNum, int extra) {
return false;
}
-void setScale(short int h, short int d) {
+void setScale(int16 h, int16 d) {
scaleHorizon = h;
scaleDivide = d;
}
@@ -397,7 +397,7 @@ void setDrawMode(int h, int ob) {
setMyDrawMode(moveMe, h);
}
-void setPersonTransparency(int ob, unsigned char x) {
+void setPersonTransparency(int ob, byte x) {
onScreenPerson *moveMe = findPerson(ob);
if (!moveMe)
return;
@@ -407,7 +407,7 @@ void setPersonTransparency(int ob, unsigned char x) {
moveMe->transparency = x;
}
-void setPersonColourise(int ob, unsigned char r, unsigned char g, unsigned char b, unsigned char colourmix) {
+void setPersonColourise(int ob, byte r, byte g, byte b, byte colourmix) {
onScreenPerson *moveMe = findPerson(ob);
if (!moveMe)
return;
diff --git a/engines/sludge/people.h b/engines/sludge/people.h
index 45ba55a233..b02bc1c490 100644
--- a/engines/sludge/people.h
+++ b/engines/sludge/people.h
@@ -67,7 +67,7 @@ struct onScreenPerson {
int direction, directionWhenDoneWalking;
struct objectType *thisType;
int extra, spinSpeed;
- unsigned char r, g, b, colourmix, transparency;
+ byte r, g, b, colourmix, transparency;
};
// Initialisation and creation
@@ -85,15 +85,15 @@ void removeOneCharacter(int i);
// Things which affect or use all characters
onScreenPerson *findPerson(int v);
-void setScale(short int h, short int d);
+void setScale(int16 h, int16 d);
// Things which affect one character
void makeTalker(onScreenPerson &me);
void makeSilent(onScreenPerson &me);
void setShown(bool h, int ob);
void setDrawMode(int h, int ob);
-void setPersonTransparency(int ob, unsigned char x);
-void setPersonColourise(int ob, unsigned char r, unsigned char g, unsigned char b, unsigned char colourmix);
+void setPersonTransparency(int ob, byte x);
+void setPersonColourise(int ob, byte r, byte g, byte b, byte colourmix);
// Moving 'em
void movePerson(int x, int y, int objNum);
diff --git a/engines/sludge/savedata.cpp b/engines/sludge/savedata.cpp
index 081798f4d3..1059cc1cff 100644
--- a/engines/sludge/savedata.cpp
+++ b/engines/sludge/savedata.cpp
@@ -31,7 +31,7 @@
namespace Sludge {
-unsigned short saveEncoding = false;
+uint16 saveEncoding = false;
char encode1 = 0;
char encode2 = 0;
@@ -106,7 +106,7 @@ char *readTextPlain(Common::File *fp) {
reply = new char[stringSize + 1];
if (reply == NULL)
return NULL;
- size_t bytes_read = fp->read(reply, stringSize);
+ uint bytes_read = fp->read(reply, stringSize);
if (bytes_read != stringSize && fp->err()) {
warning("Reading error in readTextPlain.");
}
@@ -147,8 +147,8 @@ bool fileToStack(char *filename, stackHandler *sH) {
return fatal("No such file", filename); //TODO: false value
}
- encode1 = (unsigned char)saveEncoding & 255;
- encode2 = (unsigned char)(saveEncoding >> 8);
+ encode1 = (byte)saveEncoding & 255;
+ encode2 = (byte)(saveEncoding >> 8);
while (*checker) {
if (fd.readByte() != *checker) {
@@ -227,8 +227,8 @@ bool stackToFile(char *filename, const variable &from) {
variableStack *hereWeAre = from.varData.theStack -> first;
- encode1 = (unsigned char) saveEncoding & 255;
- encode2 = (unsigned char)(saveEncoding >> 8);
+ encode1 = (byte)saveEncoding & 255;
+ encode2 = (byte)(saveEncoding >> 8);
if (saveEncoding) {
fprintf(fp, "[Custom data (encoded)]\r\n");
diff --git a/engines/sludge/sludger.cpp b/engines/sludge/sludger.cpp
index ac6042089d..22e1926e31 100644
--- a/engines/sludge/sludger.cpp
+++ b/engines/sludge/sludger.cpp
@@ -57,7 +57,7 @@ namespace Sludge {
extern personaAnimation *mouseCursorAnim;
extern spritePalette pastePalette;
extern int dialogValue;
-extern unsigned int sceneWidth, sceneHeight;
+extern uint sceneWidth, sceneHeight;
extern char *launchMe;
extern variable *launchResult;
@@ -73,10 +73,10 @@ char * *allResourceNames = NULL;
int selectedLanguage = 0;
int languageNum = -1;
-unsigned char *gameIcon = NULL;
+byte *gameIcon = NULL;
int iconW = 0, iconH = 0;
-unsigned char *gameLogo = NULL;
+byte *gameLogo = NULL;
int logoW = 0, logoH = 0;
int gameVersion;
@@ -85,7 +85,7 @@ FILETIME fileTime;
extern int desiredfps;
bool captureAllKeys = false;
-unsigned char brightnessLevel = 255;
+byte brightnessLevel = 255;
eventHandlers mainHandlers;
eventHandlers *currentEvents = &mainHandlers;
@@ -237,7 +237,7 @@ bool initSludge(const char *filename) {
delete[] readString(fp); // Unused - was used for registration purposes.
- size_t bytes_read = fp->read(&fileTime, sizeof(FILETIME));
+ uint bytes_read = fp->read(&fileTime, sizeof(FILETIME));
if (bytes_read != sizeof(FILETIME) && fp->err()) {
debug("Reading error in initSludge.");
}
@@ -268,7 +268,7 @@ bool initSludge(const char *filename) {
delete[] checker;
checker = NULL;
- unsigned char customIconLogo = fp->readByte();
+ byte customIconLogo = fp->readByte();
debug(kSludgeDebugDataLoad, "Game icon type: %i", customIconLogo);
if (customIconLogo & 1) {
@@ -341,14 +341,14 @@ bool initSludge(const char *filename) {
}
- gameIcon = new unsigned char [iconW * iconH * 4];
+ gameIcon = new byte [iconW * iconH * 4];
if (!gameIcon) return fatal("Can't reserve memory for game icon.");
int32_t transCol = 63519;
Uint8 *p = (Uint8 *) gameIcon;
if (fileIsPNG) {
- unsigned char *row_pointers[iconH];
+ byte *row_pointers[iconH];
for (int i = 0; i < iconH; i++)
row_pointers[i] = p + 4 * i * iconW;
@@ -360,7 +360,7 @@ bool initSludge(const char *filename) {
for (int t2 = 0; t2 < iconH; t2 ++) {
int t1 = 0;
while (t1 < iconW) {
- unsigned short c = (unsigned short) fp->readUint16BE();
+ uint16 c = (uint16) fp->readUint16BE();
if (c & 32) {
n = fgetc(fp) + 1;
c -= 32;
@@ -452,14 +452,14 @@ bool initSludge(const char *filename) {
if ((logoW != 310) || (logoH != 88)) return fatal("Game logo have wrong dimensions. (Should be 310x88)");
- gameLogo = new unsigned char [logoW * logoH * 4];
+ gameLogo = new byte [logoW * logoH * 4];
if (!gameLogo) return fatal("Can't reserve memory for game logo.");
// int32_t transCol = 63519;
Uint8 *p = (Uint8 *) gameLogo;
if (fileIsPNG) {
- unsigned char *row_pointers[logoH];
+ byte *row_pointers[logoH];
for (int i = 0; i < logoH; i++)
row_pointers[i] = p + 4 * i * logoW;
@@ -471,7 +471,7 @@ bool initSludge(const char *filename) {
for (int t2 = 0; t2 < logoH; t2 ++) {
int t1 = 0;
while (t1 < logoW) {
- unsigned short c = (unsigned short) fp->readUint16BE();
+ uint16 c = (uint16) fp->readUint16BE();
if (c & 32) {
n = fgetc(fp) + 1;
c -= 32;
@@ -701,7 +701,7 @@ void unfreezeSubs() {
bool continueFunction(loadedFunction *fun) {
bool keepLooping = true;
bool advanceNow;
- unsigned int param;
+ uint param;
sludgeCommand com;
if (fun->cancelMe) {
@@ -1219,7 +1219,7 @@ bool runSludge() {
bool loadFunctionCode(loadedFunction *newFunc) {
debug(kSludgeDebugDataLoad, "Current address: %i", bigDataFile->pos());
- unsigned int numLines, numLinesRead;
+ uint numLines, numLinesRead;
if (!openSubSlice(newFunc->originalNumber))
return false;
@@ -1256,7 +1256,7 @@ bool loadFunctionCode(loadedFunction *newFunc) {
return true;
}
-int startNewFunctionNum(unsigned int funcNum, unsigned int numParamsExpected,
+int startNewFunctionNum(uint funcNum, uint numParamsExpected,
loadedFunction *calledBy, variableStack *&vStack, bool returnSommet) {
loadedFunction *newFunc = new loadedFunction;
checkNew(newFunc);
diff --git a/engines/sludge/sludger.h b/engines/sludge/sludger.h
index 10c17943c2..19c6f53c57 100644
--- a/engines/sludge/sludger.h
+++ b/engines/sludge/sludger.h
@@ -61,11 +61,11 @@ struct loadedFunction {
variable *localVars;
variableStack *stack;
variable reg;
- unsigned int runThisLine;
+ uint runThisLine;
loadedFunction *calledBy;
loadedFunction *next;
bool returnSomething, isSpeech, unfreezable, cancelMe;
- unsigned char freezerLevel;
+ byte freezerLevel;
};
struct inputType {
@@ -73,13 +73,13 @@ struct inputType {
int mouseX, mouseY, keyPressed;
};
-extern unsigned char *gameIcon;
+extern byte *gameIcon;
extern int iconW, iconH;
bool initSludge(const char *);
void displayBase();
void sludgeDisplay();
-int startNewFunctionNum(unsigned int, unsigned int, loadedFunction *, variableStack*&, bool = true);
+int startNewFunctionNum(uint, uint, loadedFunction *, variableStack*&, bool = true);
bool handleInput();
void restartFunction(loadedFunction *fun);
bool loadFunctionCode(loadedFunction *newFunc);
diff --git a/engines/sludge/sound.cpp b/engines/sludge/sound.cpp
index a92a51c174..d77f3d4e63 100644
--- a/engines/sludge/sound.cpp
+++ b/engines/sludge/sound.cpp
@@ -267,8 +267,8 @@ bool playMOD(int f, int a, int fromTrack) {
return false;
}
- unsigned char *memImage;
- memImage = (unsigned char *) loadEntireFileToMemory(bigDataFile, length);
+ byte *memImage;
+ memImage = (byte *) loadEntireFileToMemory(bigDataFile, length);
if (! memImage) return fatal(ERROR_MUSIC_MEMORY_LOW);
modCache[a].stream = alureCreateStreamFromMemory(memImage, length, 19200, 0, NULL);
@@ -641,7 +641,7 @@ int initMovieSound(int f, ALenum format, int audioChannels, ALuint samplerate,
}
#endif
-unsigned int getSoundSource(int index) {
+uint getSoundSource(int index) {
return 0; /*soundCache[index].playingOnSource;*/ //TODO:false value
}
diff --git a/engines/sludge/sound.h b/engines/sludge/sound.h
index 05db6a4a29..3255c31cdf 100644
--- a/engines/sludge/sound.h
+++ b/engines/sludge/sound.h
@@ -69,7 +69,7 @@ void debugSounds();
void loadSounds(Common::SeekableReadStream *stream);
void saveSounds(Common::WriteStream *stream);
-unsigned int getSoundSource(int index);
+uint getSoundSource(int index);
} // End of namespace Sludge
diff --git a/engines/sludge/sprites.cpp b/engines/sludge/sprites.cpp
index 9790193626..bba4ca3f86 100644
--- a/engines/sludge/sprites.cpp
+++ b/engines/sludge/sprites.cpp
@@ -70,7 +70,7 @@ extern float cameraZoom;
extern Graphics::Surface renderSurface;
extern Graphics::Surface backdropSurface;
-unsigned char currentBurnR = 0, currentBurnG = 0, currentBurnB = 0;
+byte currentBurnR = 0, currentBurnG = 0, currentBurnB = 0;
void forgetSpriteBank(spriteBank &forgetme) {
if (forgetme.myPalette.pal) {
@@ -104,17 +104,17 @@ bool reserveSpritePal(spritePalette &sP, int n) {
delete[] sP.b;
}
- sP.pal = new unsigned short int[n];
+ sP.pal = new uint16[n];
if (!checkNew(sP.pal))
return false;
- sP.r = new unsigned char[n];
+ sP.r = new byte[n];
if (!checkNew(sP.r))
return false;
- sP.g = new unsigned char[n];
+ sP.g = new byte[n];
if (!checkNew(sP.g))
return false;
- sP.b = new unsigned char[n];
+ sP.b = new byte[n];
if (!checkNew(sP.b))
return false;
sP.total = n;
@@ -222,7 +222,7 @@ bool loadSpriteBank(int fileNum, spriteBank &loadhere, bool isFont) {
}
}
} else { // RAW DATA
- size_t bytes_read = bigDataFile->read(data, picwidth * picheight);
+ uint bytes_read = bigDataFile->read(data, picwidth * picheight);
if (bytes_read != picwidth * picheight && bigDataFile->err()) {
warning("Reading error in loadSpriteBank.");
}
@@ -256,7 +256,7 @@ bool loadSpriteBank(int fileNum, spriteBank &loadhere, bool isFont) {
int transColour = -1;
int size = loadhere.sprites[i].surface.w * loadhere.sprites[i].surface.h;
while (fromhere < size) {
- unsigned char s = spriteData[i][fromhere++];
+ byte s = spriteData[i][fromhere++];
if (s) {
transColour = s;
break;
@@ -266,7 +266,7 @@ bool loadSpriteBank(int fileNum, spriteBank &loadhere, bool isFont) {
for (int y = 0; y < loadhere.sprites[i].surface.h; y++) {
for (int x = 0; x < loadhere.sprites[i].surface.w; x++) {
byte *target = (byte *)loadhere.sprites[i].surface.getBasePtr(x, y);
- unsigned char s = spriteData[i][fromhere++];
+ byte s = spriteData[i][fromhere++];
if (s) {
target[0] = (byte)255;
target[1] = (byte)loadhere.myPalette.b[s];
@@ -589,7 +589,7 @@ void flipFontSprite(int x, int y, sprite &single, const spritePalette &fontPal)
fontSprite(true, x, y, single, fontPal);
}
-unsigned char curLight[3];
+byte curLight[3];
void setDrawMode(onScreenPerson *thisPerson) {
#if 0
diff --git a/engines/sludge/sprites.h b/engines/sludge/sprites.h
index effb5121a3..fd1b347946 100644
--- a/engines/sludge/sprites.h
+++ b/engines/sludge/sprites.h
@@ -38,11 +38,11 @@ struct sprite {
class spritePalette {
public:
- unsigned short int *pal;
- unsigned char *r;
- unsigned char *g;
- unsigned char *b;
- unsigned char originalRed, originalGreen, originalBlue, total;
+ uint16 *pal;
+ byte *r;
+ byte *g;
+ byte *b;
+ byte originalRed, originalGreen, originalBlue, total;
spritePalette() : pal(0), r(0), g(0), b(0), total(0) {
originalRed = originalGreen = originalBlue = 255;
diff --git a/engines/sludge/statusba.h b/engines/sludge/statusba.h
index 03c61cfa6c..b6c0c7822f 100644
--- a/engines/sludge/statusba.h
+++ b/engines/sludge/statusba.h
@@ -31,7 +31,7 @@ struct statusBar {
struct statusStuff {
statusBar *firstStatusBar;
- unsigned short alignStatus;
+ uint16 alignStatus;
int litStatus;
int statusX, statusY;
int statusR, statusG, statusB;
@@ -44,8 +44,8 @@ void setStatusBar(char *txt);
void clearStatusBar();
void addStatusBar();
void killLastStatus();
-void statusBarColour(unsigned char r, unsigned char g, unsigned char b);
-void statusBarLitColour(unsigned char r, unsigned char g, unsigned char b);
+void statusBarColour(byte r, byte g, byte b);
+void statusBarLitColour(byte r, byte g, byte b);
void setLitStatus(int i);
const char *statusBarText();
void positionStatus(int, int);
diff --git a/engines/sludge/thumbnail.cpp b/engines/sludge/thumbnail.cpp
index 74c77ff5b4..f28035b795 100644
--- a/engines/sludge/thumbnail.cpp
+++ b/engines/sludge/thumbnail.cpp
@@ -158,12 +158,12 @@ void showThumbnail(char *filename, int atX, int atY) {
if (thumbnailTexture == NULL) return;
int t1, t2;
- unsigned short c;
+ uint16 c;
GLubyte *target;
for (t2 = 0; t2 < fileHeight; t2++) {
t1 = 0;
while (t1 < fileWidth) {
- c = (unsigned short) fp->readUint16BE();
+ c = (uint16) fp->readUint16BE();
target = thumbnailTexture + 4 * picWidth * t2 + t1 * 4;
target[0] = (GLubyte) redValue(c);
target[1] = (GLubyte) greenValue(c);
diff --git a/engines/sludge/transition.cpp b/engines/sludge/transition.cpp
index 207eca65d8..e43f8b55a4 100644
--- a/engines/sludge/transition.cpp
+++ b/engines/sludge/transition.cpp
@@ -31,11 +31,11 @@ extern GLuint snapshotTextureName;
namespace Sludge {
-extern unsigned char brightnessLevel;
+extern byte brightnessLevel;
extern float snapTexW, snapTexH;
-unsigned char fadeMode = 2;
+byte fadeMode = 2;
//----------------------------------------------------
// PROPER BRIGHTNESS FADING
diff --git a/engines/sludge/utf8.cpp b/engines/sludge/utf8.cpp
index 95f9e91f8a..61c297571b 100644
--- a/engines/sludge/utf8.cpp
+++ b/engines/sludge/utf8.cpp
@@ -51,7 +51,7 @@ uint32 UTF8Converter::nextchar(const char *s, int *i) {
do {
ch <<= 6;
- ch += (unsigned char)s[(*i)++];
+ ch += (byte)s[(*i)++];
sz++;
} while (s[*i] && !isutf(s[*i]));
ch -= offsetsFromUTF8[sz - 1];
diff --git a/engines/sludge/variable.cpp b/engines/sludge/variable.cpp
index 9792dbf08c..30686e4b51 100644
--- a/engines/sludge/variable.cpp
+++ b/engines/sludge/variable.cpp
@@ -456,7 +456,7 @@ bool copyVariable(const variable &from, variable &to) {
return copyMain(from, to);
}
-variable *fastArrayGetByIndex(fastArrayHandler *vS, unsigned int theIndex) {
+variable *fastArrayGetByIndex(fastArrayHandler *vS, uint theIndex) {
if (theIndex < 0 || theIndex >= vS->size)
return NULL;
return &vS->fastVariables[theIndex];
@@ -535,7 +535,7 @@ bool addVarToStackQuick(variable &va, variableStack *&thisStack) {
return true;
}
-bool stackSetByIndex(variableStack *vS, unsigned int theIndex, const variable &va) {
+bool stackSetByIndex(variableStack *vS, uint theIndex, const variable &va) {
while (theIndex--) {
vS = vS->next;
if (!vS)
@@ -544,7 +544,7 @@ bool stackSetByIndex(variableStack *vS, unsigned int theIndex, const variable &v
return copyVariable(va, vS->thisVar);
}
-variable *stackGetByIndex(variableStack *vS, unsigned int theIndex) {
+variable *stackGetByIndex(variableStack *vS, uint theIndex) {
while (theIndex--) {
vS = vS->next;
if (!vS) {
diff --git a/engines/sludge/variable.h b/engines/sludge/variable.h
index 295473e55c..f36e4e75ec 100644
--- a/engines/sludge/variable.h
+++ b/engines/sludge/variable.h
@@ -108,13 +108,13 @@ int deleteVarFromStack(const variable &va, variableStack *&thisStack,
variableStack *stackFindLast(variableStack *hunt);
bool copyStack(const variable &from, variable &to);
int stackSize(const stackHandler *me);
-bool stackSetByIndex(variableStack *, unsigned int, const variable &);
-variable *stackGetByIndex(variableStack *, unsigned int);
+bool stackSetByIndex(variableStack *, uint, const variable &);
+variable *stackGetByIndex(variableStack *, uint);
bool getSavedGamesStack(stackHandler *sH, char *ext);
bool makeFastArrayFromStack(variable &to, const stackHandler *stacky);
bool makeFastArraySize(variable &to, int size);
-variable *fastArrayGetByIndex(fastArrayHandler *vS, unsigned int theIndex);
+variable *fastArrayGetByIndex(fastArrayHandler *vS, uint theIndex);
#define DEBUG_STACKINESS 0