aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/actor_clues.cpp14
-rw-r--r--engines/bladerunner/actor_walk.cpp15
-rw-r--r--engines/bladerunner/archive.cpp4
-rw-r--r--engines/bladerunner/audio_player.cpp2
-rw-r--r--engines/bladerunner/bladerunner.cpp28
-rw-r--r--engines/bladerunner/bladerunner.h7
-rw-r--r--engines/bladerunner/chapters.cpp13
-rw-r--r--engines/bladerunner/dialogue_menu.cpp5
-rw-r--r--engines/bladerunner/font.cpp4
-rw-r--r--engines/bladerunner/game_flags.cpp8
-rw-r--r--engines/bladerunner/image.cpp4
-rw-r--r--engines/bladerunner/regions.cpp1
-rw-r--r--engines/bladerunner/script/scene/rc01.cpp7
-rw-r--r--engines/bladerunner/script/scene/rc03.cpp4
-rw-r--r--engines/bladerunner/script/scene_script.h2
-rw-r--r--engines/bladerunner/set.cpp6
-rw-r--r--engines/bladerunner/shape.cpp17
-rw-r--r--engines/bladerunner/slice_animations.cpp2
-rw-r--r--engines/bladerunner/ui/esper.cpp5
-rw-r--r--engines/bladerunner/vqa_decoder.cpp78
-rw-r--r--engines/bladerunner/vqa_player.cpp7
-rw-r--r--engines/bladerunner/vqa_player.h2
22 files changed, 65 insertions, 170 deletions
diff --git a/engines/bladerunner/actor_clues.cpp b/engines/bladerunner/actor_clues.cpp
index d7833d7ebf..1350b8d455 100644
--- a/engines/bladerunner/actor_clues.cpp
+++ b/engines/bladerunner/actor_clues.cpp
@@ -70,7 +70,7 @@ void ActorClues::acquire(int clueId, bool flag2, int fromActorId) {
_clues[clueIndex].flags = (_clues[clueIndex].flags & ~0x02) | ((flag2 << 1) & 0x02);
_clues[clueIndex].fromActorId = fromActorId;
- debug("Actor acquired clue: \"%s\" from %d", _vm->_crimesDatabase->getClueText(clueId), fromActorId);
+ // debug("Actor acquired clue: \"%s\" from %d", _vm->_crimesDatabase->getClueText(clueId), fromActorId);
}
void ActorClues::lose(int clueId) {
@@ -83,11 +83,7 @@ bool ActorClues::isAcquired(int clueId) const {
if (clueIndex == -1) {
return false;
}
-// #if BLADERUNNER_DEBUG_GAME
-// return true;
-// #else
return _clues[clueIndex].flags & 0x01;
-// #endif
}
int ActorClues::getWeight(int clueId) const {
@@ -335,8 +331,6 @@ int ActorClues::findClueIndex(int clueId) const {
void ActorClues::add(int actorId, int clueId, int weight, bool acquired, bool unknownFlag, int fromActorId) {
assert(_count < _maxCount);
- //debug("Actor %d added clue: \"%s\" from %d", actorId, _vm->_crimesDatabase->getClueText(clueId), fromActorId);
-
_clues[_count].clueId = clueId;
_clues[_count].weight = weight;
@@ -353,9 +347,9 @@ bool ActorClues::exists(int clueId) const {
}
void ActorClues::remove(int index) {
- if (_vm->_crimesDatabase) {
- debug("Actor removed clue: \"%s\"", _vm->_crimesDatabase->getClueText(_clues[index].clueId));
- }
+ // if (_vm->_crimesDatabase) {
+ // debug("Actor removed clue: \"%s\"", _vm->_crimesDatabase->getClueText(_clues[index].clueId));
+ // }
_clues[index].clueId = -1;
_clues[index].weight = 0;
diff --git a/engines/bladerunner/actor_walk.cpp b/engines/bladerunner/actor_walk.cpp
index 25daef0795..675828284c 100644
--- a/engines/bladerunner/actor_walk.cpp
+++ b/engines/bladerunner/actor_walk.cpp
@@ -364,12 +364,12 @@ bool ActorWalk::addNearActors(int skipActorId) {
bool added = false;
int setId = _vm->_scene->getSetId();
for (int i = 0; i < (int)_vm->_gameInfo->getActorCount(); i++) {
- // TODO: remove null check after implemetantion of all actors
- if (_vm->_actors[i] != nullptr
- && _vm->_actors[skipActorId] != nullptr
- && _vm->_actors[i]->getSetId() == setId
- && i != skipActorId) {
+ assert(_vm->_actors[i] != nullptr);
+ if (_vm->_actors[skipActorId] != nullptr
+ && _vm->_actors[i]->getSetId() == setId
+ && i != skipActorId
+ ) {
if (_nearActors.contains(i)) {
_nearActors.setVal(i, false);
} else if (_vm->_actors[skipActorId]->distanceFromActor(i) <= 48.0f) {
@@ -385,8 +385,9 @@ void ActorWalk::obstaclesAddNearActors(int actorId) const {
Vector3 position = _vm->_actors[actorId]->getPosition();
for (Common::HashMap<int, bool>::const_iterator it = _nearActors.begin(); it != _nearActors.end(); ++it) {
Actor *otherActor = _vm->_actors[it->_key];
- // TODO: remove null check after implemetantion of all actors
- if (otherActor == nullptr || otherActor->isRetired()) {
+ assert(otherActor != nullptr);
+
+ if ( otherActor->isRetired()) {
continue;
}
Vector3 otherPosition = otherActor->getPosition();
diff --git a/engines/bladerunner/archive.cpp b/engines/bladerunner/archive.cpp
index 1dba3ab410..18134c70e5 100644
--- a/engines/bladerunner/archive.cpp
+++ b/engines/bladerunner/archive.cpp
@@ -55,10 +55,6 @@ bool MIXArchive::open(const Common::String &filename) {
_entries[i].offset = _fd.readUint32LE();
_entries[i].length = _fd.readUint32LE();
-#if BLADERUNNER_DEBUG_CONSOLE
- debug("%08x %-12d %-12d", _entries[i].hash, _entries[i].offset, _entries[i].length);
-#endif
-
// Verify that the entries are sorted by id. Note that id is signed.
if (i > 0) {
assert(_entries[i].hash > _entries[i - 1].hash);
diff --git a/engines/bladerunner/audio_player.cpp b/engines/bladerunner/audio_player.cpp
index 5186888dd2..2c4b75cc13 100644
--- a/engines/bladerunner/audio_player.cpp
+++ b/engines/bladerunner/audio_player.cpp
@@ -278,8 +278,6 @@ int AudioPlayer::playAud(const Common::String &name, int volume, int panFrom, in
actualVolume = _sfxVolume * volume / 100;
}
- // debug("PlayStream: %s", name.c_str());
-
int channel = _vm->_audioMixer->play(
Audio::Mixer::kPlainSoundType,
audioStream,
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp
index 49450e6367..d66836510c 100644
--- a/engines/bladerunner/bladerunner.cpp
+++ b/engines/bladerunner/bladerunner.cpp
@@ -294,13 +294,7 @@ Common::Error BladeRunnerEngine::run() {
return Common::Error(Common::kUnknownError, "Failed to initialize resources");
}
-
-
-#if BLADERUNNER_DEBUG_GAME
- {
-#else
if (warnUserAboutUnsupportedGame()) {
-#endif
if (hasSavegames) {
_kia->_forceOpen = true;
_kia->open(kKIASectionLoad);
@@ -1299,8 +1293,6 @@ void BladeRunnerEngine::handleMouseAction(int x, int y, bool mainButton, bool bu
}
void BladeRunnerEngine::handleMouseClickExit(int exitId, int x, int y, bool buttonDown) {
- debug("clicked on exit %d %d %d", exitId, x, y);
-
if (_isWalkingInterruptible && exitId != _walkingToExitId) {
_isWalkingInterruptible = false;
_interruptWalking = true;
@@ -1333,8 +1325,6 @@ void BladeRunnerEngine::handleMouseClickExit(int exitId, int x, int y, bool butt
}
void BladeRunnerEngine::handleMouseClickRegion(int regionId, int x, int y, bool buttonDown) {
- debug("clicked on region %d %d %d", regionId, x, y);
-
if (_isWalkingInterruptible && regionId != _walkingToRegionId) {
_isWalkingInterruptible = false;
_interruptWalking = true;
@@ -1368,7 +1358,6 @@ void BladeRunnerEngine::handleMouseClickRegion(int regionId, int x, int y, bool
void BladeRunnerEngine::handleMouseClick3DObject(int objectId, bool buttonDown, bool isClickable, bool isTarget) {
const Common::String &objectName = _scene->objectGetName(objectId);
- debug("Clicked on object %s", objectName.c_str());
if (_isWalkingInterruptible && objectId != _walkingToObjectId) {
_isWalkingInterruptible = false;
@@ -1423,8 +1412,6 @@ void BladeRunnerEngine::handleMouseClick3DObject(int objectId, bool buttonDown,
}
void BladeRunnerEngine::handleMouseClickEmpty(int x, int y, Vector3 &scenePosition, bool buttonDown) {
- debug("Clicked on nothing %f, %f, %f", scenePosition.x, scenePosition.y, scenePosition.z);
-
if (_isWalkingInterruptible) {
_isWalkingInterruptible = false;
_interruptWalking = true;
@@ -1503,8 +1490,6 @@ void BladeRunnerEngine::handleMouseClickEmpty(int x, int y, Vector3 &scenePositi
}
void BladeRunnerEngine::handleMouseClickItem(int itemId, bool buttonDown) {
- debug("Clicked on item %d", itemId);
-
if (_isWalkingInterruptible && itemId != _walkingToItemId) {
_isWalkingInterruptible = false;
_interruptWalking = true;
@@ -1559,8 +1544,6 @@ void BladeRunnerEngine::handleMouseClickItem(int itemId, bool buttonDown) {
}
void BladeRunnerEngine::handleMouseClickActor(int actorId, bool mainButton, bool buttonDown, Vector3 &scenePosition, int x, int y) {
- debug("Clicked on actor %d", actorId);
-
if (_isWalkingInterruptible && actorId != _walkingToActorId) {
_isWalkingInterruptible = false;
_interruptWalking = true;
@@ -1699,7 +1682,7 @@ bool BladeRunnerEngine::closeArchive(const Common::String &name) {
}
}
- debug("closeArchive: Archive %s not open.", name.c_str());
+ warning("closeArchive: Archive %s not open.", name.c_str());
return false;
}
@@ -1733,10 +1716,8 @@ Common::SeekableReadStream *BladeRunnerEngine::getResourceStream(const Common::S
continue;
}
- if (false) {
- debug("getResource: Searching archive %s for %s.", _archives[i].getName().c_str(), name.c_str());
- }
-
+ // debug("getResource: Searching archive %s for %s.", _archives[i].getName().c_str(), name.c_str());
+
Common::SeekableReadStream *stream = _archives[i].createReadStreamForMember(name);
if (stream) {
return stream;
@@ -1755,7 +1736,6 @@ void BladeRunnerEngine::playerLosesControl() {
if (++_playerLosesControlCounter == 1) {
_mouse->disable();
}
- // debug("Player Lost Control (%d)", _playerLosesControlCounter);
}
void BladeRunnerEngine::playerGainsControl() {
@@ -1766,8 +1746,6 @@ void BladeRunnerEngine::playerGainsControl() {
if (_playerLosesControlCounter > 0)
--_playerLosesControlCounter;
- // debug("Player Gained Control (%d)", _playerLosesControlCounter);
-
if (_playerLosesControlCounter == 0) {
_mouse->enable();
}
diff --git a/engines/bladerunner/bladerunner.h b/engines/bladerunner/bladerunner.h
index eb59bc2734..3f9b33dcb2 100644
--- a/engines/bladerunner/bladerunner.h
+++ b/engines/bladerunner/bladerunner.h
@@ -35,9 +35,8 @@
#include "graphics/surface.h"
-//TODO: remove these when game is playable
+//TODO: change this to debugflag
#define BLADERUNNER_DEBUG_CONSOLE 0
-#define BLADERUNNER_DEBUG_GAME 0
namespace Common {
struct Event;
@@ -105,11 +104,7 @@ class ZBuffer;
class BladeRunnerEngine : public Engine {
public:
-#if BLADERUNNER_DEBUG_GAME
- static const int kArchiveCount = 100;
-#else
static const int kArchiveCount = 11; // +1 to original value (10) to accommodate for SUBTITLES.MIX resource
-#endif
static const int kActorCount = 100;
static const int kActorVoiceOver = kActorCount - 1;
diff --git a/engines/bladerunner/chapters.cpp b/engines/bladerunner/chapters.cpp
index 16d084b970..afe04139b6 100644
--- a/engines/bladerunner/chapters.cpp
+++ b/engines/bladerunner/chapters.cpp
@@ -44,19 +44,6 @@ bool Chapters::enterChapter(int chapter) {
if (!_vm->openArchive(Common::String::format("OUTTAKE%d.MIX", id)))
return false;
-#if BLADERUNNER_DEBUG_GAME
- _vm->openArchive("OUTTAKE1.MIX");
- _vm->openArchive("OUTTAKE2.MIX");
- _vm->openArchive("OUTTAKE3.MIX");
- _vm->openArchive("OUTTAKE4.MIX");
- _vm->openArchive("VQA1.MIX");
- _vm->openArchive("VQA2.MIX");
- _vm->openArchive("VQA3.MIX");
- _vm->openArchive("1.TLK");
- _vm->openArchive("2.TLK");
- _vm->openArchive("3.TLK");
-#endif
-
_chapter = chapter;
_hasOpenResources = true;
return true;
diff --git a/engines/bladerunner/dialogue_menu.cpp b/engines/bladerunner/dialogue_menu.cpp
index 65d9bf8ebf..1901503a2f 100644
--- a/engines/bladerunner/dialogue_menu.cpp
+++ b/engines/bladerunner/dialogue_menu.cpp
@@ -76,7 +76,6 @@ bool DialogueMenu::show() {
}
bool DialogueMenu::showAt(int x, int y) {
- debug("DialogueMenu::showAt %d %d %d", _isVisible, x, y);
if (_isVisible) {
return false;
}
@@ -253,7 +252,7 @@ int DialogueMenu::queryInput() {
}
}
- debug("DM Query Input: %d %s", answer, _items[_selectedItemIndex].text.c_str());
+ // debug("DM Query Input: %d %s", answer, _items[_selectedItemIndex].text.c_str());
return answer;
}
@@ -382,7 +381,6 @@ void DialogueMenu::calculatePosition(int unusedX, int unusedY) {
_screenY = CLIP(_screenY, 0, 480 - h);
_fadeInItemIndex = 0;
- debug("calculatePosition: %d %d %d %d %d", _screenX, _screenY, _centerX, _centerY, _maxItemWidth);
}
void DialogueMenu::mouseUp() {
@@ -454,7 +452,6 @@ void DialogueMenu::load(SaveFileReadStream &f) {
_neverRepeatValues[_neverRepeatListSize] = answer[i];
_neverRepeatWasSelected[_neverRepeatListSize] = value;
++_neverRepeatListSize;
- debug("- %i, %i", answer[i], value);
}
}
#else
diff --git a/engines/bladerunner/font.cpp b/engines/bladerunner/font.cpp
index 5d9274f59c..688bed1c45 100644
--- a/engines/bladerunner/font.cpp
+++ b/engines/bladerunner/font.cpp
@@ -48,7 +48,7 @@ bool Font::open(const Common::String &fileName, int screenWidth, int screenHeigh
Common::ScopedPtr<Common::SeekableReadStream> stream(_vm->getResourceStream(fileName));
if (!stream) {
- debug("Font::open failed to open '%s'", fileName.c_str());
+ warning("Font::open failed to open '%s'", fileName.c_str());
return false;
}
@@ -58,7 +58,7 @@ bool Font::open(const Common::String &fileName, int screenWidth, int screenHeigh
_dataSize = stream->readUint32LE();
_data = new uint16[_dataSize];
if (!_data) {
- debug("Font::open failed to allocate font buffer");
+ warning("Font::open failed to allocate font buffer");
return false;
}
diff --git a/engines/bladerunner/game_flags.cpp b/engines/bladerunner/game_flags.cpp
index e2ae3c3259..76afe17b52 100644
--- a/engines/bladerunner/game_flags.cpp
+++ b/engines/bladerunner/game_flags.cpp
@@ -52,20 +52,12 @@ void GameFlags::setFlagCount(int count) {
}
void GameFlags::set(int flag) {
-#if BLADERUNNER_DEBUG_CONSOLE
- debug("GameFlags::set(%d)", flag);
-#endif
-
assert(flag >= 0 && flag <= _flagCount);
_flags[flag / 32] |= (1 << (flag % 32));
}
void GameFlags::reset(int flag) {
-#if BLADERUNNER_DEBUG_CONSOLE
- debug("GameFlags::reset(%d)", flag);
-#endif
-
assert(flag >= 0 && flag <= _flagCount);
_flags[flag / 32] &= ~(1 << (flag % 32));
diff --git a/engines/bladerunner/image.cpp b/engines/bladerunner/image.cpp
index 925b0269e3..e6b55280a7 100644
--- a/engines/bladerunner/image.cpp
+++ b/engines/bladerunner/image.cpp
@@ -40,7 +40,7 @@ Image::~Image() {
bool Image::open(const Common::String &name) {
Common::SeekableReadStream *stream = _vm->getResourceStream(name);
if (!stream) {
- debug("Image::open failed to open '%s'\n", name.c_str());
+ warning("Image::open failed to open '%s'\n", name.c_str());
return false;
}
@@ -61,7 +61,7 @@ bool Image::open(const Common::String &name) {
assert(data);
if (strcmp(tag, "LZO") == 0) {
- debug("LZO");
+ warning("LZO image decompression is not implemented");
} else if (strcmp(tag, "LCW") == 0) {
decompress_lcw(buf, bufSize, (uint8 *)data, dataSize);
}
diff --git a/engines/bladerunner/regions.cpp b/engines/bladerunner/regions.cpp
index f74186240b..3cd08b13eb 100644
--- a/engines/bladerunner/regions.cpp
+++ b/engines/bladerunner/regions.cpp
@@ -81,7 +81,6 @@ int Regions::getRegionAtXY(int x, int y) const {
// Common::Rect::contains is exclusive of right and bottom but
// Blade Runner wants inclusive, so we adjust the edges.
- // TODO: Roll our own rect class?
Common::Rect r = _regions[i].rectangle;
r.right++;
r.bottom++;
diff --git a/engines/bladerunner/script/scene/rc01.cpp b/engines/bladerunner/script/scene/rc01.cpp
index 37241cf9f3..a371086f81 100644
--- a/engines/bladerunner/script/scene/rc01.cpp
+++ b/engines/bladerunner/script/scene/rc01.cpp
@@ -47,13 +47,6 @@ enum kRC01Regions {
};
void SceneScriptRC01::InitializeScene() {
-#if BLADERUNNER_DEBUG_GAME
- //TODO: not part of game, remove
- Game_Flag_Set(kFlagIntroPlayed); // force skip intro
- Game_Flag_Set(kFlagRC02toRC01); // no landing
- // Set_Enter(kSetPS10_PS11_PS12_PS13, 73);
-#endif
-
if (!Game_Flag_Query(kFlagIntroPlayed)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
diff --git a/engines/bladerunner/script/scene/rc03.cpp b/engines/bladerunner/script/scene/rc03.cpp
index e539bd9f7a..a8696c75ea 100644
--- a/engines/bladerunner/script/scene/rc03.cpp
+++ b/engines/bladerunner/script/scene/rc03.cpp
@@ -222,7 +222,7 @@ void SceneScriptRC03::SceneFrameAdvanced(int frame) {
void SceneScriptRC03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
}
-void SceneScriptRC03::sub_402834() {
+void SceneScriptRC03::talkWithSteele() {
Actor_Face_Actor(kActorSteele, kActorMcCoy, true);
Actor_Says(kActorSteele, 1820, 3);
Actor_Face_Actor(kActorMcCoy, kActorSteele, true);
@@ -284,7 +284,7 @@ void SceneScriptRC03::PlayerWalkedIn() {
} else {
Actor_Set_At_Waypoint(kActorSteele, 203, 0);
}
- sub_402834();
+ talkWithSteele();
Async_Actor_Walk_To_Waypoint(kActorSteele, 174, 0, 0);
Actor_Set_Goal_Number(kActorIzo, 200);
Player_Gains_Control();
diff --git a/engines/bladerunner/script/scene_script.h b/engines/bladerunner/script/scene_script.h
index a28bee35c0..efe31b3b4e 100644
--- a/engines/bladerunner/script/scene_script.h
+++ b/engines/bladerunner/script/scene_script.h
@@ -416,7 +416,7 @@ DECLARE_SCRIPT(RC02)
END_SCRIPT
DECLARE_SCRIPT(RC03)
- void sub_402834();
+ void talkWithSteele();
END_SCRIPT
DECLARE_SCRIPT(RC04)
diff --git a/engines/bladerunner/set.cpp b/engines/bladerunner/set.cpp
index 8111d0b38c..227dd81adb 100644
--- a/engines/bladerunner/set.cpp
+++ b/engines/bladerunner/set.cpp
@@ -88,8 +88,6 @@ bool Set::open(const Common::String &name) {
_objects[i].unknown1 = 0;
_objects[i].isTarget = 0;
s->skip(4);
-
- // debug("OBJECT: %s [%d%d%d%d]", _objects[i]._name, _objects[i]._isObstacle, _objects[i]._isClickable, _objects[i]._isHotMouse, _objects[i]._isTarget);
}
_walkboxCount = s->readUint32LE();
@@ -112,8 +110,6 @@ bool Set::open(const Common::String &name) {
_walkboxes[i].vertices[j] = Vector3(x, _walkboxes[i].altitude, z);
}
-
- // debug("WALKBOX: %s", _walkboxes[i]._name);
}
_vm->_lights->reset();
@@ -220,7 +216,7 @@ int Set::findObject(const Common::String &objectName) const {
}
}
- debug("Set::findObject didn't find \"%s\"", objectName.c_str());
+ warning("Set::findObject didn't find \"%s\"", objectName.c_str());
return -1;
}
diff --git a/engines/bladerunner/shape.cpp b/engines/bladerunner/shape.cpp
index 45843447ff..828a8b2f39 100644
--- a/engines/bladerunner/shape.cpp
+++ b/engines/bladerunner/shape.cpp
@@ -46,13 +46,13 @@ Shape::~Shape() {
bool Shape::open(const Common::String &container, int index) {
Common::ScopedPtr<Common::SeekableReadStream> stream(_vm->getResourceStream(container));
if (!stream) {
- debug("Shape::open failed to open '%s'", container.c_str());
+ warning("Shape::open failed to open '%s'", container.c_str());
return false;
}
uint32 count = stream->readUint32LE();
if (index < 0 || (uint32)index >= count) {
- debug("Shape::open invalid index %d (count %u)", index, count);
+ warning("Shape::open invalid index %d (count %u)", index, count);
return false;
}
@@ -63,7 +63,7 @@ bool Shape::open(const Common::String &container, int index) {
size = stream->readUint32LE();
if (size != width * height * 2) {
- debug("Shape::open size mismatch (w %d, h %d, sz %d)", width, height, size);
+ warning("Shape::open size mismatch (w %d, h %d, sz %d)", width, height, size);
return false;
}
@@ -82,7 +82,7 @@ bool Shape::open(const Common::String &container, int index) {
_data = new byte[size];
if (stream->read(_data, size) != size) {
- debug("Shape::open error reading shape %d (w %d, h %d, sz %d)", index, width, height, size);
+ warning("Shape::open error reading shape %d (w %d, h %d, sz %d)", index, width, height, size);
return false;
}
@@ -90,24 +90,15 @@ bool Shape::open(const Common::String &container, int index) {
}
void Shape::draw(Graphics::Surface &surface, int x, int y) const {
- // debug("x=%d, y=%d", x, y);
- // debug("w=%d, h=%d", _width, _height);
-
int src_x = CLIP(-x, 0, _width);
int src_y = CLIP(-y, 0, _height);
- // debug("src_x=%d, src_y=%d", src_x, src_y);
-
int dst_x = CLIP<int>(x, 0, surface.w);
int dst_y = CLIP<int>(y, 0, surface.h);
- // debug("dst_x=%d, dst_y=%d", dst_x, dst_y);
-
int rect_w = MIN(CLIP(_width + x, 0, _width), surface.w - x);
int rect_h = MIN(CLIP(_height + y, 0, _height), surface.h - y);
- // debug("rect_w=%d, rect_h=%d", rect_w, rect_h);
-
if (rect_w == 0 || rect_h == 0) {
return;
}
diff --git a/engines/bladerunner/slice_animations.cpp b/engines/bladerunner/slice_animations.cpp
index 8678c1726b..274d39fc9f 100644
--- a/engines/bladerunner/slice_animations.cpp
+++ b/engines/bladerunner/slice_animations.cpp
@@ -139,7 +139,7 @@ bool SliceAnimations::PageFile::open(const Common::String &name) {
_pageOffsets[pageNumber] = dataOffset + i * _sliceAnimations->_pageSize;
}
- debug(5, "PageFile::Open: page file \"%s\" opened with %d pages", name.c_str(), pageCount);
+ // debug(5, "PageFile::Open: page file \"%s\" opened with %d pages", name.c_str(), pageCount);
return true;
}
diff --git a/engines/bladerunner/ui/esper.cpp b/engines/bladerunner/ui/esper.cpp
index 51e956cbb2..4b6b7f04c0 100644
--- a/engines/bladerunner/ui/esper.cpp
+++ b/engines/bladerunner/ui/esper.cpp
@@ -246,7 +246,7 @@ void ESPER::tick() {
}
void ESPER::resume() {
- //TODO
+ // TODO
}
void ESPER::addPhoto(const char *name, int photoId, int shapeId) {
@@ -524,14 +524,11 @@ void ESPER::activate(bool withOpening) {
void ESPER::setStateMain(EsperMainStates state) {
if (_isOpen) {
_stateMain = state;
- debug("ESPER main state: %d", _stateMain);
-
}
}
void ESPER::setStatePhoto(EsperPhotoStates state) {
_statePhoto = state;
- debug("ESPER photo state: %d", _statePhoto);
}
void ESPER::wait(int timeout) {
diff --git a/engines/bladerunner/vqa_decoder.cpp b/engines/bladerunner/vqa_decoder.cpp
index 65afef89a0..05cabfcb9b 100644
--- a/engines/bladerunner/vqa_decoder.cpp
+++ b/engines/bladerunner/vqa_decoder.cpp
@@ -206,15 +206,6 @@ bool VQADecoder::loadStream(Common::SeekableReadStream *s) {
_videoTrack = new VQAVideoTrack(this);
_audioTrack = new VQAAudioTrack(this);
-#if BLADERUNNER_DEBUG_CONSOLE
- for (int i = 0; i != _loopInfo.loopCount; ++i) {
- debug("LOOP %2d: %4d %4d %s", i,
- _loopInfo.loops[i].begin,
- _loopInfo.loops[i].end,
- _loopInfo.loops[i].name.c_str());
- }
-#endif
-
return true;
}
@@ -319,31 +310,30 @@ bool VQADecoder::readVQHD(Common::SeekableReadStream *s, uint32 size) {
_header.maxCBFZSize = s->readUint32LE();
_header.unk5 = s->readUint32LE();
- // if (_header.unk3 || _header.unk4 != 4 || _header.unk5 || _header.flags != 0x0014)
- if (false) {
- debug("_header.version %d", _header.version);
- debug("_header.flags %04x", _header.flags);
- debug("_header.numFrames %d", _header.numFrames);
- debug("_header.width %d", _header.width);
- debug("_header.height %d", _header.height);
- debug("_header.blockW %d", _header.blockW);
- debug("_header.blockH %d", _header.blockH);
- debug("_header.frameRate %d", _header.frameRate);
- debug("_header.cbParts %d", _header.cbParts);
- debug("_header.colors %d", _header.colors);
- debug("_header.maxBlocks %d", _header.maxBlocks);
- debug("_header.offsetX %d", _header.offsetX);
- debug("_header.offsetY %d", _header.offsetY);
- debug("_header.maxVPTRSize %d", _header.maxVPTRSize);
- debug("_header.freq %d", _header.freq);
- debug("_header.channels %d", _header.channels);
- debug("_header.bits %d", _header.bits);
- debug("_header.unk3 %d", _header.unk3);
- debug("_header.unk4 %d", _header.unk4);
- debug("_header.maxCBFZSize %d", _header.maxCBFZSize);
- debug("_header.unk5 %d", _header.unk5);
- debug("\n");
- }
+ // if (_header.unk3 || _header.unk4 != 4 || _header.unk5 || _header.flags != 0x0014) {
+ // debug("_header.version %d", _header.version);
+ // debug("_header.flags %04x", _header.flags);
+ // debug("_header.numFrames %d", _header.numFrames);
+ // debug("_header.width %d", _header.width);
+ // debug("_header.height %d", _header.height);
+ // debug("_header.blockW %d", _header.blockW);
+ // debug("_header.blockH %d", _header.blockH);
+ // debug("_header.frameRate %d", _header.frameRate);
+ // debug("_header.cbParts %d", _header.cbParts);
+ // debug("_header.colors %d", _header.colors);
+ // debug("_header.maxBlocks %d", _header.maxBlocks);
+ // debug("_header.offsetX %d", _header.offsetX);
+ // debug("_header.offsetY %d", _header.offsetY);
+ // debug("_header.maxVPTRSize %d", _header.maxVPTRSize);
+ // debug("_header.freq %d", _header.freq);
+ // debug("_header.channels %d", _header.channels);
+ // debug("_header.bits %d", _header.bits);
+ // debug("_header.unk3 %d", _header.unk3);
+ // debug("_header.unk4 %d", _header.unk4);
+ // debug("_header.maxCBFZSize %d", _header.maxCBFZSize);
+ // debug("_header.unk5 %d", _header.unk5);
+ // debug("\n");
+ // }
assert(_header.version == 2);
if (_header.channels != 0) {
@@ -374,7 +364,7 @@ bool VQADecoder::VQAVideoTrack::readVQFR(Common::SeekableReadStream *s, uint32 s
}
if (!rc) {
- debug("VQFR: error handling chunk %s", strTag(chd.id));
+ warning("VQFR: error handling chunk %s", strTag(chd.id));
return false;
}
}
@@ -507,14 +497,14 @@ bool VQADecoder::readFINF(Common::SeekableReadStream *s, uint32 size) {
for (uint32 i = 0; i != _header.numFrames; ++i)
_frameInfo[i] = s->readUint32LE();
- if (false) {
- uint32 last = 0;
- for (uint32 i = 0; i != _header.numFrames; ++i) {
- uint32 diff = _frameInfo[i] - last;
- debug("_frameInfo[%4d] = 0x%08x - %08x", i, _frameInfo[i], diff);
- last = _frameInfo[i];
- }
- }
+ // if (false) {
+ // uint32 last = 0;
+ // for (uint32 i = 0; i != _header.numFrames; ++i) {
+ // uint32 diff = _frameInfo[i] - last;
+ // debug("_frameInfo[%4d] = 0x%08x - %08x", i, _frameInfo[i], diff);
+ // last = _frameInfo[i];
+ // }
+ // }
return true;
}
@@ -724,7 +714,7 @@ bool VQADecoder::VQAVideoTrack::readCBFZ(Common::SeekableReadStream *s, uint32 s
bool VQADecoder::VQAVideoTrack::readZBUF(Common::SeekableReadStream *s, uint32 size) {
if (size > _maxZBUFChunkSize) {
- debug("VQA ERROR: ZBUF chunk size: %08x > %08x", size, _maxZBUFChunkSize);
+ warning("VQA ERROR: ZBUF chunk size: %08x > %08x", size, _maxZBUFChunkSize);
s->skip(roundup(size));
return false;
}
diff --git a/engines/bladerunner/vqa_player.cpp b/engines/bladerunner/vqa_player.cpp
index d4038ec4f8..0d83237ef4 100644
--- a/engines/bladerunner/vqa_player.cpp
+++ b/engines/bladerunner/vqa_player.cpp
@@ -167,9 +167,6 @@ void VQAPlayer::updateLights(Lights *lights) {
}
bool VQAPlayer::setLoop(int loop, int repeatsCount, int loopSetMode, void (*callback)(void *, int, int), void *callbackData) {
-#if BLADERUNNER_DEBUG_CONSOLE
- debug("VQAPlayer::setBeginAndEndFrameFromLoop(%i, %i, %i), streamLoaded = %i", loop, repeatsCount, loopSetMode, _s != nullptr);
-#endif
if (_s == nullptr) {
_loopInitial = loop;
_repeatsCountInitial = repeatsCount;
@@ -188,10 +185,6 @@ bool VQAPlayer::setLoop(int loop, int repeatsCount, int loopSetMode, void (*call
}
bool VQAPlayer::setBeginAndEndFrame(int begin, int end, int repeatsCount, int loopSetMode, void (*callback)(void *, int, int), void *callbackData) {
-#if BLADERUNNER_DEBUG_CONSOLE
- debug("VQAPlayer::setBeginAndEndFrame(%i, %i, %i, %i), streamLoaded = %i", begin, end, repeatsCount, loopSetMode, _s != nullptr);
-#endif
-
if (repeatsCount < 0) {
repeatsCount = -1;
}
diff --git a/engines/bladerunner/vqa_player.h b/engines/bladerunner/vqa_player.h
index a51f39cc31..c11442da82 100644
--- a/engines/bladerunner/vqa_player.h
+++ b/engines/bladerunner/vqa_player.h
@@ -43,8 +43,6 @@ class View;
class Lights;
class ZBuffer;
-//TODO: split this into two components as it is in original game: universal vqa player, blade runner player functionality
-
class VQAPlayer {
friend class Debugger;