[Scummvm-git-logs] scummvm master -> 11fb3245028a4081103f5c6d725439a314b4aa98
mgerhardy
martin.gerhardy at gmail.com
Tue Jan 26 18:46:37 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
11fb324502 TWINE: new debug command to draw holomap trajectories
Commit: 11fb3245028a4081103f5c6d725439a314b4aa98
https://github.com/scummvm/scummvm/commit/11fb3245028a4081103f5c6d725439a314b4aa98
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-26T19:46:07+01:00
Commit Message:
TWINE: new debug command to draw holomap trajectories
Changed paths:
engines/twine/debugger/console.cpp
engines/twine/debugger/console.h
engines/twine/scene/scene.cpp
engines/twine/scene/scene.h
diff --git a/engines/twine/debugger/console.cpp b/engines/twine/debugger/console.cpp
index 0546c19f66..1ffd9db88c 100644
--- a/engines/twine/debugger/console.cpp
+++ b/engines/twine/debugger/console.cpp
@@ -57,6 +57,7 @@ TwinEConsole::TwinEConsole(TwinEEngine *engine) : _engine(engine), GUI::Debugger
registerCmd("set_inventory_flag", WRAP_METHOD(TwinEConsole, doSetInventoryFlag));
registerCmd("show_inventory_flag", WRAP_METHOD(TwinEConsole, doPrintGameFlag));
registerCmd("set_holomap_flag", WRAP_METHOD(TwinEConsole, doSetHolomapFlag));
+ registerCmd("set_holomap_trajectory", WRAP_METHOD(TwinEConsole, doSetHolomapTrajectory));
registerCmd("show_holomap_flag", WRAP_METHOD(TwinEConsole, doPrintGameFlag));
}
@@ -134,6 +135,16 @@ bool TwinEConsole::doSetInventoryFlag(int argc, const char **argv) {
return true;
}
+bool TwinEConsole::doSetHolomapTrajectory(int argc, const char **argv) {
+ if (argc <= 1) {
+ debugPrintf("Expected to get a holomap trajectory index as parameter\n");
+ return true;
+ }
+ _engine->_scene->holomapTrajectory = atoi(argv[1]);
+ _engine->_scene->reloadCurrentScene();
+ return false;
+}
+
bool TwinEConsole::doSetHolomapFlag(int argc, const char **argv) {
if (argc <= 1) {
debugPrintf("Expected to get a holomap flag index as first parameter. Use -1 to set all flags\n");
diff --git a/engines/twine/debugger/console.h b/engines/twine/debugger/console.h
index 7b9e9f7672..4ffdc4903c 100644
--- a/engines/twine/debugger/console.h
+++ b/engines/twine/debugger/console.h
@@ -57,6 +57,8 @@ private:
bool doSetHolomapFlag(int argc, const char **argv);
bool doAddMagicPoints(int argc, const char **argv);
bool doDumpFile(int argc, const char **argv);
+ bool doSetHolomapTrajectory(int argc, const char **argv);
+
public:
TwinEConsole(TwinEEngine *engine);
~TwinEConsole() override;
diff --git a/engines/twine/scene/scene.cpp b/engines/twine/scene/scene.cpp
index 2195da4e72..f80d1a94bf 100644
--- a/engines/twine/scene/scene.cpp
+++ b/engines/twine/scene/scene.cpp
@@ -287,6 +287,10 @@ void Scene::resetScene() {
_engine->_screens->useAlternatePalette = false;
}
+void Scene::reloadCurrentScene() {
+ needChangeScene = currentSceneIdx;
+}
+
void Scene::changeScene() {
// change twinsen house destroyed hard-coded
if (needChangeScene == LBA1SceneId::Citadel_Island_near_twinsens_house && _engine->_gameState->hasOpenedFunfrocksSafe()) {
diff --git a/engines/twine/scene/scene.h b/engines/twine/scene/scene.h
index b11d92322c..c24f2ec5f4 100644
--- a/engines/twine/scene/scene.h
+++ b/engines/twine/scene/scene.h
@@ -303,6 +303,7 @@ public:
Scene(TwinEEngine *engine) : _engine(engine) {}
~Scene();
+ void reloadCurrentScene();
uint8 *currentScene = nullptr;
int32 needChangeScene = LBA1SceneId::Citadel_Island_Prison;
More information about the Scummvm-git-logs
mailing list