diff options
author | Max Horn | 2006-03-08 11:37:25 +0000 |
---|---|---|
committer | Max Horn | 2006-03-08 11:37:25 +0000 |
commit | d9a9fac93761a06e78fe7e7091ae5a888c1260f2 (patch) | |
tree | 62da9040abb98b0b49c0ba8a14777f32c6452c4f /engines/saga | |
parent | 14f1337c602a1823d2be26fe5b48bc4722aca681 (diff) | |
download | scummvm-rg350-d9a9fac93761a06e78fe7e7091ae5a888c1260f2.tar.gz scummvm-rg350-d9a9fac93761a06e78fe7e7091ae5a888c1260f2.tar.bz2 scummvm-rg350-d9a9fac93761a06e78fe7e7091ae5a888c1260f2.zip |
Fixed tons of format string warnings for debug/error calls (including several errors where the format string didn't match the number of arguments to the call)
svn-id: r21141
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/actor.cpp | 2 | ||||
-rw-r--r-- | engines/saga/animation.cpp | 2 | ||||
-rw-r--r-- | engines/saga/events.cpp | 2 | ||||
-rw-r--r-- | engines/saga/font.cpp | 2 | ||||
-rw-r--r-- | engines/saga/image.cpp | 2 | ||||
-rw-r--r-- | engines/saga/scene.cpp | 10 | ||||
-rw-r--r-- | engines/saga/script.cpp | 2 | ||||
-rw-r--r-- | engines/saga/sthread.cpp | 2 |
8 files changed, 12 insertions, 12 deletions
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp index cc89f0ef2a..761e1af001 100644 --- a/engines/saga/actor.cpp +++ b/engines/saga/actor.cpp @@ -332,7 +332,7 @@ bool Actor::loadActorResources(ActorData *actor) { _vm->_resource->loadResource(_actorContext, actor->_frameListResourceId, resourcePointer, resourceLength); framesCount = resourceLength / 16; - debug(9, "Frame resource contains %d frames (res length is %d)", framesCount, resourceLength); + debug(9, "Frame resource contains %d frames (res length is %d)", framesCount, (int)resourceLength); framesPointer = (ActorFrameSequence *)malloc(sizeof(ActorFrameSequence) * framesCount); if (framesPointer == NULL && framesCount != 0) { diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp index 016070dc50..3a4102f5d6 100644 --- a/engines/saga/animation.cpp +++ b/engines/saga/animation.cpp @@ -478,7 +478,7 @@ void Anim::decodeFrame(AnimationData *anim, size_t frameOffset, byte *buf, size_ #if 1 #define VALIDATE_WRITE_POINTER \ if ((writePointer < buf) || (writePointer >= (buf + screenWidth * screenHeight))) { \ - error("VALIDATE_WRITE_POINTER: writePointer=%x buf=%x", writePointer, buf); \ + error("VALIDATE_WRITE_POINTER: writePointer=%p buf=%p", (void *)writePointer, (void *)buf); \ } #else #define VALIDATE_WRITE_POINTER diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp index 0d1da65efb..bce0c454b3 100644 --- a/engines/saga/events.cpp +++ b/engines/saga/events.cpp @@ -408,7 +408,7 @@ int Events::handleOneShot(Event *event) { switch (event->op) { case kEventExecBlocking: case kEventExecNonBlocking: - debug(6, "Exec module number %d script entry number %d", event->param, event->param2); + debug(6, "Exec module number %ld script entry number %ld", event->param, event->param2); sthread = _vm->_script->createThread(event->param, event->param2); if (sthread == NULL) { diff --git a/engines/saga/font.cpp b/engines/saga/font.cpp index 9a91bf4872..fa8416bd5e 100644 --- a/engines/saga/font.cpp +++ b/engines/saga/font.cpp @@ -83,7 +83,7 @@ void Font::loadFont(uint32 fontResourceId) { _vm->_resource->loadResource(fontContext, fontResourceId, fontResourcePointer, fontResourceLength); if (fontResourceLength < FONT_DESCSIZE) { - error("Font::loadFont() Invalid font length (%i < %i)", fontResourceLength, FONT_DESCSIZE); + error("Font::loadFont() Invalid font length (%i < %i)", (int)fontResourceLength, FONT_DESCSIZE); } MemoryReadStreamEndian readS(fontResourcePointer, fontResourceLength, fontContext->isBigEndian); diff --git a/engines/saga/image.cpp b/engines/saga/image.cpp index b7ac53f179..f03880a01e 100644 --- a/engines/saga/image.cpp +++ b/engines/saga/image.cpp @@ -59,7 +59,7 @@ int SagaEngine::decodeBGImage(const byte *image_data, size_t image_size, size_t out_buf_len; if (image_size <= SAGA_IMAGE_DATA_OFFSET) { - error("decodeBGImage() Image size is way too small (%d)", image_size); + error("decodeBGImage() Image size is way too small (%d)", (int)image_size); } MemoryReadStreamEndian readS(image_data, image_size, isBigEndian()); diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp index 708800dc41..f98c1f2661 100644 --- a/engines/saga/scene.cpp +++ b/engines/saga/scene.cpp @@ -186,7 +186,7 @@ Scene::Scene(SagaEngine *vm) : _vm(vm) { loadSceneResourceList(_sceneDescription.resourceListResourceId); gDebugLevel = backUpDebugLevel; debug(DUMP_SCENES_LEVEL, "Dump Scene: number %i, descriptor resourceId %i, resourceList resourceId %i", i, _sceneLUT[i], _sceneDescription.resourceListResourceId); - debug(DUMP_SCENES_LEVEL, "\tresourceListCount %i", _resourceListCount); + debug(DUMP_SCENES_LEVEL, "\tresourceListCount %i", (int)_resourceListCount); for (j = 0; j < _resourceListCount; j++) { if (_resourceList[j].resourceType >= typesCount) { error("wrong resource type %i", _resourceList[j].resourceType); @@ -509,7 +509,7 @@ int Scene::getBGMaskType(const Point &testPoint) { } offset = testPoint.x + testPoint.y * _bgMask.w; if (offset >= _bgMask.buf_len) { - error("Scene::getBGMaskType offset 0x%X exceed bufferLength 0x%X", offset, _bgMask.buf_len); + error("Scene::getBGMaskType offset 0x%X exceed bufferLength 0x%X", offset, (int)_bgMask.buf_len); } return (_bgMask.buf[offset] >> 4) & 0x0f; @@ -942,7 +942,7 @@ void Scene::loadSceneResourceList(uint32 resourceId) { // Allocate memory for scene resource list _resourceListCount = resourceListDataLength / SAGA_RESLIST_ENTRY_LEN; - debug(3, "Scene resource list contains %i entries", _resourceListCount); + debug(3, "Scene resource list contains %i entries", (int)_resourceListCount); _resourceList = (SceneResourceData *)calloc(_resourceListCount, sizeof(*_resourceList)); // Load scene resource list from raw scene @@ -1037,7 +1037,7 @@ void Scene::processSceneResources() { _bgMask.w = MIN(_bgMask.w, _vm->getDisplayWidth()); _bgMask.h = MIN(_bgMask.h, getHeight()); - debug(4, "BACKGROUND MASK width=%d height=%d length=%d", _bgMask.w, _bgMask.h, _bgMask.buf_len); + debug(4, "BACKGROUND MASK width=%d height=%d length=%d", _bgMask.w, _bgMask.h, (int)_bgMask.buf_len); break; case SAGA_STRINGS: debug(3, "Loading scene strings resource..."); @@ -1123,7 +1123,7 @@ void Scene::processSceneResources() { byte *palPtr = resourceData; if (resourceDataLength < 3 * PAL_ENTRIES) - error("Too small scene palette %i", resourceDataLength); + error("Too small scene palette %i", (int)resourceDataLength); for (uint16 c = 0; c < PAL_ENTRIES; c++) { pal[c].red = *palPtr++; diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp index 3d3a626e9f..7c203605ee 100644 --- a/engines/saga/script.cpp +++ b/engines/saga/script.cpp @@ -95,7 +95,7 @@ Script::Script(SagaEngine *vm) : _vm(vm) { } else if (resourceLength % S_LUT_ENTRYLEN_ITEDISK == 0) { _modulesLUTEntryLen = S_LUT_ENTRYLEN_ITEDISK; } else { - error("Script::Script() Invalid script lookup table length (%i)", resourceLength); + error("Script::Script() Invalid script lookup table length (%i)", (int)resourceLength); } // Calculate number of entries diff --git a/engines/saga/sthread.cpp b/engines/saga/sthread.cpp index a6724b588c..0a1a260cef 100644 --- a/engines/saga/sthread.cpp +++ b/engines/saga/sthread.cpp @@ -234,7 +234,7 @@ bool Script::runThread(ScriptThread *thread, uint instructionLimit) { _vm->_console->DebugPrintf("%s\n", operandName); \ } - debug(8, "Executing thread offset: %lu (%x) stack: %d", thread->_instructionOffset, operandChar, thread->pushedSize()); + debug(8, "Executing thread offset: %u (%x) stack: %d", thread->_instructionOffset, operandChar, thread->pushedSize()); operandName=""; switch (operandChar) { CASEOP(opNextBlock) |