diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | akos.cpp | 2 | ||||
-rw-r--r-- | boxes.cpp | 4 | ||||
-rw-r--r-- | gfx.cpp | 10 | ||||
-rw-r--r-- | gui.cpp | 2 | ||||
-rw-r--r-- | object.cpp | 2 | ||||
-rw-r--r-- | resource.cpp | 2 | ||||
-rw-r--r-- | script_v1.cpp | 4 | ||||
-rw-r--r-- | sdl.cpp | 4 | ||||
-rw-r--r-- | sound/imuse.cpp | 2 | ||||
-rw-r--r-- | string.cpp | 4 |
11 files changed, 19 insertions, 19 deletions
@@ -1,7 +1,7 @@ # $Header$ CC = gcc -CFLAGS = -g -Wall -Wstrict-prototypes -Wno-long-long -Wno-multichar +CFLAGS = -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar DEFINES = -DUNIX -DUSE_ADLIB LDFLAGS := INCLUDES:= `sdl-config --cflags` -I./ -I./sound @@ -552,7 +552,7 @@ void Scumm::akos_codec1(AkosRenderer *ar) { int num_colors; bool use_scaling; int i,j; - int x,x_right,x_left,skip,tmp_x,tmp_y; + int x,x_right,x_left,skip=0,tmp_x,tmp_y; int y,y_top,y_bottom; bool y_clipping; bool charsetmask; @@ -508,7 +508,7 @@ void Scumm::createBoxMatrix() { int code; PathVertex *vtx; - PathNode *node, *node2; + PathNode *node, *node2=NULL; _maxBoxVertexHeap = 1000; @@ -861,7 +861,7 @@ int Scumm::findPathTowardsOld(Actor *a, byte trap1, byte trap2, byte final_trap) void Scumm::GetGates(int trap1,int trap2) { int i; -int Closest1,Closest2,Closest3; +int Closest1=0,Closest2=0,Closest3=0; int Dist[8]; int Dist1,Dist2,Dist3; int Box1,Box2,Box3; @@ -1305,7 +1305,7 @@ void Gdi::unkDecode9() { byte *dst = _bgbak_ptr; unsigned char c, bits, color, run; int x, y, i, z; - uint buffer, mask = 128; + uint buffer=0, mask = 128; int h = _numLinesToProcess; x = y = i = z = run = 0; @@ -1374,7 +1374,7 @@ void Gdi::unkDecode11() { byte *src = _smap_ptr; byte *dst = _bgbak_ptr; int bits, i; - uint buffer, mask = 128; + uint buffer=0, mask = 128; unsigned char inc = 1, color = *src++; _currentX = 8; @@ -1695,7 +1695,7 @@ void Scumm::moveCamera() { if(_features & GF_AFTER_V7) { CameraData *cd = &camera; ScummPoint old = cd->_cur; - Actor *a; + Actor *a=NULL; if (cd->_follows) { a = derefActorSafe(cd->_follows, "moveCamera"); @@ -1778,7 +1778,7 @@ void Scumm::moveCamera() { CameraData *cd = &camera; int pos = cd->_cur.x; int actorx, t; - Actor *a; + Actor *a=NULL; cd->_cur.x &= 0xFFF8; @@ -2309,7 +2309,7 @@ void Scumm::decompressDefaultCursor(int idx) { int Scumm::remapPaletteColor(int r, int g, int b, uint threshold) { int i; int ar,ag,ab; - uint sum,j,bestsum,bestitem; + uint sum,j,bestsum,bestitem=0; byte *pal = _currentPalette; if (r>255) r=255; @@ -96,7 +96,7 @@ const GuiWidget *Gui::widgetFromPos(int x, int y) { } void Gui::drawChar(const char str, int xx, int yy) { - unsigned int buffer, mask = 0, x, y; + unsigned int buffer=0, mask = 0, x, y; byte *tmp; int tempc = _color; _color = _textcolor; diff --git a/object.cpp b/object.cpp index e6e439db23..c7d2869a6e 100644 --- a/object.cpp +++ b/object.cpp @@ -670,7 +670,7 @@ byte *Scumm::getObjOrActorName(int obj) { return getActorName(derefActorSafe(obj, "getObjOrActorName")); if(_features & GF_SMALL_HEADER) { - byte offset; + byte offset=0; objptr = getOBCDFromObject(obj); if (objptr) diff --git a/resource.cpp b/resource.cpp index 16378c79d1..96799d7e06 100644 --- a/resource.cpp +++ b/resource.cpp @@ -657,7 +657,7 @@ int Scumm::loadResource(int type, int idx) { int Scumm::readSoundResource(int type, int idx) { uint32 pos, total_size, size, tag,basetag; int pri, best_pri; - uint32 best_size, best_offs; + uint32 best_size=0, best_offs=0; debug(9, "readSoundResource(%d,%d)", type, idx); diff --git a/script_v1.cpp b/script_v1.cpp index 1a1020331d..b8bf76390f 100644 --- a/script_v1.cpp +++ b/script_v1.cpp @@ -1655,7 +1655,7 @@ void Scumm::o5_quitPauseRestart() { } void Scumm::o5_resourceRoutines() { - int resid; + int resid=0; _opcode = fetchScriptByte(); if (_opcode != 17) @@ -1742,7 +1742,7 @@ void Scumm::o5_resourceRoutines() { } void Scumm::o5_roomOps() { - int a,b,c,d,e; + int a=0,b=0,c,d,e; if(_features & GF_OLD256) { @@ -979,8 +979,8 @@ int main(int argc, char* argv[]) { scumm->_scummStackPos=0; scumm->_verbMouseOver=0; - scumm->_palDirtyMax=-1; - scumm->_palDirtyMin=-1; + scumm->_palDirtyMax=0; + scumm->_palDirtyMin=0; scumm->_debugger=0; scumm->camera._cur.x=0; scumm->camera._cur.y=0; diff --git a/sound/imuse.cpp b/sound/imuse.cpp index ce2bb84669..6b3352917e 100644 --- a/sound/imuse.cpp +++ b/sound/imuse.cpp @@ -695,7 +695,7 @@ int SoundEngine::enqueue_trigger(int sound, int marker) { int32 SoundEngine::do_command(int a, int b, int c, int d, int e, int f, int g, int h) { byte cmd = a&0xFF; byte param = a>>8; - Player *player; + Player *player=NULL; if (!_initialized && (cmd || param)) return -1; diff --git a/string.cpp b/string.cpp index f07a9c5404..b51e209388 100644 --- a/string.cpp +++ b/string.cpp @@ -427,7 +427,7 @@ void Scumm::drawString(int a) { byte buf[256]; byte *charsetptr,*space; int i; - byte byte1, chr; + byte byte1=0, chr; uint color; _msgPtrToAdd = buf; @@ -701,7 +701,7 @@ void Scumm::initCharset(int charsetno) { void CharsetRenderer::printCharOld(int chr) { // Loom3 / Zak256 VirtScreen *vs; byte *char_ptr, *dest_ptr; - unsigned int buffer, mask=0, x = 0, y = 0; + unsigned int buffer=0, mask=0, x = 0, y = 0; unsigned char color; _vm->checkRange(_vm->_maxCharsets-1, 0, _curId, "Printing with bad charset %d"); |