Opened 22 years ago
Closed 22 years ago
Last modified 5 years ago
#7902 closed patch
resource extension patch
|Reported by:||SF/japj||Owned by:|
Some games (sam & max demo) have an additional extension to the resource files (SM for Sam & Max, LA for Full Throttle). This means the generic resource open code that tries to open .000/.001 files fails because those files do not exist.
The attached patch fixes this by adding an additional field to the version detection code (resExt - resource extension). When this field is set (!=0) it contains a string that should be appended to the _exe_name (together with an 'appropriate' room number). This results in the resource filenames SNMDEMO.SM0 and SNMDEMO.SM1 wich allows the sam & max demo to run correctly without renaming the files to .000 and .001
care should be taken when applying this patch since it does not incorporate the DOTTDEMO version info yet (could result in a conflict with the other patch present in the patch manager).
Ticket imported from: #479274. Ticket imported from: patches/7.
Change History (9)
by , 22 years ago
comment:1 by , 22 years ago
btw, I don't know if the VersionSettings structure is supposed to be use for this, but we could also store info about wether a game uses .000/.001, .lfl, disc01.lec, etc files.
comment:2 by , 22 years ago
I don't feel quite satisfied with this solution. It requires that the filenames of sam&max are in uppercase, on case sensitive file systems. I think an auto detection system would be better, when "scummvm samnmax" is invoked, ScummVM locates all samnmax.* (case insensitive) files and tries to determine the file format from there.
comment:3 by , 22 years ago
I agree that it should be done in a cleaner way. But how do I 'nicely' integrate such a thing with scummvm (since we probably need more detection info for the games then currently is provided in the versionsettings structure).
comment:4 by , 22 years ago
I havn't been able to find any platform independent way to iterate the files in a directory, do you know any?
comment:5 by , 22 years ago
no, I'm not aware of any platform independant way... you will probably end up writing something like this yourself (unix uses dirent, windows WIN32_FIND_DATA, etc)
comment:6 by , 22 years ago
|Status:||new → closed|
comment:7 by , 22 years ago
postponing & closing until we have a better way to deal with this
comment:8 by , 5 years ago
|Component:||→ Engine: SCUMM|
resource extension patch