[Scummvm-git-logs] scummvm master -> 01711fd8f9e1a459b2adab004b85eb319157b2f3

neuromancer neuromancer at users.noreply.github.com
Sat Jul 3 17:00:47 UTC 2021


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:
01711fd8f9 PRIVATE: it shows again the list of locations in non-US releases


Commit: 01711fd8f9e1a459b2adab004b85eb319157b2f3
    https://github.com/scummvm/scummvm/commit/01711fd8f9e1a459b2adab004b85eb319157b2f3
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2021-07-03T18:58:42+02:00

Commit Message:
PRIVATE: it shows again the list of locations in non-US releases

Changed paths:
    engines/private/decompiler.cpp
    engines/private/funcs.cpp
    engines/private/symbol.cpp
    engines/private/symbol.h


diff --git a/engines/private/decompiler.cpp b/engines/private/decompiler.cpp
index 08a6b4ffe7..0838792e9d 100644
--- a/engines/private/decompiler.cpp
+++ b/engines/private/decompiler.cpp
@@ -170,6 +170,7 @@ void Decompiler::decompile(Common::Array<byte> &buffer, bool mac) {
 			inDefineRects = false;
 		}
 	}
+	ss += "\ndefine locations { k0, k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13, k14 }";
 	_result = ss;
 }
 
diff --git a/engines/private/funcs.cpp b/engines/private/funcs.cpp
index 289f88de96..544f85a88b 100644
--- a/engines/private/funcs.cpp
+++ b/engines/private/funcs.cpp
@@ -52,8 +52,11 @@ static void fChgMode(ArgArray args) {
 	} else
 		assert(0);
 
-	if (args.size() == 3)
-		setSymbol(args[2].u.sym, true);
+	if (args.size() == 3) {
+		Symbol *location = g_private->maps.lookupLocation(args[2].u.sym->name);
+		debug("location: %s", location->name->c_str());
+		setSymbol(location, true);
+	}
 
 	// This is the only place where this should be used
 	if (g_private->_noStopSounds) {
diff --git a/engines/private/symbol.cpp b/engines/private/symbol.cpp
index 4ca25c55be..916b95d770 100644
--- a/engines/private/symbol.cpp
+++ b/engines/private/symbol.cpp
@@ -105,19 +105,20 @@ static Symbol *install(const Common::String &n, int t, int d, const char *s, Com
 
 /* lookup some name in some symbol table */
 Symbol *SymbolMaps::lookupRect(Common::String *n) {
-	//debug("looking rect up %s", n->c_str());
-
 	assert(rects.contains(*n));
 	return lookup(*n, rects);
 }
 
 Symbol *SymbolMaps::lookupVariable(Common::String *n) {
-	//debug("looking variable up %s", n->c_str());
-
 	assert(variables.contains(*n));
 	return lookup(*n, variables);
 }
 
+Symbol *SymbolMaps::lookupLocation(Common::String *n) {
+	assert(locations.contains(*n));
+	return lookup(*n, locations);
+}
+
 /* lookup some name in some symbol table */
 Symbol *SymbolMaps::lookupName(const char *n) {
 
diff --git a/engines/private/symbol.h b/engines/private/symbol.h
index 1a6ed304f4..15c9a79e36 100644
--- a/engines/private/symbol.h
+++ b/engines/private/symbol.h
@@ -72,6 +72,7 @@ public:
 
 	Symbol *constant(int t, int d, const char *s);
 	Symbol *lookupVariable(Common::String *n);
+	Symbol *lookupLocation(Common::String *n);
 	Symbol *lookupRect(Common::String *n);
 	Symbol *lookupName(const char *n);
 	void installAll(const char *n);




More information about the Scummvm-git-logs mailing list