diff options
-rw-r--r-- | engines/scumm/he/logic/moonbase_logic.cpp | 18 | ||||
-rw-r--r-- | engines/scumm/he/moonbase/net_main.cpp | 21 | ||||
-rw-r--r-- | engines/scumm/he/moonbase/net_main.h | 4 |
3 files changed, 34 insertions, 9 deletions
diff --git a/engines/scumm/he/logic/moonbase_logic.cpp b/engines/scumm/he/logic/moonbase_logic.cpp index d7158beb7c..da37417fe0 100644 --- a/engines/scumm/he/logic/moonbase_logic.cpp +++ b/engines/scumm/he/logic/moonbase_logic.cpp @@ -399,21 +399,23 @@ 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; + return _vm1->_moonbase->_net->queryProviders(); } + int LogicHEmoonbase::op_net_get_provider_name(int op, int numArgs, int32 *args) { - warning("STUB: op_net_get_provider_name()"); - return 1; + char name[MAX_PROVIDER_NAME]; + _vm1->_moonbase->_net->getProviderName(args[0] - 1, name, sizeof(name)); + return _vm1->setupStringArrayFromString(name); } + int LogicHEmoonbase::op_net_set_provider(int op, int numArgs, int32 *args) { - warning("STUB: op_net_set_provider()"); - return 1; + return _vm1->_moonbase->_net->setProvider(args[0] - 1); } + int LogicHEmoonbase::op_net_close_provider(int op, int numArgs, int32 *args) { - warning("STUB: op_net_close_provider()"); - return 1; + return _vm1->_moonbase->_net->closeProvider(); } int LogicHEmoonbase::op_net_start_query_sessions(int op, int numArgs, int32 *args) { diff --git a/engines/scumm/he/moonbase/net_main.cpp b/engines/scumm/he/moonbase/net_main.cpp index 71a4b8a2be..8938e05ffb 100644 --- a/engines/scumm/he/moonbase/net_main.cpp +++ b/engines/scumm/he/moonbase/net_main.cpp @@ -123,6 +123,21 @@ int Net::querySessions() { return 0; } +int Net::queryProviders() { + warning("STUB: Net::queryProviders()"); // PN_QueryProviders + return 0; +} + +int Net::setProvider(int providerIndex) { + warning("STUB: Net::setProvider(%d)", providerIndex); // PN_SetProvider + return 0; +} + +int Net::closeProvider() { + warning("STUB: Net::closeProvider()"); // PN_CloseProvider + return 0; +} + bool Net::getHostName(char *hostname, int length) { warning("STUB: Net::getHostName(\"%s\", %d)", hostname, length); // PN_GetHostName return false; @@ -134,7 +149,7 @@ bool Net::getIPfromName(char *ip, int ipLength, char *nameBuffer) { } void Net::getSessionName(int sessionNumber, char *buffer, int length) { - warning("STUB: Net::getSessionPlayerCount(%d, \"%s\", %d)", sessionNumber, buffer, length); // PN_GetSessionName + warning("STUB: Net::getSessionName(%d, \"%s\", %d)", sessionNumber, buffer, length); // PN_GetSessionName } int Net::getSessionPlayerCount(int sessionNumber) { @@ -144,4 +159,8 @@ int Net::getSessionPlayerCount(int sessionNumber) { return 0; } +void Net::getProviderName(int providerIndex, char *buffer, int length) { + warning("STUB: Net::getProviderName(%d, \"%s\", %d)", providerIndex, buffer, length); // PN_GetProviderName +} + } // End of namespace Scumm diff --git a/engines/scumm/he/moonbase/net_main.h b/engines/scumm/he/moonbase/net_main.h index 12f255a7ee..0490c1ce10 100644 --- a/engines/scumm/he/moonbase/net_main.h +++ b/engines/scumm/he/moonbase/net_main.h @@ -52,6 +52,9 @@ public: int32 updateQuerySessions(); void stopQuerySessions(); int querySessions(); + int queryProviders(); + int setProvider(int providerIndex); + int closeProvider(); private: @@ -61,6 +64,7 @@ public: bool getIPfromName(char *ip, int ipLength, char *nameBuffer); void getSessionName(int sessionNumber, char *buffer, int length); int getSessionPlayerCount(int sessionNumber); + void getProviderName(int providerIndex, char *buffer, int length); private: //mostly getters |