[Scummvm-git-logs] scummvm master -> 372cfe2b9fbdb261b5d067f6427ed18b71b967c0

mgerhardy martin.gerhardy at gmail.com
Thu Nov 26 21:14:49 UTC 2020


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
819650bc9d TWINE: fixed speed of the game by reduced the delay in the main loop like it was in TwinEngine
b342cd2c04 TWINE: added shortcuts to change behaviour with the menu
372cfe2b9f TWINE: set lba fps to 20 to get more close to original game speed


Commit: 819650bc9d6adbf9fafac832a6af285c33f3658e
    https://github.com/scummvm/scummvm/commit/819650bc9d6adbf9fafac832a6af285c33f3658e
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2020-11-26T21:53:05+01:00

Commit Message:
TWINE: fixed speed of the game by reduced the delay in the main loop like it was in TwinEngine

Changed paths:
    engines/twine/twine.cpp


diff --git a/engines/twine/twine.cpp b/engines/twine/twine.cpp
index e10234c61c..7d40eaa511 100644
--- a/engines/twine/twine.cpp
+++ b/engines/twine/twine.cpp
@@ -919,7 +919,7 @@ bool TwinEEngine::gameEngineLoop() {
 			if (runGameEngine()) {
 				return true;
 			}
-			g_system->delayMillis(10);
+			g_system->delayMillis(1);
 		}
 		lbaTime++;
 		if (shouldQuit()) {


Commit: b342cd2c04bcc0eb1465cfe86926791c081902d7
    https://github.com/scummvm/scummvm/commit/b342cd2c04bcc0eb1465cfe86926791c081902d7
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2020-11-26T22:14:29+01:00

Commit Message:
TWINE: added shortcuts to change behaviour with the menu

... like it is in lba2

Changed paths:
    engines/twine/input.h
    engines/twine/metaengine.cpp
    engines/twine/twine.cpp


diff --git a/engines/twine/input.h b/engines/twine/input.h
index d12e097a4c..a39a3a8bba 100644
--- a/engines/twine/input.h
+++ b/engines/twine/input.h
@@ -54,6 +54,10 @@ enum TwinEActionType {
 	QuickBehaviourAthletic,
 	QuickBehaviourAggressive,
 	QuickBehaviourDiscreet,
+	ChangeBehaviourNormal,
+	ChangeBehaviourAthletic,
+	ChangeBehaviourAggressive,
+	ChangeBehaviourDiscreet,
 	ExecuteBehaviourAction,
 	BehaviourMenu,
 	OptionsMenu,
diff --git a/engines/twine/metaengine.cpp b/engines/twine/metaengine.cpp
index cfdc4f07ee..5d46918844 100644
--- a/engines/twine/metaengine.cpp
+++ b/engines/twine/metaengine.cpp
@@ -227,22 +227,42 @@ Common::KeymapArray TwinEMetaEngine::initKeymaps(const char *target) const {
 		act->addDefaultInputMapping("MOUSE_LEFT");
 		gameKeyMap->addAction(act);
 
-		act = new Action("NORMALBEHAVIOUR", _("Normal Behaviour"));
+		act = new Action("CHANGETONORMALBEHAVIOUR", _("Normal Behaviour"));
+		act->setCustomEngineActionEvent(TwinEActionType::ChangeBehaviourNormal);
+		act->addDefaultInputMapping("1");
+		gameKeyMap->addAction(act);
+
+		act = new Action("CHANGETOATHLETICBEHAVIOUR", _("Athletic Behaviour"));
+		act->setCustomEngineActionEvent(TwinEActionType::ChangeBehaviourAthletic);
+		act->addDefaultInputMapping("2");
+		gameKeyMap->addAction(act);
+
+		act = new Action("CHANGETOAGGRESSIVEBEHAVIOUR", _("Aggressive Behaviour"));
+		act->setCustomEngineActionEvent(TwinEActionType::ChangeBehaviourAggressive);
+		act->addDefaultInputMapping("3");
+		gameKeyMap->addAction(act);
+
+		act = new Action("CHANGETODISCREETBEHAVIOUR", _("Discreet Behaviour"));
+		act->setCustomEngineActionEvent(TwinEActionType::ChangeBehaviourDiscreet);
+		act->addDefaultInputMapping("4");
+		gameKeyMap->addAction(act);
+
+		act = new Action("NORMALBEHAVIOUR", _("Normal Behaviour UI"));
 		act->setCustomEngineActionEvent(TwinEActionType::QuickBehaviourNormal);
 		act->addDefaultInputMapping("F1");
 		gameKeyMap->addAction(act);
 
-		act = new Action("ATHLETICBEHAVIOUR", _("Athletic Behaviour"));
+		act = new Action("ATHLETICBEHAVIOUR", _("Athletic Behaviour UI"));
 		act->setCustomEngineActionEvent(TwinEActionType::QuickBehaviourAthletic);
 		act->addDefaultInputMapping("F2");
 		gameKeyMap->addAction(act);
 
-		act = new Action("AGGRESSIVEBEHAVIOUR", _("Aggressive Behaviour"));
+		act = new Action("AGGRESSIVEBEHAVIOUR", _("Aggressive Behaviour UI"));
 		act->setCustomEngineActionEvent(TwinEActionType::QuickBehaviourAggressive);
 		act->addDefaultInputMapping("F3");
 		gameKeyMap->addAction(act);
 
-		act = new Action("DISCREETBEHAVIOUR", _("Discreet Behaviour"));
+		act = new Action("DISCREETBEHAVIOUR", _("Discreet Behaviour UI"));
 		act->setCustomEngineActionEvent(TwinEActionType::QuickBehaviourDiscreet);
 		act->addDefaultInputMapping("F4");
 		gameKeyMap->addAction(act);
diff --git a/engines/twine/twine.cpp b/engines/twine/twine.cpp
index 7d40eaa511..2e6540877c 100644
--- a/engines/twine/twine.cpp
+++ b/engines/twine/twine.cpp
@@ -660,6 +660,16 @@ int32 TwinEEngine::runGameEngine() { // mainLoopInteration
 			processInventoryAction();
 		}
 
+		if (_input->toggleActionIfActive(TwinEActionType::ChangeBehaviourNormal)) {
+			_actor->setBehaviour(HeroBehaviourType::kNormal);
+		} else if (_input->toggleActionIfActive(TwinEActionType::ChangeBehaviourAthletic)) {
+			_actor->setBehaviour(HeroBehaviourType::kAthletic);
+		} else if (_input->toggleActionIfActive(TwinEActionType::ChangeBehaviourAggressive)) {
+			_actor->setBehaviour(HeroBehaviourType::kAggressive);
+		} else if (_input->toggleActionIfActive(TwinEActionType::ChangeBehaviourDiscreet)) {
+			_actor->setBehaviour(HeroBehaviourType::kDiscrete);
+		}
+
 		// Process behaviour menu
 		if ((_input->isActionActive(TwinEActionType::BehaviourMenu, false) ||
 		     _input->isActionActive(TwinEActionType::QuickBehaviourNormal, false) ||


Commit: 372cfe2b9fbdb261b5d067f6427ed18b71b967c0
    https://github.com/scummvm/scummvm/commit/372cfe2b9fbdb261b5d067f6427ed18b71b967c0
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2020-11-26T22:14:29+01:00

Commit Message:
TWINE: set lba fps to 20 to get more close to original game speed

Changed paths:
    engines/twine/twine.h


diff --git a/engines/twine/twine.h b/engines/twine/twine.h
index 417b5a83ab..af70889bf6 100644
--- a/engines/twine/twine.h
+++ b/engines/twine/twine.h
@@ -50,7 +50,7 @@ namespace TwinE {
 /** Original screen height */
 #define SCREEN_HEIGHT 480
 /** Default frames per second */
-#define DEFAULT_FRAMES_PER_SECOND 19
+#define DEFAULT_FRAMES_PER_SECOND 20
 
 /** Number of colors used in the game */
 #define NUMOFCOLORS 256




More information about the Scummvm-git-logs mailing list