[Scummvm-git-logs] scummvm master -> 6a6da736f857fb276a62096481206ed9f54e5e23

mgerhardy noreply at scummvm.org
Sun Dec 7 11:23:20 UTC 2025


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

Summary:
5b522731e2 TWINE: LBA2: fixed invalid video index handling
b67cdc0d6b TWINE: autosave descriptions encoded in utf8 now
6a6da736f8 TWINE: fixed imgui assert for using ImGuiInputTextFlags_EnterReturnsTrue for ScalarInput


Commit: 5b522731e21196653a8c2c98d9a061cda5fc3427
    https://github.com/scummvm/scummvm/commit/5b522731e21196653a8c2c98d9a061cda5fc3427
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2025-12-07T12:22:54+01:00

Commit Message:
TWINE: LBA2: fixed invalid video index handling

Changed paths:
    engines/twine/movies.cpp
    engines/twine/resources/resources.cpp


diff --git a/engines/twine/movies.cpp b/engines/twine/movies.cpp
index 67e4b2f0a43..c1cf2179f48 100644
--- a/engines/twine/movies.cpp
+++ b/engines/twine/movies.cpp
@@ -377,6 +377,9 @@ void Movies::playGIFMovie(const char *flaName) {
 bool Movies::playMovie(const char *name) { // PlayAnimFla
 	if (_engine->isLBA2()) {
 		const int index = _engine->_resources->findSmkMovieIndex(name);
+		if (index == -1) {
+			return false;
+		}
 		return playSmkMovie(name, index);
 	}
 
diff --git a/engines/twine/resources/resources.cpp b/engines/twine/resources/resources.cpp
index 545fa757b0e..8a047c9c560 100644
--- a/engines/twine/resources/resources.cpp
+++ b/engines/twine/resources/resources.cpp
@@ -261,6 +261,10 @@ const Trajectory *Resources::giveTrajPtr(int index) const {
 int Resources::findSmkMovieIndex(const char *name) const {
 	Common::String smkName = name;
 	smkName.toLowercase();
+	if (!_movieInfo.contains(smkName)) {
+		warning("Movie '%s' not found in movie info", smkName.c_str());
+		return -1;
+	}
 	const Common::Array<int32> &info = getMovieInfo(smkName);
 	return info[0];
 }


Commit: b67cdc0d6bd4f21cedeff5e5ca5a230fa4026608
    https://github.com/scummvm/scummvm/commit/b67cdc0d6bd4f21cedeff5e5ca5a230fa4026608
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2025-12-07T12:22:54+01:00

Commit Message:
TWINE: autosave descriptions encoded in utf8 now

Changed paths:
    engines/twine/twine.cpp


diff --git a/engines/twine/twine.cpp b/engines/twine/twine.cpp
index 7406aa16a7d..c903de2629a 100644
--- a/engines/twine/twine.cpp
+++ b/engines/twine/twine.cpp
@@ -477,8 +477,9 @@ Common::Error TwinEEngine::saveGameStream(Common::WriteStream *stream, bool isAu
 }
 
 void TwinEEngine::autoSave() {
-	debug("Autosave %s", _gameState->_sceneName);
-	saveGameState(getAutosaveSlot(), _gameState->_sceneName, true);
+	Common::U32String originalSceneName(_gameState->_sceneName, Common::kDos850);
+	const Common::String sceneName = originalSceneName.encode(Common::kUtf8);
+	saveGameState(getAutosaveSlot(), sceneName, true);
 }
 
 void TwinEEngine::allocVideoMemory(int32 w, int32 h) {


Commit: 6a6da736f857fb276a62096481206ed9f54e5e23
    https://github.com/scummvm/scummvm/commit/6a6da736f857fb276a62096481206ed9f54e5e23
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2025-12-07T12:23:02+01:00

Commit Message:
TWINE: fixed imgui assert for using ImGuiInputTextFlags_EnterReturnsTrue for ScalarInput

Changed paths:
    engines/twine/debugger/debugtools.cpp


diff --git a/engines/twine/debugger/debugtools.cpp b/engines/twine/debugger/debugtools.cpp
index 8eca01f0c25..9a56700c310 100644
--- a/engines/twine/debugger/debugtools.cpp
+++ b/engines/twine/debugger/debugtools.cpp
@@ -50,7 +50,8 @@ namespace ImGuiEx {
 
 bool InputIVec3(const char *label, TwinE::IVec3 &v, ImGuiInputTextFlags flags = 0) {
 	int tmp[3] = {v.x, v.y, v.z};
-	if (ImGui::InputInt3(label, tmp, flags)) {
+	ImGui::InputInt3(label, tmp, flags);
+	if (ImGui::IsItemDeactivatedAfterEdit()) {
 		v.x = tmp[0];
 		v.y = tmp[1];
 		v.z = tmp[2];
@@ -72,14 +73,14 @@ bool InputAngle(const char *label, int32 *v, int step = 1, int step_fast = 100,
 bool InputBoundingBox(ImGuiID id, const char *prefixLabel, TwinE::BoundingBox &bbox) {
 	TwinE::BoundingBox copy = bbox;
 	Common::String idStr = Common::String::format("%s mins##mins%u", prefixLabel, id);
-	if (ImGuiEx::InputIVec3(idStr.c_str(), copy.mins, ImGuiInputTextFlags_EnterReturnsTrue)) {
+	if (ImGuiEx::InputIVec3(idStr.c_str(), copy.mins)) {
 		if (copy.isValid()) {
 			bbox.mins = copy.mins;
 		}
 		return true;
 	}
 	idStr = Common::String::format("%s maxs##maxs%u", prefixLabel, id);
-	if (ImGuiEx::InputIVec3(idStr.c_str(), copy.maxs, ImGuiInputTextFlags_EnterReturnsTrue)) {
+	if (ImGuiEx::InputIVec3(idStr.c_str(), copy.maxs)) {
 		if (copy.isValid()) {
 			bbox.maxs = copy.maxs;
 		}




More information about the Scummvm-git-logs mailing list