diff options
33 files changed, 559 insertions, 555 deletions
diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp index 161dcd1195..0566cbdef9 100644 --- a/engines/cine/anim.cpp +++ b/engines/cine/anim.cpp @@ -179,7 +179,7 @@ animDataEntry animData[] = { {"FIN", 0x9}, }; -uint8 getAnimTransparentColor(const char *animName) { +byte getAnimTransparentColor(const char *animName) { char name[15]; removeExtention(name, animName); @@ -207,8 +207,8 @@ int16 allocFrame(uint16 width, uint16 height, int8 isMask) { if (!isMask) { // sprite + generated mask frameSize = width * height; - animDataTable[i].ptr1 = (uint8 *)malloc(frameSize); - animDataTable[i].ptr2 = (uint8 *)malloc(frameSize); + animDataTable[i].ptr1 = (byte *)malloc(frameSize); + animDataTable[i].ptr2 = (byte *)malloc(frameSize); animDataTable[i].width = width; animDataTable[i].var1 = width >> 3; @@ -221,7 +221,7 @@ int16 allocFrame(uint16 width, uint16 height, int8 isMask) { // mask frameSize = width * height * 8; - animDataTable[i].ptr1 = (uint8 *)malloc(frameSize); + animDataTable[i].ptr1 = (byte *)malloc(frameSize); animDataTable[i].ptr2 = NULL; animDataTable[i].width = width; @@ -264,7 +264,7 @@ int16 allocFrame2(uint16 width, uint16 height, uint16 type) { frameSize *= 2; - animDataTable[i].ptr1 = (uint8 *)malloc(frameSize); + animDataTable[i].ptr1 = (byte *)malloc(frameSize); assert(animDataTable[i].ptr1); @@ -308,7 +308,7 @@ int16 reserveFrame(uint16 width, uint16 height, uint16 type, uint16 idx) { frameSize *= 2; - animDataTable[i].ptr1 = (uint8 *)malloc(frameSize); + animDataTable[i].ptr1 = (byte *)malloc(frameSize); assert(animDataTable[i].ptr1); @@ -332,7 +332,7 @@ int16 reserveFrame(uint16 width, uint16 height, uint16 type, uint16 idx) { return (i); } -void generateMask(uint8 * sprite, uint8 * mask, uint16 size, uint8 transparency) { +void generateMask(byte * sprite, byte * mask, uint16 size, byte transparency) { uint16 i; for (i = 0; i < size; i++) { @@ -344,12 +344,12 @@ void generateMask(uint8 * sprite, uint8 * mask, uint16 size, uint8 transparency) } } -void convertMask(uint8 * dest, uint8 * source, int16 width, int16 height) { +void convertMask(byte * dest, byte * source, int16 width, int16 height) { int16 i; int16 j; for (i = 0; i < width * height; i++) { - uint8 maskEntry = *(source++); + byte maskEntry = *(source++); for (j = 0; j < 8; j++) { if (maskEntry & 0x80) { *(dest++) = 0; @@ -362,11 +362,11 @@ void convertMask(uint8 * dest, uint8 * source, int16 width, int16 height) { } } -void convert4BBP(uint8 * dest, uint8 * source, int16 width, int16 height) { +void convert4BBP(byte * dest, byte * source, int16 width, int16 height) { int16 i; for (i = 0; i < width * height; i++) { - uint8 maskEntry = *(source++); + byte maskEntry = *(source++); *(dest++) = (maskEntry & 0xF0) >> 4; *(dest++) = (maskEntry & 0xF); } @@ -374,7 +374,7 @@ void convert4BBP(uint8 * dest, uint8 * source, int16 width, int16 height) { void loadSpl(const char *resourceName) { int16 foundFileIdx; - uint8 *dataPtr; + byte *dataPtr; int16 entry; foundFileIdx = findFileInBundle(resourceName); @@ -393,9 +393,9 @@ void loadSpl(const char *resourceName) { void loadMsk(const char *resourceName) { int16 foundFileIdx; - uint8 *dataPtr; + byte *dataPtr; int16 entry; - uint8 *ptr; + byte *ptr; int16 i; foundFileIdx = findFileInBundle(resourceName); @@ -426,11 +426,11 @@ void loadMsk(const char *resourceName) { void loadAni(const char *resourceName) { int16 foundFileIdx; - uint8 *dataPtr; + byte *dataPtr; int16 entry; - uint8 *ptr; + byte *ptr; int16 i; - uint8 transparentColor; + byte transparentColor; uint32 fullSize; foundFileIdx = findFileInBundle(resourceName); @@ -450,7 +450,7 @@ void loadAni(const char *resourceName) { fullSize = animHeader.frameWidth * animHeader.frameHeight; for (i = 0; i < animHeader.numFrames; i++) { - uint8 *animPtr; + byte *animPtr; entry = allocFrame(animHeader.frameWidth * 2, animHeader.frameHeight, 0); @@ -473,7 +473,7 @@ void loadAni(const char *resourceName) { } } - animPtr = (uint8 *)malloc(fullSize); + animPtr = (byte *)malloc(fullSize); memcpy(animPtr, ptr, fullSize); ptr += fullSize; @@ -490,34 +490,34 @@ void loadAni(const char *resourceName) { } } -void convert8BBP(uint8 * dest, uint8 * source, int16 width, int16 height) { +void convert8BBP(byte * dest, byte * source, int16 width, int16 height) { uint16 i; - uint8 table[16]; + byte table[16]; memcpy(table, source, 16); source += 16; for (i = 0; i < width * height; i++) { - uint8 color = *(source++); + byte color = *(source++); *(dest++) = table[color >> 4]; *(dest++) = table[color & 0xF]; } } -void convert8BBP2(uint8 * dest, uint8 * source, int16 width, int16 height) { +void convert8BBP2(byte * dest, byte * source, int16 width, int16 height) { uint16 i; uint16 j; - uint8 al; - uint8 ah; - uint8 bl; - uint8 bh; - uint8 cl; - uint8 ch; - uint8 dl; - uint8 dh; - uint8 color; + byte al; + byte ah; + byte bl; + byte bh; + byte cl; + byte ch; + byte dl; + byte dh; + byte color; for (j = 0; j < (width * height) / 16; j++) { al = *(source); @@ -605,13 +605,13 @@ void convert8BBP2(uint8 * dest, uint8 * source, int16 width, int16 height) { void loadSet(const char *resourceName) { animHeader2Struct header2; int16 foundFileIdx; - uint8 *dataPtr; + byte *dataPtr; int16 entry; - uint8 *ptr; + byte *ptr; int16 i; uint32 fullSize; uint16 numSpriteInAnim; - uint8 *startOfDataPtr; + byte *startOfDataPtr; foundFileIdx = findFileInBundle(resourceName); dataPtr = readBundleFile(foundFileIdx); @@ -626,7 +626,7 @@ void loadSet(const char *resourceName) { for (i = 0; i < numSpriteInAnim; i++) { int16 typeParam; - uint8 table[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; + byte table[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; memcpy(&header2, ptr, 0x10); ptr += 0x10; @@ -688,13 +688,13 @@ void loadSet(const char *resourceName) { void loadSetAbs(const char *resourceName, uint16 idx) { animHeader2Struct header2; int16 foundFileIdx; - uint8 *dataPtr; + byte *dataPtr; int16 entry; - uint8 *ptr; + byte *ptr; int16 i; uint32 fullSize; uint16 numSpriteInAnim; - uint8 *startOfDataPtr; + byte *startOfDataPtr; foundFileIdx = findFileInBundle(resourceName); dataPtr = readBundleFile(foundFileIdx); @@ -709,7 +709,7 @@ void loadSetAbs(const char *resourceName, uint16 idx) { for (i = 0; i < numSpriteInAnim; i++) { int16 typeParam; - uint8 table[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; + byte table[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; memcpy(&header2, ptr, 0x10); ptr += 0x10; @@ -770,7 +770,7 @@ void loadSetAbs(const char *resourceName, uint16 idx) { void loadSeq(const char *resourceName) { int16 foundFileIdx; - uint8 *dataPtr; + byte *dataPtr; int16 entry; foundFileIdx = findFileInBundle(resourceName); @@ -783,7 +783,7 @@ void loadSeq(const char *resourceName) { void loadSeqAbs(const char *resourceName, uint16 idx) { int16 foundFileIdx; - uint8 *dataPtr; + byte *dataPtr; int16 entry; foundFileIdx = findFileInBundle(resourceName); @@ -795,8 +795,8 @@ void loadSeqAbs(const char *resourceName, uint16 idx) { } void loadResource(const char *resourceName) { - /* uint8 isMask = 0; */ - /* uint8 isSpl = 0; */ + /* byte isMask = 0; */ + /* byte isSpl = 0; */ if (strstr(resourceName, ".SPL")) { loadSpl(resourceName); @@ -822,8 +822,8 @@ void loadResource(const char *resourceName) { } void loadAbs(const char *resourceName, uint16 idx) { - /* uint8 isMask = 0; */ - /* uint8 isSpl = 0; */ + /* byte isMask = 0; */ + /* byte isSpl = 0; */ if (strstr(resourceName, ".SET")) { loadSetAbs(resourceName, idx); @@ -856,8 +856,8 @@ void loadResourcesFromSave() { int8 isMask = 0; int8 isSpl = 0; int16 foundFileIdx; - uint8 *dataPtr; - uint8 *ptr; + byte *dataPtr; + byte *ptr; char animName[256]; if (strcmp(currentPartName, currentPtr->name)) { @@ -900,7 +900,7 @@ void loadResourcesFromSave() { { uint16 fullSize; uint16 i; - uint8 transparentColor; + byte transparentColor; fullSize = animHeader.frameWidth * animHeader.frameHeight; @@ -910,7 +910,7 @@ void loadResourcesFromSave() { for (i = 0; i < animHeader.numFrames; i++) { // load all the frames int16 entry; - uint8 *animPtr; + byte *animPtr; // special case transparency handling if (!strcmp(animName, "L2202.ANI")) { @@ -941,7 +941,7 @@ void loadResourcesFromSave() { ptr += fullSize; } else { if (!isMask) { - animPtr = (uint8 *)malloc(fullSize); + animPtr = (byte *)malloc(fullSize); memcpy(animPtr, ptr, fullSize); ptr += fullSize; diff --git a/engines/cine/anim.h b/engines/cine/anim.h index a76941cf32..89bd64adb3 100644 --- a/engines/cine/anim.h +++ b/engines/cine/anim.h @@ -30,29 +30,29 @@ namespace Cine { extern uint16 frameVar0; struct animHeaderStruct { - uint8 field_0; - uint8 field_1; - uint8 field_2; - uint8 field_3; + byte field_0; + byte field_1; + byte field_2; + byte field_3; uint16 frameWidth; uint16 frameHeight; - uint8 field_8; - uint8 field_9; - uint8 field_A; - uint8 field_B; - uint8 field_C; - uint8 field_D; + byte field_8; + byte field_9; + byte field_A; + byte field_B; + byte field_C; + byte field_D; uint16 numFrames; - uint8 field_10; - uint8 field_11; - uint8 field_12; - uint8 field_13; + byte field_10; + byte field_11; + byte field_12; + byte field_13; uint16 field_14; }; struct animDataEntry { char name[9]; - uint8 color; + byte color; }; extern animDataEntry animData[]; diff --git a/engines/cine/auto00.cpp b/engines/cine/auto00.cpp index 8db2adf752..b6bde378f9 100644 --- a/engines/cine/auto00.cpp +++ b/engines/cine/auto00.cpp @@ -22,11 +22,15 @@ * */ +#include "common/stdafx.h" +#include "common/scummsys.h" + #include "cine/auto00.h" + namespace Cine { -const unsigned char AUT000[] = { +const byte AUT000[] = { 0x00, 0x32, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/engines/cine/auto00.h b/engines/cine/auto00.h index 23159bb30b..15d945513e 100644 --- a/engines/cine/auto00.h +++ b/engines/cine/auto00.h @@ -27,7 +27,7 @@ namespace Cine { -extern const unsigned char AUT000[]; +extern const byte AUT000[]; #define AUT000_size sizeof(AUT000); diff --git a/engines/cine/bg.cpp b/engines/cine/bg.cpp index 8eeec1a8d6..0867dc716d 100644 --- a/engines/cine/bg.cpp +++ b/engines/cine/bg.cpp @@ -29,16 +29,16 @@ namespace Cine { uint16 bgVar0; -void loadCtHigh(uint8 * currentPtr) { +void loadCtHigh(byte * currentPtr) { memcpy(page3Raw, currentPtr, 320 * 200); } -uint8 loadCt(const char *ctName) { +byte loadCt(const char *ctName) { uint16 header[32]; strcpy(currentCtName, ctName); - uint8 *ptr = readBundleFile(findFileInBundle(ctName)); + byte *ptr = readBundleFile(findFileInBundle(ctName)); if (gameType == Cine::GID_OS) { uint16 bpp = READ_BE_UINT16(ptr); ptr += 2; @@ -76,11 +76,11 @@ void loadBgHigh(const char *currentPtr) { colorMode256 = 1; } -uint8 loadBg(const char *bgName) { +byte loadBg(const char *bgName) { strcpy(currentBgName[0], bgName); - uint8 fileIdx = findFileInBundle(bgName); - uint8 *ptr = readBundleFile(fileIdx); + byte fileIdx = findFileInBundle(bgName); + byte *ptr = readBundleFile(fileIdx); uint16 bpp = READ_BE_UINT16(ptr); ptr += 2; if (bpp == 8) { @@ -102,17 +102,17 @@ uint8 loadBg(const char *bgName) { return 0; } -uint8 *additionalBgTable[9] = { page2Raw, NULL, NULL, NULL, NULL, NULL, NULL, NULL, page3Raw }; -uint8 currentAdditionalBgIdx = 0; -uint8 currentAdditionalBgIdx2 = 0; +byte *additionalBgTable[9] = { page2Raw, NULL, NULL, NULL, NULL, NULL, NULL, NULL, page3Raw }; +byte currentAdditionalBgIdx = 0; +byte currentAdditionalBgIdx2 = 0; void addBackground(const char *bgName, uint16 bgIdx) { strcpy(currentBgName[bgIdx], bgName); - uint8 fileIdx = findFileInBundle(bgName); - uint8 *ptr = readBundleFile(fileIdx); + byte fileIdx = findFileInBundle(bgName); + byte *ptr = readBundleFile(fileIdx); - additionalBgTable[bgIdx] = (uint8 *) malloc(320 * 200); + additionalBgTable[bgIdx] = (byte *) malloc(320 * 200); uint16 bpp = READ_BE_UINT16(ptr); ptr += 2; if (bpp == 8) { diff --git a/engines/cine/bg.h b/engines/cine/bg.h index d1cd6b5790..b5af653889 100644 --- a/engines/cine/bg.h +++ b/engines/cine/bg.h @@ -27,12 +27,12 @@ namespace Cine { -uint8 loadBg(const char *bgName); -uint8 loadCt(const char *bgName); +byte loadBg(const char *bgName); +byte loadCt(const char *bgName); -extern uint8 *additionalBgTable[9]; -extern uint8 currentAdditionalBgIdx; -extern uint8 currentAdditionalBgIdx2; +extern byte *additionalBgTable[9]; +extern byte currentAdditionalBgIdx; +extern byte currentAdditionalBgIdx2; void addBackground(const char *bgName, uint16 bgIdx); diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp index db7c41bb8f..e7b0348ec4 100644 --- a/engines/cine/cine.cpp +++ b/engines/cine/cine.cpp @@ -195,7 +195,7 @@ static void initialize() { init_video(); - textDataPtr = (uint8 *)malloc(8000); + textDataPtr = (byte *)malloc(8000); partBuffer = (PartBuffer *)malloc(NUM_MAX_PARTDATA * sizeof(PartBuffer)); diff --git a/engines/cine/font.h b/engines/cine/font.h index 47284b3dac..041551d0a5 100644 --- a/engines/cine/font.h +++ b/engines/cine/font.h @@ -28,8 +28,8 @@ namespace Cine { struct CharacterEntry { - uint8 characterIdx; - uint8 characterWidth; + byte characterIdx; + byte characterWidth; }; extern const CharacterEntry fontParamTable[256]; diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index 7e29e8ca0b..240158fcec 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -33,16 +33,16 @@ byte *screenBuffer; uint16 c_palette[256]; -unsigned char *page0; -unsigned char *page1; -unsigned char *page2; -unsigned char *page3; +byte *page0; +byte *page1; +byte *page2; +byte *page3; -uint8 page1Raw[320 * 200]; -uint8 page2Raw[320 * 200]; -uint8 page3Raw[320 * 200]; +byte page1Raw[320 * 200]; +byte page2Raw[320 * 200]; +byte page3Raw[320 * 200]; -static const uint8 mouseCursorNormal[] = { +static const byte mouseCursorNormal[] = { 0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0x70, 0x00, 0x78, 0x00, 0x7C, 0x00, 0x7E, 0x00, 0x7F, 0x00, 0x7F, 0x80, 0x7C, 0x00, 0x6C, 0x00, 0x46, 0x00, @@ -53,7 +53,7 @@ static const uint8 mouseCursorNormal[] = { 0xCF, 0x00, 0x07, 0x80, 0x07, 0x80, 0x03, 0x80 }; -static const uint8 mouseCursorDisk[] = { +static const byte mouseCursorDisk[] = { 0x7F, 0xFC, 0x9F, 0x12, 0x9F, 0x12, 0x9F, 0x12, 0x9F, 0x12, 0x9F, 0xE2, 0x80, 0x02, 0x9F, 0xF2, 0xA0, 0x0A, 0xA0, 0x0A, 0xA0, 0x0A, 0xA0, 0x0A, @@ -64,7 +64,7 @@ static const uint8 mouseCursorDisk[] = { 0xFF, 0xFE, 0xFF, 0xFE, 0x7F, 0xFC, 0x00, 0x00 }; -static const uint8 mouseCursorCross[] = { +static const byte mouseCursorCross[] = { 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x7C, 0x7C, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, @@ -78,7 +78,7 @@ static const uint8 mouseCursorCross[] = { static const struct MouseCursor { int hotspotX; int hotspotY; - const uint8 *bitmap; + const byte *bitmap; } mouseCursors[] = { { 1, 1, mouseCursorNormal }, { 0, 0, mouseCursorDisk }, @@ -89,22 +89,22 @@ void init_video() { screenBuffer = (byte *)malloc(320 * 200 * 3); assert(screenBuffer); - page0 = (unsigned char *)malloc(0x8000); - page1 = (unsigned char *)malloc(0x8000); - page2 = (unsigned char *)malloc(0x8000); - page3 = (unsigned char *)malloc(0x8000); + page0 = (byte *)malloc(0x8000); + page1 = (byte *)malloc(0x8000); + page2 = (byte *)malloc(0x8000); + page3 = (byte *)malloc(0x8000); } void setMouseCursor(int cursor) { static int currentMouseCursor = -1; assert(cursor >= 0 && cursor < 3); if (currentMouseCursor != cursor) { - uint8 mouseCursor[16 * 16]; + byte mouseCursor[16 * 16]; const MouseCursor *mc = &mouseCursors[cursor]; - const uint8 *src = mc->bitmap; + const byte *src = mc->bitmap; for (int i = 0; i < 32; ++i) { int offs = i * 8; - for (uint8 mask = 0x80; mask != 0; mask >>= 1) { + for (byte mask = 0x80; mask != 0; mask >>= 1) { if (src[0] & mask) { mouseCursor[offs] = 2; } else if (src[32] & mask) { @@ -148,8 +148,8 @@ uint16 transformColor(uint16 baseColor, int8 r, int8 g, int8 b) { return (oriR | (oriG << 4) | (oriB << 8)); } -void transformPaletteRange(uint8 startColor, uint8 stopColor, int8 r, int8 g, int8 b) { - uint8 i; +void transformPaletteRange(byte startColor, byte stopColor, int8 r, int8 g, int8 b) { + byte i; for (i = startColor; i <= stopColor; i++) { c_palette[i] = transformColor(tempPalette[i], b, g, r); @@ -157,12 +157,12 @@ void transformPaletteRange(uint8 startColor, uint8 stopColor, int8 r, int8 g, in //gfxFlipPage(page2); } -void gfxFillSprite(uint8 *spritePtr, uint16 width, uint16 height, uint8 *page, int16 x, int16 y) { +void gfxFillSprite(byte *spritePtr, uint16 width, uint16 height, byte *page, int16 x, int16 y) { int16 i; int16 j; for (i = 0; i < height; i++) { - uint8 *destPtr = page + x + y * 320; + byte *destPtr = page + x + y * 320; destPtr += i * 320; for (j = 0; j < width * 8; j++) { @@ -181,7 +181,7 @@ void gfxFillSprite(uint8 *spritePtr, uint16 width, uint16 height, uint8 *page, i } } -void gfxDrawLine(int16 x1, int16 y1, int16 x2, int16 y2, uint8 color, uint8 *page) { +void gfxDrawLine(int16 x1, int16 y1, int16 x2, int16 y2, byte color, byte *page) { if (x1 == x2) { if (y1 > y2) { SWAP(y1, y2); @@ -202,7 +202,7 @@ void gfxDrawLine(int16 x1, int16 y1, int16 x2, int16 y2, uint8 color, uint8 *pag } -void gfxDrawPlainBoxRaw(int16 x1, int16 y1, int16 x2, int16 y2, uint8 color, uint8 *page) { +void gfxDrawPlainBoxRaw(int16 x1, int16 y1, int16 x2, int16 y2, byte color, byte *page) { int16 t; if (x1 > x2) { @@ -224,8 +224,8 @@ void gfxDrawPlainBoxRaw(int16 x1, int16 y1, int16 x2, int16 y2, uint8 color, uin } } -int16 gfxGetBit(int16 x, int16 y, uint8 *ptr, int16 width) { - uint8 *ptrToData = (ptr) + y * width + x; +int16 gfxGetBit(int16 x, int16 y, byte *ptr, int16 width) { + byte *ptrToData = (ptr) + y * width + x; if (x > width) { return 0; @@ -238,17 +238,17 @@ int16 gfxGetBit(int16 x, int16 y, uint8 *ptr, int16 width) { return (1); } -void gfxResetRawPage(uint8 *pageRaw) { +void gfxResetRawPage(byte *pageRaw) { memset(pageRaw, 0, 320 * 200); } -void gfxConvertSpriteToRaw(uint8 *dst, uint8 *src, uint16 width, uint16 height) { +void gfxConvertSpriteToRaw(byte *dst, byte *src, uint16 width, uint16 height) { int x, y, d, bit, plane; width >>= 3; for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { - uint8 data[2][4]; + byte data[2][4]; data[0][0] = *src++; data[1][0] = *src++; data[0][1] = *src++; @@ -259,7 +259,7 @@ void gfxConvertSpriteToRaw(uint8 *dst, uint8 *src, uint16 width, uint16 height) data[1][3] = *src++; for (d = 0; d < 2; ++d) { for (bit = 0; bit < 8; ++bit) { - uint8 color = 0; + byte color = 0; for (plane = 0; plane < 4; ++plane) { if (data[d][plane] & (1 << (7 - bit))) { color |= 1 << plane; @@ -272,14 +272,14 @@ void gfxConvertSpriteToRaw(uint8 *dst, uint8 *src, uint16 width, uint16 height) } } -void gfxCopyRawPage(uint8 *source, uint8 *dest) { +void gfxCopyRawPage(byte *source, byte *dest) { memcpy(dest, source, 320 * 200); } -void gfxFlipRawPage(uint8 *frontBuffer) { - uint8 *page = frontBuffer; +void gfxFlipRawPage(byte *frontBuffer) { + byte *page = frontBuffer; int x, y; - uint8 *pixels = (uint8 *) screenBuffer; + byte *pixels = (byte *) screenBuffer; byte c; for (y = 0; y < 200; y++) { @@ -318,13 +318,13 @@ void gfxFlipRawPage(uint8 *frontBuffer) { g_system->copyRectToScreen(screenBuffer, 320, 0, 0, 320, 200); } -void drawSpriteRaw(uint8 *spritePtr, uint8 *maskPtr, int16 width, int16 height, - uint8 *page, int16 x, int16 y) { +void drawSpriteRaw(byte *spritePtr, byte *maskPtr, int16 width, int16 height, + byte *page, int16 x, int16 y) { int16 i; int16 j; for (i = 0; i < height; i++) { - uint8 *destPtr = page + x + y * 320; + byte *destPtr = page + x + y * 320; destPtr += i * 320; for (j = 0; j < width * 8; j++) { @@ -341,13 +341,13 @@ void drawSpriteRaw(uint8 *spritePtr, uint8 *maskPtr, int16 width, int16 height, } } -void drawSpriteRaw2(uint8 *spritePtr, uint8 transColor, int16 width, int16 height, - uint8 *page, int16 x, int16 y) { +void drawSpriteRaw2(byte *spritePtr, byte transColor, int16 width, int16 height, + byte *page, int16 x, int16 y) { int16 i; int16 j; for (i = 0; i < height; i++) { - uint8 *destPtr = page + x + y * 320; + byte *destPtr = page + x + y * 320; destPtr += i * 320; for (j = 0; j < width * 8; j++) { diff --git a/engines/cine/gfx.h b/engines/cine/gfx.h index 7ee521d330..4ba32bfc9f 100644 --- a/engines/cine/gfx.h +++ b/engines/cine/gfx.h @@ -27,46 +27,46 @@ namespace Cine { -void gfxDrawSprite(uint8 *src4, uint16 sw, uint16 sh, uint8 *dst4, int16 sx, int16 sy); +void gfxDrawSprite(byte *src4, uint16 sw, uint16 sh, byte *dst4, int16 sx, int16 sy); -extern unsigned char *page0; -extern unsigned char *page1; -extern unsigned char *page2; -extern unsigned char *page3; +extern byte *page0; +extern byte *page1; +extern byte *page2; +extern byte *page3; void init_video(); void setMouseCursor(int cursor); -void convertGfx(uint8 *source, uint8 *dest, const uint16 width, const uint16 height); -void convertGfx2(uint8 *source, uint8 *dest, const uint16 width, const uint16 height); -void gfxCopyPage(uint8 *source, uint8 *dest); +void convertGfx(byte *source, byte *dest, const uint16 width, const uint16 height); +void convertGfx2(byte *source, byte *dest, const uint16 width, const uint16 height); +void gfxCopyPage(byte *source, byte *dest); -void transformPaletteRange(uint8 startColor, uint8 numColor, int8 r, int8 g, int8 b); +void transformPaletteRange(byte startColor, byte numColor, int8 r, int8 g, int8 b); void gfxFlipPage(void); -void gfxSpriteFunc1(uint8 *ptr, uint16 width, uint16 height, uint8 *page, int16 x, int16 y); -void gfxFillSprite(uint8 *src4, uint16 sw, uint16 sh, uint8 *dst4, int16 sx, int16 sy); +void gfxSpriteFunc1(byte *ptr, uint16 width, uint16 height, byte *page, int16 x, int16 y); +void gfxFillSprite(byte *src4, uint16 sw, uint16 sh, byte *dst4, int16 sx, int16 sy); -void gfxSpriteFunc2(uint8 *spritePtr, int16 width, int16 height, uint8 *maskPtr, - int16 maskWidth, int16 maskHeight, uint8 *bufferPtr, int16 x, int16 y, uint8 maskIdx); +void gfxSpriteFunc2(byte *spritePtr, int16 width, int16 height, byte *maskPtr, + int16 maskWidth, int16 maskHeight, byte *bufferPtr, int16 x, int16 y, byte maskIdx); -void gfxDrawLine(int16 x1, int16 y1, int16 x2, int16 y2, uint8 color, uint8 *page); -void gfxDrawPlainBox(int16 x1, int16 y1, int16 x2, int16 y2, uint8 color); +void gfxDrawLine(int16 x1, int16 y1, int16 x2, int16 y2, byte color, byte *page); +void gfxDrawPlainBox(int16 x1, int16 y1, int16 x2, int16 y2, byte color); -void gfxResetPage(uint8 *pagePtr); +void gfxResetPage(byte *pagePtr); -int16 gfxGetBit(int16 x, int16 y, uint8 *ptr, int16 width); +int16 gfxGetBit(int16 x, int16 y, byte *ptr, int16 width); -extern uint8 page1Raw[320 * 200]; -extern uint8 page2Raw[320 * 200]; -extern uint8 page3Raw[320 * 200]; +extern byte page1Raw[320 * 200]; +extern byte page2Raw[320 * 200]; +extern byte page3Raw[320 * 200]; -void gfxResetRawPage(uint8 *pageRaw); -void gfxConvertSpriteToRaw(uint8 *dest, uint8 *source, uint16 width, uint16 height); -void gfxCopyRawPage(uint8 *source, uint8 * dest); -void gfxFlipRawPage(uint8 *frontBuffer); -void drawSpriteRaw(uint8 *spritePtr, uint8 *maskPtr, int16 width, int16 height, uint8 *page, int16 x, int16 y); -void gfxDrawPlainBoxRaw(int16 x1, int16 y1, int16 x2, int16 y2, uint8 color, uint8 *page); -void drawSpriteRaw2(uint8 *spritePtr, uint8 transColor, int16 width, int16 height, uint8 *page, int16 x, int16 y); +void gfxResetRawPage(byte *pageRaw); +void gfxConvertSpriteToRaw(byte *dest, byte *source, uint16 width, uint16 height); +void gfxCopyRawPage(byte *source, byte * dest); +void gfxFlipRawPage(byte *frontBuffer); +void drawSpriteRaw(byte *spritePtr, byte *maskPtr, int16 width, int16 height, byte *page, int16 x, int16 y); +void gfxDrawPlainBoxRaw(int16 x1, int16 y1, int16 x2, int16 y2, byte color, byte *page); +void drawSpriteRaw2(byte *spritePtr, byte transColor, int16 width, int16 height, byte *page, int16 x, int16 y); } // End of namespace Cine diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp index 24227f169c..4f613de2a5 100644 --- a/engines/cine/main_loop.cpp +++ b/engines/cine/main_loop.cpp @@ -99,7 +99,7 @@ void mainLoop(int bootScriptIdx) { uint16 var_6; uint16 quitFlag; uint16 i; - uint8 di; + byte di; uint16 mouseButton; freeAnimDataTable(); diff --git a/engines/cine/msg.cpp b/engines/cine/msg.cpp index 829c0f1233..71e4ee323b 100644 --- a/engines/cine/msg.cpp +++ b/engines/cine/msg.cpp @@ -34,7 +34,7 @@ uint16 messageCount; void loadMsg(char *pMsgName) { uint16 i; - uint8 *ptr; + byte *ptr; checkDataDisk(-1); @@ -66,7 +66,7 @@ void loadMsg(char *pMsgName) { for (i = 0; i < messageCount; i++) { if (messageTable[i].len) { - messageTable[i].ptr = (uint8 *) malloc(messageTable[i].len); + messageTable[i].ptr = (byte *) malloc(messageTable[i].len); assert(messageTable[i].ptr); diff --git a/engines/cine/object.cpp b/engines/cine/object.cpp index 9bc980a766..2ef2dc3a66 100644 --- a/engines/cine/object.cpp +++ b/engines/cine/object.cpp @@ -61,7 +61,7 @@ void loadObject(char *pObjectName) { uint16 numEntry; uint16 entrySize; uint16 i; - uint8 *ptr; + byte *ptr; checkDataDisk(-1); @@ -196,7 +196,7 @@ void loadOverlayElement(uint16 objIdx, uint16 param) { currentHeadPtr->previous = pNewElement; } -void setupObject(uint8 objIdx, uint16 param1, uint16 param2, uint16 param3, uint16 param4) { +void setupObject(byte objIdx, uint16 param1, uint16 param2, uint16 param3, uint16 param4) { objectTable[objIdx].x = param1; objectTable[objIdx].y = param2; objectTable[objIdx].mask = param3; @@ -207,7 +207,7 @@ void setupObject(uint8 objIdx, uint16 param1, uint16 param2, uint16 param3, uint } } -void subObjectParam(uint8 objIdx, uint8 paramIdx, int16 newValue) { +void subObjectParam(byte objIdx, byte paramIdx, int16 newValue) { paramIdx--; assert(paramIdx <= 5); @@ -250,7 +250,7 @@ void subObjectParam(uint8 objIdx, uint8 paramIdx, int16 newValue) { } } -void addObjectParam(uint8 objIdx, uint8 paramIdx, int16 newValue) { +void addObjectParam(byte objIdx, byte paramIdx, int16 newValue) { paramIdx--; assert(paramIdx <= 5); @@ -293,7 +293,7 @@ void addObjectParam(uint8 objIdx, uint8 paramIdx, int16 newValue) { } } -void modifyObjectParam(uint8 objIdx, uint8 paramIdx, int16 newValue) { +void modifyObjectParam(byte objIdx, byte paramIdx, int16 newValue) { paramIdx--; assert(paramIdx <= 5); @@ -340,8 +340,8 @@ void modifyObjectParam(uint8 objIdx, uint8 paramIdx, int16 newValue) { } } -uint8 compareObjectParam(uint8 objIdx, uint8 param1, int16 param2) { - uint8 compareResult = 0; +byte compareObjectParam(byte objIdx, byte param1, int16 param2) { + byte compareResult = 0; switch (param1 - 1) { case 0: diff --git a/engines/cine/object.h b/engines/cine/object.h index 23f2250e11..6170d6e3d9 100644 --- a/engines/cine/object.h +++ b/engines/cine/object.h @@ -60,8 +60,8 @@ void unloadAllMasks(void); void resetMessageHead(void); void loadObject(char *pObjectName); -void setupObject(uint8 objIdx, uint16 param1, uint16 param2, uint16 param3, uint16 param4); -void modifyObjectParam(uint8 objIdx, uint8 paramIdx, int16 newValue); +void setupObject(byte objIdx, uint16 param1, uint16 param2, uint16 param3, uint16 param4); +void modifyObjectParam(byte objIdx, byte paramIdx, int16 newValue); void loadOverlayElement(uint16 objIdx, uint16 param); int8 removeOverlayElement(uint16 objIdx, uint16 param); @@ -69,9 +69,9 @@ int8 removeOverlayElement(uint16 objIdx, uint16 param); int16 getObjectParam(uint16 objIdx, uint16 paramIdx); int16 freeOverlay(uint16 objIdx, uint16 param); -void addObjectParam(uint8 objIdx, uint8 paramIdx, int16 newValue); -void subObjectParam(uint8 objIdx, uint8 paramIdx, int16 newValue); -uint8 compareObjectParam(uint8 objIdx, uint8 param1, int16 param2); +void addObjectParam(byte objIdx, byte paramIdx, int16 newValue); +void subObjectParam(byte objIdx, byte paramIdx, int16 newValue); +byte compareObjectParam(byte objIdx, byte param1, int16 param2); } // End of namespace Cine diff --git a/engines/cine/pal.cpp b/engines/cine/pal.cpp index ef908d8f46..eee9717b5b 100644 --- a/engines/cine/pal.cpp +++ b/engines/cine/pal.cpp @@ -29,8 +29,8 @@ namespace Cine { uint16 tempPalette[256]; -uint8 colorMode256 = 0; -uint8 palette256[256 * 3]; +byte colorMode256 = 0; +byte palette256[256 * 3]; uint16 palEntriesCount; @@ -38,8 +38,8 @@ Common::File palFileHandle; PalEntry *palPtr; -uint8 paletteBuffer1[16]; -uint8 paletteBuffer2[16]; +byte paletteBuffer1[16]; +byte paletteBuffer2[16]; void loadPal(const char *fileName) { char buffer[20]; @@ -100,7 +100,7 @@ int16 findPaletteFromName(const char *fileName) { void loadRelatedPalette(const char *fileName) { char localName[16]; - uint8 i; + byte i; int16 paletteIndex; removeExtention(localName, fileName); diff --git a/engines/cine/pal.h b/engines/cine/pal.h index baa7505550..0ed3deab56 100644 --- a/engines/cine/pal.h +++ b/engines/cine/pal.h @@ -29,15 +29,15 @@ namespace Cine { struct PalEntry { char name[10]; - uint8 pal1[16]; - uint8 pal2[16]; + byte pal1[16]; + byte pal2[16]; }; void loadPal(const char *fileName); extern uint16 tempPalette[256]; -extern uint8 colorMode256; -extern uint8 palette256[256 * 3]; +extern byte colorMode256; +extern byte palette256[256 * 3]; void loadRelatedPalette(const char *fileName); diff --git a/engines/cine/part.cpp b/engines/cine/part.cpp index 204b0525d6..37bf41ec69 100644 --- a/engines/cine/part.cpp +++ b/engines/cine/part.cpp @@ -72,7 +72,7 @@ void loadPart(const char *partName) { loadPal(partName); } -void freePartEntry(uint8 idx) { +void freePartEntry(byte idx) { if (animDataTable[idx].ptr1) { //free(animDataTable[idx].ptr1); @@ -86,8 +86,8 @@ void freePartEntry(uint8 idx) { } } -void freePartRange(uint8 startIdx, uint8 numIdx) { - uint8 i; +void freePartRange(byte startIdx, byte numIdx) { + byte i; for (i = 0; i < numIdx; i++) { freePartEntry(i + startIdx); @@ -183,23 +183,23 @@ int16 findFileInBundle(const char *fileName) { return -1; } -void readFromPart(int16 idx, uint8 *dataPtr) { +void readFromPart(int16 idx, byte *dataPtr) { setMouseCursor(MOUSE_CURSOR_DISK); partFileHandle.seek(partBuffer[idx].offset, SEEK_SET); partFileHandle.read(dataPtr, partBuffer[idx].packedSize); } -uint8 *readBundleFile(int16 foundFileIdx) { - uint8 *dataPtr; +byte *readBundleFile(int16 foundFileIdx) { + byte *dataPtr; - dataPtr = (uint8 *) malloc(partBuffer[foundFileIdx].unpackedSize); + dataPtr = (byte *) malloc(partBuffer[foundFileIdx].unpackedSize); memset(dataPtr, 0, partBuffer[foundFileIdx].unpackedSize); if (partBuffer[foundFileIdx].unpackedSize != partBuffer[foundFileIdx].packedSize) { - uint8 *unpackBuffer; + byte *unpackBuffer; - unpackBuffer = (uint8 *)malloc(partBuffer[foundFileIdx].packedSize); + unpackBuffer = (byte *)malloc(partBuffer[foundFileIdx].packedSize); readFromPart(foundFileIdx, unpackBuffer); delphineUnpack(dataPtr, unpackBuffer, partBuffer[foundFileIdx].packedSize); free(unpackBuffer); @@ -210,7 +210,7 @@ uint8 *readBundleFile(int16 foundFileIdx) { return dataPtr; } -uint8 *readFile(const char *filename) { +byte *readFile(const char *filename) { Common::File in; in.open(filename); @@ -218,10 +218,10 @@ uint8 *readFile(const char *filename) { if (!in.isOpen()) error("readFile(): Cannot open file %s", filename); - uint8 *dataPtr; + byte *dataPtr; uint32 size = in.size(); - dataPtr = (uint8 *)malloc(size); + dataPtr = (byte *)malloc(size); in.read(dataPtr, size); return dataPtr; diff --git a/engines/cine/part.h b/engines/cine/part.h index 3dcb95ac23..f02cf2996d 100644 --- a/engines/cine/part.h +++ b/engines/cine/part.h @@ -43,8 +43,8 @@ struct AnimData { uint16 bpp; uint16 height; - uint8 *ptr1; - uint8 *ptr2; + byte *ptr1; + byte *ptr2; int16 fileIdx; int16 frameIdx; char name[10]; @@ -61,15 +61,15 @@ extern AnimData *animDataTable; extern PartBuffer *partBuffer; void loadPart(const char *partName); -void freePartRange(uint8 startIdx, uint8 numIdx); +void freePartRange(byte startIdx, byte numIdx); void closePart(void); int16 findFileInBundle(const char *fileName); -void readFromPart(int16 idx, uint8 *dataPtr); +void readFromPart(int16 idx, byte *dataPtr); -uint8 *readBundleFile(int16 foundFileIdx); -uint8 *readFile(const char *filename); +byte *readBundleFile(int16 foundFileIdx); +byte *readFile(const char *filename); } // End of namespace Cine diff --git a/engines/cine/prc.cpp b/engines/cine/prc.cpp index ddb856a13e..70b3daf9a0 100644 --- a/engines/cine/prc.cpp +++ b/engines/cine/prc.cpp @@ -59,9 +59,9 @@ void freePrcLinkedList(void) { } void loadPrc(const char *pPrcName) { - uint8 i; + byte i; uint16 numScripts; - const uint8 *scriptPtr; + const byte *scriptPtr; assert(pPrcName); diff --git a/engines/cine/rel.cpp b/engines/cine/rel.cpp index 187593047e..75ec5efe33 100644 --- a/engines/cine/rel.cpp +++ b/engines/cine/rel.cpp @@ -55,7 +55,7 @@ void releaseObjectScripts(void) { void loadRel(char *pRelName) { uint16 numEntry; uint16 i; - uint8 *ptr; + byte *ptr; checkDataDisk(-1); @@ -97,7 +97,7 @@ void loadRel(char *pRelName) { { uint16 i; - uint8 buffer[256]; + byte buffer[256]; for (i = 0; i < numEntry; i++) { if (relTable[i].var4) { diff --git a/engines/cine/resource.cpp b/engines/cine/resource.cpp index c2835fc7e9..0601dceb52 100644 --- a/engines/cine/resource.cpp +++ b/engines/cine/resource.cpp @@ -90,9 +90,9 @@ static int snd_findBasesonEntry(const char *entryName) { return -1; } -uint8 *snd_loadBasesonEntry(const char *entryName) { +byte *snd_loadBasesonEntry(const char *entryName) { int entryNum; - uint8 *entryData = NULL; + byte *entryData = NULL; if (gameType == Cine::GID_OS) { entryNum = findFileInBundle((const char *)entryName); @@ -102,10 +102,10 @@ uint8 *snd_loadBasesonEntry(const char *entryName) { entryNum = snd_findBasesonEntry(entryName); if (entryNum != -1 && entryNum < snd_numBasesonEntries) { const BasesonEntry *be = &snd_basesonEntries[entryNum]; - entryData = (uint8 *)malloc(be->unpackedSize); + entryData = (byte *)malloc(be->unpackedSize); if (entryData) { if (be->unpackedSize > be->size) { - uint8 *tempData = (uint8 *)malloc(be->size); + byte *tempData = (byte *)malloc(be->size); if (tempData) { snd_baseSndFile->seek(be->offset, SEEK_SET); snd_baseSndFile->read(tempData, be->size); diff --git a/engines/cine/resource.h b/engines/cine/resource.h index a77ac7ef94..163d21bdf1 100644 --- a/engines/cine/resource.h +++ b/engines/cine/resource.h @@ -40,7 +40,7 @@ struct BasesonEntry { void checkDataDisk(int16 param); extern int snd_loadBasesonEntries(const char *fileName); extern void snd_clearBasesonEntries(); -extern uint8 *snd_loadBasesonEntry(const char *entryName); +extern byte *snd_loadBasesonEntry(const char *entryName); } // End of namespace Cine diff --git a/engines/cine/script.cpp b/engines/cine/script.cpp index 746f4ed824..b5569f9900 100644 --- a/engines/cine/script.cpp +++ b/engines/cine/script.cpp @@ -154,7 +154,7 @@ void stopGlobalScript(uint16 scriptIdx) { currentHead->scriptIdx = -1; } -uint16 computeScriptStackSub(uint8 mode, byte *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint8 param1, uint16 startOffset) { +uint16 computeScriptStackSub(byte mode, byte *scriptPtr, int16 *stackPtr, uint16 scriptSize, byte param1, uint16 startOffset) { byte *localScriptPtr = scriptPtr; uint16 exitScript; uint16 i; @@ -243,7 +243,7 @@ uint16 computeScriptStackSub(uint8 mode, byte *scriptPtr, int16 *stackPtr, uint1 case 0x52: case 0x53: { - uint8 param; + byte param; position++; param = *(localScriptPtr + position); @@ -258,7 +258,7 @@ uint16 computeScriptStackSub(uint8 mode, byte *scriptPtr, int16 *stackPtr, uint1 } case 0x9E: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -421,7 +421,7 @@ uint16 computeScriptStackFromScript(byte *scriptPtr, uint16 currentPosition, uin return computeScriptStackSub(0, scriptPtr, (int16 *)&dummyU16, (uint16)scriptSize, labelIdx, currentPosition); } -void palRotate(uint8 a, uint8 b, uint8 c) { +void palRotate(byte a, byte b, byte c) { int16 i; uint16 currentColor; @@ -543,9 +543,9 @@ int16 endScript1(uint16 scriptIdx) { return (0); } -int16 getZoneFromPosition(uint8 *page, int16 x, int16 y, int16 width) { - uint8 *ptr = page + (y * width) + x / 2; - uint8 zoneVar; +int16 getZoneFromPosition(byte *page, int16 x, int16 y, int16 width) { + byte *ptr = page + (y * width) + x / 2; + byte zoneVar; if (!(x % 2)) { zoneVar = (*(ptr) >> 4) & 0xF; @@ -556,9 +556,9 @@ int16 getZoneFromPosition(uint8 *page, int16 x, int16 y, int16 width) { return (zoneVar); } -int16 getZoneFromPositionRaw(uint8 *page, int16 x, int16 y, int16 width) { - uint8 *ptr = page + (y * width) + x; - uint8 zoneVar; +int16 getZoneFromPositionRaw(byte *page, int16 x, int16 y, int16 width) { + byte *ptr = page + (y * width) + x; + byte zoneVar; zoneVar = (*(ptr)) & 0xF; @@ -649,8 +649,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x0: //OP_modifyObjectParam { - uint8 objIdx; - uint8 paramIdx; + byte objIdx; + byte paramIdx; int16 newValue; objIdx = *(currentScriptPtr + currentPosition); @@ -670,9 +670,9 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x1: //OP_getObjectParam { - uint8 objIdx; - uint8 paramIdx; - uint8 newValue; + byte objIdx; + byte paramIdx; + byte newValue; objIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -691,8 +691,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x2: { - uint8 objIdx; - uint8 paramIdx; + byte objIdx; + byte paramIdx; int16 newValue; objIdx = *(currentScriptPtr + currentPosition); @@ -712,8 +712,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x3: { - uint8 objIdx; - uint8 paramIdx; + byte objIdx; + byte paramIdx; int16 newValue; objIdx = *(currentScriptPtr + currentPosition); @@ -733,8 +733,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x6: { - uint8 objIdx; - uint8 param1; + byte objIdx; + byte param1; int16 param2; objIdx = *(currentScriptPtr + currentPosition); @@ -754,7 +754,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x7: { - uint8 objIdx; + byte objIdx; int16 param1; int16 param2; int16 param3; @@ -783,7 +783,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x8: { - uint8 objIdx; + byte objIdx; int16 param1; int16 param2; int16 param3; @@ -812,8 +812,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x9: // OP_loadVar { - uint8 varIdx; - uint8 varType; + byte varIdx; + byte varType; varIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -822,7 +822,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { currentPosition++; if (varType) { - uint8 dataIdx; + byte dataIdx; dataIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -895,8 +895,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0xA: // OP_addVar { - uint8 param1; - uint8 type; + byte param1; + byte type; param1 = *(currentScriptPtr + currentPosition); currentPosition++; @@ -905,7 +905,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { currentPosition++; if (type) { - uint8 param2; + byte param2; param2 = *(currentScriptPtr + currentPosition); currentPosition++; @@ -928,8 +928,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0xB: // OP_subVar { - uint8 param1; - uint8 type; + byte param1; + byte type; param1 = *(currentScriptPtr + currentPosition); currentPosition++; @@ -938,7 +938,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { currentPosition++; if (type) { - uint8 param2; + byte param2; param2 = *(currentScriptPtr + currentPosition); currentPosition++; @@ -961,8 +961,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0xC: // OP_mulVar { - uint8 param1; - uint8 type; + byte param1; + byte type; param1 = *(currentScriptPtr + currentPosition); currentPosition++; @@ -971,7 +971,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { currentPosition++; if (type) { - uint8 param2; + byte param2; param2 = *(currentScriptPtr + currentPosition); currentPosition++; @@ -994,8 +994,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0xD: // OP_modVar { - uint8 param1; - uint8 type; + byte param1; + byte type; param1 = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1004,7 +1004,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { currentPosition++; if (type) { - uint8 param2; + byte param2; param2 = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1027,8 +1027,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0xE: // OP_ compareVar { - uint8 varIdx; - uint8 varType; + byte varIdx; + byte varType; varIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1037,7 +1037,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { currentPosition++; if (varType) { - uint8 value; + byte value; value = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1073,9 +1073,9 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0xF: //OP_modifyObjectParam2 { - uint8 objIdx; - uint8 paramIdx; - uint8 newValue; + byte objIdx; + byte paramIdx; + byte newValue; objIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1094,7 +1094,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x13: // OP_loadV7Element { - uint8 param; + byte param; param = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1107,7 +1107,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x14: { - uint8 param; + byte param; param = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1120,7 +1120,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x15: { - uint8 param; + byte param; param = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1133,7 +1133,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x16: { - uint8 param; + byte param; param = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1146,7 +1146,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x17: { - uint8 param; + byte param; param = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1159,7 +1159,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x18: { - uint8 param; + byte param; param = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1172,7 +1172,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x19: { - uint8 param; + byte param; param = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1185,7 +1185,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x1A: { - uint8 param; + byte param; param = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1204,7 +1204,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x1D: // OP_label { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1217,7 +1217,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x1E: // OP_goto { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1231,7 +1231,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x1F: // OP_gotoIfSup { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1248,7 +1248,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x20: // OP_gotoIfSupEqu { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1266,7 +1266,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x21: // OP_gotoIfInf { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1283,7 +1283,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x22: // OP_gotoIfInfEqu { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1300,7 +1300,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x23: // OP_gotoIfEqu { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1317,7 +1317,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x24: // OP_gotoIfDiff { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1334,8 +1334,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x26: // loop { - uint8 varIdx; - uint8 labelIdx; + byte varIdx; + byte labelIdx; varIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1357,7 +1357,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x31: // OP_startScript { - uint8 param; + byte param; param = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1371,7 +1371,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x32: { - uint8 scriptIdx; + byte scriptIdx; scriptIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1435,7 +1435,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x41: // OP_loadData { - uint8 param; + byte param; param = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1498,8 +1498,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x47: { - uint8 startColor; - uint8 numColor; + byte startColor; + byte numColor; uint16 r; uint16 g; uint16 b; @@ -1527,9 +1527,9 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x4A: { - uint8 a; - uint8 b; - uint8 c; + byte a; + byte b; + byte c; a = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1578,7 +1578,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x51: { - uint8 param1; + byte param1; uint16 param2; uint16 param3; uint16 param4; @@ -1607,8 +1607,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x52: // OP_loadGlobalVar { - uint8 idx; - uint8 type; + byte idx; + byte type; idx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1617,7 +1617,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { currentPosition++; if (type) { - uint8 idx2; + byte idx2; idx2 = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1646,8 +1646,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x53: // OP_compareGlobalVar { - uint8 idx; - uint8 type; + byte idx; + byte type; idx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1656,7 +1656,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { currentPosition++; if (type) { - uint8 b; + byte b; b = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1692,8 +1692,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x5A: { - uint8 startIdx; - uint8 numIdx; + byte startIdx; + byte numIdx; startIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1719,7 +1719,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x65: { - uint8 i; + byte i; DEBUG_SCRIPT(currentLine, "initializeZoneData()"); @@ -1731,7 +1731,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x66: { - uint8 zoneIdx; + byte zoneIdx; uint16 var; zoneIdx = *(currentScriptPtr + currentPosition); @@ -1771,7 +1771,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x6B: // OP_changeDataDisk { - uint8 newDisk; + byte newDisk; newDisk = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1810,7 +1810,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { case 0x78: { DEBUG_SCRIPT(currentLine, "playSample()"); - uint8 anim, channel; + byte anim, channel; int16 volume; uint16 flag; @@ -1866,7 +1866,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x7A: { - uint8 param; + byte param; param = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1879,7 +1879,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x7B: { - uint8 param; + byte param; param = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1892,10 +1892,10 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x7F: { - uint8 param1; - uint8 param2; - uint8 param3; - uint8 param4; + byte param1; + byte param2; + byte param3; + byte param4; uint16 param5; uint16 param6; uint16 param7; @@ -1929,8 +1929,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x80: { - uint8 a; - uint8 b; + byte a; + byte b; a = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1946,8 +1946,8 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x83: { - uint8 a; - uint8 b; + byte a; + byte b; a = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1966,7 +1966,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x84: // OP_gotoIfSup nearest { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -1985,7 +1985,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x85: // OP_gotoIfSupEqu nearest { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -2003,7 +2003,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x86: // OP_gotoIfInf nearest { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -2021,7 +2021,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x87: // OP_gotoIfInfEqu nearest { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -2039,7 +2039,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x88: // OP_gotoIfEqu nearest { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -2057,7 +2057,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x89: // OP_gotoIfDiff nearest { - uint8 labelIdx; + byte labelIdx; labelIdx = *(currentScriptPtr + currentPosition); currentPosition++; @@ -2075,7 +2075,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x8B: { - uint8 temp = *(currentScriptPtr + currentPosition); + byte temp = *(currentScriptPtr + currentPosition); currentPosition++; DEBUG_SCRIPT(currentLine, "startObjectScript(%d,%d)", temp, currentScriptPtr + currentPosition); @@ -2085,7 +2085,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x8C: { - uint8 temp = *(currentScriptPtr + currentPosition); + byte temp = *(currentScriptPtr + currentPosition); currentPosition++; DEBUG_SCRIPT(currentLine, "startObjectScript(%d,%d)", temp, currentScriptPtr + currentPosition); @@ -2095,7 +2095,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x8E: { - uint8 temp = *(currentScriptPtr + currentPosition); + byte temp = *(currentScriptPtr + currentPosition); currentPosition++; DEBUG_SCRIPT(currentLine, "addBackground(%s,%d)", currentScriptPtr + currentPosition, temp); @@ -2107,7 +2107,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x8F: { - uint8 temp = *(currentScriptPtr + currentPosition); + byte temp = *(currentScriptPtr + currentPosition); currentPosition++; DEBUG_SCRIPT(currentLine, "removeBackground(%d)", temp); @@ -2132,7 +2132,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x90: { - uint8 temp = *(currentScriptPtr + currentPosition); + byte temp = *(currentScriptPtr + currentPosition); currentPosition++; DEBUG_SCRIPT(currentLine, "loadABS(%d,%s)", temp, currentScriptPtr + currentPosition); @@ -2145,7 +2145,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x91: { - uint8 temp = *(currentScriptPtr + currentPosition); + byte temp = *(currentScriptPtr + currentPosition); currentPosition++; DEBUG_SCRIPT(currentLine, "useBg(%d)", temp); @@ -2162,7 +2162,7 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x9D: { - uint8 temp = *(currentScriptPtr + currentPosition); + byte temp = *(currentScriptPtr + currentPosition); currentPosition++; DEBUG_SCRIPT(currentLine, "useBgScroll(%d)", temp); @@ -2176,13 +2176,13 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) { } case 0x9E: { - uint8 type; + byte type; type = *(currentScriptPtr + currentPosition); currentPosition++; if (type) { - uint8 param2; + byte param2; param2 = *(currentScriptPtr + currentPosition); currentPosition++; @@ -2280,15 +2280,15 @@ void purgeList0(void) { #ifdef DUMP_SCRIPTS -uint8 decompileBuffer[10000][1000]; +byte decompileBuffer[10000][1000]; uint16 decompileBufferPosition = 0; -uint8 bufferDec[256]; +byte bufferDec[256]; -uint8 compareString1[256]; -uint8 compareString2[256]; +byte compareString1[256]; +byte compareString2[256]; -uint8 *getObjPramName(uint8 paramIdx) { +byte *getObjPramName(byte paramIdx) { switch (paramIdx) { case 1: { @@ -2322,9 +2322,9 @@ uint8 *getObjPramName(uint8 paramIdx) { } } -void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint16 scriptIdx) { - uint8 lineBuffer[256]; - uint8 *localScriptPtr = scriptPtr; +void decompileScript(byte *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint16 scriptIdx) { + byte lineBuffer[256]; + byte *localScriptPtr = scriptPtr; uint16 exitScript; uint32 position = 0; @@ -2354,8 +2354,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x0: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; int16 param3; param1 = *(localScriptPtr + position); @@ -2373,9 +2373,9 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x1: { - uint8 param1; - uint8 param2; - uint8 param3; + byte param1; + byte param2; + byte param3; param1 = *(localScriptPtr + position); position++; @@ -2391,8 +2391,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x2: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; int16 param3; param1 = *(localScriptPtr + position); @@ -2410,8 +2410,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x3: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; int16 param3; param1 = *(localScriptPtr + position); @@ -2429,8 +2429,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x4: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; int16 param3; param1 = *(localScriptPtr + position); @@ -2448,8 +2448,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x5: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; int16 param3; param1 = *(localScriptPtr + position); @@ -2467,8 +2467,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x6: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; int16 param3; param1 = *(localScriptPtr + position); @@ -2487,7 +2487,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x7: { - uint8 param1; + byte param1; int16 param2; int16 param3; int16 param4; @@ -2514,7 +2514,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x8: { - uint8 param1; + byte param1; int16 param2; int16 param3; int16 param4; @@ -2541,7 +2541,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x9: { - uint8 param1; + byte param1; int16 param2; param1 = *(localScriptPtr + position); @@ -2551,7 +2551,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 position++; if (param2) { - uint8 param3; + byte param3; param3 = *(localScriptPtr + position); position++; @@ -2582,8 +2582,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0xA: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; param1 = *(localScriptPtr + position); position++; @@ -2592,7 +2592,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 position++; if (param2) { - uint8 param3; + byte param3; param3 = *(localScriptPtr + position); position++; @@ -2610,8 +2610,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0xB: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; param1 = *(localScriptPtr + position); position++; @@ -2620,7 +2620,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 position++; if (param2) { - uint8 param3; + byte param3; param3 = *(localScriptPtr + position); position++; @@ -2638,8 +2638,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0xC: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; param1 = *(localScriptPtr + position); position++; @@ -2648,7 +2648,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 position++; if (param2) { - uint8 param3; + byte param3; param3 = *(localScriptPtr + position); position++; @@ -2666,8 +2666,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0xD: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; param1 = *(localScriptPtr + position); position++; @@ -2676,7 +2676,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 position++; if (param2) { - uint8 param3; + byte param3; param3 = *(localScriptPtr + position); position++; @@ -2694,8 +2694,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0xE: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; param1 = *(localScriptPtr + position); position++; @@ -2704,7 +2704,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 position++; if (param2) { - uint8 param3; + byte param3; param3 = *(localScriptPtr + position); position++; @@ -2732,9 +2732,9 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0xF: { - uint8 param1; - uint8 param2; - uint8 param3; + byte param1; + byte param2; + byte param3; param1 = *(localScriptPtr + position); position++; @@ -2751,7 +2751,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x13: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2762,7 +2762,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x14: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2773,7 +2773,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x15: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2784,7 +2784,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x16: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2795,7 +2795,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x17: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2806,7 +2806,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x18: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2817,7 +2817,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x19: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2828,7 +2828,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x1A: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2844,7 +2844,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x1D: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2855,7 +2855,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x1E: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2866,7 +2866,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x1F: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2877,7 +2877,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x20: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2888,7 +2888,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x21: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2899,7 +2899,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x22: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2910,7 +2910,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x23: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2921,7 +2921,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x24: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2932,7 +2932,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x25: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2943,8 +2943,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x26: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; param1 = *(localScriptPtr + position); position++; @@ -2957,7 +2957,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x31: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -2968,7 +2968,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x32: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -3012,7 +3012,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case OP_loadNewPrcName: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -3039,8 +3039,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x47: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; int16 param3; int16 param4; int16 param5; @@ -3066,7 +3066,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x49: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -3088,7 +3088,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x51: { - uint8 param1; + byte param1; int16 param2; int16 param3; int16 param4; @@ -3115,8 +3115,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x52: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; param1 = *(localScriptPtr + position); position++; @@ -3125,7 +3125,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 position++; if (param2) { - uint8 param3; + byte param3; param3 = *(localScriptPtr + position); position++; @@ -3149,8 +3149,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x53: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; param1 = *(localScriptPtr + position); position++; @@ -3159,7 +3159,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 position++; if (param2) { - uint8 param3; + byte param3; param3 = *(localScriptPtr + position); position++; @@ -3193,8 +3193,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x5A: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; param1 = *(localScriptPtr + position); position++; @@ -3218,7 +3218,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x66: { - uint8 param1; + byte param1; int16 param2; param1 = *(localScriptPtr + position); @@ -3233,7 +3233,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x68: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -3254,7 +3254,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case OP_changeDataDisk: { - uint8 newDisk; + byte newDisk; newDisk = *(localScriptPtr + position); position++; @@ -3287,7 +3287,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case OP_79: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -3298,10 +3298,10 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x77: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; int16 param3; - uint8 param4; + byte param4; int16 param5; int16 param6; @@ -3329,10 +3329,10 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x78: { - uint8 param1; - uint8 param2; + byte param1; + byte param2; int16 param3; - uint8 param4; + byte param4; int16 param5; int16 param6; @@ -3360,7 +3360,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x7A: { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -3371,7 +3371,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x7B: // OS only { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -3382,10 +3382,10 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x7F: // OS only { - uint8 param1; - uint8 param2; - uint8 param3; - uint8 param4; + byte param1; + byte param2; + byte param3; + byte param4; int16 param5; int16 param6; int16 param7; @@ -3417,8 +3417,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x80: // OS only { - uint8 param1; - uint8 param2; + byte param1; + byte param2; param1 = *(localScriptPtr + position); position++; @@ -3432,11 +3432,11 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x82: // OS only { - uint8 param1; - uint8 param2; + byte param1; + byte param2; uint16 param3; uint16 param4; - uint8 param5; + byte param5; param1 = *(localScriptPtr + position); position++; @@ -3459,8 +3459,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x83: // OS only { - uint8 param1; - uint8 param2; + byte param1; + byte param2; param1 = *(localScriptPtr + position); position++; @@ -3474,7 +3474,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x89: // OS only { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -3485,7 +3485,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x8B: // OS only { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -3496,7 +3496,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x8C: // OS only { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -3547,7 +3547,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x8E: // OS only { - uint8 param1; + byte param1; param1 = *(localScriptPtr + position); position++; @@ -3560,7 +3560,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x8F: // OS only { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -3571,7 +3571,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x90: // OS only { - uint8 param1; + byte param1; param1 = *(localScriptPtr + position); position++; @@ -3584,7 +3584,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x91: // OS only { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -3595,7 +3595,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x9D: // OS only { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; @@ -3606,13 +3606,13 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0x9E: // OS only { - uint8 param; + byte param; param = *(localScriptPtr + position); position++; if (param) { - uint8 param2; + byte param2; param2 = *(localScriptPtr + position); position++; @@ -3631,8 +3631,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0xA0: // OS only { - uint8 param1; - uint8 param2; + byte param1; + byte param2; param1 = *(localScriptPtr + position); position++; @@ -3646,8 +3646,8 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } case 0xA1: // OS only { - uint8 param1; - uint8 param2; + byte param1; + byte param2; param1 = *(localScriptPtr + position); position++; @@ -3678,7 +3678,7 @@ void decompileScript(uint8 *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint1 } while (!exitScript); } -void dumpScript(uint8 *dumpName) { +void dumpScript(byte *dumpName) { File *fHandle; uint16 i; diff --git a/engines/cine/sfx_player.cpp b/engines/cine/sfx_player.cpp index ef2b6d5553..6ee9852255 100644 --- a/engines/cine/sfx_player.cpp +++ b/engines/cine/sfx_player.cpp @@ -141,8 +141,8 @@ void SfxPlayer::update() { } void SfxPlayer::handleEvents() { - const uint8 *patternData = _sfxData + 600; - const uint8 *orderTable = _sfxData + 472; + const byte *patternData = _sfxData + 600; + const byte *orderTable = _sfxData + 472; uint16 patternNum = orderTable[_currentOrder] * 1024; for (int i = 0; i < 4; ++i) { @@ -164,7 +164,7 @@ void SfxPlayer::handleEvents() { debug(7, "_currentOrder=%d/%d _currentPos=%d", _currentOrder, _numOrders, _currentPos); } -void SfxPlayer::handlePattern(int channel, const uint8 *patternData) { +void SfxPlayer::handlePattern(int channel, const byte *patternData) { int instrument = patternData[2] >> 4; if (instrument != 0) { --instrument; diff --git a/engines/cine/sfx_player.h b/engines/cine/sfx_player.h index 1b40df06d8..ce00a64bfb 100644 --- a/engines/cine/sfx_player.h +++ b/engines/cine/sfx_player.h @@ -51,7 +51,7 @@ private: void update(); void handleEvents(); - void handlePattern(int channel, const uint8 *patternData); + void handlePattern(int channel, const byte *patternData); void unload(); bool _playing; @@ -62,8 +62,8 @@ private: int _fadeOutCounter; int _updateTicksCounter; int _instrumentsChannelTable[NUM_CHANNELS]; - uint8 *_sfxData; - uint8 *_instrumentsData[NUM_INSTRUMENTS]; + byte *_sfxData; + byte *_instrumentsData[NUM_INSTRUMENTS]; SoundDriver *_driver; }; diff --git a/engines/cine/sound_driver.cpp b/engines/cine/sound_driver.cpp index 872d6c1742..8973fdf445 100644 --- a/engines/cine/sound_driver.cpp +++ b/engines/cine/sound_driver.cpp @@ -64,7 +64,7 @@ AdlibSoundDriver::~AdlibSoundDriver() { _mixer->setupPremix(NULL); } -void AdlibSoundDriver::setupChannel(int channel, const uint8 *data, int instrument, int volume) { +void AdlibSoundDriver::setupChannel(int channel, const byte *data, int instrument, int volume) { assert(channel < 4); if (data) { if (volume > 80) { @@ -170,7 +170,7 @@ void AdlibSoundDriver::update(int16 *buf, int len) { } } -void AdlibSoundDriver::setupInstrument(const uint8 *data, int channel) { +void AdlibSoundDriver::setupInstrument(const byte *data, int channel) { assert(channel < 4); AdlibSoundInstrument *ins = &_instrumentsTable[channel]; loadInstrument(data, ins); @@ -216,7 +216,7 @@ void AdlibSoundDriver::setupInstrument(const uint8 *data, int channel) { OPLWriteReg(_opl, 0xE0 | car, ins->waveSelectCar); } -void AdlibSoundDriver::loadRegisterInstrument(const uint8 *data, AdlibRegisterSoundInstrument *reg) { +void AdlibSoundDriver::loadRegisterInstrument(const byte *data, AdlibRegisterSoundInstrument *reg) { reg->vibrato = 0; if (READ_LE_UINT16(data + 18)) { // amplitude vibrato reg->vibrato |= 0x80; @@ -248,7 +248,7 @@ void AdlibSoundDriver::loadRegisterInstrument(const uint8 *data, AdlibRegisterSo reg->freqMod = READ_LE_UINT16(data + 24); } -void AdlibSoundDriverINS::loadInstrument(const uint8 *data, AdlibSoundInstrument *asi) { +void AdlibSoundDriverINS::loadInstrument(const byte *data, AdlibSoundInstrument *asi) { asi->mode = *data++; asi->channel = *data++; loadRegisterInstrument(data, &asi->regMod); data += 26; @@ -286,7 +286,7 @@ void AdlibSoundDriverINS::setChannelFrequency(int channel, int frequency) { } } -void AdlibSoundDriverINS::playSound(const uint8 *data, int channel, int volume) { +void AdlibSoundDriverINS::playSound(const byte *data, int channel, int volume) { assert(channel < 4); _channelsVolumeTable[channel] = 127; resetChannel(channel); @@ -310,7 +310,7 @@ void AdlibSoundDriverINS::playSound(const uint8 *data, int channel, int volume) } } -void AdlibSoundDriverADL::loadInstrument(const uint8 *data, AdlibSoundInstrument *asi) { +void AdlibSoundDriverADL::loadInstrument(const byte *data, AdlibSoundInstrument *asi) { asi->mode = *data++; asi->channel = *data++; asi->waveSelectMod = *data++ & 3; @@ -358,7 +358,7 @@ void AdlibSoundDriverADL::setChannelFrequency(int channel, int frequency) { } } -void AdlibSoundDriverADL::playSound(const uint8 *data, int channel, int volume) { +void AdlibSoundDriverADL::playSound(const byte *data, int channel, int volume) { assert(channel < 4); _channelsVolumeTable[channel] = 127; setupInstrument(data, channel); diff --git a/engines/cine/sound_driver.h b/engines/cine/sound_driver.h index d51517e66e..e551e65c52 100644 --- a/engines/cine/sound_driver.h +++ b/engines/cine/sound_driver.h @@ -40,10 +40,10 @@ public: virtual ~SoundDriver() {} - virtual void setupChannel(int channel, const uint8 *data, int instrument, int volume) = 0; + virtual void setupChannel(int channel, const byte *data, int instrument, int volume) = 0; virtual void setChannelFrequency(int channel, int frequency) = 0; virtual void stopChannel(int channel) = 0; - virtual void playSound(const uint8 *data, int channel, int volume) = 0; + virtual void playSound(const byte *data, int channel, int volume) = 0; virtual void stopSound() = 0; virtual const char *getInstrumentExtension() const = 0; @@ -70,13 +70,13 @@ struct AdlibRegisterSoundInstrument { }; struct AdlibSoundInstrument { - uint8 mode; - uint8 channel; + byte mode; + byte channel; AdlibRegisterSoundInstrument regMod; AdlibRegisterSoundInstrument regCar; - uint8 waveSelectMod; - uint8 waveSelectCar; - uint8 amDepth; + byte waveSelectMod; + byte waveSelectCar; + byte amDepth; }; class AdlibSoundDriver : public SoundDriver, AudioStream { @@ -85,7 +85,7 @@ public: virtual ~AdlibSoundDriver(); // SoundDriver interface - virtual void setupChannel(int channel, const uint8 *data, int instrument, int volume); + virtual void setupChannel(int channel, const byte *data, int instrument, int volume); virtual void stopChannel(int channel); virtual void stopSound(); @@ -97,16 +97,16 @@ public: void initCard(); void update(int16 *buf, int len); - void setupInstrument(const uint8 *data, int channel); - void loadRegisterInstrument(const uint8 *data, AdlibRegisterSoundInstrument *reg); - virtual void loadInstrument(const uint8 *data, AdlibSoundInstrument *asi) = 0; + void setupInstrument(const byte *data, int channel); + void loadRegisterInstrument(const byte *data, AdlibRegisterSoundInstrument *reg); + virtual void loadInstrument(const byte *data, AdlibSoundInstrument *asi) = 0; protected: FM_OPL *_opl; int _sampleRate; Audio::Mixer *_mixer; - uint8 _vibrato; + byte _vibrato; int _channelsVolumeTable[4]; AdlibSoundInstrument _instrumentsTable[4]; @@ -123,9 +123,9 @@ class AdlibSoundDriverINS : public AdlibSoundDriver { public: AdlibSoundDriverINS(Audio::Mixer *mixer) : AdlibSoundDriver(mixer) {} virtual const char *getInstrumentExtension() const { return ".INS"; } - virtual void loadInstrument(const uint8 *data, AdlibSoundInstrument *asi); + virtual void loadInstrument(const byte *data, AdlibSoundInstrument *asi); virtual void setChannelFrequency(int channel, int frequency); - virtual void playSound(const uint8 *data, int channel, int volume); + virtual void playSound(const byte *data, int channel, int volume); }; // Operation Stealth adlib driver @@ -133,9 +133,9 @@ class AdlibSoundDriverADL : public AdlibSoundDriver { public: AdlibSoundDriverADL(Audio::Mixer *mixer) : AdlibSoundDriver(mixer) {} virtual const char *getInstrumentExtension() const { return ".ADL"; } - virtual void loadInstrument(const uint8 *data, AdlibSoundInstrument *asi); + virtual void loadInstrument(const byte *data, AdlibSoundInstrument *asi); virtual void setChannelFrequency(int channel, int frequency); - virtual void playSound(const uint8 *data, int channel, int volume); + virtual void playSound(const byte *data, int channel, int volume); }; extern SoundDriver *g_soundDriver; // TEMP diff --git a/engines/cine/texte.cpp b/engines/cine/texte.cpp index f0b927a7c7..53c923b4db 100644 --- a/engines/cine/texte.cpp +++ b/engines/cine/texte.cpp @@ -28,18 +28,18 @@ namespace Cine { -uint8 *textDataPtr; +byte *textDataPtr; -uint8 textTable[256][2][16 * 8]; +byte textTable[256][2][16 * 8]; -void generateMask(uint8 *sprite, uint8 *mask, uint16 size, uint8 transparency); +void generateMask(byte *sprite, byte *mask, uint16 size, byte transparency); -void loadTextData(const char *pFileName, uint8 *pDestinationBuffer) { +void loadTextData(const char *pFileName, byte *pDestinationBuffer) { Common::File pFileHandle; uint16 entrySize; uint16 numEntry; uint16 i; - uint8 *tempBuffer; + byte *tempBuffer; uint16 dataSize; assert(pFileName); diff --git a/engines/cine/texte.h b/engines/cine/texte.h index 263426728e..8907e9e638 100644 --- a/engines/cine/texte.h +++ b/engines/cine/texte.h @@ -30,10 +30,10 @@ namespace Cine { -extern uint8 *textDataPtr; -extern uint8 textTable[256][2][16 * 8]; +extern byte *textDataPtr; +extern byte textTable[256][2][16 * 8]; -void loadTextData(const char *pFileName, uint8 *pDestinationBuffer); +void loadTextData(const char *pFileName, byte *pDestinationBuffer); } // End of namespace Cine diff --git a/engines/cine/unpack.cpp b/engines/cine/unpack.cpp index 5eb8bc32fb..cae9a2e1f2 100644 --- a/engines/cine/unpack.cpp +++ b/engines/cine/unpack.cpp @@ -45,7 +45,7 @@ static int nextChunk(UnpackCtx *uc) { return CF; } -static uint16 getCode(UnpackCtx *uc, uint8 numChunks) { +static uint16 getCode(UnpackCtx *uc, byte numChunks) { uint16 c = 0; while (numChunks--) { c <<= 1; @@ -56,16 +56,16 @@ static uint16 getCode(UnpackCtx *uc, uint8 numChunks) { return c; } -static void unpackHelper1(UnpackCtx *uc, uint8 numChunks, uint8 addCount) { +static void unpackHelper1(UnpackCtx *uc, byte numChunks, byte addCount) { uint16 count = getCode(uc, numChunks) + addCount + 1; uc->datasize -= count; while (count--) { - *uc->dst = (uint8)getCode(uc, 8); + *uc->dst = (byte)getCode(uc, 8); --uc->dst; } } -static void unpackHelper2(UnpackCtx *uc, uint8 numChunks) { +static void unpackHelper2(UnpackCtx *uc, byte numChunks) { uint16 i = getCode(uc, numChunks); uint16 count = uc->size + 1; uc->datasize -= count; @@ -75,7 +75,7 @@ static void unpackHelper2(UnpackCtx *uc, uint8 numChunks) { } } -bool delphineUnpack(uint8 *dst, const uint8 *src, int len) { +bool delphineUnpack(byte *dst, const byte *src, int len) { UnpackCtx uc; uc.src = src + len - 4; uc.datasize = READ_BE_UINT32(uc.src); uc.src -= 4; diff --git a/engines/cine/unpack.h b/engines/cine/unpack.h index 1fe92c28c3..56edb1f596 100644 --- a/engines/cine/unpack.h +++ b/engines/cine/unpack.h @@ -34,11 +34,11 @@ struct UnpackCtx { int size, datasize; uint32 crc; uint32 chk; - uint8 *dst; - const uint8 *src; + byte *dst; + const byte *src; }; -bool delphineUnpack(uint8 *dst, const uint8 *src, int len); +bool delphineUnpack(byte *dst, const byte *src, int len); } // End of namespace Cine diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp index e77caed79e..35e634653d 100644 --- a/engines/cine/various.cpp +++ b/engines/cine/various.cpp @@ -41,17 +41,17 @@ unk1Struct messageTable[NUM_MAX_MESSAGE]; uint32 var6; uint32 var8; -uint8 *var9; +byte *var9; uint16 var2; uint16 var3; uint16 var4; uint16 var5; -void drawString(const char *string, uint8 param) { +void drawString(const char *string, byte param) { } -void blitRawScreen(uint8 *frontBuffer) { +void blitRawScreen(byte *frontBuffer) { gfxFlipRawPage(frontBuffer); } @@ -70,12 +70,12 @@ void setTextWindow(uint16 param1, uint16 param2, uint16 param3, uint16 param4) { } uint16 errorVar; -uint8 menuVar; +byte menuVar; -void gfxFuncGen1(uint8 *param1, uint8 *param2, uint8 *param3, uint8 *param4, int16 param5) { +void gfxFuncGen1(byte *param1, byte *param2, byte *param3, byte *param4, int16 param5) { } -uint8 *page0c; +byte *page0c; void ptrGfxFunc13(void) { } @@ -95,7 +95,7 @@ uint16 var17; uint16 var18; uint16 var19; uint16 var20; -uint8 var21; +byte var21; int16 playerCommand; @@ -119,11 +119,11 @@ char currentDatName[30]; int16 saveVar2; -uint8 isInPause = 0; +byte isInPause = 0; uint16 defaultMenuBoxColor; -uint8 inputVar1 = 0; +byte inputVar1 = 0; uint16 inputVar2; uint16 inputVar3; @@ -1231,8 +1231,8 @@ uint16 menuVar5 = 0; int16 makeMenuChoice(const commandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width) { - uint8 color = 2; - uint8 color2; + byte color = 2; + byte color2; int16 paramY; int16 currentX; int16 currentY; @@ -1277,15 +1277,15 @@ int16 makeMenuChoice(const commandeType commandList[], uint16 height, uint16 X, currentX = X + 4; for (j = 0; j < strlen(commandList[i]); j++) { - uint8 currentChar = commandList[i][j]; + byte currentChar = commandList[i][j]; if (currentChar == ' ') { currentX += 5; } else { - uint8 characterWidth = fontParamTable[currentChar].characterWidth; + byte characterWidth = fontParamTable[currentChar].characterWidth; if (characterWidth) { - uint8 characterIdx = fontParamTable[currentChar].characterIdx; + byte characterIdx = fontParamTable[currentChar].characterIdx; drawSpriteRaw(textTable[characterIdx][0], textTable[characterIdx][1], 2, 8, page1Raw, currentX, currentY); currentX += characterWidth + 1; } @@ -1323,15 +1323,15 @@ int16 makeMenuChoice(const commandeType commandList[], uint16 height, uint16 X, currentX = X + 4; for (j = 0; j < strlen(commandList[currentSelection]); j++) { - uint8 currentChar = commandList[currentSelection][j]; + byte currentChar = commandList[currentSelection][j]; if (currentChar == ' ') { currentX += 5; } else { - uint8 characterWidth = fontParamTable[currentChar].characterWidth; + byte characterWidth = fontParamTable[currentChar].characterWidth; if (characterWidth) { - uint8 characterIdx = fontParamTable[currentChar].characterIdx; + byte characterIdx = fontParamTable[currentChar].characterIdx; drawSpriteRaw(textTable[characterIdx][0], textTable[characterIdx][1], 2, 8, page1Raw, currentX, di); currentX += characterWidth + 1; } @@ -1396,15 +1396,15 @@ int16 makeMenuChoice(const commandeType commandList[], uint16 height, uint16 X, currentX = X + 4; for (j = 0; j < strlen(commandList[oldSelection]); j++) { - uint8 currentChar = commandList[oldSelection][j]; + byte currentChar = commandList[oldSelection][j]; if (currentChar == ' ') { currentX += 5; } else { - uint8 characterWidth = fontParamTable[currentChar].characterWidth; + byte characterWidth = fontParamTable[currentChar].characterWidth; if (characterWidth) { - uint8 characterIdx = fontParamTable[currentChar].characterIdx; + byte characterIdx = fontParamTable[currentChar].characterIdx; drawSpriteRaw(textTable[characterIdx][0], textTable[characterIdx][1], 2, 8, page1Raw, currentX, di); currentX += characterWidth + 1; } @@ -1419,15 +1419,15 @@ int16 makeMenuChoice(const commandeType commandList[], uint16 height, uint16 X, for (j = 0; j < strlen(commandList[currentSelection]); j++) { - uint8 currentChar = commandList[currentSelection][j]; + byte currentChar = commandList[currentSelection][j]; if (currentChar == ' ') { currentX += 5; } else { - uint8 characterWidth = fontParamTable[currentChar].characterWidth; + byte characterWidth = fontParamTable[currentChar].characterWidth; if (characterWidth) { - uint8 characterIdx = fontParamTable[currentChar].characterIdx; + byte characterIdx = fontParamTable[currentChar].characterIdx; drawSpriteRaw(textTable[characterIdx][0], textTable[characterIdx][1], 2, 8, page1Raw, currentX, di); currentX += characterWidth + 1; } @@ -1465,8 +1465,8 @@ int16 makeMenuChoice(const commandeType commandList[], uint16 height, uint16 X, int16 makeMenuChoice2(const commandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width) { - uint8 color = 2; - uint8 color2; + byte color = 2; + byte color2; int16 paramY; int16 currentX; int16 currentY; @@ -1511,15 +1511,15 @@ int16 makeMenuChoice2(const commandeType commandList[], uint16 height, uint16 X, currentX = X + 4; for (j = 0; j < strlen(commandList[i]); j++) { - uint8 currentChar = commandList[i][j]; + byte currentChar = commandList[i][j]; if (currentChar == ' ') { currentX += 5; } else { - uint8 characterWidth = fontParamTable[currentChar].characterWidth; + byte characterWidth = fontParamTable[currentChar].characterWidth; if (characterWidth) { - uint8 characterIdx = fontParamTable[currentChar].characterIdx; + byte characterIdx = fontParamTable[currentChar].characterIdx; drawSpriteRaw(textTable[characterIdx][0], textTable[characterIdx][1], 2, 8, page1Raw, currentX, currentY); currentX += characterWidth + 1; } @@ -1557,15 +1557,15 @@ int16 makeMenuChoice2(const commandeType commandList[], uint16 height, uint16 X, currentX = X + 4; for (j = 0; j < strlen(commandList[currentSelection]); j++) { - uint8 currentChar = commandList[currentSelection][j]; + byte currentChar = commandList[currentSelection][j]; if (currentChar == ' ') { currentX += 5; } else { - uint8 characterWidth = fontParamTable[currentChar].characterWidth; + byte characterWidth = fontParamTable[currentChar].characterWidth; if (characterWidth) { - uint8 characterIdx = fontParamTable[currentChar].characterIdx; + byte characterIdx = fontParamTable[currentChar].characterIdx; drawSpriteRaw(textTable[characterIdx][0], textTable[characterIdx][1], 2, 8, page1Raw, currentX, di); currentX += characterWidth + 1; } @@ -1630,15 +1630,15 @@ int16 makeMenuChoice2(const commandeType commandList[], uint16 height, uint16 X, currentX = X + 4; for (j = 0; j < strlen(commandList[oldSelection]); j++) { - uint8 currentChar = commandList[oldSelection][j]; + byte currentChar = commandList[oldSelection][j]; if (currentChar == ' ') { currentX += 5; } else { - uint8 characterWidth = fontParamTable[currentChar].characterWidth; + byte characterWidth = fontParamTable[currentChar].characterWidth; if (characterWidth) { - uint8 characterIdx = fontParamTable[currentChar].characterIdx; + byte characterIdx = fontParamTable[currentChar].characterIdx; drawSpriteRaw(textTable[characterIdx][0], textTable[characterIdx][1], 2, 8, page1Raw, currentX, di); currentX += characterWidth + 1; } @@ -1653,15 +1653,15 @@ int16 makeMenuChoice2(const commandeType commandList[], uint16 height, uint16 X, for (j = 0; j < strlen(commandList[currentSelection]); j++) { - uint8 currentChar = commandList[currentSelection][j]; + byte currentChar = commandList[currentSelection][j]; if (currentChar == ' ') { currentX += 5; } else { - uint8 characterWidth = fontParamTable[currentChar].characterWidth; + byte characterWidth = fontParamTable[currentChar].characterWidth; if (characterWidth) { - uint8 characterIdx = fontParamTable[currentChar].characterIdx; + byte characterIdx = fontParamTable[currentChar].characterIdx; drawSpriteRaw(textTable[characterIdx][0], textTable[characterIdx][1], 2, 8, page1Raw, currentX, di); currentX += characterWidth + 1; } @@ -1698,8 +1698,8 @@ int16 makeMenuChoice2(const commandeType commandList[], uint16 height, uint16 X, } void drawMenuBox(char *command, int16 x, int16 y) { - uint8 j; - uint8 lColor = 2; + byte j; + byte lColor = 2; hideMouse(); @@ -1714,15 +1714,15 @@ void drawMenuBox(char *command, int16 x, int16 y) { y += 2; for (j = 0; j < strlen(command); j++) { - uint8 currentChar = command[j]; + byte currentChar = command[j]; if (currentChar == ' ') { x += 5; } else { - uint8 characterWidth = fontParamTable[currentChar].characterWidth; + byte characterWidth = fontParamTable[currentChar].characterWidth; if (characterWidth) { - uint8 characterIdx = fontParamTable[currentChar].characterIdx; + byte characterIdx = fontParamTable[currentChar].characterIdx; drawSpriteRaw(textTable[characterIdx][0], textTable[characterIdx][1], 2, 8, page2Raw, x, y); x += characterWidth + 1; } @@ -2088,11 +2088,11 @@ uint16 executePlayerInput(void) { return var_5E; } -void drawSprite(overlayHeadElement *currentOverlay, uint8 *spritePtr, - uint8 *maskPtr, uint16 width, uint16 height, uint8 *page, int16 x, int16 y) { +void drawSprite(overlayHeadElement *currentOverlay, byte *spritePtr, + byte *maskPtr, uint16 width, uint16 height, byte *page, int16 x, int16 y) { #if 0 - uint8 *ptr = NULL; - uint8 i = 0; + byte *ptr = NULL; + byte i = 0; uint16 si = 0; overlayHeadElement *pCurrentOverlay = currentOverlay; @@ -2105,7 +2105,7 @@ void drawSprite(overlayHeadElement *currentOverlay, uint8 *spritePtr, uint16 maskSpriteIdx; if (!si) { - ptr = (uint8 *)malloc(width * height); + ptr = (byte *)malloc(width * height); si = 1; } @@ -2140,8 +2140,8 @@ void drawSprite(overlayHeadElement *currentOverlay, uint8 *spritePtr, int16 additionalBgVScroll = 0; void backupOverlayPage(void) { - uint8 *bgPage; - uint8 *scrollBg; + byte *bgPage; + byte *scrollBg; bgPage = additionalBgTable[currentAdditionalBgIdx]; @@ -2165,8 +2165,8 @@ void backupOverlayPage(void) { } } -uint16 computeMessageLength(uint8 *ptr, uint16 width, uint16 *numWords, uint16 *messageWidth, uint16 *lineResult) { - uint8 *localPtr = ptr; +uint16 computeMessageLength(byte *ptr, uint16 width, uint16 *numWords, uint16 *messageWidth, uint16 *lineResult) { + byte *localPtr = ptr; uint16 var_2 = 0; uint16 localLineResult = 0; @@ -2179,7 +2179,7 @@ uint16 computeMessageLength(uint8 *ptr, uint16 width, uint16 *numWords, uint16 * uint16 di = 0; while (!finished) { - uint8 character = *(localPtr++); + byte character = *(localPtr++); if (character == ' ') { var_8 = var_16; @@ -2226,9 +2226,9 @@ uint16 computeMessageLength(uint8 *ptr, uint16 width, uint16 *numWords, uint16 * return (di); } -void drawDialogueMessage(uint8 msgIdx, int16 x, int16 y, int16 width, int16 color) { - uint8 color2 = 2; - uint8 endOfMessageReached = 0; +void drawDialogueMessage(byte msgIdx, int16 x, int16 y, int16 width, int16 color) { + byte color2 = 2; + byte endOfMessageReached = 0; int16 localX; int16 localY; int16 localWidth; @@ -2256,8 +2256,8 @@ void drawDialogueMessage(uint8 msgIdx, int16 x, int16 y, int16 width, int16 colo uint16 fullLineWidth; uint16 interWordSize; uint16 interWordSizeRemain; - uint8 currentChar; - uint8 characterWidth; + byte currentChar; + byte characterWidth; while (messagePtr[messageLength] == ' ') { messageLength++; @@ -2265,7 +2265,7 @@ void drawDialogueMessage(uint8 msgIdx, int16 x, int16 y, int16 width, int16 colo messagePtr += messageLength; - messageLength = computeMessageLength((uint8 *) messagePtr, localWidth, &numWords, &messageWidth, &lineResult); + messageLength = computeMessageLength((byte *) messagePtr, localWidth, &numWords, &messageWidth, &lineResult); endOfMessagePtr = messagePtr + messageLength; @@ -2300,7 +2300,7 @@ void drawDialogueMessage(uint8 msgIdx, int16 x, int16 y, int16 width, int16 colo characterWidth = fontParamTable[currentChar].characterWidth; if (characterWidth) { - uint8 characterIdx = fontParamTable[currentChar].characterIdx; + byte characterIdx = fontParamTable[currentChar].characterIdx; drawSpriteRaw(textTable[characterIdx][0], textTable[characterIdx][1], 2, 8, page1Raw, localX, localY); localX += characterWidth; } @@ -2387,7 +2387,7 @@ void drawOverlays(void) { } case 2: // text { - uint8 messageIdx; + byte messageIdx; int16 x; int16 y; uint16 partVar1; @@ -2552,11 +2552,11 @@ void closeEngine7(void) { } void removeExtention(char *dest, const char *source) { - uint8 *ptr; + byte *ptr; strcpy(dest, source); - ptr = (uint8 *) strchr(dest, '.'); + ptr = (byte *) strchr(dest, '.'); if (ptr) { *ptr = 0; @@ -2569,7 +2569,7 @@ uint16 defaultMenuBoxColor2; uint16 zoneData[NUM_MAX_ZONE]; -void addMessage(uint8 param1, int16 param2, int16 param3, int16 param4, int16 param5) { +void addMessage(byte param1, int16 param2, int16 param3, int16 param4, int16 param5) { overlayHeadElement *currentHead = &overlayHead; overlayHeadElement *tempHead = currentHead; overlayHeadElement *newElement; @@ -2690,11 +2690,11 @@ uint16 computeMove2(SeqListElement *element) { void resetGfxEntityEntry(uint16 objIdx) { #if 0 overlayHeadElement* tempHead = &overlayHead; - uint8* var_16 = NULL; + byte* var_16 = NULL; uint16 var_10 = 0; uint16 var_12 = 0; overlayHeadElement* currentHead = tempHead->next; - uint8* var_1A = NULL; + byte* var_1A = NULL; overlayHeadElement* var1E = &overlayHead; while(currentHead) { @@ -2757,10 +2757,10 @@ void resetGfxEntityEntry(uint16 objIdx) { #endif } -uint16 addAni(uint16 param1, uint16 param2, uint8 *ptr, SeqListElement *element, uint16 param3, int16 *param4) { - uint8 *currentPtr = ptr; - uint8 *ptrData; - uint8 *ptr2; +uint16 addAni(uint16 param1, uint16 param2, byte *ptr, SeqListElement *element, uint16 param3, int16 *param4) { + byte *currentPtr = ptr; + byte *ptrData; + byte *ptr2; int16 di; assert(ptr); @@ -2802,7 +2802,7 @@ uint16 addAni(uint16 param1, uint16 param2, uint8 *ptr, SeqListElement *element, void processSeqListElement(SeqListElement *element) { int16 x; int16 y; - uint8 *ptr1; + byte *ptr1; int16 var_10; int16 var_4; int16 var_2; diff --git a/engines/cine/various.h b/engines/cine/various.h index c9d78897f3..a232c53b3f 100644 --- a/engines/cine/various.h +++ b/engines/cine/various.h @@ -42,7 +42,7 @@ int16 makeMenuChoice2(const commandeType commandList[], uint16 height, uint16 X, extern int16 allowSystemMenu; struct unk1Struct { - uint8 *ptr; + byte *ptr; uint16 len; }; @@ -72,7 +72,7 @@ extern SeqListElement seqList; extern uint32 var6; extern uint32 var8; -extern uint8 *var9; +extern byte *var9; extern uint16 var2; extern uint16 var3; @@ -87,12 +87,12 @@ void mainLoopSub1(void); void setTextWindow(uint16 param1, uint16 param2, uint16 param3, uint16 param4); extern uint16 errorVar; -extern uint8 menuVar; +extern byte menuVar; -void gfxFuncGen1(uint8 *param1, uint8 *param2, uint8 *param3, uint8 *param4, int16 param5); +void gfxFuncGen1(byte *param1, byte *param2, byte *param3, byte *param4, int16 param5); -extern uint8 *page0; -extern uint8 *page0c; +extern byte *page0; +extern byte *page0c; void ptrGfxFunc13(void); void gfxFuncGen2(void); @@ -109,7 +109,7 @@ extern uint16 var17; extern uint16 var18; extern uint16 var19; extern uint16 var20; -extern uint8 var21; +extern byte var21; extern int16 playerCommand; @@ -168,9 +168,9 @@ extern uint16 defaultMenuBoxColor2; #define NUM_MAX_ZONE 16 extern uint16 zoneData[NUM_MAX_ZONE]; -void addMessage(uint8 param1, int16 param2, int16 param3, int16 param4, int16 param5); +void addMessage(byte param1, int16 param2, int16 param3, int16 param4, int16 param5); -void blitScreen(uint8 *frontBuffer, uint8 *backbuffer); +void blitScreen(byte *frontBuffer, byte *backbuffer); struct mouseStatusStruct { int left; |