A port of the open-source rewrite Cave Story game engine for various platforms. Original author is Caitlin "rogueeve" Shaw, https://nxengine.sourceforge.io/
LoadFXCache scans the file until if hits in EOF, so it requires a way of knowing when the end of the file is reached. Previously, loading the sound effects cache would always crash the program. The new fgeti and fgetl variants provide a way for callers to handle EOF manually instead of aborting the program.
As a sidenote, I'm not sure that the relatively new behavior aborting on any EOF is desirable, but if that's what we're going to do, we at least need a way of detecting EOF without causing the program to exit.
Also, I'm not sure where to get a copy of Caitlin Shaw's Makegen program, so I just manually added function declarations to the fdh files.
LoadFXCache scans the file until if hits in EOF, so it requires a way of knowing when the end of the file is reached. Previously, loading the sound effects cache would always crash the program. The new fgeti and fgetl variants provide a way for callers to handle EOF manually instead of aborting the program.
As a sidenote, I'm not sure that the relatively new behavior aborting on any EOF is desirable, but if that's what we're going to do, we at least need a way of detecting EOF without causing the program to exit.
Also, I'm not sure where to get a copy of Caitlin Shaw's Makegen program, so I just manually added function declarations to the fdh files.