[Scummvm-git-logs] scummvm master -> b3b438d1d269917d8b17fa7afff709f387a8c0a4
mduggan
noreply at scummvm.org
Fri Feb 24 01:33:10 UTC 2023
This automated email contains information about 8 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6b1c3b4f1f TETRAEDGE: Set callback method correctly for setObjectMoveDest
221468140e TETRAEDGE: Make viewport setting closer to original
92c74a5efd TETRAEDGE: Set layout ratios if widescreen is in use for Syberia 2
598ba6e2b4 TETRAEDGE: Clean up use of config bools
79f830af0c TETRAEDGE: Register config defaults
d585b5f621 TETRAEDGE: Fix animations overshooting
9dcfa3255b TETRAEDGE: Add option to correct movie aspect
b3b438d1d2 TETRAEDGE: Add option to correct movie aspect ratio
Commit: 6b1c3b4f1f0e282aac8cc90b04251e09b1d36862
https://github.com/scummvm/scummvm/commit/6b1c3b4f1f0e282aac8cc90b04251e09b1d36862
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-02-24T10:30:12+09:00
Commit Message:
TETRAEDGE: Set callback method correctly for setObjectMoveDest
Changed paths:
engines/tetraedge/game/object3d.cpp
diff --git a/engines/tetraedge/game/object3d.cpp b/engines/tetraedge/game/object3d.cpp
index cd0bca59362..44f29c717a4 100644
--- a/engines/tetraedge/game/object3d.cpp
+++ b/engines/tetraedge/game/object3d.cpp
@@ -72,6 +72,7 @@ void Object3D::setObjectMoveDest(const TeVector3f32 &vec) {
void Object3D::setObjectMoveTime(float time) {
_moveAnim._duration = time * 1000;
_moveAnim._callbackObj = this;
+ _moveAnim._callbackMethod = &Object3D::setCurMovePos;
Common::Array<float> curve;
curve.push_back(0.0f);
curve.push_back(1.0f);
Commit: 221468140ec754d38b41f1db545dce9a931815f8
https://github.com/scummvm/scummvm/commit/221468140ec754d38b41f1db545dce9a931815f8
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-02-24T10:30:12+09:00
Commit Message:
TETRAEDGE: Make viewport setting closer to original
In practice this currently probably makes no difference, but might be different
if/when we add widescreen support in the future.
Changed paths:
engines/tetraedge/game/in_game_scene.cpp
diff --git a/engines/tetraedge/game/in_game_scene.cpp b/engines/tetraedge/game/in_game_scene.cpp
index 075e2ed4a90..ba1de6ccfac 100644
--- a/engines/tetraedge/game/in_game_scene.cpp
+++ b/engines/tetraedge/game/in_game_scene.cpp
@@ -1382,8 +1382,8 @@ void InGameScene::moveCharacterTo(const Common::String &charName, const Common::
}
void InGameScene::onMainWindowSizeChanged() {
- TeCamera *mainWinCam = g_engine->getApplication()->mainWindowCamera();
- _viewportSize = mainWinCam->viewportSize();
+ TeVector3f32 winSize = g_engine->getApplication()->getMainWindow().size();
+ _viewportSize = TeVector2f32(winSize.x(), winSize.y());
Common::Array<TeIntrusivePtr<TeCamera>> &cams = cameras();
for (uint i = 0; i < cams.size(); i++) {
cams[i]->viewport(0, 0, _viewportSize.getX(), _viewportSize.getY());
Commit: 92c74a5efd01d7a36d74e926a5e244db1b355f2a
https://github.com/scummvm/scummvm/commit/92c74a5efd01d7a36d74e926a5e244db1b355f2a
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-02-24T10:30:12+09:00
Commit Message:
TETRAEDGE: Set layout ratios if widescreen is in use for Syberia 2
Currently it's never in use so this probably does nothing yet.
Changed paths:
engines/tetraedge/game/main_menu.cpp
diff --git a/engines/tetraedge/game/main_menu.cpp b/engines/tetraedge/game/main_menu.cpp
index a996edf9263..25c819ff9c9 100644
--- a/engines/tetraedge/game/main_menu.cpp
+++ b/engines/tetraedge/game/main_menu.cpp
@@ -205,6 +205,21 @@ bool MainMenu::onContinueGameButtonValidated() {
leave();
app->startGame(false, 1);
app->fade();
+
+ if (g_engine->gameType() == TetraedgeEngine::kSyberia2) {
+ // TODO: This should probably happen on direct game load too,
+ // as it bypasses this code path which always gets called in
+ // the original?
+ if (app->ratioStretched()) {
+ app->backLayout().setRatioMode(TeILayout::RATIO_MODE_NONE);
+ app->frontLayout().setRatioMode(TeILayout::RATIO_MODE_NONE);
+ } else {
+ app->backLayout().setRatioMode(TeILayout::RATIO_MODE_LETTERBOX);
+ app->backLayout().setRatio(1.333333f);
+ app->frontLayout().setRatioMode(TeILayout::RATIO_MODE_LETTERBOX);
+ app->frontLayout().setRatio(1.333333f);
+ }
+ }
return false;
}
Commit: 598ba6e2b4c11be5c8829fc26a28abb929f1f269
https://github.com/scummvm/scummvm/commit/598ba6e2b4c11be5c8829fc26a28abb929f1f269
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-02-24T10:30:12+09:00
Commit Message:
TETRAEDGE: Clean up use of config bools
Changed paths:
engines/tetraedge/game/application.cpp
engines/tetraedge/game/confirm.cpp
engines/tetraedge/game/main_menu.cpp
engines/tetraedge/game/splash_screens.cpp
diff --git a/engines/tetraedge/game/application.cpp b/engines/tetraedge/game/application.cpp
index e73a84abdcd..cbf95fada41 100644
--- a/engines/tetraedge/game/application.cpp
+++ b/engines/tetraedge/game/application.cpp
@@ -280,7 +280,7 @@ void Application::create() {
onMainWindowSizeChanged();
_splashScreens.enter();
- _drawShadows = (ConfMan.get("disable_shadows") != "true");
+ _drawShadows = (!ConfMan.getBool("disable_shadows"));
// Note: this is not in the original, but seems like a good place to do it..
g_engine->getGame()->loadUnlockedArtwork();
diff --git a/engines/tetraedge/game/confirm.cpp b/engines/tetraedge/game/confirm.cpp
index 2703c707b46..3bc4bb41a47 100644
--- a/engines/tetraedge/game/confirm.cpp
+++ b/engines/tetraedge/game/confirm.cpp
@@ -100,7 +100,7 @@ void Confirm::enter(const Common::String &guiPath, const Common::String &y) {
app->frontOrientationLayout().removeChild(&app->mouseCursorLayout());
app->frontOrientationLayout().addChild(&app->mouseCursorLayout());
- if (ConfMan.get("skip_confirm") == "true") {
+ if (ConfMan.getBool("skip_confirm")) {
onButtonYes();
}
}
diff --git a/engines/tetraedge/game/main_menu.cpp b/engines/tetraedge/game/main_menu.cpp
index 25c819ff9c9..5d167871cd3 100644
--- a/engines/tetraedge/game/main_menu.cpp
+++ b/engines/tetraedge/game/main_menu.cpp
@@ -126,7 +126,7 @@ void MainMenu::enter() {
// Skip the menu if we are loading.
Game *game = g_engine->getGame();
- if (game->hasLoadName() || ConfMan.get("skip_mainmenu") == "true") {
+ if (game->hasLoadName() || ConfMan.getBool("skip_mainmenu")) {
onNewGameConfirmed();
}
}
diff --git a/engines/tetraedge/game/splash_screens.cpp b/engines/tetraedge/game/splash_screens.cpp
index ed731556fb6..be262fe6699 100644
--- a/engines/tetraedge/game/splash_screens.cpp
+++ b/engines/tetraedge/game/splash_screens.cpp
@@ -58,7 +58,7 @@ bool SplashScreens::onAlarm() {
const Common::String scriptName = Common::String::format("menus/splashes/splash%d.lua", _splashNo);
_splashNo++;
- if (ConfMan.get("skip_splash") == "true") {
+ if (ConfMan.getBool("skip_splash")) {
onQuitSplash();
return true;
}
Commit: 79f830af0caba98c29954d7cc9012af91ed9a420
https://github.com/scummvm/scummvm/commit/79f830af0caba98c29954d7cc9012af91ed9a420
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-02-24T10:30:12+09:00
Commit Message:
TETRAEDGE: Register config defaults
Changed paths:
engines/tetraedge/tetraedge.cpp
engines/tetraedge/tetraedge.h
diff --git a/engines/tetraedge/tetraedge.cpp b/engines/tetraedge/tetraedge.cpp
index 5c9cfb9caad..5af1fe3b805 100644
--- a/engines/tetraedge/tetraedge.cpp
+++ b/engines/tetraedge/tetraedge.cpp
@@ -195,6 +195,19 @@ bool TetraedgeEngine::onKeyUp(const Common::KeyState &state) {
return false;
}
+void TetraedgeEngine::registerConfigDefaults() {
+ // The skips are mostly for debugging to jump straight to certain
+ // things. If they are all enabled you get into a new game as
+ // soon as possible.
+ ConfMan.registerDefault("skip_videos", false);
+ ConfMan.registerDefault("skip_splash", false);
+ ConfMan.registerDefault("skip_mainmenu", false);
+ ConfMan.registerDefault("skip_confirm", false);
+
+ ConfMan.registerDefault("disable_shadows", false);
+ ConfMan.registerDefault("correct_movie_aspect", true);
+}
+
Common::Error TetraedgeEngine::run() {
if (getGameId() == "syberia")
_gameType = kSyberia;
@@ -205,6 +218,8 @@ Common::Error TetraedgeEngine::run() {
else
error("Unknown game id %s", getGameId().c_str());
+ registerConfigDefaults();
+
configureSearchPaths();
// from BasicOpenGLView::prepareOpenGL..
_application = new Application();
diff --git a/engines/tetraedge/tetraedge.h b/engines/tetraedge/tetraedge.h
index 102e72ab246..c0e1351303c 100644
--- a/engines/tetraedge/tetraedge.h
+++ b/engines/tetraedge/tetraedge.h
@@ -142,6 +142,7 @@ public:
private:
void configureSearchPaths();
+ void registerConfigDefaults();
};
extern TetraedgeEngine *g_engine;
Commit: d585b5f621318e12eda619982ac21b6bbc3eb2da
https://github.com/scummvm/scummvm/commit/d585b5f621318e12eda619982ac21b6bbc3eb2da
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-02-24T10:30:12+09:00
Commit Message:
TETRAEDGE: Fix animations overshooting
Changed paths:
engines/tetraedge/te/te_animation.cpp
engines/tetraedge/te/te_model_animation.cpp
diff --git a/engines/tetraedge/te/te_animation.cpp b/engines/tetraedge/te/te_animation.cpp
index 2b56fb20740..b5f8e35fd28 100644
--- a/engines/tetraedge/te/te_animation.cpp
+++ b/engines/tetraedge/te/te_animation.cpp
@@ -122,7 +122,7 @@ void TeAnimation::updateAll() {
// getting deleted, so be careful about the numbers.
for (uint i = 0; i < anims.size(); i++) {
if (anims[i]->_runTimer.running()) {
- float msFromStart = anims[i]->_runTimer.getTimeFromStart() / 1000.0;
+ double msFromStart = anims[i]->_runTimer.getTimeFromStart() / 1000.0;
anims[i]->update(msFromStart);
}
}
diff --git a/engines/tetraedge/te/te_model_animation.cpp b/engines/tetraedge/te/te_model_animation.cpp
index d5cac67fd04..e6c259afcd3 100644
--- a/engines/tetraedge/te/te_model_animation.cpp
+++ b/engines/tetraedge/te/te_model_animation.cpp
@@ -177,7 +177,7 @@ int TeModelAnimation::lastFrame() const {
} else {
result = _numNMOFrames;
}
- return MIN(_lastFrame, result);
+ return MIN(_lastFrame, result - 1);
}
bool TeModelAnimation::load(const Common::Path &path) {
Commit: 9dcfa3255b42ad4c658c0d2432547333b9d34ce6
https://github.com/scummvm/scummvm/commit/9dcfa3255b42ad4c658c0d2432547333b9d34ce6
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-02-24T10:30:12+09:00
Commit Message:
TETRAEDGE: Add option to correct movie aspect
Changed paths:
engines/tetraedge/game/game.cpp
diff --git a/engines/tetraedge/game/game.cpp b/engines/tetraedge/game/game.cpp
index f3b92fac736..8e0ad7d2e0d 100644
--- a/engines/tetraedge/game/game.cpp
+++ b/engines/tetraedge/game/game.cpp
@@ -1292,8 +1292,10 @@ bool Game::onSkipVideoButtonValidated() {
}
bool Game::onVideoFinished() {
- if (!_inGameGui.loaded())
+ if (!_inGameGui.loaded()) {
+ _music.stop();
return false;
+ }
Application *app = g_engine->getApplication();
@@ -1351,20 +1353,34 @@ bool Game::playMovie(const Common::String &vidPath, const Common::String &musicP
_running = false;
TeSpriteLayout *videoSpriteLayout = _inGameGui.spriteLayoutChecked("video");
- // TODO: check return value here.
- videoSpriteLayout->load(vidPath);
- videoSpriteLayout->setVisible(true);
- music.play();
- videoSpriteLayout->play();
+ if (videoSpriteLayout->load(vidPath)) {
+ uint vidHeight = videoSpriteLayout->_tiledSurfacePtr->codec()->height();
+ uint vidWidth = videoSpriteLayout->_tiledSurfacePtr->codec()->width();
+
+ // Note: Not in original, but original incorrectly stretches
+ // videos that should be 16:9.
+ if (ConfMan.getBool("correct_movie_aspect")) {
+ videoSpriteLayout->setRatioMode(TeILayout::RATIO_MODE_LETTERBOX);
+ videoSpriteLayout->setRatio((float)vidWidth / vidHeight);
+ videoSpriteLayout->updateSize();
+ }
- // Stop the movie and sound early for testing if skip_videos set
- if (ConfMan.get("skip_videos") == "true") {
- videoSpriteLayout->_tiledSurfacePtr->_frameAnim.setNbFrames(10);
- music.stop();
- }
+ videoSpriteLayout->setVisible(true);
+ music.play();
+ videoSpriteLayout->play();
- app->fade();
- return true;
+ // Stop the movie and sound early for testing if skip_videos set
+ if (ConfMan.getBool("skip_videos")) {
+ videoSpriteLayout->_tiledSurfacePtr->_frameAnim.setNbFrames(10);
+ music.stop();
+ }
+
+ app->fade();
+ return true;
+ } else {
+ warning("Failed to load movie %s", vidPath.c_str());
+ return false;
+ }
}
void Game::playRandomSound(const Common::String &name) {
Commit: b3b438d1d269917d8b17fa7afff709f387a8c0a4
https://github.com/scummvm/scummvm/commit/b3b438d1d269917d8b17fa7afff709f387a8c0a4
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-02-24T10:30:12+09:00
Commit Message:
TETRAEDGE: Add option to correct movie aspect ratio
Changed paths:
engines/tetraedge/detection.cpp
engines/tetraedge/detection_tables.h
engines/tetraedge/metaengine.cpp
engines/tetraedge/metaengine.h
engines/tetraedge/tetraedge.h
diff --git a/engines/tetraedge/detection.cpp b/engines/tetraedge/detection.cpp
index 7b2ce9c44b0..d5ec376df17 100644
--- a/engines/tetraedge/detection.cpp
+++ b/engines/tetraedge/detection.cpp
@@ -20,6 +20,7 @@
*/
#include "tetraedge/detection.h"
+#include "tetraedge/metaengine.h"
#include "tetraedge/detection_tables.h"
const DebugChannelDef TetraedgeMetaEngineDetection::debugFlagList[] = {
diff --git a/engines/tetraedge/detection_tables.h b/engines/tetraedge/detection_tables.h
index 685464a620c..5928e1a80c1 100644
--- a/engines/tetraedge/detection_tables.h
+++ b/engines/tetraedge/detection_tables.h
@@ -39,7 +39,7 @@ const ADGameDescription GAME_DESCRIPTIONS[] = {
Common::EN_ANY,
Common::kPlatformMacintosh,
ADGF_UNSTABLE,
- GUIO1(GUIO_NONE)
+ GUIO1(GAMEOPTION_CORRECT_MOVIE_ASPECT)
},
// GOG release
@@ -50,7 +50,7 @@ const ADGameDescription GAME_DESCRIPTIONS[] = {
Common::EN_ANY,
Common::kPlatformMacintosh,
ADGF_UNSTABLE,
- GUIO1(GUIO_NONE)
+ GUIO1(GAMEOPTION_CORRECT_MOVIE_ASPECT)
},
AD_TABLE_END_MARKER
diff --git a/engines/tetraedge/metaengine.cpp b/engines/tetraedge/metaengine.cpp
index 10d7d9cd0d7..eea67eb4513 100644
--- a/engines/tetraedge/metaengine.cpp
+++ b/engines/tetraedge/metaengine.cpp
@@ -22,6 +22,28 @@
#include "tetraedge/metaengine.h"
#include "tetraedge/detection.h"
#include "tetraedge/tetraedge.h"
+#include "common/str-array.h"
+#include "common/translation.h"
+#include "common/gui_options.h"
+
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_CORRECT_MOVIE_ASPECT,
+ {
+ _s("Correct movie aspect ratio"),
+ _s("Play Syberia cutscenes in 16:9, rather than stretching to full screen"),
+ "correct_movie_aspect",
+ true,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
+const ADExtraGuiOptionsMap *TetraedgeMetaEngine::getAdvancedExtraGuiOptions() const {
+ return optionsList;
+}
const char *TetraedgeMetaEngine::getName() const {
return "tetraedge";
diff --git a/engines/tetraedge/metaengine.h b/engines/tetraedge/metaengine.h
index 08c9d062c27..15887127977 100644
--- a/engines/tetraedge/metaengine.h
+++ b/engines/tetraedge/metaengine.h
@@ -25,6 +25,8 @@
#include "engines/achievements.h"
#include "engines/advancedDetector.h"
+#define GAMEOPTION_CORRECT_MOVIE_ASPECT GUIO_GAMEOPTIONS1
+
class TetraedgeMetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override;
@@ -33,6 +35,8 @@ public:
void getSavegameThumbnail(Graphics::Surface &thumb) override;
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override;
+
/**
* Determine whether the engine supports the specified MetaEngine feature.
*
diff --git a/engines/tetraedge/tetraedge.h b/engines/tetraedge/tetraedge.h
index c0e1351303c..49e9ff58fe7 100644
--- a/engines/tetraedge/tetraedge.h
+++ b/engines/tetraedge/tetraedge.h
@@ -97,7 +97,8 @@ public:
return
(f == kSupportsLoadingDuringRuntime) ||
(f == kSupportsSavingDuringRuntime) ||
- (f == kSupportsReturnToLauncher);
+ (f == kSupportsReturnToLauncher) ||
+ (f == kSupportsChangingOptionsDuringRuntime);
};
bool canLoadGameStateCurrently() override;
More information about the Scummvm-git-logs
mailing list