Beispiel #1
0
int32 LogicHEmoonbase::dispatch(int op, int numArgs, int32 *args) {
    switch (op) {
    case OP_CREATE_MULTI_STATE_WIZ:
        op_create_multi_state_wiz(op, numArgs, args);
        break;
    case OP_LOAD_MULTI_CHANNEL_WIZ:
        op_load_multi_channel_wiz(op, numArgs, args);
        break;
    case OP_WIZ_FROM_MULTI_CHANNEL_WIZ:
        op_wiz_from_multi_channel_wiz(op, numArgs, args);
        break;
    case OP_DOS_COMMAND:
        op_dos_command(op, numArgs, args);
        break;
    case OP_SET_FOW_SENTINEL:
        op_set_fow_sentinel(args);
        break;
    case OP_SET_FOW_INFORMATION:
        op_set_fow_information(op, numArgs, args);
        break;
    case OP_SET_FOW_IMAGE:
        op_set_fow_image(op, numArgs, args);
        break;

    case OP_AI_TEST_KLUDGE:
        op_ai_test_kludge(op, numArgs, args);
        break;
    case OP_AI_MASTER_CONTROL_PROGRAM:
        op_ai_master_control_program(op, numArgs, args);
        break;
    case OP_AI_RESET:
        op_ai_reset(op, numArgs, args);
        break;
    case OP_AI_SET_TYPE:
        op_ai_set_type(op, numArgs, args);
        break;
    case OP_AI_CLEAN_UP:
        op_ai_clean_up(op, numArgs, args);
        break;

    default:
        LogicHE::dispatch(op, numArgs, args);
    }

    return 0;
}
Beispiel #2
0
int32 LogicHEmoonbase::dispatch(int op, int numArgs, int32 *args) {
	switch (op) {
	case OP_CREATE_MULTI_STATE_WIZ:
		op_create_multi_state_wiz(op, numArgs, args);
		break;
	case OP_LOAD_MULTI_CHANNEL_WIZ:
		op_load_multi_channel_wiz(op, numArgs, args);
		break;
	case OP_WIZ_FROM_MULTI_CHANNEL_WIZ:
		op_wiz_from_multi_channel_wiz(op, numArgs, args);
		break;
	case OP_DOS_COMMAND:
		op_dos_command(op, numArgs, args);
		break;
	case OP_SET_FOW_SENTINEL:
		op_set_fow_sentinel(args);
		break;
	case OP_SET_FOW_INFORMATION:
		op_set_fow_information(op, numArgs, args);
		break;
	case OP_SET_FOW_IMAGE:
		return op_set_fow_image(op, numArgs, args);

	case OP_AI_TEST_KLUDGE:
		op_ai_test_kludge(op, numArgs, args);
		break;
	case OP_AI_MASTER_CONTROL_PROGRAM:
		return op_ai_master_control_program(op, numArgs, args);
	case OP_AI_RESET:
		op_ai_reset(op, numArgs, args);
		break;
	case OP_AI_SET_TYPE:
		op_ai_set_type(op, numArgs, args);
		break;
	case OP_AI_CLEAN_UP:
		op_ai_clean_up(op, numArgs, args);
		break;

#ifdef USE_SDL_NET
	case OP_NET_REMOTE_START_SCRIPT:
		op_net_remote_start_script(op, numArgs, args);
		break;
	case OP_NET_REMOTE_SEND_ARRAY:
		op_net_remote_send_array(op, numArgs, args);
		break;
	case OP_NET_REMOTE_START_FUNCTION:
		return op_net_remote_start_function(op, numArgs, args);
	case OP_NET_DO_INIT_ALL:
		return op_net_do_init_all(op, numArgs, args);
	case OP_NET_DO_INIT_PROVIDER:
		return op_net_do_init_provider(op, numArgs, args);
	case OP_NET_DO_INIT_SESSION:
		return op_net_do_init_session(op, numArgs, args);
	case OP_NET_DO_INIT_USER:
		return op_net_do_init_user(op, numArgs, args);
	case OP_NET_QUERY_PROVIDERS:
		return op_net_query_providers(op, numArgs, args);
	case OP_NET_GET_PROVIDER_NAME:
		return op_net_get_provider_name(op, numArgs, args);
	case OP_NET_SET_PROVIDER:
		return op_net_set_provider(op, numArgs, args);
	case OP_NET_CLOSE_PROVIDER:
		return op_net_close_provider(op, numArgs, args);
	case OP_NET_START_QUERY_SESSIONS:
		return op_net_start_query_sessions(op, numArgs, args);
	case OP_NET_UPDATE_QUERY_SESSIONS:
		return op_net_update_query_sessions(op, numArgs, args);
	case OP_NET_STOP_QUERY_SESSIONS:
		return op_net_stop_query_sessions(op, numArgs, args);
	case OP_NET_QUERY_SESSIONS:
		return op_net_query_sessions(op, numArgs, args);
	case OP_NET_GET_SESSION_NAME:
		return op_net_get_session_name(op, numArgs, args);
	case OP_NET_GET_SESSION_PLAYER_COUNT:
		return op_net_get_session_player_count(op, numArgs, args);
	case OP_NET_DESTROY_PLAYER:
		return op_net_destroy_player(op, numArgs, args);
#if 1 // 12/2/99 BPT
	case OP_NET_GET_PLAYER_LONG_NAME:
		return op_net_get_player_long_name(op, numArgs, args);
	case OP_NET_GET_PLAYER_SHORT_NAME:
		return op_net_get_player_short_name(op, numArgs, args);
#endif
	case OP_NET_CREATE_SESSION:
		return op_net_create_session(op, numArgs, args);
	case OP_NET_JOIN_SESSION:
		return op_net_join_session(op, numArgs, args);
	case OP_NET_END_SESSION:
		return op_net_end_session(op, numArgs, args);
	case OP_NET_DISABLE_SESSION_PLAYER_JOIN:
		return op_net_disable_session_player_join(op, numArgs, args);
	case OP_NET_ENABLE_SESSION_PLAYER_JOIN:
		return op_net_enable_session_player_join(op, numArgs, args);
	case OP_NET_SET_AI_PLAYER_COUNT:
		return op_net_set_ai_player_count(op, numArgs, args);
	case OP_NET_ADD_USER:
		return op_net_add_user(op, numArgs, args);
	case OP_NET_REMOVE_USER:
		return op_net_remove_user(op, numArgs, args);
	case OP_NET_WHO_SENT_THIS:
		return op_net_who_sent_this(op, numArgs, args);
	case OP_NET_WHO_AM_I:
		return op_net_who_am_i(op, numArgs, args);
	case OP_NET_SET_PROVIDER_BY_NAME:
		return op_net_set_provider_by_name(op, numArgs, args);
	case OP_NET_SET_FAKE_LATENCY: //  SET_FAKE_LAG is a valid alias for backwards compatibility
		op_net_set_fake_latency(op, numArgs, args);
		break;
	case OP_NET_GET_HOST_NAME:
		return op_net_get_host_name(op, numArgs, args);
	case OP_NET_GET_IP_FROM_NAME:
		return op_net_get_ip_from_name(op, numArgs, args);
	case OP_NET_HOST_TCPIP_GAME:
		return op_net_host_tcpip_game(op, numArgs, args);
	case OP_NET_JOIN_TCPIP_GAME:
		return op_net_join_tcpip_game(op, numArgs, args);
#endif

	default:
		LogicHE::dispatch(op, numArgs, args);
	}

	return 0;
}