Files
fallout2-ce/third_party/fpattern
Mike Klaas b97c9864aa Fix global script loading on non-Windows (#347)
* Fix global script loading on non-Windows

Previously, global scripts in .dats and in local FS didn't work due to path separator confusion.

Now:
 * Hardcode global script path to "scripts\gl*.int" (windows separator)
 * Use Windows fpattern matching inside of dFile (.dats, which always use windows separators)
 * Use \-paths when listing found global scripts

The awkward part is having to vendor a copy of fpattern to force it to use "windows mode".  It's possible that we could use this everywhere since windows allows / as separator, but that could cause bugs where we're using fpattern on the native FS.  For now keeping the dFile implementation separate makes sense.
2026-04-01 20:20:57 -07:00
..
2022-05-19 11:51:26 +03:00
2022-05-19 11:51:26 +03:00

fpattern

Fallout 2 uses fpattern v1.07 (see 0x4EB990) to find entries in .DAT files. The closest version I was able to find is v1.08 on the author's website (fpattern.c, fpattern.h). It's not very safe to use such direct links, and I'm not sure if it's possible to download these files via FetchContent. Luckily there is a newer v1.9 on GitHub.