[Scummvm-git-logs] scummvm master -> 9e89fdf9dd46d7771d62eebad1afce171a8273bc
mgerhardy
martin.gerhardy at gmail.com
Wed Jan 6 09:35:59 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
60ae3237d5 TWINE: todo comment
9e89fdf9dd TWINE: added debug command to play fla movies
Commit: 60ae3237d57460ceb4fa2d5b2e7d5aef8d354497
https://github.com/scummvm/scummvm/commit/60ae3237d57460ceb4fa2d5b2e7d5aef8d354497
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-06T08:06:06+01:00
Commit Message:
TWINE: todo comment
Changed paths:
engines/twine/script/script_life_v1.cpp
diff --git a/engines/twine/script/script_life_v1.cpp b/engines/twine/script/script_life_v1.cpp
index 4b84dbc756..c8832bf857 100644
--- a/engines/twine/script/script_life_v1.cpp
+++ b/engines/twine/script/script_life_v1.cpp
@@ -266,6 +266,7 @@ static int32 processLifeConditions(TwinEEngine *engine, LifeScriptContext &ctx)
engine->_scene->currentScriptValue = engine->_gameState->gameFlags[flagIdx];
} else {
if (flagIdx == GAMEFLAG_INVENTORY_DISABLED) {
+ // TODO: this case should already get handled in the above if branch as the flagIdx is bigger than MaxInventoryItems
engine->_scene->currentScriptValue = engine->_gameState->inventoryDisabled();
} else {
engine->_scene->currentScriptValue = 0;
Commit: 9e89fdf9dd46d7771d62eebad1afce171a8273bc
https://github.com/scummvm/scummvm/commit/9e89fdf9dd46d7771d62eebad1afce171a8273bc
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-06T08:43:22+01:00
Commit Message:
TWINE: added debug command to play fla movies
Changed paths:
engines/twine/debugger/console.cpp
engines/twine/debugger/console.h
engines/twine/twine.cpp
engines/twine/twine.h
diff --git a/engines/twine/debugger/console.cpp b/engines/twine/debugger/console.cpp
index 2998f0b36d..af4e59a3f4 100644
--- a/engines/twine/debugger/console.cpp
+++ b/engines/twine/debugger/console.cpp
@@ -35,6 +35,7 @@ namespace TwinE {
TwinEConsole::TwinEConsole(TwinEEngine *engine) : _engine(engine), GUI::Debugger() {
registerCmd("give_allitems", WRAP_METHOD(TwinEConsole, doGiveAllItems));
registerCmd("give_key", WRAP_METHOD(TwinEConsole, doGiveKey));
+ registerCmd("play_video", WRAP_METHOD(TwinEConsole, doPlayVideo));
registerCmd("change_scene", WRAP_METHOD(TwinEConsole, doChangeScene));
registerCmd("magic_points", WRAP_METHOD(TwinEConsole, doAddMagicPoints));
registerCmd("list_menutext", WRAP_METHOD(TwinEConsole, doListMenuText));
@@ -196,6 +197,15 @@ bool TwinEConsole::doSetHeroPosition(int argc, const char **argv) {
return true;
}
+bool TwinEConsole::doPlayVideo(int argc, const char **argv) {
+ if (argc <= 1) {
+ debugPrintf("Expected to get a video filename as first parameter\n");
+ return false;
+ }
+ _engine->queueMovie(argv[1]);
+ return true;
+}
+
bool TwinEConsole::doChangeScene(int argc, const char **argv) {
if (argc <= 1) {
debugPrintf("Expected to get a scene index as first parameter\n");
diff --git a/engines/twine/debugger/console.h b/engines/twine/debugger/console.h
index c7e2db2b36..d3f16bd525 100644
--- a/engines/twine/debugger/console.h
+++ b/engines/twine/debugger/console.h
@@ -34,6 +34,7 @@ class TwinEConsole : public GUI::Debugger {
private:
TwinEEngine *_engine;
+ bool doPlayVideo(int argc, const char **argv);
bool doPrintGameFlag(int argc, const char **argv);
bool doSetHeroPosition(int argc, const char **argv);
bool doGiveAllItems(int argc, const char **argv);
diff --git a/engines/twine/twine.cpp b/engines/twine/twine.cpp
index 8ece5b0db8..0f00d1f1a1 100644
--- a/engines/twine/twine.cpp
+++ b/engines/twine/twine.cpp
@@ -403,6 +403,10 @@ void TwinEEngine::initConfigurations() {
debug(1, "SceZoom: %s", (cfgfile.SceZoom ? "true" : "false"));
}
+void TwinEEngine::queueMovie(const char *filename) {
+ _queuedFlaMovie = filename;
+}
+
void TwinEEngine::initEngine() {
// getting configuration file
initConfigurations();
@@ -659,6 +663,11 @@ int32 TwinEEngine::runGameEngine() { // mainLoopInteration
readKeys();
+ if (!_queuedFlaMovie.empty()) {
+ _flaMovies->playFlaMovie(_queuedFlaMovie.c_str());
+ _queuedFlaMovie.clear();
+ }
+
if (_scene->needChangeScene > -1) {
_scene->changeScene();
}
diff --git a/engines/twine/twine.h b/engines/twine/twine.h
index cd129ea600..063de30c3e 100644
--- a/engines/twine/twine.h
+++ b/engines/twine/twine.h
@@ -195,6 +195,8 @@ private:
/** recenter screen on followed actor automatically */
void centerScreenOnActor();
+ Common::String _queuedFlaMovie;
+
public:
TwinEEngine(OSystem *system, Common::Language language, uint32 flagsTwineGameType, TwineGameType gameType);
~TwinEEngine() override;
@@ -254,6 +256,8 @@ public:
void initMCGA();
void initSVGA();
+ void queueMovie(const char *filename);
+
void initConfigurations();
/** Initialize all needed stuffs at first time running engine */
void initAll();
More information about the Scummvm-git-logs
mailing list