⚠ Cookies ⚠

By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.

Projects

AGS EngineFilesFile.Seek
RadiantI was surprised to find that AGS doesn't have a file seek operation (i.e. move the file pointer to a given offset from the file start). Could this please be added? This could be a simple wrapper for C++'s fseek() function.
Crimson WizardSome thoughts on this.

Although this does not stand out much, but AGS works with files in two modes: raw and safe.
"Safe" functions read and write extra tags into file that let AGS trace if data is unserialized properly.

Common Seek is not usable for "safe" files, because file cursor may be easily positioned in the middle of data field.
I propose to consider implementing a file work mode which would restrict file to one of the function sets (safe or unsafe).
Or, maybe split File class into two parts... although I wonder if backwards-compatibility could be maintained then.

In either case we could also add safe Seek that would only move between tagged fields in file.
RadiantThis is intended for plain binary files; I've never used the "safe" format myself, and indeed as you say seeking in that can't be expected to work.
© Adventure Game Studio 2024. Page design by loominous and Darth Mandarb; coding by AGA.
Page generated on 06 May 2024 at 07:05:10