static void set_stick(int id, int a, int v) { int jd = shared_stick_basic(id, a, v); int i = gui_token(jd); if (jd && set_exists(i)) set_over(i); }
static int conf_click(int b, int d) { if (gui_click(b, d)) return conf_action(gui_token(gui_active())); return 1; }
static void set_point(int id, int x, int y, int dx, int dy) { int jd = shared_point_basic(id, x, y); int i = gui_token(jd); if (jd && set_exists(i)) set_over(i); }
static void demo_stick(int id, int a, float v, int bump) { int jd = shared_stick_basic(id, a, v, bump); if (jd && gui_token(jd) == DEMO_SELECT) gui_demo_update_status(gui_value(jd)); }
static void demo_point(int id, int x, int y, int dx, int dy) { int jd = shared_point_basic(id, x, y); if (jd && gui_token(jd) == DEMO_SELECT) gui_demo_update_status(gui_value(jd)); }
static void demo_stick(int id, int a, int v) { int jd = shared_stick_basic(id, a, v); int i = gui_token(jd); if (jd && i >= 0 && !GUI_ISMSK(i)) gui_demo_update_status(i); }
static void demo_point(int id, int x, int y, int dx, int dy) { int jd = shared_point_basic(id, x, y); int i = gui_token(jd); if (jd && i >= 0 && !GUI_ISMSK(i)) gui_demo_update_status(i); }
int common_click(int b, int d) { if (gui_click(b, d)) { int active = gui_active(); return common_action(gui_token(active), gui_value(active)); } return 1; }
static int conf_click(int b, int d) { if (gui_click(b, d)) return conf_action(gui_token(gui_active())); else if (gui_click_right(b, d)) return goto_state(&st_title); return 1; }
static int resol_click(int b, int d) { if (gui_click(b, d)) { int active = gui_active(); return resol_action(gui_token(active), gui_value(active)); } return 1; }
static int pause_buttn(int b, int d) { if (d) { if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return pause_action(gui_token(gui_click())); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b)) return pause_action(PAUSE_CONTINUE); } return 1; }
static int demo_del_buttn(int b, int d) { if (d) { if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return demo_del_action(gui_token(gui_click())); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b)) return demo_del_action(DEMO_KEEP); } return 1; }
static int party_buttn(int b, int d) { if (d) { if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return party_action(gui_token(gui_click())); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b)) return party_action(PARTY_B); } return 1; }
static int title_buttn(int b, int d) { if (d) { if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return title_action(gui_token(gui_click())); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b)) return title_action(TITLE_EXIT); } return 1; }
static int time_out_buttn(int b, int d) { if (d) { if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return time_out_action(gui_token(gui_click())); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b)) return time_out_action(TIME_OUT_BACK); } return 1; }
static int set_buttn(int b, int d) { if (d) { if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return set_action(gui_token(gui_click())); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b)) return set_action(GUI_BACK); } return 1; }
static int conf_buttn(int b, int d) { if (d) { if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return conf_action(gui_token(gui_active())); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_B, b)) return goto_state(&st_title); } return 1; }
static int course_buttn(int b, int d) { if (d) { if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return course_action(gui_token(gui_click())); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b)) return course_action(COURSE_BACK); } return 1; }
static int demo_del_buttn(int b, int d) { if (d) { int active = gui_active(); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return demo_del_action(gui_token(active), gui_value(active)); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_B, b)) return demo_del_action(DEMO_KEEP, 0); } return 1; }
static int start_buttn(int b, int d) { if (d) { if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return start_action(gui_token(gui_click())); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_B, b)) return goto_state(&st_title); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b)) return goto_state(&st_title); } return 1; }
static int title_buttn(int b, int d) { if (d) { int active = gui_active(); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return title_action(gui_token(active), gui_value(active)); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b)) return 0; } return 1; }
static int goal_buttn(int b, int d) { if (d) { int active = gui_active(); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return goal_action(gui_token(active), gui_value(active)); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_B, b)) return goal_action(GUI_BACK, 0); } return 1; }
static int title_buttn(int b, int d) { if (d) { if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return title_action(gui_token(gui_active())); //senquack - made it so pressing B on main menu doesn't exit the program #ifndef GCWZERO if (config_tst_d(CONFIG_JOYSTICK_BUTTON_B, b)) return title_action(TITLE_EXIT); #endif //GCWZERO } return 1; }
static int pause_buttn(int b, int d) { if (d) { int active = gui_active(); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return pause_action(gui_token(active), gui_value(active)); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_B, b) || config_tst_d(CONFIG_JOYSTICK_BUTTON_START, b)) return pause_action(PAUSE_CONTINUE, 0); } return 1; }
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 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 int demo_end_buttn(int b, int d) { if (d) { if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return demo_end_action(gui_token(gui_click())); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b)) { if (demo_paused) return demo_end_action(DEMO_CONTINUE); else return demo_end_action(standalone ? DEMO_QUIT : DEMO_KEEP); } } return 1; }
static int name_buttn(int b, int d) { if (d) { if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) { int tok = gui_token(gui_active()); int val = gui_value(gui_active()); return name_action(tok, (tok == GUI_CHAR ? gui_keyboard_char(val) : val)); } if (config_tst_d(CONFIG_JOYSTICK_BUTTON_B, b)) name_action(GUI_BACK, 0); } return 1; }
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); } }