return set_exists(i) ? SET_GET(sets, i)->shot : NULL;
}
-const struct score *set_time_score(int i)
+const struct score *set_score(int i, int s)
{
- return set_exists(i) ? &SET_GET(sets, i)->time_score : NULL;
-}
-
-const struct score *set_coin_score(int i)
-{
- return set_exists(i) ? &SET_GET(sets, i)->coin_score : NULL;
+ if (set_exists(i))
+ {
+ if (s == SCORE_TIME) return &SET_GET(sets, i)->time_score;
+ if (s == SCORE_COIN) return &SET_GET(sets, i)->coin_score;
+ }
+ return NULL;
}
/*---------------------------------------------------------------------------*/
const char *set_name(int);
const char *set_desc(int);
const char *set_shot(int);
-const struct score *set_time_score(int);
-const struct score *set_coin_score(int);
+const struct score *set_score(int, int);
int set_score_update (int, int, int *, int *);
void set_rename_player(int, int, const char *);
gui_layout(id, 0, 0);
}
- set_score_board(set_coin_score(curr_set()), progress_score_rank(),
- set_time_score(curr_set()), progress_times_rank(),
+ set_score_board(set_score(curr_set(), SCORE_COIN), progress_score_rank(),
+ set_score(curr_set(), SCORE_TIME), progress_times_rank(),
NULL, -1);
/* Reset hack. */
{
gui_set_image(shot_id, set_shot(curr_set()));
- set_score_board(set_coin_score(curr_set()), -1,
- set_time_score(curr_set()), -1,
+ set_score_board(set_score(curr_set(), SCORE_COIN), -1,
+ set_score(curr_set(), SCORE_TIME), -1,
NULL, -1);
}