コード例 #1
0
ファイル: button.cpp プロジェクト: briandamaged/openglad
// For right-button
Sint32 vbutton::do_call_right(Sint32 whatfunc, Sint32 arg)
{
	switch (whatfunc)
	{
		case DECREASE_STAT:
			return decrease_stat(arg, 5);
		case INCREASE_STAT:
			return increase_stat(arg, 5);
		default:
			return 4;
	}
}
コード例 #2
0
ファイル: button.cpp プロジェクト: briandamaged/openglad
Sint32 vbutton::do_call(Sint32 whatfunc, Sint32 arg)
{
	switch (whatfunc)
	{
		case BEGINMENU:
			return beginmenu(arg);
		case CREATE_TEAM_MENU:
			return create_team_menu(arg);
		case SET_PLAYER_MODE:
			return set_player_mode(arg);
		case QUIT_MENU:
			quit(arg);
			return 1;
		case CREATE_VIEW_MENU:
			return create_view_menu(arg);
		case CREATE_EDIT_MENU:
			return create_edit_menu(arg);
		case CREATE_BUY_MENU:
			return create_buy_menu(arg);
		case CREATE_LOAD_MENU:
			return create_load_menu(arg);
		case CREATE_SAVE_MENU:
			return create_save_menu(arg);
		case GO_MENU:
			return go_menu(arg);
		case RETURN_MENU:
			return arg;
		case CYCLE_TEAM_GUY:
			return cycle_team_guy(arg);
		case DECREASE_STAT:
			return decrease_stat(arg);
		case INCREASE_STAT:
			return increase_stat(arg);
		case EDIT_GUY:
			return edit_guy(arg);
		case CYCLE_GUY:
			return cycle_guy(arg);
		case ADD_GUY:
			return add_guy(arg);
		case DO_SAVE:
			return do_save(arg);
		case DO_LOAD:
			return do_load(arg);
		case NAME_GUY: // name some guy
			return name_guy(arg);
		case CREATE_DETAIL_MENU:
			return create_detail_menu(NULL);
		case DO_SET_SCEN_LEVEL:
			return do_set_scen_level(arg);
		case SET_DIFFICULTY:
			return set_difficulty();
		case CHANGE_TEAM:
			return change_teamnum(arg);
		case CHANGE_HIRE_TEAM:
			return change_hire_teamnum(arg);
		case ALLIED_MODE:
			return change_allied();
		case YES_OR_NO:
			return yes_or_no(arg);
		default:
			return 4;
	}
}
コード例 #3
0
ファイル: button.cpp プロジェクト: openglad/openglad
Sint32 vbutton::do_call(Sint32 whatfunc, Sint32 arg)
{
    switch (whatfunc)
    {
    case BEGINMENU:
        return beginmenu(arg);
    case CREATE_TEAM_MENU:
        return create_team_menu(arg);
    case SET_PLAYER_MODE:
        return set_player_mode(arg);
    case QUIT_MENU:
        quit(arg);
        return 1;
    case CREATE_VIEW_MENU:
        return create_view_menu(arg);
    case CREATE_TRAIN_MENU:
        return create_train_menu(arg);
    case CREATE_HIRE_MENU:
        return create_hire_menu(arg);
    case CREATE_LOAD_MENU:
        return create_load_menu(arg);
    case CREATE_SAVE_MENU:
        return create_save_menu(arg);
    case GO_MENU:
        return go_menu(arg);
    case RETURN_MENU:
        return arg;
    case CYCLE_TEAM_GUY:
        return cycle_team_guy(arg);
    case DECREASE_STAT:
        return decrease_stat(arg);
    case INCREASE_STAT:
        return increase_stat(arg);
    case EDIT_GUY:
        return edit_guy(arg);
    case CYCLE_GUY:
        return cycle_guy(arg);
    case ADD_GUY:
        return add_guy(arg);
    case DO_SAVE:
        return do_save(arg);
    case DO_LOAD:
        return do_load(arg);
    case NAME_GUY: // name some guy
        return name_guy(arg);
    case CREATE_DETAIL_MENU:
        return create_detail_menu(NULL);
    case DO_SET_SCEN_LEVEL:
        return do_set_scen_level(arg);
    case DO_PICK_CAMPAIGN:
        return do_pick_campaign(arg);
    case SET_DIFFICULTY:
        return set_difficulty();
    case CHANGE_TEAM:
        return change_teamnum(arg);
    case CHANGE_HIRE_TEAM:
        return change_hire_teamnum(arg);
    case ALLIED_MODE:
        return change_allied();
    case DO_LEVEL_EDIT:
        return level_editor();
    case YES_OR_NO:
        return yes_or_no(arg);
    case MAIN_OPTIONS:
        return main_options();
    case TOGGLE_SOUND:
        toggle_effect("sound", "sound");
        return REDRAW;
    case TOGGLE_RENDERING_ENGINE:
        toggle_rendering_engine();
        return REDRAW;
    case TOGGLE_FULLSCREEN:
        toggle_effect("graphics", "fullscreen");
        myscreen->set_fullscreen(cfg.is_on("graphics", "fullscreen"));
        return REDRAW;
    case OVERSCAN_ADJUST:
        return overscan_adjust(arg);
    case TOGGLE_MINI_HP_BAR:
        toggle_effect("effects", "mini_hp_bar");
        return REDRAW;
    case TOGGLE_HIT_FLASH:
        toggle_effect("effects", "hit_flash");
        return REDRAW;
    case TOGGLE_HIT_RECOIL:
        toggle_effect("effects", "hit_recoil");
        return REDRAW;
    case TOGGLE_ATTACK_LUNGE:
        toggle_effect("effects", "attack_lunge");
        return REDRAW;
    case TOGGLE_HIT_ANIM:
        toggle_effect("effects", "hit_anim");
        return REDRAW;
    case TOGGLE_DAMAGE_NUMBERS:
        toggle_effect("effects", "damage_numbers");
        return REDRAW;
    case TOGGLE_HEAL_NUMBERS:
        toggle_effect("effects", "heal_numbers");
        return REDRAW;
    case TOGGLE_GORE:
        toggle_effect("effects", "gore");
        return REDRAW;
    case RESTORE_DEFAULT_SETTINGS:
        restore_default_settings();
        cfg.load_settings();
        return REDRAW;
    default:
        return OK;
    }
}