[Scummvm-git-logs] scummvm master -> 44a831d0a4ce60d05fb3f4a8759e398ba9f0650e

sev- noreply at scummvm.org
Thu Jun 27 20:30:13 UTC 2024


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

Summary:
92c4e5984f DEVTOOLS: DIRECTOR: fix XlibProto table entry gen
44a831d0a4 DEVTOOLS: DIRECTOR: Remove unused variable


Commit: 92c4e5984fefb165d186b71b2fe836243b954a45
    https://github.com/scummvm/scummvm/commit/92c4e5984fefb165d186b71b2fe836243b954a45
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2024-06-27T22:30:10+02:00

Commit Message:
DEVTOOLS: DIRECTOR: fix XlibProto table entry gen

A recent refactoring created simplified the code for defining XOBJs.
This change is now reflected in the generation for XOBJs.

Refactoring commit was: c1b63ed731a18063ae602552873c6c12

Changed paths:
    devtools/director-generate-xobj-stub.py


diff --git a/devtools/director-generate-xobj-stub.py b/devtools/director-generate-xobj-stub.py
index 2fa66210588..9a80cbf048c 100755
--- a/devtools/director-generate-xobj-stub.py
+++ b/devtools/director-generate-xobj-stub.py
@@ -321,7 +321,7 @@ def inject_lingo_object(slug: str, xobj_class: str, director_version: int, xcode
 
     # write entry in the XLibProto table
     lo_contents = open(LINGO_OBJECT_PATH, "r").readlines()
-    expr = re.compile("^\t\\{ ([a-zA-Z0-9_]+)::fileNames")
+    expr = re.compile("^\tXLIBDEF\\(([a-zA-Z0-9_]+),")
     in_xlibs = False
     for i in range(len(lo_contents)):
         m = expr.match(lo_contents[i])
@@ -335,7 +335,7 @@ def inject_lingo_object(slug: str, xobj_class: str, director_version: int, xcode
             elif xobj_class < m.group(1):
                 lo_contents.insert(
                     i,
-                    f"	{{ {xobj_class}::fileNames,			{xobj_class}::open,			{xobj_class}::close,		{obj_type},					{director_version} }},	// D{director_version // 100}\n",
+                    f"	XLIBDEF({xobj_class},		    {obj_type},					{director_version}),	// D{director_version // 100}\n",
                 )
                 with open(LINGO_OBJECT_PATH, "w") as f:
                     f.writelines(lo_contents)
@@ -344,7 +344,7 @@ def inject_lingo_object(slug: str, xobj_class: str, director_version: int, xcode
             # final entry in the list
             lo_contents.insert(
                 i,
-                f"	{{ {xobj_class}::fileNames,			{xobj_class}::open,			{xobj_class}::close,		{obj_type},					{director_version} }},	// D{director_version // 100}\n",
+                f"	XLIBDEF({xobj_class},			{obj_type},					{director_version}),	// D{director_version // 100}\n",
             )
             with open(LINGO_OBJECT_PATH, "w") as f:
                 f.writelines(lo_contents)


Commit: 44a831d0a4ce60d05fb3f4a8759e398ba9f0650e
    https://github.com/scummvm/scummvm/commit/44a831d0a4ce60d05fb3f4a8759e398ba9f0650e
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2024-06-27T22:30:10+02:00

Commit Message:
DEVTOOLS: DIRECTOR: Remove unused variable

The following `BuiltinProto xlibTopLevel[]` is unused
and was flagged during compilation.
It's now removed.

Changed paths:
    devtools/director-generate-xobj-stub.py


diff --git a/devtools/director-generate-xobj-stub.py b/devtools/director-generate-xobj-stub.py
index 9a80cbf048c..65e0ff612a7 100755
--- a/devtools/director-generate-xobj-stub.py
+++ b/devtools/director-generate-xobj-stub.py
@@ -130,11 +130,6 @@ static BuiltinProto xlibBuiltins[] = {{
 	{{ nullptr, nullptr, 0, 0, 0, VOIDSYM }}
 }};
 
-static BuiltinProto xlibTopLevel[] = {{
-{xlib_toplevels}
-	{{ nullptr, nullptr, 0, 0, 0, VOIDSYM }}
-}};
-
 {xobject_class}::{xobject_class}(ObjectType ObjectType) :Object<{xobject_class}>("{name}") {{
 	_objType = ObjectType;
 }}




More information about the Scummvm-git-logs mailing list