[Scummvm-git-logs] scummvm master -> 03005233f1f8b9138eef3a585488135a169ad35d

bluegr noreply at scummvm.org
Thu Mar 6 12:03:58 UTC 2025


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

Summary:
03005233f1 SWORD25: Add internal debugger launch flag


Commit: 03005233f1f8b9138eef3a585488135a169ad35d
    https://github.com/scummvm/scummvm/commit/03005233f1f8b9138eef3a585488135a169ad35d
Author: Rinevard (136295900+rinevard at users.noreply.github.com)
Date: 2025-03-06T14:03:54+02:00

Commit Message:
SWORD25: Add internal debugger launch flag

Run ScummVM with `./scummvm --debugflags=internaldebugger sword25` to enable the internal debugger.

Changed paths:
    engines/sword25/detection.cpp
    engines/sword25/package/packagemanager.cpp
    engines/sword25/sword25.h


diff --git a/engines/sword25/detection.cpp b/engines/sword25/detection.cpp
index 614c2662edb..de90c956422 100644
--- a/engines/sword25/detection.cpp
+++ b/engines/sword25/detection.cpp
@@ -34,6 +34,7 @@ static const PlainGameDescriptor sword25Game[] = {
 static const DebugChannelDef debugFlagList[] = {
 	{Sword25::kDebugScript, "Script", "Script debug level"},
 	{Sword25::kDebugSound, "Sound", "Sound debug level"},
+	{Sword25::kDebugInternalDebugger, "Internaldebugger", "Internal debugger level"}, 
 	DEBUG_CHANNEL_END
 };
 
diff --git a/engines/sword25/package/packagemanager.cpp b/engines/sword25/package/packagemanager.cpp
index bbb72417003..7bee61fd8de 100644
--- a/engines/sword25/package/packagemanager.cpp
+++ b/engines/sword25/package/packagemanager.cpp
@@ -198,6 +198,14 @@ byte *PackageManager::getFile(const Common::String &fileName, uint *fileSizePtr)
 	int bytesRead = in->read(buffer, in->size());
 	delete in;
 
+	// Modify the buffer to enable internal debugger if needed
+	if (debugChannelSet(-1, kDebugInternalDebugger) && fileName.equals("/system/internal_config.lua")) {
+		char *found = strstr((char *)buffer, "ENGINE_RELEASE_TYPE = 'pub'");
+		if (found != nullptr) {
+			memcpy(found + 23, "dev", 3);
+		}
+	}
+
 	if (!bytesRead) {
 		delete[] buffer;
 		return NULL;
diff --git a/engines/sword25/sword25.h b/engines/sword25/sword25.h
index 68ca637767b..0b173fb6c89 100644
--- a/engines/sword25/sword25.h
+++ b/engines/sword25/sword25.h
@@ -55,6 +55,7 @@ enum {
 enum {
 	kDebugScript = 1,
 	kDebugSound,
+	kDebugInternalDebugger,
 	kDebugResource,
 };
 




More information about the Scummvm-git-logs mailing list