sys->dbheader.playerinfo_root = AATREE_PTR_NIL;
}
-static int highscores_read(void)
-{
+static int highscores_read( const char *path ){
struct highscore_system *sys = &highscore_system;
- FILE *fp = fopen( ".aadb", "rb" );
+ if( path == NULL )
+ path = ".aadb";
+
+ FILE *fp = fopen( path, "rb" );
if( fp ){
vg_info( "Loading existing database\n" );
}
else
{
- vg_low( "No existing database found (.aadb)\n" );
+ vg_low( "No existing database found (%s)\n", path );
return 0;
}
}
offsetof(highscore_playerinfo,aa_playerid);
sys->aainfo_playerinfo_playerid.p_cmp = highscore_cmp_playerinfo_playerid;
+ /* TODO: Is this even useable? */
sys->aainfo_playerinfo.base = highscore_system.playerinfo_data;
sys->aainfo_playerinfo.stride = sizeof(highscore_playerinfo);
sys->aainfo_playerinfo.offset = offsetof(highscore_playerinfo,aapn);