[Scummvm-git-logs] scummvm master -> 4fc271addca1193db7f5c2d68962fb6a19fa5822
bluegr
noreply at scummvm.org
Wed Dec 2 18:34:15 UTC 2026
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:
089431d6ae DEVTOOLS: Compress Nancy 5 patch files
480d36e270 DEVTOOLS: Add error-checking to create_nancy
4fc271addc DEVTOOLS: Fix CIF type in create_nancy and regen nancy.dat
Commit: 089431d6aeecf3a78579940105e75ccafbf60e51
https://github.com/scummvm/scummvm/commit/089431d6aeecf3a78579940105e75ccafbf60e51
Author: pjsamm (8357867+bgsamm at users.noreply.github.com)
Date: 2026-12-02T20:29:58+02:00
Commit Message:
DEVTOOLS: Compress Nancy 5 patch files
The Nancy engine was changed (de65395590) to decompress CIF files by
resource type instead of the "comp" flag for Nancy 4+. This leads to
crashes in Nancy 5, whose patch files (S3218.cif and S3503.cif) are
uncompressed.
Changed paths:
devtools/create_nancy/files/nancy5/S3218.cif
devtools/create_nancy/files/nancy5/S3503.cif
diff --git a/devtools/create_nancy/files/nancy5/S3218.cif b/devtools/create_nancy/files/nancy5/S3218.cif
index 561d0c334db..5d19eeba03b 100644
Binary files a/devtools/create_nancy/files/nancy5/S3218.cif and b/devtools/create_nancy/files/nancy5/S3218.cif differ
diff --git a/devtools/create_nancy/files/nancy5/S3503.cif b/devtools/create_nancy/files/nancy5/S3503.cif
index b084480768e..5964a1b8cfd 100644
Binary files a/devtools/create_nancy/files/nancy5/S3503.cif and b/devtools/create_nancy/files/nancy5/S3503.cif differ
Commit: 480d36e2709fdc6c7f348279d9c4d32e9c35a7bb
https://github.com/scummvm/scummvm/commit/480d36e2709fdc6c7f348279d9c4d32e9c35a7bb
Author: pjsamm (8357867+bgsamm at users.noreply.github.com)
Date: 2026-12-02T20:29:58+02:00
Commit Message:
DEVTOOLS: Add error-checking to create_nancy
The NCP06na sound patch for Nancy 9 was silently dropped in d3b6140396.
create_nancy ignored a failed file open and wrote the entry without
its data. This commit adds error-checking, printing a message and
aborting the run if a patch file cannot be opened.
Changed paths:
devtools/create_nancy/cif.cpp
devtools/create_nancy/create_nancy.cpp
devtools/create_nancy/types.h
diff --git a/devtools/create_nancy/cif.cpp b/devtools/create_nancy/cif.cpp
index 29da06109d4..eb3b0c2fa26 100644
--- a/devtools/create_nancy/cif.cpp
+++ b/devtools/create_nancy/cif.cpp
@@ -57,7 +57,9 @@ byte *createCifTree(uint16 gameVersion, Common::Array<const char *> filenames, c
strcpy(path, folderName);
strcat(path, "/");
strcat(path, filenames[i]);
- f.open(path, kFileReadMode);
+ if (!f.open(path, kFileReadMode)) {
+ error("Unable to open %s", path);
+ }
delete[] path;
const char *c = filenames[i];
diff --git a/devtools/create_nancy/create_nancy.cpp b/devtools/create_nancy/create_nancy.cpp
index a1eefb0e025..6c2cfe6e0b3 100644
--- a/devtools/create_nancy/create_nancy.cpp
+++ b/devtools/create_nancy/create_nancy.cpp
@@ -93,8 +93,16 @@
output.writeUint32(endOffset);\
output.seek(endOffset);
-void NORETURN_PRE error(const char *s, ...) {
- printf("%s\n", s);
+void error(const char *s, ...) {
+ char buf[1024];
+ va_list va;
+
+ va_start(va, s);
+ vsnprintf(buf, 1024, s, va);
+ va_end(va);
+
+ fprintf(stderr, "ERROR: %s!\n", buf);
+
exit(1);
}
diff --git a/devtools/create_nancy/types.h b/devtools/create_nancy/types.h
index fbd0cf4d442..a86818579d5 100644
--- a/devtools/create_nancy/types.h
+++ b/devtools/create_nancy/types.h
@@ -95,4 +95,6 @@ struct PatchAssociation {
Common::Array<const char *> fileIDs;
};
+void NORETURN_PRE error(const char *s, ...) NORETURN_POST;
+
#endif // CREATE_NANCY_TYPES_H
Commit: 4fc271addca1193db7f5c2d68962fb6a19fa5822
https://github.com/scummvm/scummvm/commit/4fc271addca1193db7f5c2d68962fb6a19fa5822
Author: pjsamm (8357867+bgsamm at users.noreply.github.com)
Date: 2026-12-02T20:29:58+02:00
Commit Message:
DEVTOOLS: Fix CIF type in create_nancy and regen nancy.dat
The Nancy engine was changed (de65395590) to decompress CIF files by
resource type instead of the "comp" flag for Nancy 4+. create_nancy
used resource type 3 for uncompressed file entries. However, type 3 is
treated as compressed by the engine, which would prevent the Nancy 9
NCP06na sound patch from loading. This commit switches to type 1, which
is treated as uncompressed. Type 1 was chosen because it is unused by
the engine and matches the "no compression" comp flag value.
Changed paths:
devtools/create_nancy/cif.cpp
dists/engine-data/nancy.dat
diff --git a/devtools/create_nancy/cif.cpp b/devtools/create_nancy/cif.cpp
index eb3b0c2fa26..48a7dcef3e4 100644
--- a/devtools/create_nancy/cif.cpp
+++ b/devtools/create_nancy/cif.cpp
@@ -199,7 +199,9 @@ byte *createCifTree(uint16 gameVersion, Common::Array<const char *> filenames, c
WRITE_LE_UINT32(ret + retPos + 8, fileSizes[i]);
retPos += 12;
- *(ret + retPos) = 3; // data type
+ // The engine ignores the compression type (above) in Nancy 4+,
+ // so this must be a type that is treated as uncompressed
+ *(ret + retPos) = 1; // data type
++retPos;
}
diff --git a/dists/engine-data/nancy.dat b/dists/engine-data/nancy.dat
index a25e86757ef..9dd485596a9 100644
Binary files a/dists/engine-data/nancy.dat and b/dists/engine-data/nancy.dat differ
More information about the Scummvm-git-logs
mailing list