[Scummvm-git-logs] scummvm master -> 063970ba8a26636381fabad8dda47d0a0ef7adcf
mgerhardy
martin.gerhardy at gmail.com
Mon Aug 23 10:17:26 UTC 2021
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
637af0396d TWINE: fixed global main menu binding
a1c9b60557 TWINE: Extended error output
d701616f87 TWINE: disable custom thumbnail for now
6d44405f5a TWINE: fixed savegame thumbnail creation
b3befdf6b9 TWINE: fixed unlocking achievements when resetting game flags
063970ba8a TWINE: removed outdated todo comment
Commit: 637af0396d34b6fc368f5dcbbd03899d9b60fb33
https://github.com/scummvm/scummvm/commit/637af0396d34b6fc368f5dcbbd03899d9b60fb33
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-23T12:17:00+02:00
Commit Message:
TWINE: fixed global main menu binding
bind it to F5 - as ctrl is already bound
Changed paths:
engines/twine/metaengine.cpp
diff --git a/engines/twine/metaengine.cpp b/engines/twine/metaengine.cpp
index b87df8359a..97cc32594c 100644
--- a/engines/twine/metaengine.cpp
+++ b/engines/twine/metaengine.cpp
@@ -209,6 +209,11 @@ Common::KeymapArray TwinEMetaEngine::initKeymaps(const char *target) const {
act->addDefaultInputMapping("JOY_X");
gameKeyMap->addAction(act);
+ act = new Action("MENU", _("Global Main Menu"));
+ act->addDefaultInputMapping("F5");
+ act->setEvent(EVENT_MAINMENU);
+ gameKeyMap->addAction(act);
+
act = new Action("OPTIONSMENU", _("Options Menu"));
act->setCustomEngineActionEvent(TwinEActionType::OptionsMenu);
act->addDefaultInputMapping("F6");
Commit: a1c9b6055703a445b11b47f73156c59a913bf3ec
https://github.com/scummvm/scummvm/commit/a1c9b6055703a445b11b47f73156c59a913bf3ec
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-23T12:17:00+02:00
Commit Message:
TWINE: Extended error output
Changed paths:
engines/twine/script/script_life_v1.cpp
engines/twine/script/script_move_v1.cpp
diff --git a/engines/twine/script/script_life_v1.cpp b/engines/twine/script/script_life_v1.cpp
index 598f5afbdf..62d3d35389 100644
--- a/engines/twine/script/script_life_v1.cpp
+++ b/engines/twine/script/script_life_v1.cpp
@@ -1865,7 +1865,7 @@ void ScriptLife::processLifeScript(int32 actorIdx) {
if (scriptOpcode < ARRAYSIZE(function_map)) {
end = function_map[scriptOpcode].function(_engine, ctx);
} else {
- error("Actor %d with wrong offset/opcode - Offset: %d (opcode: %i)", actorIdx, (int)ctx.stream.pos() - 1, scriptOpcode);
+ error("Actor %d with wrong offset/opcode - Offset: %d/%d (opcode: %i)", actorIdx, (int)ctx.stream.pos() - 1, (int)ctx.stream.size(), scriptOpcode);
}
if (end < 0) {
diff --git a/engines/twine/script/script_move_v1.cpp b/engines/twine/script/script_move_v1.cpp
index c3e540f09c..8caa3a76c5 100644
--- a/engines/twine/script/script_move_v1.cpp
+++ b/engines/twine/script/script_move_v1.cpp
@@ -703,7 +703,7 @@ void ScriptMove::processMoveScript(int32 actorIdx) {
if (scriptOpcode < ARRAYSIZE(function_map)) {
end = function_map[scriptOpcode].function(_engine, ctx);
} else {
- error("Actor %d with wrong offset/opcode - Offset: %d (opcode: %u)", actorIdx, (int)ctx.stream.pos() - 1, scriptOpcode);
+ error("Actor %d with wrong offset/opcode - Offset: %d/%d (opcode: %u)", actorIdx, (int)ctx.stream.pos() - 1, (int)ctx.stream.size(), scriptOpcode);
}
if (end < 0) {
Commit: d701616f87e0c91e0f1c65a614166f5769b23359
https://github.com/scummvm/scummvm/commit/d701616f87e0c91e0f1c65a614166f5769b23359
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-23T12:17:00+02:00
Commit Message:
TWINE: disable custom thumbnail for now
workaround for the save bug that still needs a proper solution for the thumbnails
Changed paths:
engines/twine/metaengine.cpp
diff --git a/engines/twine/metaengine.cpp b/engines/twine/metaengine.cpp
index 97cc32594c..b8a42ba354 100644
--- a/engines/twine/metaengine.cpp
+++ b/engines/twine/metaengine.cpp
@@ -64,12 +64,14 @@ public:
return TwinE::achievementDescriptionList;
}
- void getSavegameThumbnail(Graphics::Surface &thumb) override;
+ //void getSavegameThumbnail(Graphics::Surface &thumb) override;
};
+#if 0
void TwinEMetaEngine::getSavegameThumbnail(Graphics::Surface &thumb) {
thumb.copyFrom(((TwinEEngine*)g_engine)->_workVideoBuffer);
}
+#endif
//
// unused:
Commit: 6d44405f5a3a6822b90933be1f14cd6a87dcaa47
https://github.com/scummvm/scummvm/commit/6d44405f5a3a6822b90933be1f14cd6a87dcaa47
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-23T12:17:00+02:00
Commit Message:
TWINE: fixed savegame thumbnail creation
see https://bugs.scummvm.org/ticket/12827
this fixes a previous error that created invalid thumbnail images
a savegame with an invalid thumbnail included, could not get loaded
Changed paths:
engines/twine/metaengine.cpp
diff --git a/engines/twine/metaengine.cpp b/engines/twine/metaengine.cpp
index b8a42ba354..097b9116fe 100644
--- a/engines/twine/metaengine.cpp
+++ b/engines/twine/metaengine.cpp
@@ -28,10 +28,12 @@
#include "common/system.h"
#include "common/translation.h"
#include "engines/advancedDetector.h"
+#include "graphics/managed_surface.h"
#include "graphics/scaler.h"
#include "twine/achievements_tables.h"
#include "twine/detection.h"
#include "twine/input.h"
+#include "twine/renderer/screens.h"
#include "twine/twine.h"
namespace TwinE {
@@ -60,18 +62,19 @@ public:
Common::Array<Common::Keymap *> initKeymaps(const char *target) const override;
- const Common::AchievementDescriptionList* getAchievementDescriptionList() const override {
+ const Common::AchievementDescriptionList *getAchievementDescriptionList() const override {
return TwinE::achievementDescriptionList;
}
- //void getSavegameThumbnail(Graphics::Surface &thumb) override;
+ void getSavegameThumbnail(Graphics::Surface &thumb) override;
};
-#if 0
void TwinEMetaEngine::getSavegameThumbnail(Graphics::Surface &thumb) {
- thumb.copyFrom(((TwinEEngine*)g_engine)->_workVideoBuffer);
+ TwinEEngine *engine = (TwinEEngine *)g_engine;
+ const Graphics::ManagedSurface &managedSurface = engine->_workVideoBuffer;
+ const Graphics::Surface &screenSurface = managedSurface.rawSurface();
+ ::createThumbnail(&thumb, (const uint8 *)screenSurface.getPixels(), screenSurface.w, screenSurface.h, engine->_screens->_palette);
}
-#endif
//
// unused:
Commit: b3befdf6b93fca48037e9754cbb41cd7d84da4c6
https://github.com/scummvm/scummvm/commit/b3befdf6b93fca48037e9754cbb41cd7d84da4c6
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-23T12:17:01+02:00
Commit Message:
TWINE: fixed unlocking achievements when resetting game flags
Changed paths:
engines/twine/scene/gamestate.cpp
diff --git a/engines/twine/scene/gamestate.cpp b/engines/twine/scene/gamestate.cpp
index 2b5e2ea169..1bc12c049d 100644
--- a/engines/twine/scene/gamestate.cpp
+++ b/engines/twine/scene/gamestate.cpp
@@ -281,8 +281,14 @@ bool GameState::saveGame(Common::WriteStream *file) {
}
void GameState::setGameFlag(uint8 index, uint8 value) {
+ if (_gameStateFlags[index] == value) {
+ return;
+ }
debug(2, "Set gameStateFlags[%u]=%u", index, value);
_gameStateFlags[index] = value;
+ if (!value) {
+ return;
+ }
if ((index == GAMEFLAG_VIDEO_BAFFE || index == GAMEFLAG_VIDEO_BAFFE2 || index == GAMEFLAG_VIDEO_BAFFE3 || index == GAMEFLAG_VIDEO_BAFFE5) &&
_gameStateFlags[GAMEFLAG_VIDEO_BAFFE] != 0 && _gameStateFlags[GAMEFLAG_VIDEO_BAFFE2] != 0 && _gameStateFlags[GAMEFLAG_VIDEO_BAFFE3] != 0 && _gameStateFlags[GAMEFLAG_VIDEO_BAFFE5] != 0) {
Commit: 063970ba8a26636381fabad8dda47d0a0ef7adcf
https://github.com/scummvm/scummvm/commit/063970ba8a26636381fabad8dda47d0a0ef7adcf
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-23T12:17:01+02:00
Commit Message:
TWINE: removed outdated todo comment
Changed paths:
engines/twine/menu/menuoptions.cpp
diff --git a/engines/twine/menu/menuoptions.cpp b/engines/twine/menu/menuoptions.cpp
index 3680c70f77..813113e837 100644
--- a/engines/twine/menu/menuoptions.cpp
+++ b/engines/twine/menu/menuoptions.cpp
@@ -95,7 +95,6 @@ void MenuOptions::newGame() {
}
void MenuOptions::showCredits() {
- // TODO: the camera settings are wrong - this results in rendering problems with e.g. circles
const int32 tmpShadowMode = _engine->_cfgfile.ShadowMode;
_engine->_cfgfile.ShadowMode = 0;
_engine->_gameState->initEngineVars();
More information about the Scummvm-git-logs
mailing list