Opened 14 years ago

Closed 14 years ago

Last modified 5 years ago

#9134 closed patch

Tools: compress_sword1 better handling of directory layout

Reported by: criezy Owned by: sev-
Priority: normal Component: Tools
Version: Keywords:
Cc: Game:

Description

I find the way the current compress_sword1 tool handles input and output directories too restrictive. It forces the speech files to be in a SPEECH subdirectory and the music files to be in a MUSIC subdirectory in both input and output directories. Furthermore when using the GUI we have to select a cluster file that is at the root of the game directory, which means the cluster files (or at least one of them) cannot be in a CLUSTER sub-directory.

This patch proposes to fix these issues to let more flexibility in the layout of the input and output directories, which is more in line with what the Sword1 engine in ScummVM accepts. It does three things: 1) GUI accept as input the swordres.rif file, which means the cluster file can now be in a CLUSTER sub-directory. 2) If the speech and music files are not in a SPEECH and MUSIC sub-directory respectively, it looks for them at the root of the input directory. One side effect is that when using --speech-only with the CLI we can now directly give the speech cluster file as input to the tool. 3) If the SPEECH and/or MUSIC sub-directories do not exist in the output directory, the corresponding files are created directly at the root of the output directory.

Concerning point 3, there are alternatives solutions, such as creating the MUSIC and SPEECH sub-directories if they do not exist in the output directory. The choice I made has the advantage to create the files in the same location as the uncompressed files if the input and output directories are the same (unless the SPEECH subdirectory is read-only for example, or this subdirectory exists but does not contain the uncompressed speech files).

Ticket imported from: #2929082. Ticket imported from: patches/1239.

Attachments (1)

compress_sword1_layout_improvements.patch (10.2 KB ) - added by criezy 14 years ago.
Improve handling of input and output directory layouts in compress_sword1

Download all attachments as: .zip

Change History (4)

by criezy, 14 years ago

Improve handling of input and output directory layouts in compress_sword1

comment:1 by sev-, 14 years ago

Owner: set to sev-
Status: newclosed

comment:2 by sev-, 14 years ago

Thank you, committed with slight formatting fixes.

comment:3 by digitall, 5 years ago

Component: Tools
Note: See TracTickets for help on using tickets.