diff options
author | dhewg | 2011-03-29 21:55:21 +0200 |
---|---|---|
committer | dhewg | 2011-03-29 21:57:56 +0200 |
commit | d83a83ef5021c1e329127d3c6402088aeb1c1dd1 (patch) | |
tree | 5ade1c22a76ed8a10fac3d4c488a9866d649508e | |
parent | 8c70f2a58492335e9045c5abfd291887b2d7a339 (diff) | |
download | scummvm-rg350-d83a83ef5021c1e329127d3c6402088aeb1c1dd1.tar.gz scummvm-rg350-d83a83ef5021c1e329127d3c6402088aeb1c1dd1.tar.bz2 scummvm-rg350-d83a83ef5021c1e329127d3c6402088aeb1c1dd1.zip |
JANITORIAL: Remove/comment unused vars
Found by GCC 4.6's -Wunused-but-set-variable
32 files changed, 51 insertions, 115 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp index c0d93b3bf2..67b979a830 100644 --- a/backends/graphics/sdl/sdl-graphics.cpp +++ b/backends/graphics/sdl/sdl-graphics.cpp @@ -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; diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp index 642ddf6917..c01b9bbef7 100644 --- a/backends/midi/timidity.cpp +++ b/backends/midi/timidity.cpp @@ -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; diff --git a/common/EventRecorder.cpp b/common/EventRecorder.cpp index 07a651be65..d61fe0fe45 100644 --- a/common/EventRecorder.cpp +++ b/common/EventRecorder.cpp @@ -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); diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp index 08a3d4e2f0..ca603db1fa 100644 --- a/engines/agos/icons.cpp +++ b/engines/agos/icons.cpp @@ -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; diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp index ed56cbd266..bda605a84a 100644 --- a/engines/agos/string.cpp +++ b/engines/agos/string.cpp @@ -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) diff --git a/engines/cine/bg.cpp b/engines/cine/bg.cpp index 1c6a55c270..b3171de918 100644 --- a/engines/cine/bg.cpp +++ b/engines/cine/bg.cpp @@ -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); diff --git a/engines/cine/saveload.cpp b/engines/cine/saveload.cpp index fd426be66a..4911f78da9 100644 --- a/engines/cine/saveload.cpp +++ b/engines/cine/saveload.cpp @@ -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 diff --git a/engines/cruise/backgroundIncrust.cpp b/engines/cruise/backgroundIncrust.cpp index 6bd8b270e0..b51e86296c 100644 --- a/engines/cruise/backgroundIncrust.cpp +++ b/engines/cruise/backgroundIncrust.cpp @@ -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) { diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp index 99de66deb6..b1d7a594fe 100644 --- a/engines/cruise/cruise_main.cpp +++ b/engines/cruise/cruise_main.cpp @@ -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; diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp index 03a2117f07..b9e4ca8bc9 100644 --- a/engines/cruise/dataLoader.cpp +++ b/engines/cruise/dataLoader.cpp @@ -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; diff --git a/engines/cruise/linker.cpp b/engines/cruise/linker.cpp index 49e97ebc11..afc7992493 100644 --- a/engines/cruise/linker.cpp +++ b/engines/cruise/linker.cpp @@ -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; diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp index aaa6f987b6..f6b04e6d9d 100644 --- a/engines/cruise/mainDraw.cpp +++ b/engines/cruise/mainDraw.cpp @@ -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; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 884697dec7..7744374518 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -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) { diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 63b2d7f681..6a42b5ecd4 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -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); } diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index 441436a825..c55153b802 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -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; } diff --git a/engines/m4/rails.cpp b/engines/m4/rails.cpp index ff18d645e7..39cba9ab84 100644 --- a/engines/m4/rails.cpp +++ b/engines/m4/rails.cpp @@ -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; diff --git a/engines/m4/resource.cpp b/engines/m4/resource.cpp index 70abc47960..192cab0c83 100644 --- a/engines/m4/resource.cpp +++ b/engines/m4/resource.cpp @@ -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)) diff --git a/engines/m4/woodscript.cpp b/engines/m4/woodscript.cpp index 1235cc9cb6..1b9d9859ef 100644 --- a/engines/m4/woodscript.cpp +++ b/engines/m4/woodscript.cpp @@ -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); } diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index 34163a940d..87640f2b67 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -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); diff --git a/engines/saga/font.cpp b/engines/saga/font.cpp index 01e74d2984..2434f7aad8 100644 --- a/engines/saga/font.cpp +++ b/engines/saga/font.cpp @@ -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; diff --git a/engines/saga/image.cpp b/engines/saga/image.cpp index 87d9e514c8..ac9fe94f2f 100644 --- a/engines/saga/image.cpp +++ b/engines/saga/image.cpp @@ -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; diff --git a/engines/sci/graphics/transitions.cpp b/engines/sci/graphics/transitions.cpp index fac9a97efe..fb124055d6 100644 --- a/engines/sci/graphics/transitions.cpp +++ b/engines/sci/graphics/transitions.cpp @@ -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; diff --git a/engines/sci/parser/grammar.cpp b/engines/sci/parser/grammar.cpp index 8a6cd2dd4d..77db56adba 100644 --- a/engines/sci/parser/grammar.cpp +++ b/engines/sci/parser/grammar.cpp @@ -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) { diff --git a/engines/scumm/imuse_digi/dimuse_codecs.cpp b/engines/scumm/imuse_digi/dimuse_codecs.cpp index 3f7c341701..62a006c56b 100644 --- a/engines/scumm/imuse_digi/dimuse_codecs.cpp +++ b/engines/scumm/imuse_digi/dimuse_codecs.cpp @@ -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; diff --git a/engines/scumm/insane/insane_iact.cpp b/engines/scumm/insane/insane_iact.cpp index 942256b1a4..265931ecc2 100644 --- a/engines/scumm/insane/insane_iact.cpp +++ b/engines/scumm/insane/insane_iact.cpp @@ -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; diff --git a/engines/scumm/room.cpp b/engines/scumm/room.cpp index 02b2482e40..58b6cdb105 100644 --- a/engines/scumm/room.cpp +++ b/engines/scumm/room.cpp @@ -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)); diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp index 30187937f3..abe397ba7e 100644 --- a/engines/scumm/script_v6.cpp +++ b/engines/scumm/script_v6.cpp @@ -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(); diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp index 7b59fa2726..55ba6039c3 100644 --- a/engines/sky/control.cpp +++ b/engines/sky/control.cpp @@ -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; diff --git a/graphics/scaler/2xsai.cpp b/graphics/scaler/2xsai.cpp index 936ed19124..43a5b2fd1d 100644 --- a/graphics/scaler/2xsai.cpp +++ b/graphics/scaler/2xsai.cpp @@ -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)) || diff --git a/video/codecs/qdm2.cpp b/video/codecs/qdm2.cpp index c7e1ffe54f..762f56b3d7 100644 --- a/video/codecs/qdm2.cpp +++ b/video/codecs/qdm2.cpp @@ -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))) diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp index ef92e5f35e..b2d64bfb3c 100644 --- a/video/coktel_decoder.cpp +++ b/video/coktel_decoder.cpp @@ -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); diff --git a/video/dxa_decoder.cpp b/video/dxa_decoder.cpp index 3a8b3acae9..62c2622437 100644 --- a/video/dxa_decoder.cpp +++ b/video/dxa_decoder.cpp @@ -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]; |