-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All file IO should go through PhysFs #43
Milestone
Comments
I wouldn't necessarily enforce an extra API layer for file I/O, even when we can do it without a run-time overhead. But anything that makes the program more modular is welcome at this point. :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If we ever want to be able to distribute our game, we can't go opening or writing files at random locations. Windows, Linux and Mac have different conventions about where files are supposed to be, and none of them allow writing to the directory where the executable lives.
So I would like to replace all direct calls to fopen etc to calls through PhysFs, which should manage these things for us.
I also think we should put all those calls behind an anti-corruption-layer of our own (engine.h), in case we ever need to move away from PhysFs. It sounds a bit like gold-plating (it kinda violates YAGNI and KISS), but File_Exists and a few others are already there, and it was a huge help to have this layer when moving from Grim to SDL. I might reconsider this if it's too much work, though. :)
The text was updated successfully, but these errors were encountered: