aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
Diffstat (limited to 'saga')
-rw-r--r--saga/actor.cpp3
-rw-r--r--saga/events.cpp6
-rw-r--r--saga/font.cpp2
-rw-r--r--saga/game.cpp2
-rw-r--r--saga/gfx.cpp2
-rw-r--r--saga/ite_introproc.cpp6
-rw-r--r--saga/palanim.cpp4
-rw-r--r--saga/saga.cpp4
-rw-r--r--saga/scene.cpp48
-rw-r--r--saga/script.cpp12
-rw-r--r--saga/sfuncs.cpp1
-rw-r--r--saga/sndres.cpp6
-rw-r--r--saga/sprite.cpp4
13 files changed, 49 insertions, 51 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp
index 7da1fbd11c..12cad6eb41 100644
--- a/saga/actor.cpp
+++ b/saga/actor.cpp
@@ -570,7 +570,6 @@ bool Actor::validFollowerLocation(const Location &location) {
}
void Actor::setProtagState(int state) {
- debug(0, "STUB: setProtagState(%d)", state); //TODO: do it
_protagState = state;
}
@@ -793,7 +792,7 @@ void Actor::handleSpeech(int msec) {
if (_activeSpeech.slowModeCharIndex >= stringLength)
error("Wrong string index");
- debug(0 , "Slow string!");
+ warning("Slow string encountered!");
_activeSpeech.playingTime = 10 * talkspeed;
// 10 - fix it
diff --git a/saga/events.cpp b/saga/events.cpp
index 088caf90f5..378ff9a772 100644
--- a/saga/events.cpp
+++ b/saga/events.cpp
@@ -44,12 +44,12 @@
namespace Saga {
Events::Events(SagaEngine *vm) : _vm(vm), _initialized(false) {
- debug(0, "Initializing event subsystem...");
+ debug(8, "Initializing event subsystem...");
_initialized = true;
}
Events::~Events(void) {
- debug(0, "Shutting down event subsystem...");
+ debug(8, "Shutting down event subsystem...");
freeList();
}
@@ -409,7 +409,7 @@ int Events::handleOneShot(EVENT *event) {
switch (event->op) {
case EVENT_EXEC_BLOCKING:
case EVENT_EXEC_NONBLOCKING:
- debug(0, "Exec module number %d script entry number %d", event->param, event->param2);
+ debug(6, "Exec module number %d script entry number %d", event->param, event->param2);
sthread = _vm->_script->createThread(event->param, event->param2);
if (sthread == NULL) {
diff --git a/saga/font.cpp b/saga/font.cpp
index a364fb3ad2..124e7af6f4 100644
--- a/saga/font.cpp
+++ b/saga/font.cpp
@@ -60,7 +60,7 @@ Font::Font(SagaEngine *vm) : _vm(vm), _initialized(false) {
Font::~Font(void) {
// int i;
- debug(0, "Font::~Font(): Freeing fonts.");
+ debug(8, "Font::~Font(): Freeing fonts.");
/*
for (i = 0 ; i < FONT_COUNT ; i++) {
if (_fonts[i] != NULL) {
diff --git a/saga/game.cpp b/saga/game.cpp
index b410ec24b8..44e2b7cb53 100644
--- a/saga/game.cpp
+++ b/saga/game.cpp
@@ -1078,7 +1078,7 @@ int SagaEngine::loadGame(int gameNumber) {
return FAILURE;
}
- debug(0, "Opened resource file: %s", gameFileName);
+ debug(3, "Opened resource file: %s", gameFileName);
_gameFileContexts[i] = loadContext;
}
diff --git a/saga/gfx.cpp b/saga/gfx.cpp
index f4f2484605..cd26e03e0e 100644
--- a/saga/gfx.cpp
+++ b/saga/gfx.cpp
@@ -39,7 +39,7 @@ Gfx::Gfx(OSystem *system, int width, int height, GameDetector &detector) : _syst
_system->initSize(width, height);
_system->endGFXTransaction();
- debug(0, "Init screen %dx%d", width, height);
+ debug(5, "Init screen %dx%d", width, height);
// Convert surface data to R surface data
back_buf.pixels = calloc(1, width * height);
back_buf.w = width;
diff --git a/saga/ite_introproc.cpp b/saga/ite_introproc.cpp
index 1ef061b98b..00c2d7cb77 100644
--- a/saga/ite_introproc.cpp
+++ b/saga/ite_introproc.cpp
@@ -304,8 +304,8 @@ int Scene::ITEIntroAnimProc(int param) {
q_event = _vm->_events->queue(&event);
- debug(0, "Intro animation procedure started.");
- debug(0, "Linking animation resources...");
+ debug(3, "Intro animation procedure started.");
+ debug(3, "Linking animation resources...");
_vm->_anim->setFrameTime(0, ITE_INTRO_FRAMETIME);
@@ -332,7 +332,7 @@ int Scene::ITEIntroAnimProc(int param) {
_vm->_anim->setFlag(lastAnim, ANIM_ENDSCENE);
- debug(0, "Beginning animation playback.");
+ debug(3, "Beginning animation playback.");
// Begin the animation
event.type = ONESHOT_EVENT;
diff --git a/saga/palanim.cpp b/saga/palanim.cpp
index 1294789c64..9cb52a6ece 100644
--- a/saga/palanim.cpp
+++ b/saga/palanim.cpp
@@ -62,7 +62,7 @@ int PalAnim::loadPalAnim(const byte *resdata, size_t resdata_len) {
_entryCount = readS.readUint16();
- debug(0, "PalAnim::loadPalAnim(): Loading %d PALANIM entries.", _entryCount);
+ debug(3, "PalAnim::loadPalAnim(): Loading %d PALANIM entries.", _entryCount);
test_p = calloc(_entryCount, sizeof(PALANIM_ENTRY));
if (test_p == NULL) {
@@ -196,7 +196,7 @@ int PalAnim::freePalAnim() {
free(_entries[i].pal_index);
}
- debug(0, "PalAnim::freePalAnim(): Freeing entries.");
+ debug(3, "PalAnim::freePalAnim(): Freeing entries.");
free(_entries);
diff --git a/saga/saga.cpp b/saga/saga.cpp
index faf6028472..37dbdafc48 100644
--- a/saga/saga.cpp
+++ b/saga/saga.cpp
@@ -274,7 +274,7 @@ int SagaEngine::init(GameDetector &detector) {
_music->setAdlib(adlib);
if (!_musicEnabled) {
- debug(0, "Music disabled.");
+ debug(1, "Music disabled.");
}
@@ -286,7 +286,7 @@ int SagaEngine::init(GameDetector &detector) {
// Initialize system specific sound
_sound = new Sound(this, _mixer, _soundEnabled);
if (!_soundEnabled) {
- debug(0, "Sound disabled.");
+ debug(1, "Sound disabled.");
}
_interface->converseInit();
diff --git a/saga/scene.cpp b/saga/scene.cpp
index 1a852b65e2..df04853769 100644
--- a/saga/scene.cpp
+++ b/saga/scene.cpp
@@ -66,7 +66,7 @@ Scene::Scene(SagaEngine *vm) : _vm(vm), _initialized(false) {
// Load scene lookup table
- debug(0, "Loading scene LUT from resource %u.", RSC_ConvertID(_vm->getResourceDescription()->sceneLUTResourceId));
+ debug(3, "Loading scene LUT from resource %u.", RSC_ConvertID(_vm->getResourceDescription()->sceneLUTResourceId));
result = RSC_LoadResource(_sceneContext, RSC_ConvertID(_vm->getResourceDescription()->sceneLUTResourceId), &scene_lut_p, &scene_lut_len);
if (result != SUCCESS) {
warning("Scene::Scene(): Error: couldn't load scene LUT");
@@ -94,9 +94,9 @@ Scene::Scene(SagaEngine *vm) : _vm(vm), _initialized(false) {
_firstScene = _vm->getStartSceneNumber();
- debug(0, "First scene set to %d.", _firstScene);
+ debug(3, "First scene set to %d.", _firstScene);
- debug(0, "LUT has %d entries.", _sceneMax);
+ debug(3, "LUT has %d entries.", _sceneMax);
// Create scene module text list
_textList = _vm->textCreateList();
@@ -423,11 +423,11 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) {
break;
}
- debug(0, "Loading scene number %u:", _sceneNumber);
+ debug(3, "Loading scene number %u:", _sceneNumber);
// Load scene descriptor and resource list resources
if (_loadDescription) {
- debug(0, "Loading scene resource %u:", _sceneResourceId);
+ debug(3, "Loading scene resource %u:", _sceneResourceId);
if (loadSceneDescriptor(_sceneResourceId) != SUCCESS) {
error("Scene::loadScene(): Error reading scene descriptor");
@@ -437,7 +437,7 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) {
error("Scene::loadScene(): Error reading scene resource list");
}
} else {
- debug(0, "Loading memory scene resource.");
+ debug(3, "Loading memory scene resource.");
}
// Load resources from scene resource list
@@ -642,7 +642,7 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) {
_vm->_events->queue(&event);
}
- debug(0, "Scene started");
+ debug(3, "Scene started");
} else {
loadSceneParams->sceneProc(SCENE_BEGIN, this);
@@ -707,7 +707,7 @@ int Scene::loadSceneResourceList(uint32 reslist_rn) {
// Allocate memory for scene resource list
_resListEntries = resource_list_len / SAGA_RESLIST_ENTRY_LEN;
- debug(0, "Scene resource list contains %d entries.", _resListEntries);
+ debug(3, "Scene resource list contains %d entries.", _resListEntries);
_resList = (SCENE_RESLIST *)calloc(_resListEntries, sizeof(*_resList));
if (_resList == NULL) {
@@ -716,7 +716,7 @@ int Scene::loadSceneResourceList(uint32 reslist_rn) {
// Load scene resource list from raw scene
// resource table
- debug(0, "Loading scene resource list...");
+ debug(3, "Loading scene resource list...");
for (i = 0; i < _resListEntries; i++) {
_resList[i].res_number = readS.readUint16();
@@ -744,7 +744,7 @@ int Scene::processSceneResources() {
error("Scene::processSceneResources(): Multiple background resources encountered");
}
- debug(0, "Loading background resource.");
+ debug(3, "Loading background resource.");
_bg.res_buf = resourceData;
_bg.res_len = resourceDataLength;
_bg.loaded = 1;
@@ -766,7 +766,7 @@ int Scene::processSceneResources() {
if (_bgMask.loaded) {
error("Scene::ProcessSceneResources(): Duplicate background mask resource encountered");
}
- debug(0, "Loading BACKGROUND MASK resource.");
+ debug(3, "Loading BACKGROUND MASK resource.");
_bgMask.res_buf = resourceData;
_bgMask.res_len = resourceDataLength;
_bgMask.loaded = 1;
@@ -778,18 +778,18 @@ int Scene::processSceneResources() {
_bgMask.w = MIN(_bgMask.w, _vm->getDisplayWidth());
_bgMask.h = MIN(_bgMask.h, _vm->getClippedSceneHeight());
- debug(0, "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, _bgMask.buf_len);
break;
case SAGA_STRINGS:
- debug(0, "Loading scene strings resource...");
+ debug(3, "Loading scene strings resource...");
_vm->loadStrings(_sceneStrings, resourceData, resourceDataLength);
break;
case SAGA_OBJECT_MAP:
- debug(0, "Loading object map resource...");
+ debug(3, "Loading object map resource...");
_objectMap->load(resourceData, resourceDataLength);
break;
case SAGA_ACTION_MAP:
- debug(0, "Loading action map resource...");
+ debug(3, "Loading action map resource...");
_actionMap->load(resourceData, resourceDataLength);
break;
case SAGA_ISO_IMAGES:
@@ -797,7 +797,7 @@ int Scene::processSceneResources() {
error("Scene::ProcessSceneResources(): not Iso mode");
}
- debug(0, "Loading isometric images resource.");
+ debug(3, "Loading isometric images resource.");
_vm->_isoMap->loadImages(resourceData, resourceDataLength);
break;
@@ -806,7 +806,7 @@ int Scene::processSceneResources() {
error("Scene::ProcessSceneResources(): not Iso mode");
}
- debug(0, "Loading isometric map resource.");
+ debug(3, "Loading isometric map resource.");
_vm->_isoMap->loadMap(resourceData, resourceDataLength);
break;
@@ -815,7 +815,7 @@ int Scene::processSceneResources() {
error("Scene::ProcessSceneResources(): not Iso mode");
}
- debug(0, "Loading isometric platforms resource.");
+ debug(3, "Loading isometric platforms resource.");
_vm->_isoMap->loadPlatforms(resourceData, resourceDataLength);
break;
@@ -824,7 +824,7 @@ int Scene::processSceneResources() {
error("Scene::ProcessSceneResources(): not Iso mode");
}
- debug(0, "Loading isometric metatiles resource.");
+ debug(3, "Loading isometric metatiles resource.");
_vm->_isoMap->loadMetaTiles(resourceData, resourceDataLength);
break;
@@ -838,7 +838,7 @@ int Scene::processSceneResources() {
{
uint16 animId = _resList[i].res_type - SAGA_ANIM_1;
- debug(0, "Loading animation resource animId=%i", animId);
+ debug(3, "Loading animation resource animId=%i", animId);
_vm->_anim->load(animId, resourceData, resourceDataLength);
}
@@ -848,16 +848,16 @@ int Scene::processSceneResources() {
error("Scene::ProcessSceneResources(): not Iso mode");
}
- debug(0, "Loading isometric multi resource.");
+ debug(3, "Loading isometric multi resource.");
_vm->_isoMap->loadMulti(resourceData, resourceDataLength);
break;
case SAGA_PAL_ANIM:
- debug(0, "Loading palette animation resource.");
+ debug(3, "Loading palette animation resource.");
_vm->_palanim->loadPalAnim(resourceData, resourceDataLength);
break;
case SAGA_ENTRY:
- debug(0, "Loading entry list resource...");
+ debug(3, "Loading entry list resource...");
loadSceneEntryList(resourceData, resourceDataLength);
break;
case SAGA_FACES:
@@ -914,7 +914,7 @@ void Scene::endScene() {
if (!_sceneLoaded)
return;
- debug(0, "Ending scene...");
+ debug(3, "Ending scene...");
if (_sceneProc != NULL) {
_sceneProc(SCENE_END, this);
diff --git a/saga/script.cpp b/saga/script.cpp
index cba0233239..7227c772ef 100644
--- a/saga/script.cpp
+++ b/saga/script.cpp
@@ -76,7 +76,7 @@ Script::Script(SagaEngine *vm) : _vm(vm){
_commonBuffer = (byte*)malloc(_commonBufferSize);
memset(_commonBuffer, 0, _commonBufferSize);
- debug(0, "Initializing scripting subsystem");
+ debug(8, "Initializing scripting subsystem");
// Load script resource file context
_scriptContext = _vm->getFileContext(GAME_SCRIPTFILE, 0);
if (_scriptContext == NULL) {
@@ -88,7 +88,7 @@ Script::Script(SagaEngine *vm) : _vm(vm){
error("Script::Script() Couldn't get resource file context");
}
- debug(0, "Loading module LUT from resource %u.", _vm->getResourceDescription()->moduleLUTResourceId);
+ debug(3, "Loading module LUT from resource %u.", _vm->getResourceDescription()->moduleLUTResourceId);
result = RSC_LoadResource(resourceContext, _vm->getResourceDescription()->moduleLUTResourceId, &resourcePointer, &resourceLength);
if (result != SUCCESS) {
error("Script::Script() Couldn't load module LUT resource");
@@ -106,7 +106,7 @@ Script::Script(SagaEngine *vm) : _vm(vm){
// Calculate number of entries
_modulesCount = resourceLength / _modulesLUTEntryLen;
- debug(0, "LUT has %d entries.", _modulesCount);
+ debug(3, "LUT has %d entries.", _modulesCount);
// Allocate space for logical LUT
_modules = (ModuleData *)malloc(_modulesCount * sizeof(*_modules));
@@ -171,7 +171,7 @@ Script::~Script() {
error("Script not initialized");
}
- debug(0, "Shutting down scripting subsystem.");
+ debug(8, "Shutting down scripting subsystem.");
_mainStrings.freeMem();
@@ -198,7 +198,7 @@ void Script::loadModule(int scriptModuleNumber) {
}
// Initialize script data structure
- debug(0, "Loading script module #%d", scriptModuleNumber);
+ debug(3, "Loading script module #%d", scriptModuleNumber);
result = RSC_LoadResource(_scriptContext, _modules[scriptModuleNumber].scriptResourceId, &resourcePointer, &resourceLength);
if (result != SUCCESS) {
@@ -247,7 +247,7 @@ void Script::freeModules() {
void Script::loadModuleBase(ModuleData &module, const byte *resourcePointer, size_t resourceLength) {
int i;
- debug(0, "Loading module base...");
+ debug(3, "Loading module base...");
module.moduleBase = (byte*)malloc(resourceLength);
module.moduleBaseSize = resourceLength;
diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp
index 56ec2f69c3..cfaa4d2f99 100644
--- a/saga/sfuncs.cpp
+++ b/saga/sfuncs.cpp
@@ -690,7 +690,6 @@ void Script::sfEnableZone(SCRIPTFUNC_PARAMS) {
int16 flag = thread->pop();
HitZone *hitZone;
- debug(0, "sfEnableZone(%d, %d)", objectId, flag);
if (objectTypeId(objectId) == kGameObjectHitZone) {
hitZone = _vm->_scene->_objectMap->getHitZone(objectIdToIndex(objectId));
} else {
diff --git a/saga/sndres.cpp b/saga/sndres.cpp
index 6b12285a91..57852ea254 100644
--- a/saga/sndres.cpp
+++ b/saga/sndres.cpp
@@ -59,10 +59,10 @@ SndRes::SndRes(SagaEngine *vm) : _vm(vm) {
int SndRes::playSound(uint32 sound_rn, int volume, bool loop) {
SOUNDBUFFER snd_buffer;
- debug(0, "SndRes::playSound(%ld)", sound_rn);
+ debug(4, "SndRes::playSound(%ld)", sound_rn);
if (load(_sfx_ctxt, sound_rn, &snd_buffer) != SUCCESS) {
- debug(0, "Failed to load sound");
+ warning("Failed to load sound");
return FAILURE;
}
@@ -76,7 +76,7 @@ int SndRes::playVoice(uint32 voice_rn) {
int result = FAILURE;
bool voiceFile = false;
- debug(0, "SndRes::playVoice(%ld)", voice_rn);
+ debug(4, "SndRes::playVoice(%ld)", voice_rn);
if (_vm->getGameType() == GType_ITE && voice_rn == 4) {
// The Wyrmkeep release of Inherit the Earth provides a
diff --git a/saga/sprite.cpp b/saga/sprite.cpp
index 64447eefa0..6ceca6f12d 100644
--- a/saga/sprite.cpp
+++ b/saga/sprite.cpp
@@ -37,7 +37,7 @@
namespace Saga {
Sprite::Sprite(SagaEngine *vm) : _vm(vm), _initialized(false) {
- debug(0, "Initializing sprite subsystem...");
+ debug(8, "Initializing sprite subsystem...");
// Load sprite module resource context
_spriteContext = _vm->getFileContext(GAME_RESOURCEFILE, 0);
@@ -62,7 +62,7 @@ Sprite::~Sprite(void) {
return;
}
- debug(0, "Shutting down sprite subsystem...");
+ debug(8, "Shutting down sprite subsystem...");
_mainSprites.freeMem();
free(_decodeBuf);
}