![]() |
OpenXcom
1.0
Open-source clone of the original X-Com
|
Subclass of std::ifstream to handle CAT files. More...
#include <CatFile.h>
Public Member Functions | |
| CatFile (const char *path) | |
| Creates a CAT file stream. More... | |
| ~CatFile () | |
| Cleans up the stream. More... | |
| bool | operator! () const |
| Inherit operator. | |
| int | getAmount () const |
| Get amount of objects. | |
| unsigned int | getObjectSize (unsigned int i) const |
| Get object size. | |
| char * | load (unsigned int i, bool name=false) |
| Load an object into memory. More... | |
Subclass of std::ifstream to handle CAT files.
| OpenXcom::CatFile::CatFile | ( | const char * | path | ) |
Creates a CAT file stream.
A CAT file starts with an index of the offset and size of every file contained within. Each file consists of a filename followed by its contents.
| path | Full path to CAT file. |
| OpenXcom::CatFile::~CatFile | ( | ) |
Cleans up the stream.
Frees associated memory.
| char * OpenXcom::CatFile::load | ( | unsigned int | i, |
| bool | name = false |
||
| ) |
Load an object into memory.
Loads an object into memory.
| i | Object number to load. |
| name | Preserve internal file name. |
1.8.14