al_fseek
bool al_fseek(ALLEGRO_FILE *f, int64_t offset, int whence)
Introduced in 5.0.0
Set the current position of the given file to a position relative to that specified by 'whence', plus 'offset' number of bytes.
'whence' can be:
- ALLEGRO_SEEK_SET - seek relative to beginning of file
- ALLEGRO_SEEK_CUR - seek relative to current file position
- ALLEGRO_SEEK_END - seek relative to end of file
Returns true on success, false on failure. errno is set to indicate the error.
After a successful seek, the end-of-file indicator is cleared and all pushback bytes are forgotten.
On some platforms this function may not support large files.
See also: al_ftell, al_get_errno
Examples: ex_memfile
Most helpful discussions:
- Bug in allegro filestytem? I think that reads are drifting!
- Does PhysFS work for you with Allegro 5.2.2?
- Get binary stream of bitmap - al_save_bitmap_f() or something like this
- Decrypting files in memory and reading them.
- [A5] trouble writing ALLEGRO_BITMAP to zip file
- Android al_fseek() and al_ftell() Not Working
- [A5] loading multiple images stored in a single .dat
- fast put_pixels(again) or al_load_bitmap(void* data)
- trouble writing file