diff options
Diffstat (limited to 'engines/bladerunner')
-rw-r--r-- | engines/bladerunner/actor.cpp | 9 | ||||
-rw-r--r-- | engines/bladerunner/ambient_sounds.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/ambient_sounds.h | 8 | ||||
-rw-r--r-- | engines/bladerunner/bladerunner.cpp | 1 | ||||
-rw-r--r-- | engines/bladerunner/debugger.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/dialogue_menu.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/outtake.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/savefile.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/scene.cpp | 17 | ||||
-rw-r--r-- | engines/bladerunner/scene_objects.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/script/scene_script.cpp | 1 | ||||
-rw-r--r-- | engines/bladerunner/set_effects.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/ui/elevator.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/ui/elevator.h | 1 | ||||
-rw-r--r-- | engines/bladerunner/ui/esper.cpp | 9 | ||||
-rw-r--r-- | engines/bladerunner/ui/esper.h | 2 | ||||
-rw-r--r-- | engines/bladerunner/ui/kia.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/ui/kia_section_clues.h | 1 | ||||
-rw-r--r-- | engines/bladerunner/vqa_player.cpp | 2 |
19 files changed, 22 insertions, 63 deletions
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp index 34345c9f5f..a5cc4c492b 100644 --- a/engines/bladerunner/actor.cpp +++ b/engines/bladerunner/actor.cpp @@ -1365,8 +1365,8 @@ void Actor::save(SaveFileWriteStream &f) { f.writeInt(_retiredWidth); f.writeInt(_retiredHeight); f.writeInt(_damageAnimIfMoving); - f.writeInt(0); // TODO: _actorFieldU6 - f.writeInt(0); // TODO: _actorFieldU7 + f.writeInt(0); + f.writeInt(0); f.writeFloat(_scale); for (int i = 0; i < 7; ++i) { @@ -1444,8 +1444,8 @@ void Actor::load(SaveFileReadStream &f) { _retiredWidth = f.readInt(); _retiredHeight = f.readInt(); _damageAnimIfMoving = f.readInt(); - f.skip(4); // TODO: _actorFieldU6 - f.skip(4); // TODO: _actorFieldU7 + f.skip(4); + f.skip(4); _scale = f.readFloat(); for (int i = 0; i < 7; ++i) { @@ -1453,7 +1453,6 @@ void Actor::load(SaveFileReadStream &f) { } // Bugfix: Special initialization case for timer 4 when it's value is restored as 0 // This should be harmless, but will remedy any broken save-games where the timer 4 was saved as 0. -// // if (_timersLeft[4] == 0) { _timersLeft[4] = _timer4RemainDefault; } diff --git a/engines/bladerunner/ambient_sounds.cpp b/engines/bladerunner/ambient_sounds.cpp index 81f4c7caeb..08ec388de7 100644 --- a/engines/bladerunner/ambient_sounds.cpp +++ b/engines/bladerunner/ambient_sounds.cpp @@ -358,7 +358,7 @@ void AmbientSounds::removeLoopingSoundByIndex(int index, int delay) { } void AmbientSounds::save(SaveFileWriteStream &f) { - f.writeBool(false); // TODO: _isDisabled + f.writeBool(false); // _isDisabled - not used for (int i = 0; i != kNonLoopingSounds; ++i) { // 73 bytes per non-looping sound @@ -397,7 +397,7 @@ void AmbientSounds::load(SaveFileReadStream &f) { removeAllLoopingSounds(0); removeAllNonLoopingSounds(true); - f.skip(4); // TODO: _isDisabled + f.skip(4); // _isDisabled - not used uint32 now = _vm->_time->getPauseStart(); diff --git a/engines/bladerunner/ambient_sounds.h b/engines/bladerunner/ambient_sounds.h index f52bdd443c..06144d6076 100644 --- a/engines/bladerunner/ambient_sounds.h +++ b/engines/bladerunner/ambient_sounds.h @@ -118,14 +118,6 @@ private: int findAvailableLoopingTrack() const; int findLoopingTrackByHash(int32 hash) const; - // stopNonLoopingTrack - // stopLoopingTrack - - // saveToSaveGame - // initFromSaveGame - // addSoundByName - // playVolumeAdjustSound - void addSoundByName( const Common::String &name, int timeMin, int timeMax, diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp index 0ea6cae86d..0bd4a400cf 100644 --- a/engines/bladerunner/bladerunner.cpp +++ b/engines/bladerunner/bladerunner.cpp @@ -613,7 +613,6 @@ void BladeRunnerEngine::shutdown() { delete _esper; _esper = nullptr; - /// todo for (uint i = 0; i != _shapes.size(); ++i) { delete _shapes[i]; } diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp index 48087ac831..f8101f63ec 100644 --- a/engines/bladerunner/debugger.cpp +++ b/engines/bladerunner/debugger.cpp @@ -892,7 +892,6 @@ void Debugger::drawLights() { Light *light = _vm->_lights->_lights[i]; Matrix4x3 m = light->_matrix; m = invertMatrix(m); - //todo do this properly Vector3 posOrigin = m * Vector3(0.0f, 0.0f, 0.0f); float t = posOrigin.y; posOrigin.y = posOrigin.z; @@ -927,7 +926,6 @@ void Debugger::drawFogs() { // m = invertMatrix(m); Matrix4x3 m = fog->_inverted; - //todo do this properly Vector3 posOrigin = m * Vector3(0.0f, 0.0f, 0.0f); float t = posOrigin.y; posOrigin.y = posOrigin.z; diff --git a/engines/bladerunner/dialogue_menu.cpp b/engines/bladerunner/dialogue_menu.cpp index 3811471f9f..c3aced0c73 100644 --- a/engines/bladerunner/dialogue_menu.cpp +++ b/engines/bladerunner/dialogue_menu.cpp @@ -207,10 +207,6 @@ int DialogueMenu::queryInput() { if (agenda == kPlayerAgendaUserChoice) { _waitingForInput = true; do { - // TODO: game resuming - // if (!_vm->_gameRunning) - // break; - while (!_vm->playerHasControl()) { _vm->playerGainsControl(); } diff --git a/engines/bladerunner/outtake.cpp b/engines/bladerunner/outtake.cpp index f37729fc9b..986f6fc527 100644 --- a/engines/bladerunner/outtake.cpp +++ b/engines/bladerunner/outtake.cpp @@ -95,8 +95,6 @@ void OuttakePlayer::play(const Common::String &name, bool noLocalization, int co _vm->_vqaStopIsRequested = false; vqaPlayer.close(); - // TODO: scene video is played fast after end of outtake - visible in tb07 - _vm->playerGainsControl(); if (container > 0) { diff --git a/engines/bladerunner/savefile.cpp b/engines/bladerunner/savefile.cpp index 62bcdb2f17..ed6217925b 100644 --- a/engines/bladerunner/savefile.cpp +++ b/engines/bladerunner/savefile.cpp @@ -22,6 +22,7 @@ #include "bladerunner/savefile.h" +#include "bladerunner/bladerunner.h" #include "bladerunner/boundingbox.h" #include "bladerunner/vector.h" @@ -130,8 +131,7 @@ bool SaveFileManager::readHeader(Common::SeekableReadStream &in, SaveFileHeader void *thumbnailData = malloc(kThumbnailSize); // freed by ScummVM's smartptr s.read(thumbnailData, kThumbnailSize); - // TODO: cleanup - remove magic constants - header._thumbnail->init(80, 60, 160, thumbnailData, Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0)); + header._thumbnail->init(80, 60, 160, thumbnailData, createRGB555()); s.seek(pos); } diff --git a/engines/bladerunner/scene.cpp b/engines/bladerunner/scene.cpp index 78b1bb6da4..dc6a7f798c 100644 --- a/engines/bladerunner/scene.cpp +++ b/engines/bladerunner/scene.cpp @@ -160,21 +160,20 @@ bool Scene::open(int setId, int sceneId, bool isLoadingGame) { Actor *actor = _vm->_actors[i]; if (actor->getSetId() == setId) { _vm->_sceneObjects->addActor( - i + kSceneObjectOffsetActors, - actor->getBoundingBox(), - actor->getScreenRectangle(), - true, - false, - actor->isTarget(), - actor->isRetired()); + i + kSceneObjectOffsetActors, + actor->getBoundingBox(), + actor->getScreenRectangle(), + true, + false, + actor->isTarget(), + actor->isRetired() + ); } } _set->addObjectsToScene(_vm->_sceneObjects); _vm->_items->addToSet(setId); _vm->_sceneObjects->updateObstacles(); - // TODO: add all items to scene - // TODO: calculate walking obstacles?? if (_specialLoopMode != kSceneLoopModeLoseControl) { _vm->_sceneScript->playerWalkedIn(); diff --git a/engines/bladerunner/scene_objects.cpp b/engines/bladerunner/scene_objects.cpp index c84bf95741..5eace21736 100644 --- a/engines/bladerunner/scene_objects.cpp +++ b/engines/bladerunner/scene_objects.cpp @@ -313,8 +313,6 @@ void SceneObjects::setIsTarget(int sceneObjectId, bool isTarget) { } void SceneObjects::updateObstacles() { - // TODO remove comments after pathfinding is working properly - // debug("o.clear()"); _vm->_obstacles->clear(); for (int i = 0; i < _count; ++i) { int index = _sceneObjectsSortedByDistance[i]; @@ -323,8 +321,6 @@ void SceneObjects::updateObstacles() { float x0, y0, z0, x1, y1, z1; sceneObject->boundingBox.getXYZ(&x0, &y0, &z0, &x1, &y1, &z1); _vm->_obstacles->add(x0, z0, x1, z1); - - // debug("o.add(%f, %f, %f, %f);", x0, z0, x1, z1); } } _vm->_obstacles->backup(); diff --git a/engines/bladerunner/script/scene_script.cpp b/engines/bladerunner/script/scene_script.cpp index 77ebaa2a98..dd685950b6 100644 --- a/engines/bladerunner/script/scene_script.cpp +++ b/engines/bladerunner/script/scene_script.cpp @@ -254,7 +254,6 @@ void SceneScript::sceneFrameAdvanced(int frame) { void SceneScript::actorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { _inScriptCounter++; - //TODO remove this check if(_currentScript) _currentScript->ActorChangedGoal(actorId, newGoal, oldGoal, currentSet); _inScriptCounter--; diff --git a/engines/bladerunner/set_effects.cpp b/engines/bladerunner/set_effects.cpp index 99cb030e8f..d54fd2b3dd 100644 --- a/engines/bladerunner/set_effects.cpp +++ b/engines/bladerunner/set_effects.cpp @@ -66,10 +66,10 @@ void SetEffects::read(Common::ReadStream *stream, int frameCount) { case 2: fog = new FogBox(); break; + default: + error("Uknown fog type %d", type); } - if (!fog) { - //TODO exception, unknown fog type - } else { + if (fog != nullptr) { fog->read(stream, frameCount); fog->_next = _fogs; _fogs = fog; diff --git a/engines/bladerunner/ui/elevator.cpp b/engines/bladerunner/ui/elevator.cpp index a5e0c65fdd..9baca0f3f4 100644 --- a/engines/bladerunner/ui/elevator.cpp +++ b/engines/bladerunner/ui/elevator.cpp @@ -303,10 +303,6 @@ void Elevator::tickDescription() { _sentenceId = -1; } -void Elevator::resume() { - // TODO -} - void Elevator::mouseInCallback(int buttonId, void *self) { ((Elevator *)self)->buttonFocus(buttonId); } diff --git a/engines/bladerunner/ui/elevator.h b/engines/bladerunner/ui/elevator.h index f2e1443929..96724430b0 100644 --- a/engines/bladerunner/ui/elevator.h +++ b/engines/bladerunner/ui/elevator.h @@ -59,7 +59,6 @@ public: void setupDescription(int actorId, int sentenceId); void resetDescription(); void tickDescription(); - void resume(); private: static void mouseInCallback(int, void *); diff --git a/engines/bladerunner/ui/esper.cpp b/engines/bladerunner/ui/esper.cpp index 4b6b7f04c0..a5d858e3a3 100644 --- a/engines/bladerunner/ui/esper.cpp +++ b/engines/bladerunner/ui/esper.cpp @@ -245,10 +245,6 @@ void ESPER::tick() { } } -void ESPER::resume() { - // TODO -} - void ESPER::addPhoto(const char *name, int photoId, int shapeId) { int i = findEmptyPhoto(); if (i >= 0) { @@ -303,9 +299,7 @@ void ESPER::mouseUpCallback(int buttonId, void *callbackData) { if (buttonId < kPhotoCount) { self->selectPhoto(buttonId); } else if (self->_statePhoto != kEsperPhotoStateVideoZoomOut) { - if (buttonId == kPhotoCount + 1) { - // TODO: is it even used? - } else if (buttonId == kPhotoCount + 2) { + if (buttonId == kPhotoCount + 2) { self->zoomOutStop(); } else if (buttonId == kPhotoCount + 3) { self->goBack(); @@ -912,7 +906,6 @@ void ESPER::drawVideoZoomOut(Graphics::Surface &surface) { if (timeNow > _timeZoomNext && _vqaLastFrame > 0) { _timeZoomNext = timeNow + 300; playSound(419, 25); - //TODO: implement frame loading after seek, then advanceFrame can be removed _vqaPlayerPhoto->seekToFrame(_vqaLastFrame); int nextFrame = _vqaPlayerPhoto->getFrameCount() / 4; if (nextFrame <= 0) { diff --git a/engines/bladerunner/ui/esper.h b/engines/bladerunner/ui/esper.h index 4a1c606498..34648a38f4 100644 --- a/engines/bladerunner/ui/esper.h +++ b/engines/bladerunner/ui/esper.h @@ -195,8 +195,6 @@ public: void tick(); - void resume(); - void addPhoto(const char *name, int photoId, int shapeId); void defineRegion(int regionId, Common::Rect inner, Common::Rect outer, Common::Rect selection, const char *name); diff --git a/engines/bladerunner/ui/kia.cpp b/engines/bladerunner/ui/kia.cpp index 2cc978f0cc..be64131d34 100644 --- a/engines/bladerunner/ui/kia.cpp +++ b/engines/bladerunner/ui/kia.cpp @@ -315,7 +315,7 @@ void KIA::tick() { _shapes->get(39)->draw(_vm->_surfaceFront, 583, 342); } } - //TODO: implement frame loading after seek, then advanceFrame can be removed + _playerVqaPlayer->seekToFrame(_playerVqaFrame); _playerVqaPlayer->update(true, true); @@ -370,7 +370,7 @@ void KIA::tick() { _shapes->get(47)->draw(_vm->_surfaceFront, 182, 446); } } - _vm->_mainFont->drawColor("1.00", _vm->_surfaceFront, 438, 471, 0x1CE7); // TODO: 1.01 for DVD version + _vm->_mainFont->drawColor("1.00", _vm->_surfaceFront, 438, 471, 0x1CE7); // 1.01 is DVD version, but only cd handling routines were changed, no game logic if (!_transitionId) { _buttons->drawTooltip(_vm->_surfaceFront, mouse.x, mouse.y); } diff --git a/engines/bladerunner/ui/kia_section_clues.h b/engines/bladerunner/ui/kia_section_clues.h index 1061e637df..eb43f60102 100644 --- a/engines/bladerunner/ui/kia_section_clues.h +++ b/engines/bladerunner/ui/kia_section_clues.h @@ -36,7 +36,6 @@ class UIImagePicker; class UIScrollBox; class KIASectionClues : public KIASectionBase { - //TODO: use gameInfo->getClueCount(), not in original game static const int kClueCount = 288; struct Line { diff --git a/engines/bladerunner/vqa_player.cpp b/engines/bladerunner/vqa_player.cpp index 040bb5817c..300740e028 100644 --- a/engines/bladerunner/vqa_player.cpp +++ b/engines/bladerunner/vqa_player.cpp @@ -195,8 +195,6 @@ bool VQAPlayer::setBeginAndEndFrame(int begin, int end, int repeatsCount, int lo loopSetMode = kLoopSetModeImmediate; } - //TODO: there is code in original game which deals with changing loop at start of loop, is it nescesarry? loc_46EA04 - _frameBegin = begin; if (loopSetMode == kLoopSetModeJustStart) { |