Logo Search packages:      
Sourcecode: einstein version File versions  Download package

void ResourceFile::load ( char *  buf,
long  offset,
long  packedSize,
long  unpackedSize,
int  level 
) [inherited]

Load data in preallocated buffer buf of size unpackedSize.

buf buffer of unpackedSize bytes where unpacked data will be placed
offset offset from start of resource file to packed data
packedSize size of packed resource
unpackedSize size of unpacked resource

Definition at line 223 of file resources.cpp.

    char *inBuf=NULL;
    try {
        if (! level) {
            stream.seekg(offset, std::ios::beg);
            stream.read(buf, unpackedSize);

        stream.seekg(offset, std::ios::beg);
        stream.read((char*)buffer->getData(), packedSize);
        unpack((char*)buffer->getData(), packedSize, buf, unpackedSize);
    } catch (Exception &e) {
        if (inBuf) free(inBuf);
        throw e;
    } catch (...) {
        if (inBuf) free(inBuf);
        throw Exception(name + L": Error loading resource");

Generated by  Doxygen 1.6.0   Back to index