synkro
0xdeadbeef
[About Ratpak]
A simple tool to put all your assets (.WAVs, .BMPs or what ever you use) into
one file. It also provides code to load files from ratpak files for usage in
your games or whatever you code (I hope not emus). THIS IS A FIRST RELEASE TO
SEE IF THERE IS ANY DEMAND FOR A TOOL LIKE THIS. Ratpak does not support
compression/encryption yet. At the moment the files just checked with Crc32.
[Usage of Ratpak]
You can create a pakfile by calling ratpak like this:
CODE
ratpak <folder_with_assets> <yourfile.pak>
This will add all files in the folder and its subfolders to the pakfile with
the given name. As an example, with the following command you can create a
test pakfile (in the folder this READ.ME is in).
CODE
ratpak assets test.pak
[Test Ratpak]
In the folder catpak is example code for reading from pakfiles. Catpak also
works as a tester to check the crcs of all files. Try catpak with the pakfile
created above:
CODE
catpak test.pak test.dat
OR
CODE
catpakk test.pak bump.wav
[API]
Well, there is no real API per se. To get a file from a pakfile just use this
function:
CODE
char *Ratpak_getFile(const char *ratpakFile, const char *asset, uint32_t *out_filesize)
This function takes the name of the pakfile and the name of the file in the
pakfile as parameter. it returns a pointer to a buffer containig that file or
NULL otherwise. You can directly access the file now or something like
SDL_Rwops. Adding catpak.c and catpak.h to your project should work in most
cases. You can get details to the ratpak file format in the file
ratpakFormat.hpp. Extensions are welcome!
P.S. :
I have no Windows toolchain and can't provide a Windows executable at the moment. Anyone willing to help me out? I am going to release Ratpak when it has all the features I want it to have anyway. This is more a Beta realease. Maybe someone else did something similar/better; let me knwo. Same goes for anykind of C/C and feature request. (I promise nothing!)
A simple tool to put all your assets (.WAVs, .BMPs or what ever you use) into
one file. It also provides code to load files from ratpak files for usage in
your games or whatever you code (I hope not emus). THIS IS A FIRST RELEASE TO
SEE IF THERE IS ANY DEMAND FOR A TOOL LIKE THIS. Ratpak does not support
compression/encryption yet. At the moment the files just checked with Crc32.
[Usage of Ratpak]
You can create a pakfile by calling ratpak like this:
CODE
ratpak <folder_with_assets> <yourfile.pak>
This will add all files in the folder and its subfolders to the pakfile with
the given name. As an example, with the following command you can create a
test pakfile (in the folder this READ.ME is in).
CODE
ratpak assets test.pak
[Test Ratpak]
In the folder catpak is example code for reading from pakfiles. Catpak also
works as a tester to check the crcs of all files. Try catpak with the pakfile
created above:
CODE
catpak test.pak test.dat
OR
CODE
catpakk test.pak bump.wav
[API]
Well, there is no real API per se. To get a file from a pakfile just use this
function:
CODE
char *Ratpak_getFile(const char *ratpakFile, const char *asset, uint32_t *out_filesize)
This function takes the name of the pakfile and the name of the file in the
pakfile as parameter. it returns a pointer to a buffer containig that file or
NULL otherwise. You can directly access the file now or something like
SDL_Rwops. Adding catpak.c and catpak.h to your project should work in most
cases. You can get details to the ratpak file format in the file
ratpakFormat.hpp. Extensions are welcome!
P.S. :
I have no Windows toolchain and can't provide a Windows executable at the moment. Anyone willing to help me out? I am going to release Ratpak when it has all the features I want it to have anyway. This is more a Beta realease. Maybe someone else did something similar/better; let me knwo. Same goes for anykind of C/C and feature request. (I promise nothing!)