diff options
author | Alexander Tkachev | 2016-08-15 13:49:53 +0600 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-30 23:26:29 +0200 |
commit | 4df16d6e1255e627665294bf60da0fc3d3e5d9a4 (patch) | |
tree | e6801c841e70cbdb705b93f6ef047988b94fb9d1 | |
parent | 7ac4bddfa92b01df87437c5e25c78488b5d7f628 (diff) | |
download | scummvm-rg350-4df16d6e1255e627665294bf60da0fc3d3e5d9a4.tar.gz scummvm-rg350-4df16d6e1255e627665294bf60da0fc3d3e5d9a4.tar.bz2 scummvm-rg350-4df16d6e1255e627665294bf60da0fc3d3e5d9a4.zip |
HE: Add Moonbase logic ops stubs
Most of them return int, yet there are a few which don't return
anything. Stubs print a warning and return 1 (or nothing).
-rw-r--r-- | engines/scumm/he/logic/moonbase_logic.cpp | 267 |
1 files changed, 267 insertions, 0 deletions
diff --git a/engines/scumm/he/logic/moonbase_logic.cpp b/engines/scumm/he/logic/moonbase_logic.cpp index 150a57e809..89e1e95a16 100644 --- a/engines/scumm/he/logic/moonbase_logic.cpp +++ b/engines/scumm/he/logic/moonbase_logic.cpp @@ -57,6 +57,45 @@ private: void op_ai_set_type(int op, int numArgs, int32 *args); void op_ai_clean_up(int op, int numArgs, int32 *args); +#ifdef USE_SDL_NET + void op_net_remote_start_script(int op, int numArgs, int32 *args); + void op_net_remote_send_array(int op, int numArgs, int32 *args); + int op_net_remote_start_function(int op, int numArgs, int32 *args); + int op_net_do_init_all(int op, int numArgs, int32 *args); + int op_net_do_init_provider(int op, int numArgs, int32 *args); + int op_net_do_init_session(int op, int numArgs, int32 *args); + int op_net_do_init_user(int op, int numArgs, int32 *args); + int op_net_query_providers(int op, int numArgs, int32 *args); + int op_net_get_provider_name(int op, int numArgs, int32 *args); + int op_net_set_provider(int op, int numArgs, int32 *args); + int op_net_close_provider(int op, int numArgs, int32 *args); + int op_net_start_query_sessions(int op, int numArgs, int32 *args); + int op_net_update_query_sessions(int op, int numArgs, int32 *args); + int op_net_stop_query_sessions(int op, int numArgs, int32 *args); + int op_net_query_sessions(int op, int numArgs, int32 *args); + int op_net_get_session_name(int op, int numArgs, int32 *args); + int op_net_get_session_player_count(int op, int numArgs, int32 *args); + int op_net_destroy_player(int op, int numArgs, int32 *args); + int op_net_get_player_long_name(int op, int numArgs, int32 *args); + int op_net_get_player_short_name(int op, int numArgs, int32 *args); + int op_net_create_session(int op, int numArgs, int32 *args); + int op_net_join_session(int op, int numArgs, int32 *args); + int op_net_end_session(int op, int numArgs, int32 *args); + int op_net_disable_session_player_join(int op, int numArgs, int32 *args); + int op_net_enable_session_player_join(int op, int numArgs, int32 *args); + int op_net_set_ai_player_count(int op, int numArgs, int32 *args); + int op_net_add_user(int op, int numArgs, int32 *args); + int op_net_remove_user(int op, int numArgs, int32 *args); + int op_net_who_sent_this(int op, int numArgs, int32 *args); + int op_net_who_am_i(int op, int numArgs, int32 *args); + int op_net_set_provider_by_name(int op, int numArgs, int32 *args); + void op_net_set_fake_latency(int op, int numArgs, int32 *args); + int op_net_get_host_name(int op, int numArgs, int32 *args); + int op_net_get_ip_from_name(int op, int numArgs, int32 *args); + int op_net_host_tcpip_game(int op, int numArgs, int32 *args); + int op_net_join_tcpip_game(int op, int numArgs, int32 *args); +#endif + private: ScummEngine_v100he *_vm1; }; @@ -110,6 +149,7 @@ int LogicHEmoonbase::versionID() { #define OP_NET_HOST_TCPIP_GAME 1517 #define OP_NET_JOIN_TCPIP_GAME 1518 #define OP_NET_SET_FAKE_LAG 1555 +#define OP_NET_SET_FAKE_LATENCY 1555 /* SET_FAKE_LAG is a valid alias for backwards compatibility */ #define OP_NET_GET_HOST_NAME 1556 #define OP_NET_GET_IP_FROM_NAME 1557 #define OP_NET_GET_SESSION_PLAYER_COUNT 1558 @@ -160,6 +200,86 @@ int32 LogicHEmoonbase::dispatch(int op, int numArgs, int32 *args) { 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); } @@ -251,6 +371,153 @@ void LogicHEmoonbase::op_ai_clean_up(int op, int numArgs, int32 *args) { _vm1->_moonbase->_ai->cleanUpAI(); } +#ifdef USE_SDL_NET +void LogicHEmoonbase::op_net_remote_start_script(int op, int numArgs, int32 *args) { + warning("STUB: op_net_remote_start_script()"); +} +void LogicHEmoonbase::op_net_remote_send_array(int op, int numArgs, int32 *args) { + warning("STUB: op_net_remote_send_array()"); +} +int LogicHEmoonbase::op_net_remote_start_function(int op, int numArgs, int32 *args) { + warning("STUB: op_net_remote_start_function()"); + return 1; +} +int LogicHEmoonbase::op_net_do_init_all(int op, int numArgs, int32 *args) { + warning("STUB: op_net_do_init_all()"); + return 1; +} +int LogicHEmoonbase::op_net_do_init_provider(int op, int numArgs, int32 *args) { + warning("STUB: op_net_do_init_provider()"); + return 1; +} +int LogicHEmoonbase::op_net_do_init_session(int op, int numArgs, int32 *args) { + warning("STUB: op_net_do_init_session()"); + return 1; +} +int LogicHEmoonbase::op_net_do_init_user(int op, int numArgs, int32 *args) { + warning("STUB: op_net_do_init_user()"); + return 1; +} +int LogicHEmoonbase::op_net_query_providers(int op, int numArgs, int32 *args) { + warning("STUB: op_net_query_providers()"); + return 1; +} +int LogicHEmoonbase::op_net_get_provider_name(int op, int numArgs, int32 *args) { + warning("STUB: op_net_get_provider_name()"); + return 1; +} +int LogicHEmoonbase::op_net_set_provider(int op, int numArgs, int32 *args) { + warning("STUB: op_net_set_provider()"); + return 1; +} +int LogicHEmoonbase::op_net_close_provider(int op, int numArgs, int32 *args) { + warning("STUB: op_net_close_provider()"); + return 1; +} +int LogicHEmoonbase::op_net_start_query_sessions(int op, int numArgs, int32 *args) { + warning("STUB: op_net_start_query_sessions()"); + return 1; +} +int LogicHEmoonbase::op_net_update_query_sessions(int op, int numArgs, int32 *args) { + warning("STUB: op_net_update_query_sessions()"); + return 1; +} +int LogicHEmoonbase::op_net_stop_query_sessions(int op, int numArgs, int32 *args) { + warning("STUB: op_net_stop_query_sessions()"); + return 1; +} +int LogicHEmoonbase::op_net_query_sessions(int op, int numArgs, int32 *args) { + warning("STUB: op_net_query_sessions()"); + return 1; +} +int LogicHEmoonbase::op_net_get_session_name(int op, int numArgs, int32 *args) { + warning("STUB: op_net_get_session_name()"); + return 1; +} +int LogicHEmoonbase::op_net_get_session_player_count(int op, int numArgs, int32 *args) { + warning("STUB: op_net_get_session_player_count()"); + return 1; +} +int LogicHEmoonbase::op_net_destroy_player(int op, int numArgs, int32 *args) { + warning("STUB: op_net_destroy_player()"); + return 1; +} +int LogicHEmoonbase::op_net_get_player_long_name(int op, int numArgs, int32 *args) { + warning("STUB: op_net_get_player_long_name()"); + return 1; +} +int LogicHEmoonbase::op_net_get_player_short_name(int op, int numArgs, int32 *args) { + warning("STUB: op_net_get_player_short_name()"); + return 1; +} +int LogicHEmoonbase::op_net_create_session(int op, int numArgs, int32 *args) { + warning("STUB: op_net_create_session()"); + return 1; +} +int LogicHEmoonbase::op_net_join_session(int op, int numArgs, int32 *args) { + warning("STUB: op_net_join_session()"); + return 1; +} +int LogicHEmoonbase::op_net_end_session(int op, int numArgs, int32 *args) { + warning("STUB: op_net_end_session()"); + return 1; +} +int LogicHEmoonbase::op_net_disable_session_player_join(int op, int numArgs, int32 *args) { + warning("STUB: op_net_disable_session_player_join()"); + return 1; +} +int LogicHEmoonbase::op_net_enable_session_player_join(int op, int numArgs, int32 *args) { + warning("STUB: op_net_enable_session_player_join()"); + return 1; +} +int LogicHEmoonbase::op_net_set_ai_player_count(int op, int numArgs, int32 *args) { + warning("STUB: op_net_set_ai_player_count()"); + return 1; +} +int LogicHEmoonbase::op_net_add_user(int op, int numArgs, int32 *args) { + warning("STUB: op_net_add_user()"); + return 1; +} +int LogicHEmoonbase::op_net_remove_user(int op, int numArgs, int32 *args) { + warning("STUB: op_net_remove_user()"); + return 1; +} +int LogicHEmoonbase::op_net_who_sent_this(int op, int numArgs, int32 *args) { + warning("STUB: op_net_who_sent_this()"); + return 1; +} +int LogicHEmoonbase::op_net_who_am_i(int op, int numArgs, int32 *args) { + warning("STUB: op_net_who_am_i()"); + return 1; +} + +int LogicHEmoonbase::op_net_set_provider_by_name(int op, int numArgs, int32 *args) { + // Parameter 1 is the provider name and + // Parameter 2 is the (optional) tcp/ip address + warning("STUB: op_net_set_provider_by_name()"); + return 1; +} +void LogicHEmoonbase::op_net_set_fake_latency(int op, int numArgs, int32 *args) { + warning("STUB: op_net_set_fake_latency()"); +} +int LogicHEmoonbase::op_net_get_host_name(int op, int numArgs, int32 *args) { + warning("STUB: op_net_get_host_name()"); + return 1; +} +int LogicHEmoonbase::op_net_get_ip_from_name(int op, int numArgs, int32 *args) { + warning("STUB: op_net_get_ip_from_name()"); + return 1; +} +int LogicHEmoonbase::op_net_host_tcpip_game(int op, int numArgs, int32 *args) { + warning("STUB: op_net_host_tcpip_game()"); + return 1; +} +int LogicHEmoonbase::op_net_join_tcpip_game(int op, int numArgs, int32 *args) { + warning("STUB: op_net_join_tcpip_game()"); + return 1; +} +#endif + LogicHE *makeLogicHEmoonbase(ScummEngine_v100he *vm) { return new LogicHEmoonbase(vm); } |