From 7430ebe8830f58ae8fd1c123bfd7b08031a0f8b1 Mon Sep 17 00:00:00 2001 From: yinsimei Date: Mon, 5 Jun 2017 19:35:03 +0200 Subject: SLUDGE: use scummvm int type instead of uint16/32_t --- engines/sludge/fonttext.cpp | 18 +++++++++--------- engines/sludge/linuxstuff.cpp | 2 +- engines/sludge/moreio.h | 2 -- engines/sludge/people.cpp | 2 -- engines/sludge/platform-dependent.h | 3 +-- engines/sludge/savedata.cpp | 2 -- engines/sludge/sludger.h | 6 ++---- engines/sludge/sound_bass.cpp | 6 +++--- engines/sludge/sound_nosound.cpp | 2 +- engines/sludge/sound_openal.cpp | 8 +++----- engines/sludge/thumbnail.cpp | 2 +- engines/sludge/transition.cpp | 12 +++++------- engines/sludge/variable.cpp | 6 ++---- engines/sludge/vid.cpp | 1 - engines/sludge/winstuff.cpp | 4 ++-- engines/sludge/zbuffer.cpp | 2 +- 16 files changed, 31 insertions(+), 47 deletions(-) diff --git a/engines/sludge/fonttext.cpp b/engines/sludge/fonttext.cpp index bf7de8b4e5..f66cde54d6 100644 --- a/engines/sludge/fonttext.cpp +++ b/engines/sludge/fonttext.cpp @@ -38,10 +38,10 @@ int fontHeight = 0, numFontColours, loadedFontNum; char *fontOrderString = NULL; short fontSpace = -1; -uint32_t *fontTable = NULL; +uint32 *fontTable = NULL; unsigned int fontTableSize = 0; -#define fontInTable(x) ((x - namespace Sludge { // Read diff --git a/engines/sludge/people.cpp b/engines/sludge/people.cpp index ebbf7622cf..98b913cbf3 100644 --- a/engines/sludge/people.cpp +++ b/engines/sludge/people.cpp @@ -20,8 +20,6 @@ * */ -#include - #include "sludge/allfiles.h" #include "sludge/sprites.h" #include "sludge/sprbanks.h" diff --git a/engines/sludge/platform-dependent.h b/engines/sludge/platform-dependent.h index 5754ef5c6c..0296bc1382 100644 --- a/engines/sludge/platform-dependent.h +++ b/engines/sludge/platform-dependent.h @@ -24,7 +24,6 @@ /* These are the functions which have different versions for * the different operating systems. */ -#include namespace Sludge { @@ -35,7 +34,7 @@ void msgBox(const char *head, const char *msg); int msgBoxQuestion(const char *head, const char *msg); void changeToUserDir(); -uint32_t launch(char *filename); +uint32 launch(char *filename); bool defaultUserFullScreen(); diff --git a/engines/sludge/savedata.cpp b/engines/sludge/savedata.cpp index f79e7fb5f2..d1e3fa5e2d 100644 --- a/engines/sludge/savedata.cpp +++ b/engines/sludge/savedata.cpp @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -#include -#include #include "common/file.h" diff --git a/engines/sludge/sludger.h b/engines/sludge/sludger.h index 591bd13069..be49276cb0 100644 --- a/engines/sludge/sludger.h +++ b/engines/sludge/sludger.h @@ -22,8 +22,6 @@ #ifndef SLUDGER_H #define SLUDGER_H -#include - #include "common/file.h" #include "sludge/allfiles.h" @@ -35,8 +33,8 @@ namespace Sludge { #ifndef _WIN32 typedef struct _FILETIME { - uint32_t dwLowDateTime; - uint32_t dwHighDateTime; + uint32 dwLowDateTime; + uint32 dwHighDateTime; } FILETIME; #endif diff --git a/engines/sludge/sound_bass.cpp b/engines/sludge/sound_bass.cpp index a7e2ec75cb..d85981ed46 100644 --- a/engines/sludge/sound_bass.cpp +++ b/engines/sludge/sound_bass.cpp @@ -49,7 +49,7 @@ soundThing soundCache[MAX_SAMPLES]; int defVol = 128; int defSoundVol = 255; -char *loadEntireFileToMemory(Common::SeekableReadStream *inputFile, uint32_t size) { +char *loadEntireFileToMemory(Common::SeekableReadStream *inputFile, uint32 size) { char *allData = new char[size]; if (!allData) return NULL; @@ -137,7 +137,7 @@ bool playMOD(int f, int a, int fromTrack) { stopMOD(a); setResourceForFatal(f); - uint32_t length = openFileFromNum(f); + uint32 length = openFileFromNum(f); if (length == 0) return NULL; @@ -287,7 +287,7 @@ int cacheSound(int f) { a = findEmptySoundSlot(); freeSound(a); - uint32_t length = openFileFromNum(f); + uint32 length = openFileFromNum(f); if (!length) return -1; diff --git a/engines/sludge/sound_nosound.cpp b/engines/sludge/sound_nosound.cpp index 9e34ff4bd9..46b6963166 100644 --- a/engines/sludge/sound_nosound.cpp +++ b/engines/sludge/sound_nosound.cpp @@ -34,7 +34,7 @@ int defVol = 128; int defSoundVol = 255; #if 0 -char *loadEntireFileToMemory(FILE *inputFile, uint32_t size) { +char *loadEntireFileToMemory(FILE *inputFile, uint32 size) { char *allData = new char[size]; if (! allData) return NULL; fread(allData, size, 1, inputFile); diff --git a/engines/sludge/sound_openal.cpp b/engines/sludge/sound_openal.cpp index ea64acc00f..c72815134d 100644 --- a/engines/sludge/sound_openal.cpp +++ b/engines/sludge/sound_openal.cpp @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -#include -#include #if 0 #include "AL/alure.h" @@ -369,7 +367,7 @@ void playStream(int a, bool isMOD, bool loopy) { } char *loadEntireFileToMemory(Common::SeekableReadStream *inputFile, - uint32_t size) { + uint32 size) { char *allData = new char[size]; if (!allData) return NULL; @@ -390,7 +388,7 @@ bool playMOD(int f, int a, int fromTrack) { stopMOD(a); setResourceForFatal(f); - uint32_t length = openFileFromNum(f); + uint32 length = openFileFromNum(f); if (length == 0) { finishAccess(); setResourceForFatal(-1); @@ -532,7 +530,7 @@ int cacheSound(int f) { a = findEmptySoundSlot(); freeSound(a); - uint32_t length = openFileFromNum(f); + uint32 length = openFileFromNum(f); if (! length) return -1; unsigned char *memImage; diff --git a/engines/sludge/thumbnail.cpp b/engines/sludge/thumbnail.cpp index c163452be9..df0076c616 100644 --- a/engines/sludge/thumbnail.cpp +++ b/engines/sludge/thumbnail.cpp @@ -255,7 +255,7 @@ void showThumbnail(char *filename, int atX, int atY) { bool skipThumbnail(Common::SeekableReadStream *stream) { thumbWidth = stream->readUint32LE(); thumbHeight = stream->readUint32LE(); - uint32_t skippy = thumbWidth; + uint32 skippy = thumbWidth; skippy *= thumbHeight << 1; stream->seek(skippy, 1); return (stream->readByte() == '!'); diff --git a/engines/sludge/transition.cpp b/engines/sludge/transition.cpp index 373475b749..05257d8041 100644 --- a/engines/sludge/transition.cpp +++ b/engines/sludge/transition.cpp @@ -20,8 +20,6 @@ * */ -#include - #include "sludge/allfiles.h" #include "sludge/colours.h" #include "sludge/backdrop.h" @@ -147,7 +145,7 @@ void transitionSnapshotBox() { //---------------------------------------------------- #define KK 17 -uint32_t randbuffer[KK][2]; // history buffer +uint32 randbuffer[KK][2]; // history buffer int p1, p2; void resetRandW() { @@ -199,8 +197,8 @@ void transitionDisolve() { return; } - uint32_t n; - uint32_t y; + uint32 n; + uint32 y; GLubyte *toScreen = transitionTexture; GLubyte *end = transitionTexture + (256 * 256 * 4); @@ -267,8 +265,8 @@ void transitionTV() { #if 0 if (! transitionTextureName) reserveTransitionTexture(); - uint32_t n; - uint32_t y; + uint32 n; + uint32 y; GLubyte *toScreen = transitionTexture; GLubyte *end = transitionTexture + (256 * 256 * 4); diff --git a/engines/sludge/variable.cpp b/engines/sludge/variable.cpp index 00df66c6d8..949060c786 100644 --- a/engines/sludge/variable.cpp +++ b/engines/sludge/variable.cpp @@ -20,8 +20,6 @@ * */ -#include - #include "common/debug.h" #include "sludge/debug.h" @@ -164,7 +162,7 @@ bool getSavedGamesStack(stackHandler *sH, char *ext) { variable newName; newName.varType = SVT_NULL; - +#if 0 #ifdef _WIN32 WCHAR *w_pattern = ConvertToUTF16(pattern); @@ -215,7 +213,7 @@ bool getSavedGamesStack(stackHandler *sH, char *ext) { closedir(dir); #endif - +#endif delete[] pattern; pattern = NULL; return true; diff --git a/engines/sludge/vid.cpp b/engines/sludge/vid.cpp index 519b4ca392..d0c51d1d57 100644 --- a/engines/sludge/vid.cpp +++ b/engines/sludge/vid.cpp @@ -21,7 +21,6 @@ */ #ifndef _MSC_VER // Microsoft compiler? -#include // For unlink #else #include #include diff --git a/engines/sludge/winstuff.cpp b/engines/sludge/winstuff.cpp index a229225422..dfe0a5a794 100644 --- a/engines/sludge/winstuff.cpp +++ b/engines/sludge/winstuff.cpp @@ -215,9 +215,9 @@ namespace Sludge { _wchdir(szAppData); } - uint32_t launch(char *f) { + uint32 launch(char *f) { WCHAR *w_f = ConvertToUTF16(f); - uint32_t r = (uint32_t) ShellExecute(hMainWindow, TEXT("open"), w_f, NULL, TEXT("C:\\"), SW_SHOWNORMAL); + uint32 r = (uint32) ShellExecute(hMainWindow, TEXT("open"), w_f, NULL, TEXT("C:\\"), SW_SHOWNORMAL); delete w_f; return r; } diff --git a/engines/sludge/zbuffer.cpp b/engines/sludge/zbuffer.cpp index a4641caac3..4f42c98fe4 100644 --- a/engines/sludge/zbuffer.cpp +++ b/engines/sludge/zbuffer.cpp @@ -68,7 +68,7 @@ void sortZPal(int *oldpal, int *newpal, int size) { bool setZBuffer(int y) { #if 0 int x, n; - uint32_t stillToGo = 0; + uint32 stillToGo = 0; int yPalette[16], sorted[16], sortback[16]; killZBuffer(); -- cgit v1.2.3