71 e.
add(
"Failed reading RIM file");
81 ResourceList::iterator res =
_resources.begin();
#define MKTAG(a0, a1, a2, a3)
A wrapper macro used around four character constants, like 'DATA', to ensure portability.
uint16 readUint16LE()
Read an unsigned 16-bit word stored in little endian (LSB first) order from the stream and return it...
void add(const char *s,...) GCC_PRINTF(2
Common::SeekableReadStream * getResource(uint32 index, bool tryNoCopy=false) const
Return a stream of the resource's contents.
uint32 readUint32LE()
Read an unsigned 32-bit word stored in little endian (LSB first) order from the stream and return it...
ResourceList _resources
External list of resource names and types.
virtual size_t seek(ptrdiff_t offset, Origin whence=kOriginBegin)=0
Sets the stream position indicator for the stream.
void readResList(Common::SeekableReadStream &rim, uint32 offset)
Handling BioWare's RIMs (resource archives).
const IResource & getIResource(uint32 index) const
static const uint32 kVersion1
Implementing the reading stream interfaces for plain memory blocks.
uint32 getResourceSize(uint32 index) const
Return the size of a resource.
uint32 offset
The offset of the resource within the RIM.
Utility templates and functions for working with strings and streams.
Exception that provides a stack of explanations.
static void readHeader(Common::ReadStream &stream, uint32 &id, uint32 &version, bool &utf16le)
Read the header out of a stream.
Basic exceptions to throw.
Utility templates and functions.
std::list< Resource > ResourceList
Internal resource information.
virtual size_t skip(ptrdiff_t offset)
Skip the specified number of bytes, adding that offset to the current position in the stream...
Utility functions for working with differing string encodings.
uint32 _id
The file's ID.
uint32 _version
The file's version.
const ResourceList & getResources() const
Return the list of resources.
Plain, unextended ASCII (7bit clean).
PointerType get() const
Returns the plain pointer value.
static const uint32 kRIMID
IResourceList _iResources
Internal list of resource offsets and sizes.
UString debugTag(uint32 tag, bool trim)
Create an elaborate string from an integer tag, for debugging purposes.
Common::ScopedPtr< Common::SeekableReadStream > _rim
FileType
Various file types used by the Aurora engine and found in archives.
UString readStringFixed(SeekableReadStream &stream, Encoding encoding, size_t length)
Read length bytes as a string with the given encoding out of a stream.
SeekableSubReadStream provides access to a SeekableReadStream restricted to the range [begin...
RIMFile(Common::SeekableReadStream *rim)
Take over this stream and read a RIM file out of it.
Interface for a seekable & readable data stream.
uint32 size
The resource's size.
void load(Common::SeekableReadStream &rim)