aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Brown2002-02-24 17:25:03 +0000
committerJames Brown2002-02-24 17:25:03 +0000
commitabbc4bf289892ce20a7de1560c171a5822c897e1 (patch)
treec0962bbbbc2279ec71528b8a94afe412e1f1e8bd
parentc8522359f5bd376433bf58ead734de43534a109c (diff)
downloadscummvm-rg350-abbc4bf289892ce20a7de1560c171a5822c897e1.tar.gz
scummvm-rg350-abbc4bf289892ce20a7de1560c171a5822c897e1.tar.bz2
scummvm-rg350-abbc4bf289892ce20a7de1560c171a5822c897e1.zip
Code cleanup - get rid of a bunch of typecast and unused variable warnings.
svn-id: r3627
-rw-r--r--akos.cpp15
-rw-r--r--debug.cpp6
-rw-r--r--gfx.cpp11
-rw-r--r--gui.cpp6
-rw-r--r--object.cpp44
-rw-r--r--resource.cpp9
-rw-r--r--saveload.cpp17
-rw-r--r--script.cpp9
-rw-r--r--script_v1.cpp5
-rw-r--r--script_v2.cpp14
-rw-r--r--scummvm.cpp5
-rw-r--r--sdl.cpp4
-rw-r--r--sound.cpp8
-rw-r--r--sound/adlib.cpp5
-rw-r--r--sound/fmopl.cpp2
-rw-r--r--sound/imuse.cpp16
-rw-r--r--string.cpp2
-rw-r--r--verbs.cpp13
18 files changed, 64 insertions, 127 deletions
diff --git a/akos.cpp b/akos.cpp
index 8d4cb681fd..602eb0c049 100644
--- a/akos.cpp
+++ b/akos.cpp
@@ -51,7 +51,7 @@ void Scumm::akos_decodeData(Actor *a, int frame, uint usemask) {
uint offs;
int i;
byte code;
- uint32 start,len;
+ uint16 start,len;
uint16 mask;
if (a->costume==0)
@@ -120,7 +120,7 @@ void Scumm::akos_decodeData(Actor *a, int frame, uint usemask) {
}
void Scumm::akos_setPalette(AkosRenderer *ar, byte *palette) {
- byte *akos, *akpl;
+ byte *akpl;
uint size, i;
akpl = findResourceData(MKID('AKPL'), ar->akos);
@@ -294,10 +294,8 @@ StartPos:;
void akos_generic_decode(AkosRenderer *ar) {
byte *src,*dst;
- byte len,height,pcolor, maskbit;
- uint y,scrheight;
- uint color;
- int t;
+ byte len,height, maskbit;
+ uint y, color;
const byte *scaleytab, *mask;
@@ -358,9 +356,7 @@ StartPos:;
void akos_c1_spec1(AkosRenderer *ar) {
byte *src,*dst;
byte len,height,pcolor, maskbit;
- uint y,scrheight;
- uint color;
- int t;
+ uint y, color;
const byte *scaleytab, *mask;
@@ -528,7 +524,6 @@ void Scumm::akos_codec1(AkosRenderer *ar) {
int i,j;
int x,x_right,x_left,skip,tmp_x,tmp_y;
int y,y_top,y_bottom;
- byte *stab;
bool y_clipping;
bool charsetmask;
bool masking;
diff --git a/debug.cpp b/debug.cpp
index 8b9ea334c4..7e44d9609e 100644
--- a/debug.cpp
+++ b/debug.cpp
@@ -60,8 +60,6 @@ void ScummDebugger::attach(Scumm *s) {
void BoxTest(int num);
bool ScummDebugger::do_command() {
- int cmd;
-
switch(get_command()) {
case CMD_HELP:
printf(
@@ -121,8 +119,10 @@ bool ScummDebugger::do_command() {
return true;
case CMD_EXIT:
exit(1);
+
+ default: /* this line is never reached */
+ error("Unknown debug command");
}
- /* this line is never reached */
}
void ScummDebugger::enter() {
diff --git a/gfx.cpp b/gfx.cpp
index 0298b5f941..d2ea946f86 100644
--- a/gfx.cpp
+++ b/gfx.cpp
@@ -358,7 +358,7 @@ void Scumm::initBGBuffers() {
void Scumm::setPaletteFromPtr(byte *ptr) {
int i, r, g, b;
- byte *dest, *epal;
+ byte *dest;
int numcolor;
if( _features & GF_SMALL_HEADER ) {
@@ -406,7 +406,7 @@ void Scumm::setDirtyColors(int min, int max) {
}
void Scumm::initCycl(byte *ptr) {
- int i, j;
+ int j;
ColorCycle *cycl;
memset(_colorCycle, 0, sizeof(_colorCycle));
@@ -560,7 +560,7 @@ void Scumm::redrawBGAreas() {
int i;
int val;
CameraData *cd = &camera;
- int diff;
+ int diff; // Full throttle hack
#if !defined(FULL_THROTTLE)
if (cd->_cur.x!=cd->_last.x && charset._hasMask)
@@ -1260,7 +1260,6 @@ void Gdi::unkDecode7() {
void Gdi::unkDecode8() {
byte *src = _smap_ptr;
byte *dst = _bgbak_ptr;
- int i;
uint h = _numLinesToProcess;
_currentX = 8;
@@ -1583,7 +1582,6 @@ void Scumm::unkScreenEffect7(int a) {
int tab_2[16];
int i,j;
int bottom;
- int *tab2_ptr;
int l,t,r,b;
for (i=0; i<16; i++) {
@@ -1988,7 +1986,6 @@ void Scumm::resetActorBgs() {
Actor *a;
int i;
uint32 onlyActorFlags,bitpos;
- int offs;
for(i=0; i<40; i++) {
onlyActorFlags = (gfxUsageBits[_screenStartStrip + i]&=0x3FFFFFFF);
@@ -2391,7 +2388,7 @@ void Scumm::drawBomp(BompDrawData *bd) {
src = bd->dataptr;
do {
- byte color,code;
+ byte color;
uint len, num;
uint x;
if ((uint)y >= (uint)bd->outheight) {
diff --git a/gui.cpp b/gui.cpp
index db0728cda9..46f0821ec7 100644
--- a/gui.cpp
+++ b/gui.cpp
@@ -115,8 +115,7 @@ void Gui::drawWidget(const GuiWidget *w) {
}
void Gui::widgetClear(const GuiWidget *wid) {
- int x,y,w,h;
- int i,j;
+ int x,y,w,h,i;
x = wid->_x;
y = wid->_y;
@@ -145,7 +144,6 @@ void Gui::widgetClear(const GuiWidget *wid) {
void Gui::widgetBorder(const GuiWidget *w) {
int x = w->_x, y = w->_y;
int x2 = x + w->_w-1, y2 = y + w->_h-1;
- int i;
byte tmp;
hline(x+1,y,x2-1);
@@ -494,7 +492,7 @@ void Gui::loop() {
if (_s->_mouseButStat&MBS_LEFT_CLICK) {
leftMouseClick(_s->mouse.x, _s->mouse.y);
} else if (_s->_lastKeyHit) {
- addLetter(_s->_lastKeyHit);
+ addLetter((unsigned char)_s->_lastKeyHit);
}
if (_clickTimer && !--_clickTimer) {
diff --git a/object.cpp b/object.cpp
index 5cfb93a929..cc819a8d58 100644
--- a/object.cpp
+++ b/object.cpp
@@ -133,7 +133,6 @@ void Scumm::getObjectXYPos(int object) {
byte *ptr;
ImageHeader *imhd;
int x,y;
- AdjustBoxResult abr;
if(!(_features & GF_SMALL_HEADER)) {
if (_features&GF_AFTER_V6) {
@@ -167,13 +166,6 @@ void Scumm::getObjectXYPos(int object) {
_dir= oldDirToNewDir(od->actordir&3);
}
-
-// abr = adjustXYToBeInBox(0, x, y);
-// _xPos = abr.x;
-// _yPos = abr.y;
-// _xPos = x;
-// _yPos = y;
-// _dir = oldDirToNewDir(od->actordir&3);
}
int Scumm::getObjActToObjActDist(int a, int b) {
@@ -355,8 +347,7 @@ void Scumm::loadRoomObjects() {
byte *room,*searchptr;
ImageHeader *imhd;
RoomHeader *roomhdr;
-
- CodeHeader *cdhd;
+ CodeHeader *cdhd;
CHECK_HEAP
@@ -421,11 +412,8 @@ void Scumm::loadRoomObjectsSmall() {
ObjectData *od;
byte *ptr;
uint16 obim_id;
- byte *room,*searchptr;
- ImageHeader *imhd;
- RoomHeader *roomhdr;
-
- CodeHeader *cdhd;
+ byte *room,*searchptr;
+ RoomHeader *roomhdr;
CHECK_HEAP
@@ -483,10 +471,9 @@ void Scumm::loadRoomObjectsSmall() {
CHECK_HEAP
}
-void Scumm::setupRoomObject(ObjectData *od, byte *room) {
- byte *obcd;
- CodeHeader *cdhd;
- ImageHeader *imhd;
+void Scumm::setupRoomObject(ObjectData *od, byte *room) {
+ CodeHeader *cdhd;
+ ImageHeader *imhd; // Full throttle hack
if(_features & GF_SMALL_HEADER) {
@@ -584,8 +571,7 @@ void Scumm::processDrawQue() {
void Scumm::clearOwnerOf(int obj) {
int i,j;
- uint16 *a;
- byte *ptr;
+ uint16 *a;
stopObjectScript(obj);
@@ -976,13 +962,9 @@ int Scumm::getDistanceBetween(bool is_obj_1, int b, int c, bool is_obj_2, int e,
return getDist(x,y,x2,y2) * 0xFF / ((i + j)>>1);
}
-void Scumm::setCursorImg(uint img, uint room, uint imgindex) {
- byte *ptr;
- int index;
+void Scumm::setCursorImg(uint img, uint room, uint imgindex) {
int w,h;
- byte *roomptr,*obim,*dataptr,*bomp;
- RoomHeader *rmhd;
- int i,numobj;
+ byte *dataptr,*bomp;
uint32 size;
FindObjectInRoom foir;
@@ -1082,10 +1064,6 @@ void Scumm::drawEnqueuedObject(EnqueuedObject *eo) {
byte *ptr;
int index;
ObjectData *od;
- int width,height;
- byte *outptr;
- int x,y;
- byte *dataptr;
BompDrawData bdd;
@@ -1122,8 +1100,8 @@ void Scumm::drawEnqueuedObject(EnqueuedObject *eo) {
bdd.dataptr = bomp + 18;
bdd.x = eo->x;
bdd.y = eo->y;
- bdd.scale_x = eo->j;
- bdd.scale_y = eo->k;
+ bdd.scale_x = (unsigned char)eo->j;
+ bdd.scale_y = (unsigned char)eo->k;
updateDirtyRect(vs->number, bdd.x, bdd.x+bdd.srcwidth, bdd.y, bdd.y+bdd.srcheight, 0);
diff --git a/resource.cpp b/resource.cpp
index 77f983e40d..8cf84106ac 100644
--- a/resource.cpp
+++ b/resource.cpp
@@ -24,7 +24,7 @@
/* Open a room */
void Scumm::openRoom(int room) {
- uint room_offs, roomlimit;
+ int room_offs, roomlimit;
char buf[256];
debug(9, "openRoom(%d)",room);
@@ -647,7 +647,6 @@ int Scumm::loadResource(int type, int index) {
int Scumm::readSoundResource(int type, int index) {
uint32 pos, total_size, size, tag,basetag;
- int i;
int pri, best_pri;
uint32 best_size, best_offs;
@@ -890,7 +889,7 @@ StartScan:
}
byte *findResource(uint32 tag, byte *searchin, int index) {
- uint32 maxsize,curpos,totalsize,size;
+ uint32 curpos,totalsize,size;
assert(searchin);
@@ -920,7 +919,7 @@ byte *findResource(uint32 tag, byte *searchin, int index) {
}
byte *findResourceSmall(uint32 tag, byte *searchin, int index) {
- uint32 maxsize,curpos,totalsize,size;
+ uint32 curpos,totalsize,size;
uint16 smallTag;
smallTag=newTag2Old(tag);
@@ -1056,7 +1055,7 @@ void Scumm::freeResources() {
}
void Scumm::loadPtrToResource(int type, int resindex, byte *source) {
- byte *ptr, *alloced;
+ byte *alloced;
int i,len;
nukeResource(type, resindex);
diff --git a/saveload.cpp b/saveload.cpp
index 845a49d58e..dd5b7e7770 100644
--- a/saveload.cpp
+++ b/saveload.cpp
@@ -67,7 +67,6 @@ bool Scumm::loadState(int slot, bool compat) {
SaveGameHeader hdr;
Serializer ser;
int sb,sh;
- SoundEngine *se;
makeSavegameName(filename, slot, compat);
if (!out.fopen(filename,"rb"))
@@ -156,7 +155,6 @@ bool Scumm::getSavegameName(int slot, char *desc) {
char filename[256];
SerializerStream out;
SaveGameHeader hdr;
- bool result;
int len;
makeSavegameName(filename, slot, false);
@@ -524,11 +522,10 @@ void Scumm::saveOrLoad(Serializer *s) {
void Scumm::saveLoadResource(Serializer *ser, int type, int index) {
byte *ptr;
- uint32 size,sizele;
- byte flag;
+ uint32 size;
/* don't save/load these resource types */
- if (/*type==rtFlObject ||*/ type==rtTemp || type==rtBuffer || res.mode[type])
+ if (type==rtTemp || type==rtBuffer || res.mode[type])
return;
if (ser->isSaving()) {
@@ -623,9 +620,9 @@ void Serializer::saveLoadArrayOf(void *b, int len, int datasize, byte filetype)
error("saveLoadArrayOf: invalid size %d", datasize);
}
switch(filetype) {
- case sleByte: saveByte(data); break;
+ case sleByte: saveByte((byte)data); break;
case sleUint16:
- case sleInt16:saveWord(data); break;
+ case sleInt16:saveWord((int16)data); break;
case sleInt32:
case sleUint32:saveUint32(data); break;
default:
@@ -643,10 +640,10 @@ void Serializer::saveLoadArrayOf(void *b, int len, int datasize, byte filetype)
error("saveLoadArrayOf: invalid filetype %d", filetype);
}
if (datasize==1) {
- *(byte*)at = data;
+ *(byte*)at = (byte)data;
at += 1;
} else if (datasize==2) {
- *(uint16*)at = data;
+ *(uint16*)at = (uint16)data;
at += 2;
} else if (datasize==4) {
*(uint32*)at = data;
@@ -673,7 +670,6 @@ void Serializer::saveLoadEntries(void *d, const SaveLoadEntry *sle) {
byte type;
byte *at;
int size;
- int value;
int num;
void *ptr;
@@ -704,4 +700,3 @@ void Serializer::saveLoadEntries(void *d, const SaveLoadEntry *sle) {
sle++;
}
}
-
diff --git a/script.cpp b/script.cpp
index a689fa5f6d..e2a1bb5a25 100644
--- a/script.cpp
+++ b/script.cpp
@@ -330,8 +330,6 @@ int Scumm::readVar(uint var) {
}
void Scumm::writeVar(uint var, int value) {
- int a;
-
if (!(var&0xF000)) {
checkRange(_numVariables-1, 0, var, "Variable %d out of range(w)");
_vars[var] = value;
@@ -510,7 +508,7 @@ void Scumm::runAllScripts() {
for(_curExecScript = 0; _curExecScript<NUM_SCRIPT_SLOT; _curExecScript++) {
if (vm.slot[_curExecScript].status == 2 &&
vm.slot[_curExecScript].didexec == 0) {
- _currentScript = _curExecScript;
+ _currentScript = (char)_curExecScript;
getScriptBaseAddress();
getScriptEntryPoint();
executeScript();
@@ -832,8 +830,7 @@ void Scumm::animateActor(int act, int anim) {
#else
- int shr,dir;
- bool inRoom;
+ int dir;
Actor *a;
a = derefActorSafe(act, "animateActor");
@@ -926,7 +923,7 @@ int Scumm::defineArray(int array, int type, int dim2, int dim1) {
id = getArrayId();
if (array&0x4000) {
- _arrays[id] = vm.slot[_currentScript].number;
+ _arrays[id] = (char)vm.slot[_currentScript].number;
}
if (array&0x8000) {
diff --git a/script_v1.cpp b/script_v1.cpp
index edf6ca89e6..c0c6eb4628 100644
--- a/script_v1.cpp
+++ b/script_v1.cpp
@@ -931,7 +931,7 @@ void Scumm::o5_cursorCommand() {
case 14: /* unk */
getWordVararg(table);
for (i=0; i<16; i++)
- charset._colorMap[i] = _charsetData[string[1].t_charset][i] = table[i];
+ charset._colorMap[i] = _charsetData[string[1].t_charset][i] = (unsigned char)table[i];
break;
}
@@ -1565,7 +1565,7 @@ void Scumm::o5_print() {
}
void Scumm::o5_printEgo() {
- _actorToPrintStrFor = _vars[VAR_EGO];
+ _actorToPrintStrFor = (unsigned char)_vars[VAR_EGO];
decodeParseString();
}
@@ -2142,7 +2142,6 @@ void Scumm::o5_verbOps() {
VerbSlot *vs;
int a,b;
byte *ptr;
- int tempRoom;
verb = getVarOrDirectByte(0x80);
diff --git a/script_v2.cpp b/script_v2.cpp
index 19450dff9d..fc7debc127 100644
--- a/script_v2.cpp
+++ b/script_v2.cpp
@@ -708,7 +708,7 @@ void Scumm::o6_freezeUnfreeze() {
}
void Scumm::o6_cursorCommand() {
- int a,num,i;
+ int a,i;
int16 args[16];
switch(fetchScriptByte()) {
@@ -757,7 +757,7 @@ void Scumm::o6_cursorCommand() {
case 0x9D: /* set charset colors */
getStackList(args,sizeof(args)/sizeof(args[0]));
for (i=0; i<16; i++)
- charset._colorMap[i] = _charsetData[string[1].t_charset][i] = args[i];
+ charset._colorMap[i] = _charsetData[string[1].t_charset][i] = (unsigned char)args[i];
break;
case 0xD6:
makeCursorColorTransparent(pop());
@@ -1204,7 +1204,6 @@ void Scumm::o6_createBoxMatrix() {
void Scumm::o6_resourceRoutines() {
int res;
- int obj,room;
switch(fetchScriptByte()) {
case 100: /* load script */
@@ -1830,8 +1829,6 @@ void Scumm::o6_getActorWidth() {
}
void Scumm::o6_wait() {
- byte oldaddr;
-
switch(fetchScriptByte()) {
case 168: {
int offs = (int16)fetchScriptWord();
@@ -2009,7 +2006,7 @@ void Scumm::o6_talkActor() {
}
void Scumm::o6_talkEgo() {
- _actorToPrintStrFor = _vars[VAR_EGO];
+ _actorToPrintStrFor = (unsigned char)_vars[VAR_EGO];
_messagePtr = _scriptPointer;
setStringVars(0);
actorTalk();
@@ -2017,7 +2014,6 @@ void Scumm::o6_talkEgo() {
}
void Scumm::o6_dim() {
- byte b;
int data;
switch(fetchScriptByte()) {
@@ -2187,7 +2183,7 @@ void Scumm::o6_miscOps() {
break;
case 107:
a = derefActorSafe(args[1], "o6_miscops: 107");
- a->scalex = args[2];
+ a->scalex = (unsigned char)args[2];
a->needBgReset = true;
a->needRedraw = true;
break;
@@ -2256,7 +2252,7 @@ void Scumm::o6_miscOps() {
case 107: /* set actor scale */
a = derefActorSafe(args[1], "o6_miscops: 107");
- a->scalex = args[2];
+ a->scalex = (unsigned char)args[2];
a->needBgReset = true;
a->needRedraw = true;
break;
diff --git a/scummvm.cpp b/scummvm.cpp
index 87e99912ad..21fce33829 100644
--- a/scummvm.cpp
+++ b/scummvm.cpp
@@ -182,10 +182,7 @@ void Scumm::checkRange(int max, int min, int no, const char *str) {
}
}
-void Scumm::scummMain(int argc, char **argv) {
- int tmr, i;
- Actor *a;
-
+void Scumm::scummMain(int argc, char **argv) {
charset._vm = this;
gdi._vm = this;
diff --git a/sdl.cpp b/sdl.cpp
index ea86127d0e..8545ff522b 100644
--- a/sdl.cpp
+++ b/sdl.cpp
@@ -465,7 +465,7 @@ void fill_sound(void *userdata, Uint8 *stream, int len) {
void cd_playtrack(int track, int offset, int delay) {
SDL_CDStatus(cdrom);
- SDL_CDPlayTracks(cdrom, track, (offset * 7.5) - 22650, 0, delay * 7.5);
+ SDL_CDPlayTracks(cdrom, track, (int)((offset * 7.5) - 22650), 0, (int)(delay * 7.5));
}
int music_thread(Scumm *s) {
@@ -548,7 +548,7 @@ void initGraphics(Scumm *s, bool fullScreen) {
#endif
int main(int argc, char* argv[]) {
- int delta,tmp;
+ int delta;
int last_time, new_time;
sound.initialize(&scumm, &snd_driv);
diff --git a/sound.cpp b/sound.cpp
index cc7fd3bca5..0cd740b82b 100644
--- a/sound.cpp
+++ b/sound.cpp
@@ -84,7 +84,7 @@ void Scumm::processSoundQues() {
#endif
#if !defined(FULL_THROTTLE)
if (se)
- _vars[VAR_SOUNDRESULT] = se->do_command(data[0],data[1],data[2],data[3],data[4],data[5],data[6],data[7]);
+ _vars[VAR_SOUNDRESULT] = (short)se->do_command(data[0],data[1],data[2],data[3],data[4],data[5],data[6],data[7]);
#endif
}
}
@@ -140,8 +140,7 @@ void Scumm::processSfxQueues() {
void Scumm::startTalkSound(uint32 offset, uint32 b, int mode) {
int num, i;
- byte file_byte,file_byte_2;
- uint16 elem;
+ byte file_byte,file_byte_2;
if (!_sfxFile) {
warning("startTalkSound: SFX file is not open");
@@ -432,8 +431,7 @@ void Scumm::playSfxSound(void *sound, uint32 size, uint rate) {
}
void MixerChannel::mix(int16 *data, uint32 len) {
- int8 *s;
- int i;
+ int8 *s;
uint32 fp_pos, fp_speed;
if (!_sfx_sound)
diff --git a/sound/adlib.cpp b/sound/adlib.cpp
index 94b0717631..a2ea956d24 100644
--- a/sound/adlib.cpp
+++ b/sound/adlib.cpp
@@ -642,10 +642,10 @@ void AdlibSoundDriver::mc_inc_stuff(MidiChannelAdl *mc, Struct10 *s10, Struct11
}
break;
case 30:
- s11->s10->modwheel = s11->modify_val;
+ s11->s10->modwheel = (char)s11->modify_val;
break;
case 31:
- s11->s10->unk3 = s11->modify_val;
+ s11->s10->unk3 = (char)s11->modify_val;
break;
default:
part->_drv->adlib_set_param(mc->_channel, s11->param, s10->start_value + s11->modify_val);
@@ -916,7 +916,6 @@ void AdlibSoundDriver::part_set_instrument(Part *part, Instrument *instr) {
}
int AdlibSoundDriver::part_update_active(Part *part,uint16 *active) {
- int i;
uint16 bits;
int count = 0;
MidiChannelAdl *mc;
diff --git a/sound/fmopl.cpp b/sound/fmopl.cpp
index 167e323a9c..3a2b8a3ec0 100644
--- a/sound/fmopl.cpp
+++ b/sound/fmopl.cpp
@@ -710,7 +710,7 @@ void OPLWriteReg(FM_OPL *OPL, int r, int v)
{
OPL_CH *CH;
int slot;
- int block_fnum;
+ unsigned int block_fnum;
switch(r&0xe0)
{
diff --git a/sound/imuse.cpp b/sound/imuse.cpp
index 54681170c3..c69dee198f 100644
--- a/sound/imuse.cpp
+++ b/sound/imuse.cpp
@@ -347,8 +347,7 @@ void Player::sequencer_timer() {
void SoundEngine::handle_marker(uint id, byte data) {
uint16 *p;
- uint pos;
- int a;
+ uint pos;
pos = _queue_end;
if (pos == _queue_pos)
@@ -420,7 +419,7 @@ void SoundEngine::expire_sustain_notes() {
counter = sn->counter + player->_timer_speed;
sn->pos += counter>>16;
- sn->counter = counter & 0xFFFF;
+ sn->counter = (unsigned short)counter & 0xFFFF;
if (sn->pos >= sn->off_pos) {
player->key_off(sn->chan, sn->note);
@@ -568,7 +567,6 @@ int SoundEngine::clear_queue() {
int SoundEngine::enqueue_command(int a, int b, int c, int d, int e, int f, int g) {
uint16 *p;
- uint32 r;
uint i;
i = _queue_pos;
@@ -929,13 +927,12 @@ void SoundEngine::init_queue() {
}
void SoundEngine::pause(bool paused) {
- Part *part;
- int i;
- MidiChannel *mc;
-
lock();
#if 0
+ int i;
+ Part *part;
+ MidiChannel *mc;
for (i=ARRAYSIZE(_parts),part=_parts; i!=0; i--, part++) {
if (part->_player) {
@@ -1236,7 +1233,6 @@ void Player::parse_sysex(byte *p, uint len) {
uint b;
byte buf[128];
Part *part;
- byte hw;
/* too big? */
if (len>=sizeof(buf)*2)
@@ -1764,7 +1760,6 @@ Part *Player::get_part(uint8 chan) {
uint Player::update_actives() {
Part *part;
- MidiChannel *mc;
uint16 *active;
int count = 0;
@@ -2094,7 +2089,6 @@ int SoundEngine::save_or_load(Serializer *ser) {
if (!ser->isSaving()) {
/* Load all sounds that we need */
- int i;
fix_players_after_load();
init_sustaining_notes();
_active_volume_faders = true;
diff --git a/string.cpp b/string.cpp
index 6023bda964..c63c4af744 100644
--- a/string.cpp
+++ b/string.cpp
@@ -280,8 +280,6 @@ void Scumm::CHARSET_1() {
if (!_keepText) {
if(_features & GF_OLD256) {
- int lenght;
-
gdi._mask_left = string[0].xpos;
gdi._mask_top = string[0].ypos;
gdi._mask_bottom = string[0].ypos+8;
diff --git a/verbs.cpp b/verbs.cpp
index f25c2b5777..42dc115cf5 100644
--- a/verbs.cpp
+++ b/verbs.cpp
@@ -160,7 +160,6 @@ void Scumm::restoreVerbBG(int verb) {
}
void Scumm::drawVerbBitmap(int vrb, int x, int y) {
- int nozbufs;
VirtScreen *vs;
VerbSlot *vst;
byte twobufs, *imptr;
@@ -186,15 +185,13 @@ void Scumm::drawVerbBitmap(int vrb, int x, int y) {
obim = getResourceAddress(rtVerb, vrb);
if (_features & GF_SMALL_HEADER) {
- ObjectData *od;
- int index, obj;
+ int obj;
obj = READ_LE_UINT16(obim+6);
- size = READ_LE_UINT32(obim);
-
- imgw = (*(obim+size+11)) ;
- imgh = (*(obim+size+17))>>3 ;
- imptr = (obim+8);
+ size = READ_LE_UINT32(obim);
+ imgw = (*(obim+size+11)) ;
+ imgh = (*(obim+size+17))>>3 ;
+ imptr = (obim+8);
} else {
imhd = (ImageHeader*)findResourceData(MKID('IMHD'), obim);
imgw = READ_LE_UINT16(&imhd->width) >> 3;