Exemplo n.º 1
0
int64_t ReadFile::readSLE64()
{
    PHYSFS_sint64 val;
    if(!PHYSFS_readSLE64(file, &val))
        throw Exception("read error: %s", PHYSFS_getLastError());
    return val;
}
Exemplo n.º 2
0
int64 FileStream::get64()
{
    int64 v = 0;
    if(!m_caching) {
        if(PHYSFS_readSLE64(m_fileHandle, (PHYSFS_sint64*)&v) == 0)
            throwError("read failed", true);
    } else {
        if(m_pos+8 > m_data.size())
            throwError("read failed");
        v = stdext::readSLE64(&m_data[m_pos]);
        m_pos += 8;
    }
    return v;
}