Re: Re: [AD] set_config_file jumping around on OS X bundles |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> From: Elias Pschernig <elias@xxxxxxxxxx>
> Can we still add an entry to the system driver? Then we could solve this
> properly instead of adding another hack.
>
> char *system_driver.get_path(int type, int name)
>
> name would be the name of my game, type would be one of (and what it
> would return in linux):
As long as all your games have numeric names, like '1984', '3036' etc ;)
> Possibly we could later add more type constants, but these 4 are the
> ones I would use right now.
>
We are thinking along the same lines, this is some code that I wrote for KQ
/* Get the directory for application data (music, gfx, etc.)
or user data (screenshots, prefs, saved games)
*/
const char *kqres (int dir_id, const char *file);
#define DATA_DIR 0
#define MAP_DIR 1
#define SAVE_DIR 2
#define MUSIC_DIR 3
#define SCRIPT_DIR 4
#define SETTINGS_DIR 5
#define PCX_DATAFILE kqres(DATA_DIR, "mpcx.dat")
#define SPELL_DATAFILE kqres(DATA_DIR, "ssprites.dat")
#define SOUND_DATAFILE kqres(DATA_DIR, "kqsnd.dat")
Obviously these are a bit game specific but you get the idea...
Pete
-----------------------------------------
Email sent from www.ntlworld.com
Virus-checked using McAfee(R) Software
Visit www.ntlworld.com/security for more information