X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=highscores.c;fp=highscores.c;h=d1866ae58d5a86a1cba27503e508ae3003fb9a78;hb=22f62f001f21d1b91fefd9fc495c122d9ddf205a;hp=6593b9a47696c20382aac41b192fd424d03dffbb;hpb=a5cdfe2fc872f03c7988d63498abb7e7827325c1;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/highscores.c b/highscores.c index 6593b9a..d1866ae 100644 --- a/highscores.c +++ b/highscores.c @@ -3,13 +3,13 @@ #include "highscores.h" -VG_STATIC int highscore_cmp_points( void *a, void *b ) +static int highscore_cmp_points( void *a, void *b ) { highscore_record *pa = a, *pb = b; return (int)pa->points - (int)pb->points; } -VG_STATIC int highscore_cmp_datetime( void *a, void *b ) +static int highscore_cmp_datetime( void *a, void *b ) { highscore_record *pa = a, *pb = b; @@ -17,27 +17,27 @@ VG_STATIC int highscore_cmp_datetime( void *a, void *b ) return pa->datetime < pb->datetime? 1: -1; } -VG_STATIC int highscore_cmp_time( void *a, void *b ) +static int highscore_cmp_time( void *a, void *b ) { highscore_record *pa = a, *pb = b; return (int)pb->time - (int)pa->time; } -VG_STATIC int highscore_cmp_playerid( void *a, void *b ) +static int highscore_cmp_playerid( void *a, void *b ) { highscore_record *pa = a, *pb = b; if( pa->playerid == pb->playerid ) return 0; return pa->playerid < pb->playerid? -1: 1; } -VG_STATIC int highscore_cmp_playerinfo_playerid( void *a, void *b ) +static int highscore_cmp_playerinfo_playerid( void *a, void *b ) { highscore_playerinfo *pa = a, *pb = b; if( pa->playerid == pb->playerid ) return 0; return pa->playerid < pb->playerid? -1: 1; } -VG_STATIC void highscores_create_db(void) +static void highscores_create_db(void) { struct highscore_system *sys = &highscore_system; @@ -64,7 +64,7 @@ VG_STATIC void highscores_create_db(void) sys->dbheader.playerinfo_root = AATREE_PTR_NIL; } -VG_STATIC int highscores_read(void) +static int highscores_read(void) { struct highscore_system *sys = &highscore_system; @@ -111,7 +111,7 @@ VG_STATIC int highscores_read(void) } } -VG_STATIC void highscores_init( u32 pool_size, u32 playerinfo_pool_size ) +static void highscores_init( u32 pool_size, u32 playerinfo_pool_size ) { struct highscore_system *sys = &highscore_system; @@ -168,7 +168,7 @@ VG_STATIC void highscores_init( u32 pool_size, u32 playerinfo_pool_size ) sys->pool_size = pool_size; } -VG_STATIC int highscores_serialize_all(void) +static int highscores_serialize_all(void) { struct highscore_system *sys = &highscore_system; vg_info( "Serializing database\n" ); @@ -191,7 +191,7 @@ VG_STATIC int highscores_serialize_all(void) return 1; } -VG_STATIC highscore_record *highscore_find_user_record( u64 playerid, +static highscore_record *highscore_find_user_record( u64 playerid, u32 trackid ) { struct highscore_system *sys = &highscore_system; @@ -209,7 +209,7 @@ VG_STATIC highscore_record *highscore_find_user_record( u64 playerid, return aatree_get_data( &sys->aainfo_playerid, find ); } -VG_STATIC aatree_ptr highscores_push_record( highscore_record *record ) +static aatree_ptr highscores_push_record( highscore_record *record ) { struct highscore_system *sys = &highscore_system; @@ -278,7 +278,7 @@ VG_STATIC aatree_ptr highscores_push_record( highscore_record *record ) return index; } -VG_STATIC aatree_ptr highscore_set_user_nickname( u64 steamid, char nick[16] ) +static aatree_ptr highscore_set_user_nickname( u64 steamid, char nick[16] ) { char name[17]; for( int i=0; i<16; i++ ) @@ -328,7 +328,7 @@ VG_STATIC aatree_ptr highscore_set_user_nickname( u64 steamid, char nick[16] ) } /* Get the length of a string, bounded by '\0' or len, whichever is first */ -VG_STATIC int highscore_strlen( const char *str, int len ) +static int highscore_strlen( const char *str, int len ) { int str_length; for( str_length=0; str_length