Opened 23 years ago

Closed 23 years ago

Last modified 6 years ago

#7902 closed patch

resource extension patch

Reported by: SF/japj Owned by:
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game:

Description

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.

Attachments (1)

samnmax_demo_extension_patch (2.9 KB ) - added by SF/japj 23 years ago.
resource extension patch

Download all attachments as: .zip

Change History (9)

by SF/japj, 23 years ago

resource extension patch

comment:1 by SF/japj, 23 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 SF/strigeus, 23 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 SF/japj, 23 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 SF/strigeus, 23 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 SF/japj, 23 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 SF/japj, 23 years ago

Status: newclosed

comment:7 by SF/japj, 23 years ago

postponing & closing until we have a better way to deal with this

comment:8 by digitall, 6 years ago

Component: Engine: SCUMM
Note: See TracTickets for help on using tickets.