mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
JANITORIAL: Remove/comment unused vars
Found by GCC 4.6's -Wunused-but-set-variable
This commit is contained in:
@@ -1978,7 +1978,6 @@ void SdlGraphicsManager::drawMouse() {
|
||||
|
||||
SDL_Rect dst;
|
||||
int scale;
|
||||
int width, height;
|
||||
int hotX, hotY;
|
||||
|
||||
dst.x = _mouseCurState.x;
|
||||
@@ -1986,16 +1985,12 @@ void SdlGraphicsManager::drawMouse() {
|
||||
|
||||
if (!_overlayVisible) {
|
||||
scale = _videoMode.scaleFactor;
|
||||
width = _videoMode.screenWidth;
|
||||
height = _videoMode.screenHeight;
|
||||
dst.w = _mouseCurState.vW;
|
||||
dst.h = _mouseCurState.vH;
|
||||
hotX = _mouseCurState.vHotX;
|
||||
hotY = _mouseCurState.vHotY;
|
||||
} else {
|
||||
scale = 1;
|
||||
width = _videoMode.overlayWidth;
|
||||
height = _videoMode.overlayHeight;
|
||||
dst.w = _mouseCurState.rW;
|
||||
dst.h = _mouseCurState.rH;
|
||||
hotX = _mouseCurState.rHotX;
|
||||
|
||||
@@ -428,10 +428,9 @@ void MidiDriver_TIMIDITY::timidity_write_data(const void *buf, size_t nbytes) {
|
||||
}
|
||||
|
||||
int MidiDriver_TIMIDITY::fdgets(char *buff, size_t buff_size) {
|
||||
int n, len, count, size;
|
||||
int n, count, size;
|
||||
char *buff_endp = buff + buff_size - 1, *pbuff, *beg;
|
||||
|
||||
len = 0;
|
||||
count = _controlbuffer_count;
|
||||
size = _controlbuffer_size;
|
||||
pbuff = _controlbuffer;
|
||||
|
||||
@@ -144,7 +144,7 @@ void EventRecorder::init() {
|
||||
}
|
||||
|
||||
uint32 sign;
|
||||
uint32 version;
|
||||
//uint32 version;
|
||||
uint32 randomSourceCount;
|
||||
if (_recordMode == kRecorderPlayback) {
|
||||
_playbackCount = 0;
|
||||
@@ -168,7 +168,7 @@ void EventRecorder::init() {
|
||||
if (sign != RECORD_SIGNATURE) {
|
||||
error("Unknown record file signature");
|
||||
}
|
||||
version = _playbackFile->readUint32LE();
|
||||
//version = _playbackFile->readUint32LE();
|
||||
|
||||
// conf vars
|
||||
ConfMan.setBool("subtitles", _playbackFile->readByte() != 0);
|
||||
|
||||
@@ -484,7 +484,7 @@ void AGOSEngine::drawIconArray(uint num, Item *itemRef, int line, int classMask)
|
||||
Item *item_ptr_org = itemRef;
|
||||
WindowBlock *window;
|
||||
uint width, height;
|
||||
uint k, i, curWidth;
|
||||
uint k, curWidth;
|
||||
bool item_again, showArrows;
|
||||
uint x_pos, y_pos;
|
||||
const int iconSize = (getGameType() == GType_SIMON2) ? 20 : 1;
|
||||
@@ -502,8 +502,6 @@ void AGOSEngine::drawIconArray(uint num, Item *itemRef, int line, int classMask)
|
||||
height = window->height / 3;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
|
||||
if (window == NULL)
|
||||
return;
|
||||
|
||||
|
||||
@@ -725,12 +725,11 @@ void AGOSEngine_Feeble::printScreenText(uint vgaSpriteId, uint color, const char
|
||||
const char *string2 = string;
|
||||
int16 height, talkDelay;
|
||||
int stringLength = strlen(string);
|
||||
int lettersPerRow, lettersPerRowJustified;
|
||||
int lettersPerRow;
|
||||
const int textHeight = 15;
|
||||
|
||||
height = textHeight;
|
||||
lettersPerRow = width / 6;
|
||||
lettersPerRowJustified = stringLength / (stringLength / lettersPerRow + 1) + 1;
|
||||
|
||||
talkDelay = (stringLength + 3) / 3;
|
||||
if (_variableArray[86] == 0)
|
||||
|
||||
@@ -39,7 +39,6 @@ int16 currentAdditionalBgIdx = 0, currentAdditionalBgIdx2 = 0;
|
||||
|
||||
byte loadCtFW(const char *ctName) {
|
||||
debugC(1, kCineDebugCollision, "loadCtFW(\"%s\")", ctName);
|
||||
uint16 header[32];
|
||||
byte *ptr, *dataPtr;
|
||||
|
||||
int16 foundFileIdx = findFileInBundle(ctName);
|
||||
@@ -59,12 +58,6 @@ byte loadCtFW(const char *ctName) {
|
||||
|
||||
assert(strstr(ctName, ".NEO"));
|
||||
|
||||
Common::MemoryReadStream readS(ptr, 32);
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
header[i] = readS.readUint16BE();
|
||||
}
|
||||
|
||||
gfxConvertSpriteToRaw(collisionPage, ptr + 0x80, 160, 200);
|
||||
|
||||
free(dataPtr);
|
||||
|
||||
@@ -996,9 +996,8 @@ void CineEngine::makeSave(char *saveFileName) {
|
||||
* at a time.
|
||||
*/
|
||||
void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGameFormat saveGameFormat) {
|
||||
int16 currentAnim, foundFileIdx, frame;
|
||||
int16 currentAnim, foundFileIdx;
|
||||
char *animName, part[256], name[10];
|
||||
uint16 width, height, bpp, var1;
|
||||
|
||||
strcpy(part, currentPartName);
|
||||
|
||||
@@ -1012,10 +1011,10 @@ void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGam
|
||||
// Seek to the start of the current animation's entry
|
||||
fHandle.seek(fileStartPos + currentAnim * entrySize);
|
||||
// Read in the current animation entry
|
||||
width = fHandle.readUint16BE();
|
||||
var1 = fHandle.readUint16BE();
|
||||
bpp = fHandle.readUint16BE();
|
||||
height = fHandle.readUint16BE();
|
||||
fHandle.readUint16BE(); // width
|
||||
fHandle.readUint16BE();
|
||||
fHandle.readUint16BE(); // bpp
|
||||
fHandle.readUint16BE(); // height
|
||||
|
||||
bool validPtr = false;
|
||||
// Handle variables only present in animation entries of size 30
|
||||
@@ -1025,7 +1024,7 @@ void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGam
|
||||
}
|
||||
|
||||
foundFileIdx = fHandle.readSint16BE();
|
||||
frame = fHandle.readSint16BE();
|
||||
fHandle.readSint16BE(); // frame
|
||||
fHandle.read(name, 10);
|
||||
|
||||
// Handle variables only present in animation entries of size 23
|
||||
|
||||
@@ -198,17 +198,13 @@ void regenerateBackgroundIncrust(backgroundIncrustStruct *pHead) {
|
||||
while (pl) {
|
||||
backgroundIncrustStruct* pl2 = pl->next;
|
||||
|
||||
bool bLoad = false;
|
||||
int frame = pl->frame;
|
||||
//int screen = pl->backgroundIdx;
|
||||
|
||||
if ((filesDatabase[frame].subData.ptr == NULL) || (strcmp(pl->name, filesDatabase[frame].subData.name))) {
|
||||
frame = NUM_FILE_ENTRIES - 1;
|
||||
if (loadFile(pl->name, frame, pl->spriteId) >= 0) {
|
||||
bLoad = true;
|
||||
} else {
|
||||
if (!loadFile(pl->name, frame, pl->spriteId) >= 0)
|
||||
frame = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (frame >= 0) {
|
||||
|
||||
@@ -1004,18 +1004,7 @@ bool findRelation(int objOvl, int objIdx, int x, int y) {
|
||||
if (!obj2Ovl) obj2Ovl = j;
|
||||
|
||||
char verbe_name[80];
|
||||
char obj1_name[80];
|
||||
char obj2_name[80];
|
||||
char r_verbe_name[80];
|
||||
char r_obj1_name[80];
|
||||
char r_obj2_name[80];
|
||||
|
||||
verbe_name[0] = 0;
|
||||
obj1_name[0] = 0;
|
||||
obj2_name[0] = 0;
|
||||
r_verbe_name[0] = 0;
|
||||
r_obj1_name[0] = 0;
|
||||
r_obj2_name[0] = 0;
|
||||
|
||||
ovlDataStruct *ovl2 = NULL;
|
||||
ovlDataStruct *ovl3 = NULL;
|
||||
|
||||
@@ -358,7 +358,7 @@ int loadFNTSub(uint8 *ptr, int destIdx) {
|
||||
uint8 *ptr2 = ptr;
|
||||
uint8 *destPtr;
|
||||
int fileIndex;
|
||||
uint32 fontSize;
|
||||
//uint32 fontSize;
|
||||
|
||||
ptr2 += 4;
|
||||
loadFileVar1 = READ_BE_UINT32(ptr2);
|
||||
@@ -373,7 +373,7 @@ int loadFNTSub(uint8 *ptr, int destIdx) {
|
||||
|
||||
memcpy(destPtr, ptr2, loadFileVar1);
|
||||
|
||||
fontSize = READ_BE_UINT32(ptr2);
|
||||
//fontSize = READ_BE_UINT32(ptr2);
|
||||
|
||||
if (destPtr != NULL) {
|
||||
int32 i;
|
||||
|
||||
@@ -147,8 +147,6 @@ int updateScriptImport(int ovlIdx) {
|
||||
const char *ptrImportName;
|
||||
uint8 *ptrData;
|
||||
|
||||
int var_22 = 0;
|
||||
|
||||
if (param == 0) {
|
||||
pScript = getOvlData3Entry(ovlIdx, i);
|
||||
} else {
|
||||
@@ -159,8 +157,6 @@ int updateScriptImport(int ovlIdx) {
|
||||
ptrImportName = (const char*)(pScript->dataPtr + pScript->offsetToImportName); // import name
|
||||
ptrData = pScript->dataPtr;
|
||||
|
||||
var_22 = 0;
|
||||
|
||||
if (pScript->numRelocGlob > 0) {
|
||||
int counter = pScript->numRelocGlob;
|
||||
|
||||
|
||||
@@ -1081,8 +1081,6 @@ void mainDrawPolygons(int fileIndex, cellStruct *plWork, int X, int scale, int Y
|
||||
int newScale;
|
||||
char *newFrame;
|
||||
|
||||
int var_8; // unused
|
||||
|
||||
int sizeTable[4]; // 0 = left, 1 = right, 2 = bottom, 3 = top
|
||||
|
||||
// this function checks if the dataPtr is not 0, else it retrives the data for X, Y, scale and DataPtr again (OLD: mainDrawSub1Sub1)
|
||||
@@ -1125,8 +1123,6 @@ void mainDrawPolygons(int fileIndex, cellStruct *plWork, int X, int scale, int Y
|
||||
|
||||
gfxModuleData_addDirtyRect(Common::Rect(spriteX2, spriteY2, spriteX1, spriteY1));
|
||||
|
||||
var_8 = 0;
|
||||
|
||||
memset(polygonMask, 0xFF, (320*200) / 8);
|
||||
|
||||
int numPasses = 0;
|
||||
|
||||
@@ -182,11 +182,11 @@ bool DrasculaEngine::roomParse(int rN, int fl) {
|
||||
}
|
||||
|
||||
bool DrasculaEngine::room_0(int fl) {
|
||||
(void)fl;
|
||||
|
||||
static const int lookExcuses[3] = {100, 101, 54};
|
||||
static const int actionExcuses[6] = {11, 109, 111, 110, 115, 116};
|
||||
|
||||
fl = -1; // avoid warning
|
||||
|
||||
// non-default actions
|
||||
if (currentChapter == 2 || currentChapter == 4 ||
|
||||
currentChapter == 5 || currentChapter == 6) {
|
||||
|
||||
@@ -1172,12 +1172,11 @@ void Inter_v2::o2_addHotspot(OpFuncParams ¶ms) {
|
||||
top = 0;
|
||||
}
|
||||
|
||||
int16 index;
|
||||
if (id < 0)
|
||||
index = _vm->_game->_hotspots->add(0xD000 - id, left & 0xFFFC, top & 0xFFFC,
|
||||
_vm->_game->_hotspots->add(0xD000 - id, left & 0xFFFC, top & 0xFFFC,
|
||||
left + width + 3, top + height + 3, flags, key, 0, 0, funcPos);
|
||||
else
|
||||
index = _vm->_game->_hotspots->add(0xE000 + id, left, top,
|
||||
_vm->_game->_hotspots->add(0xE000 + id, left, top,
|
||||
left + width - 1, top + height - 1, flags, key, 0, 0, funcPos);
|
||||
}
|
||||
|
||||
|
||||
@@ -1216,7 +1216,7 @@ int KyraEngine_HoF::seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm)
|
||||
int chatW = 0;
|
||||
int chatFirstFrame = 0;
|
||||
int chatLastFrame = 0;
|
||||
int textCol = 0;
|
||||
//int textCol = 0;
|
||||
|
||||
uint16 voiceIndex = 0;
|
||||
|
||||
@@ -1257,13 +1257,13 @@ int KyraEngine_HoF::seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm)
|
||||
|
||||
if (_flags.isTalkie) {
|
||||
chatX = 82;
|
||||
textCol = 143;
|
||||
//textCol = 143;
|
||||
chatFirstFrame = 16;
|
||||
chatLastFrame = 21;
|
||||
voiceIndex = 41;
|
||||
} else {
|
||||
chatX = 62;
|
||||
textCol = 137;
|
||||
//textCol = 137;
|
||||
chatFirstFrame = 9;
|
||||
chatLastFrame = 13;
|
||||
}
|
||||
@@ -1281,7 +1281,7 @@ int KyraEngine_HoF::seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm)
|
||||
if (frm == 16)
|
||||
break;
|
||||
chatX = 64;
|
||||
textCol = 137;
|
||||
//textCol = 137;
|
||||
chatFirstFrame = 9;
|
||||
chatLastFrame = 13;
|
||||
voiceIndex = 42;
|
||||
@@ -1289,7 +1289,7 @@ int KyraEngine_HoF::seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm)
|
||||
if (frm == 9)
|
||||
break;
|
||||
chatX = 80;
|
||||
textCol = 143;
|
||||
//textCol = 143;
|
||||
chatFirstFrame = 16;
|
||||
chatLastFrame = 21;
|
||||
}
|
||||
|
||||
@@ -194,9 +194,8 @@ long SqrtF16(long n) {
|
||||
void Rails::createEdge(int32 node1, int32 node2) {
|
||||
uint32 index;
|
||||
int32 x1, y1, x2, y2;
|
||||
bool valid, finished;
|
||||
bool valid;
|
||||
long deltaX, deltaY, distance;
|
||||
uint8 *walkCodePtr;
|
||||
|
||||
if ((node1 < 0) || (node1 >= MAXRAILNODES) || (node2 < 0) || (node2 >= MAXRAILNODES))
|
||||
return;
|
||||
@@ -214,8 +213,6 @@ void Rails::createEdge(int32 node1, int32 node2) {
|
||||
_edges.resize(index + 1);
|
||||
_edges.insert_at(index, 0);
|
||||
valid = true;
|
||||
walkCodePtr = NULL;
|
||||
finished = false;
|
||||
|
||||
if (_nodes.size() <= (uint32)node1 || _nodes.size() <= (uint32)node2)
|
||||
return;
|
||||
|
||||
@@ -465,7 +465,6 @@ Common::SeekableReadStream *MADSResourceManager::loadResource(const char *resour
|
||||
|
||||
bool MADSResourceManager::resourceExists(const char *resourceName) {
|
||||
Common::File hagFile;
|
||||
uint32 offset, size;
|
||||
|
||||
// If the first character is the wildcard (resource indicator), skip over it
|
||||
if (*resourceName == '*')
|
||||
@@ -488,8 +487,8 @@ bool MADSResourceManager::resourceExists(const char *resourceName) {
|
||||
while (++resIndex < numEntries) {
|
||||
// Read in the details of the next resource
|
||||
char resourceBuffer[14];
|
||||
offset = hagFile.readUint32LE();
|
||||
size = hagFile.readUint32LE();
|
||||
hagFile.readUint32LE(); // offset
|
||||
hagFile.readUint32LE(); // size
|
||||
hagFile.read(resourceBuffer, 14);
|
||||
|
||||
if (!strcmp(resName, resourceBuffer))
|
||||
|
||||
@@ -164,7 +164,7 @@ WoodScript::WoodScript(MadsM4Engine *vm) {
|
||||
|
||||
_backgroundSurface = NULL;
|
||||
|
||||
Common::Rect viewBounds = Common::Rect(0, 0, 640, 480);
|
||||
//Common::Rect viewBounds = Common::Rect(0, 0, 640, 480);
|
||||
//_surfaceView = new View(viewBounds);
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ bool PmvPlayer::play(const char *filename) {
|
||||
|
||||
uint32 soundStartTime = 0, skipFrames = 0;
|
||||
|
||||
uint32 frameNum, bytesRead;
|
||||
uint32 bytesRead;
|
||||
uint16 width, height, cmdOffs, pixelOffs, maskOffs, lineSize;
|
||||
|
||||
// TODO: Sound can still be a little choppy. A bug in the decoder or -
|
||||
@@ -156,7 +156,7 @@ bool PmvPlayer::play(const char *filename) {
|
||||
// Handle video
|
||||
imageData = frameData + READ_LE_UINT32(frameData + 12) - 8;
|
||||
|
||||
frameNum = READ_LE_UINT32(frameData);
|
||||
// frameNum @0
|
||||
width = READ_LE_UINT16(imageData + 8);
|
||||
height = READ_LE_UINT16(imageData + 10);
|
||||
cmdOffs = READ_LE_UINT16(imageData + 12);
|
||||
|
||||
@@ -434,7 +434,6 @@ int Font::getHeight(FontId fontId, const char *text, int width, FontEffectFlags
|
||||
int textWidth;
|
||||
int textLength;
|
||||
int fitWidth;
|
||||
const char *startPointer;
|
||||
const char *searchPointer;
|
||||
const char *measurePointer;
|
||||
const char *foundPointer;
|
||||
@@ -465,7 +464,6 @@ int Font::getHeight(FontId fontId, const char *text, int width, FontEffectFlags
|
||||
len_total = 0;
|
||||
wc = 0;
|
||||
|
||||
startPointer = text;
|
||||
measurePointer = text;
|
||||
searchPointer = text;
|
||||
endPointer = text + textLength;
|
||||
@@ -498,7 +496,6 @@ int Font::getHeight(FontId fontId, const char *text, int width, FontEffectFlags
|
||||
len_total = 0;
|
||||
wc = 0;
|
||||
measurePointer = searchPointer;
|
||||
startPointer = searchPointer;
|
||||
} else {
|
||||
// Word will fit ok
|
||||
w_total += w;
|
||||
|
||||
@@ -322,7 +322,6 @@ void SagaEngine::unbankBGImage(byte *dst_buf, const byte *src_buf, int columns,
|
||||
int rowjump_src;
|
||||
int rowjump_dest;
|
||||
const byte *src_p;
|
||||
byte *dst_p;
|
||||
const byte *srcptr1, *srcptr2, *srcptr3, *srcptr4;
|
||||
byte *dstptr1, *dstptr2, *dstptr3, *dstptr4;
|
||||
|
||||
@@ -332,7 +331,6 @@ void SagaEngine::unbankBGImage(byte *dst_buf, const byte *src_buf, int columns,
|
||||
assert(scanlines > 0);
|
||||
|
||||
src_p = src_buf;
|
||||
dst_p = dst_buf + columns;
|
||||
|
||||
srcptr1 = src_p;
|
||||
srcptr2 = src_p + 1;
|
||||
|
||||
@@ -463,7 +463,6 @@ void GfxTransitions::scrollCopyOldToScreen(Common::Rect screenRect, int16 x, int
|
||||
// Scroll old screen (up/down/left/right) and insert new screen that way - works
|
||||
// on _picRect area only.
|
||||
void GfxTransitions::scroll(int16 number) {
|
||||
int16 screenWidth, screenHeight;
|
||||
int16 stepNr = 0;
|
||||
Common::Rect oldMoveRect = _picRect;
|
||||
Common::Rect oldScreenRect = _picRect;
|
||||
@@ -472,7 +471,6 @@ void GfxTransitions::scroll(int16 number) {
|
||||
uint32 msecCount = 0;
|
||||
|
||||
_screen->copyFromScreen(_oldScreen);
|
||||
screenWidth = _screen->getDisplayWidth(); screenHeight = _screen->getDisplayHeight();
|
||||
|
||||
switch (number) {
|
||||
case SCI_TRANSITIONS_SCROLL_LEFT:
|
||||
@@ -516,7 +514,7 @@ void GfxTransitions::scroll(int16 number) {
|
||||
newScreenRect.bottom = newScreenRect.top;
|
||||
newMoveRect.top = newMoveRect.bottom;
|
||||
while (oldMoveRect.top < oldMoveRect.bottom) {
|
||||
oldMoveRect.top++; oldScreenRect.top++;
|
||||
oldMoveRect.top++; oldScreenRect.top++;
|
||||
newScreenRect.bottom++; newMoveRect.top--;
|
||||
|
||||
msecCount += 5;
|
||||
|
||||
@@ -380,7 +380,7 @@ static ParseRuleList *_vocab_clone_rule_list_by_id(ParseRuleList *list, int id)
|
||||
|
||||
ParseRuleList *Vocabulary::buildGNF(bool verbose) {
|
||||
int iterations = 0;
|
||||
int last_termrules, termrules = 0;
|
||||
int termrules = 0;
|
||||
int ntrules_nr;
|
||||
ParseRuleList *ntlist = NULL;
|
||||
ParseRuleList *tlist, *new_tlist;
|
||||
@@ -405,7 +405,6 @@ ParseRuleList *Vocabulary::buildGNF(bool verbose) {
|
||||
do {
|
||||
ParseRuleList *new_new_tlist = NULL;
|
||||
ParseRuleList *ntseeker, *tseeker;
|
||||
last_termrules = termrules;
|
||||
|
||||
ntseeker = ntlist;
|
||||
while (ntseeker) {
|
||||
|
||||
@@ -522,7 +522,7 @@ int32 decompressCodec(int32 codec, byte *compInput, byte *compOutput, int32 inpu
|
||||
int32 destPos;
|
||||
int16 firstWord;
|
||||
byte initialTablePos[MAX_CHANNELS] = {0, 0};
|
||||
int32 initialimcTableEntry[MAX_CHANNELS] = {7, 7};
|
||||
//int32 initialimcTableEntry[MAX_CHANNELS] = {7, 7};
|
||||
int32 initialOutputWord[MAX_CHANNELS] = {0, 0};
|
||||
int32 totalBitOffset, curTablePos, outputWord;
|
||||
byte *dst;
|
||||
@@ -562,7 +562,7 @@ int32 decompressCodec(int32 codec, byte *compInput, byte *compOutput, int32 inpu
|
||||
for (i = 0; i < channels; i++) {
|
||||
initialTablePos[i] = *src;
|
||||
src += 1;
|
||||
initialimcTableEntry[i] = READ_BE_UINT32(src);
|
||||
//initialimcTableEntry[i] = READ_BE_UINT32(src);
|
||||
src += 4;
|
||||
initialOutputWord[i] = READ_BE_UINT32(src);
|
||||
src += 4;
|
||||
|
||||
@@ -62,7 +62,7 @@ void Insane::procIACT(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
void Insane::iactScene1(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, Common::SeekableReadStream &b, int32 size, int32 flags,
|
||||
int16 par1, int16 par2, int16 par3, int16 par4) {
|
||||
int16 par5, par6, par7, par9, par11, par13, tmp;
|
||||
int16 par5, par6, par7, par9, par11, par13;
|
||||
|
||||
switch (par1) {
|
||||
case 2: // PATCH
|
||||
@@ -99,15 +99,15 @@ void Insane::iactScene1(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
if (par2 != 13)
|
||||
break;
|
||||
|
||||
tmp = b.readUint16LE(); // +8
|
||||
tmp = b.readUint16LE(); // +10
|
||||
par7 = b.readUint16LE(); // +12 dx
|
||||
tmp = b.readUint16LE(); // +14
|
||||
par9 = b.readUint16LE(); // +16 bx
|
||||
tmp = b.readUint16LE(); // +18
|
||||
par11 = b.readUint16LE(); // +20 cx
|
||||
tmp = b.readUint16LE(); // +22
|
||||
par13 = b.readUint16LE(); // +24 ax
|
||||
b.readUint16LE(); // +8
|
||||
b.readUint16LE(); // +10
|
||||
par7 = b.readUint16LE(); // +12 dx
|
||||
b.readUint16LE(); // +14
|
||||
par9 = b.readUint16LE(); // +16 bx
|
||||
b.readUint16LE(); // +18
|
||||
par11 = b.readUint16LE(); // +20 cx
|
||||
b.readUint16LE(); // +22
|
||||
par13 = b.readUint16LE(); // +24 ax
|
||||
|
||||
if (par13 > _actor[0].x || par11 < _actor[0].x) {
|
||||
_tiresRustle = true;
|
||||
|
||||
@@ -581,7 +581,7 @@ void ScummEngine::resetRoomSubBlocks() {
|
||||
|
||||
void ScummEngine_v3old::setupRoomSubBlocks() {
|
||||
const byte *ptr;
|
||||
byte *roomptr, *searchptr = 0;
|
||||
byte *roomptr;
|
||||
const RoomHeader *rmhd;
|
||||
|
||||
_ENCD_offs = 0;
|
||||
@@ -669,7 +669,6 @@ void ScummEngine_v3old::setupRoomSubBlocks() {
|
||||
|
||||
// Determine the room script base address
|
||||
roomptr = getResourceAddress(rtRoom, _roomResource);
|
||||
searchptr = roomptr;
|
||||
|
||||
memset(_localScriptOffsets, 0, sizeof(_localScriptOffsets));
|
||||
|
||||
|
||||
@@ -1228,11 +1228,11 @@ void ScummEngine_v6::o6_animateActor() {
|
||||
}
|
||||
|
||||
void ScummEngine_v6::o6_doSentence() {
|
||||
int verb, objectA, objectB, dummy = 0;
|
||||
int verb, objectA, objectB;
|
||||
|
||||
objectB = pop();
|
||||
if (_game.version < 8)
|
||||
dummy = pop(); // dummy pop (in Sam&Max, seems to be always 0 or 130)
|
||||
pop(); // dummy pop (in Sam&Max, seems to be always 0 or 130)
|
||||
objectA = pop();
|
||||
verb = pop();
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ void TextResource::flushForRedraw() {
|
||||
}
|
||||
|
||||
void TextResource::drawToScreen(bool doMask) {
|
||||
doMask = true;
|
||||
(void)doMask;
|
||||
uint16 cnty, cntx, cpWidth, cpHeight;
|
||||
if ((_oldX == _x) && (_oldY == _y) && (_spriteData))
|
||||
return;
|
||||
|
||||
@@ -287,7 +287,7 @@ void _2xSaITemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32
|
||||
|
||||
register unsigned colorA, colorB;
|
||||
unsigned colorC, colorD,
|
||||
colorE, colorF, colorG, colorH, colorI, colorJ, colorK, colorL, colorM, colorN, colorO, colorP;
|
||||
colorE, colorF, colorG, colorH, colorI, colorJ, colorK, colorL, colorM, colorN, colorO;
|
||||
unsigned product, product1, product2;
|
||||
|
||||
//---------------------------------------
|
||||
@@ -313,7 +313,6 @@ void _2xSaITemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32
|
||||
colorM = *(bP + 2 * nextlineSrc - 1);
|
||||
colorN = *(bP + 2 * nextlineSrc);
|
||||
colorO = *(bP + 2 * nextlineSrc + 1);
|
||||
colorP = *(bP + 2 * nextlineSrc + 2);
|
||||
|
||||
if ((colorA == colorD) && (colorB != colorC)) {
|
||||
if (((colorA == colorE) && (colorB == colorL)) ||
|
||||
|
||||
@@ -376,13 +376,7 @@ static inline unsigned int getBits(GetBitContext *s, int n) {
|
||||
}
|
||||
|
||||
static inline void skipBits(GetBitContext *s, int n) {
|
||||
int reIndex, reCache;
|
||||
|
||||
reIndex = s->index;
|
||||
reCache = 0;
|
||||
|
||||
reCache = READ_LE_UINT32((const uint8 *)s->buffer + (reIndex >> 3)) >> (reIndex & 0x07);
|
||||
s->index = reIndex + n;
|
||||
s->index += n;
|
||||
}
|
||||
|
||||
#define BITS_LEFT(length, gb) ((length) - getBitsCount((gb)))
|
||||
|
||||
@@ -556,10 +556,7 @@ void CoktelDecoder::renderBlockSparse2Y(Graphics::Surface &dstSurf, const byte *
|
||||
int16 pixCount = *src++;
|
||||
|
||||
if (pixCount & 0x80) { // Data
|
||||
int16 copyCount;
|
||||
|
||||
pixCount = MIN((pixCount & 0x7F) + 1, srcRect.width() - pixWritten);
|
||||
copyCount = CLIP<int16>(rect.width() - pixWritten, 0, pixCount);
|
||||
memcpy(dstRow , src, pixCount);
|
||||
memcpy(dstRow + dstSurf.pitch, src, pixCount);
|
||||
|
||||
|
||||
@@ -306,11 +306,11 @@ void DXADecoder::decode13(int size) {
|
||||
memcpy(_frameBuffer2, _frameBuffer1, _frameSize);
|
||||
|
||||
int codeSize = _width * _curHeight / 16;
|
||||
int dataSize, motSize, maskSize;
|
||||
int dataSize, motSize;
|
||||
|
||||
dataSize = READ_BE_UINT32(&_decompBuffer[0]);
|
||||
motSize = READ_BE_UINT32(&_decompBuffer[4]);
|
||||
maskSize = READ_BE_UINT32(&_decompBuffer[8]);
|
||||
//maskSize = READ_BE_UINT32(&_decompBuffer[8]);
|
||||
|
||||
codeBuf = &_decompBuffer[12];
|
||||
dataBuf = &codeBuf[codeSize];
|
||||
|
||||
Reference in New Issue
Block a user