Re: [AD] Allegro 4.3 file location API |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Tue, 2005-11-15 at 22:33 +0000, Peter Hull wrote:
> I added some thoughts about a file location API to the wiki:
> http://awiki.tomasu.org/bin/view/Main/FileSystems
>
> Here's what I wrote:
>
> Different platforms store files in different places, so paths can't be
> hardcoded. I propose a simple API like this:
> enum FILE_LOCATION
> {
> SYSTEM_SETTINGS,
> APP_RESOURCES,
> USER_SETTINGS
> };
>
I would name them:
ALLEGRO_PATH,
SHARED_PATH,
USER_PATH
Else you assume that all settings are per-user, and all resources are
shared. But a game could look like this:
/usr/games/mygame/settings/mygame.cfg
/usr/games/mygame/data/mygame.data
$(HOME)/.mygame/settings/mygame.cfg
$(HOME)/.mygame/data/mygame.data
And I would first read the shared settings, and load the shared data,
then additionally load the local settings (overriding shared ones), and
then load the local data (e.g. addons/mods).
--
Elias Pschernig