/* check players of local game wether they entered a highscore */ static void check_highscores( void ) { int i; chart_clear_new_entries(); for ( i = 0; i < config.player_count; i++ ) chart_add( chart_set_query(game_set->name), players[i].name, players[i].level_id + 1, players[i].stats.total_score ); chart_save(); }
/* ==================================================================== Reset charts ==================================================================== */ void chart_reset( Set_Chart *chart ) { int i; memset( chart->entries, 0, sizeof( Chart_Entry ) * CHART_ENTRY_COUNT ); for ( i = 0; i < CHART_ENTRY_COUNT; i++ ) chart_add( chart, "............", i + 1, 10000 * ( i + 1 ) ); chart->entries[0].score = 300000; chart->entries[1].score = 200000; chart->entries[2].score = 150000; chart->entries[3].score = 100000; chart->entries[4].score = 70000; for ( i = 0; i < CHART_ENTRY_COUNT; i++ ) chart->entries[i].new_entry = 0; }