Not a SCUMMVM problem or question per se, but I could use a little help with it anyway, so I thought I'd ask here!
Is there any way to compress the speech*.clu files from Broken Sword (1) They take up the majority of the space and I'd like the game to be somewhat more compact, to be honest (so it'll leave more space for other games on my MS).
I already encoded the music wav files to ogg files, but now I'm wondering if there's a way to compress the speech files as well.
If anyone knows a good way to do that, I'd really appreciate a pointer in the right direction!
Thanks in advance
Broken Sword file compression
Moderator: ScummVM Team
- eriktorbjorn
- ScummVM Developer
- Posts: 3558
- Joined: Mon Oct 31, 2005 7:39 am
Re: Broken Sword file compression
Look for the "compress_sword1" tool. Like all of the ScummVM compression tools, it's meant for running from a command prompt, and uses an external program (oggenc or lame) to do the actual compression.Largo Lagrande wrote:Is there any way to compress the speech*.clu files from Broken Sword (1) They take up the majority of the space and I'd like the game to be somewhat more compact, to be honest (so it'll leave more space for other games on my MS).
- abelthorne
- Posts: 43
- Joined: Fri Jun 02, 2006 11:50 am
- Location: France
I've just compressed BS1 files usng the compress_sword1 tool. It compressed speech and music files as expected except a small detail : one music file (6M13.WAV) has not been compressed.
Is that normal ? Can I remove it safely ?
EDIT : I can manually compress the file using oggenc, but I wonder why the compress_sword1 tool skips it.
Also, is it possible to compress the *.CLU files apart from the speech files (i.e. COMPACTS.CLU, GENERAL.CLU, etc.) ?
Is that normal ? Can I remove it safely ?
EDIT : I can manually compress the file using oggenc, but I wonder why the compress_sword1 tool skips it.
Also, is it possible to compress the *.CLU files apart from the speech files (i.e. COMPACTS.CLU, GENERAL.CLU, etc.) ?
- eriktorbjorn
- ScummVM Developer
- Posts: 3558
- Joined: Mon Oct 31, 2005 7:39 am
It's not used. The only music files that Broken Sword 1 plays are listed in _tuneList[] in engines/sword1/staticres.cpp, and 6m13 is not in that list.abelthorne wrote:I've just compressed BS1 files usng the compress_sword1 tool. It compressed speech and music files as expected except a small detail : one music file (6M13.WAV) has not been compressed.
Is that normal ? Can I remove it safely ?
There's no support for that in ScummVM.abelthorne wrote:Also, is it possible to compress the *.CLU files apart from the speech files (i.e. COMPACTS.CLU, GENERAL.CLU, etc.) ?
most of that are probably gfx files/animationsabelthorne wrote:Also, is it possible to compress the *.CLU files apart from the speech files (i.e. COMPACTS.CLU, GENERAL.CLU, etc.) ?
I tried converting the pcx files in FOTAQ to bruteforced png files once, the gain was negligible
anyway, BS1 with cutscenes and mp3-compressed audio comes to about 364 mbyte, anyone today should be able to live with that HD usage
- abelthorne
- Posts: 43
- Joined: Fri Jun 02, 2006 11:50 am
- Location: France
Yes, the size is not an issue. It was juste by curiosity : I wondered why some CLU files could be compressed and others could not. That didn't leap to my mind immediately that they were data files other than sound.clem wrote:anyway, BS1 with cutscenes and mp3-compressed audio comes to about 364 mbyte, anyone today should be able to live with that HD usage
- eriktorbjorn
- ScummVM Developer
- Posts: 3558
- Joined: Mon Oct 31, 2005 7:39 am
I don't know about Broken Sword 1, but in Broken Sword 2 the data files that are named after areas in the game - paris, jungle, etc - contain the resources specific to those areas. For instance, paris.clu contains:abelthorne wrote:Yes, the size is not an issue. It was juste by curiosity : I wondered why some CLU files could be compressed and others could not. That didn't leap to my mind immediately that they were data files other than sound.
- 223 Animation resources, total size 19.4M. These are pretty self-explaining.
- 44 WAV File resources, total size 3.5M. These are the sound effects. Cars, birds, etc.
- 9 Screen resources, total size 5.2M. These are the graphics for the rooms. I don't remember if they also contain the scripts specific to that room or not.
- 9 Run List resources, total size 796 bytes. These are lists of resources to run scripts for.
- 8 Walk Grid resources, total size 2K. These control where actors can move.
- general.clu contains... well, lots of things. Animations, icons, mouse cursors, etc.
- players.clu contains mostly animations (George and Nico doing various things, probably), and a few run lists.
- scripts.clu contains the global variables, the object scripts, and the screen managers (used only for debugging?)
- text.clu contains, not surprisingly, text.
It looks like Revolution did consider adding some sort of generic compression for the Broken Sword 2 resources. There are fields in the resource header for compression type, compressed size, etc. I don't know if they decided it wasn't worth the effort, or if they simply ran out of time.