static void gui_demo_update_thumbs(void) { int i; for (i = 0; i < ARRAYSIZE(thumbs) && thumbs[i].shot && thumbs[i].name; i++) { gui_set_image(thumbs[i].shot, DEMO_GET(items, thumbs[i].item)->shot); gui_set_label(thumbs[i].name, DEMO_GET(items, thumbs[i].item)->name); } }
static void gui_demo_update_thumbs(void) { struct dir_item *item; struct demo *demo; int i; for (i = 0; i < ARRAYSIZE(thumbs) && thumbs[i].shot && thumbs[i].name; i++) { item = DIR_ITEM_GET(items, thumbs[i].item); demo = item->data; gui_set_image(thumbs[i].shot, demo ? demo->shot : ""); gui_set_label(thumbs[i].name, demo ? demo->name : base_name(item->path)); } }
static void course_stick(int id, int a, int v) { int jd; if ((jd = shared_stick_basic(id, a, v))) { int i = gui_token(jd); if (course_exists(i)) { gui_set_image(shot_id, course_shot(i)); gui_set_multi(desc_id, _(course_desc(i))); } gui_pulse(jd, 1.2f); } }
static void course_point(int id, int x, int y, int dx, int dy) { int jd; if ((jd = gui_point(id, x, y))) { int i = gui_token(jd); if (course_exists(i)) { gui_set_image(shot_id, course_shot(i)); gui_set_multi(desc_id, _(course_desc(i))); } gui_pulse(jd, 1.2f); } }
static void start_point(int id, int x, int y, int dx, int dy) { int jd; if ((jd = gui_point(id, x, y))) { int i = gui_token(jd); gui_set_image(shot_id, level_shot(i)); set_most_coins(i, 3); set_best_times(i, 3); gui_pulse(jd, 1.2f); } }
static void start_over_level(int i) { struct level *l = get_level(i); if (level_opened(l) || config_cheat()) { gui_set_image(shot_id, level_shot(l)); set_score_board(level_score(l, SCORE_COIN), -1, level_score(l, SCORE_TIME), -1, level_score(l, SCORE_GOAL), -1); if (file_id) gui_set_label(file_id, level_file(l)); } }
static void start_stick(int id, int a, int v) { int jd; int x = (config_tst_d(CONFIG_JOYSTICK_AXIS_X, a)) ? v : 0; int y = (config_tst_d(CONFIG_JOYSTICK_AXIS_Y, a)) ? v : 0; if ((jd = gui_stick(id, x, y))) { int i = gui_token(jd); gui_set_image(shot_id, level_shot(i)); set_most_coins(i, 3); set_best_times(i, 3); gui_pulse(jd, 1.2f); } }
static void start_over(int id, int pulse) { if (id) { if (pulse) gui_pulse(id, 1.2f); if (gui_token(id) == START_LEVEL) { start_over_level(gui_value(id)); } else { gui_set_image(shot_id, set_shot(curr_set())); set_score_board(set_score(curr_set(), SCORE_COIN), -1, set_score(curr_set(), SCORE_TIME), -1, NULL, -1); } } }
static void set_over(int i) { gui_set_image(shot_id, set_shot(i)); gui_set_multi(desc_id, set_desc(i)); }