aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/he/logic/moonbase_logic.cpp18
-rw-r--r--engines/scumm/he/moonbase/net_main.cpp24
-rw-r--r--engines/scumm/he/moonbase/net_main.h5
3 files changed, 36 insertions, 11 deletions
diff --git a/engines/scumm/he/logic/moonbase_logic.cpp b/engines/scumm/he/logic/moonbase_logic.cpp
index 9f86147ac1..7e7736835d 100644
--- a/engines/scumm/he/logic/moonbase_logic.cpp
+++ b/engines/scumm/he/logic/moonbase_logic.cpp
@@ -475,21 +475,23 @@ 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;
+ char userName[MAX_PLAYER_NAME];
+ _vm1->getStringFromArray(args[0], userName, sizeof(userName));
+ return _vm1->_moonbase->_net->addUser(userName, userName);
}
+
int LogicHEmoonbase::op_net_remove_user(int op, int numArgs, int32 *args) {
- warning("STUB: op_net_remove_user()");
- return 1;
+ return _vm1->_moonbase->_net->removeUser();
}
+
int LogicHEmoonbase::op_net_who_sent_this(int op, int numArgs, int32 *args) {
- warning("STUB: op_net_who_sent_this()");
- return 1;
+ return _vm1->_moonbase->_net->whoSentThis();
}
+
int LogicHEmoonbase::op_net_who_am_i(int op, int numArgs, int32 *args) {
- warning("STUB: op_net_who_am_i()");
- return 1;
+ return _vm1->_moonbase->_net->whoAmI();
}
int LogicHEmoonbase::op_net_set_provider_by_name(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 dc95303f9f..eb54250fdd 100644
--- a/engines/scumm/he/moonbase/net_main.cpp
+++ b/engines/scumm/he/moonbase/net_main.cpp
@@ -31,12 +31,32 @@ Net::Net(ScummEngine_v100he *vm) : _vm(vm) {
}
int Net::hostGame(char *sessionName, char *userName) {
- warning("STUB: op_net_host_tcpip_game()"); // PN_HostTCPIPGame
+ warning("STUB: op_net_host_tcpip_game(\"%s\", \"%s\")", sessionName, userName); // PN_HostTCPIPGame
return 0;
}
int Net::joinGame(char *IP, char *userName) {
- warning("STUB: Net::joinGame()"); // PN_JoinTCPIPGame
+ warning("STUB: Net::joinGame(\"%s\", \"%s\")", IP, userName); // PN_JoinTCPIPGame
+ return 0;
+}
+
+int Net::addUser(char *shortName, char *longName) {
+ warning("STUB: Net::addUser(\"%s\", \"%s\")", shortName, longName); // PN_AddUser
+ return 0;
+}
+
+int Net::removeUser() {
+ warning("STUB: Net::removeUser()"); // PN_RemoveUser
+ return 0;
+}
+
+int Net::whoSentThis() {
+ warning("STUB: Net::whoSentThis()"); // PN_WhoSentThis
+ return 0;
+}
+
+int Net::whoAmI() {
+ warning("STUB: Net::whoAmI()"); // PN_WhoAmI
return 0;
}
diff --git a/engines/scumm/he/moonbase/net_main.h b/engines/scumm/he/moonbase/net_main.h
index 4a7f898834..f8c289cade 100644
--- a/engines/scumm/he/moonbase/net_main.h
+++ b/engines/scumm/he/moonbase/net_main.h
@@ -35,7 +35,10 @@ public:
int hostGame(char *sessionName, char *userName);
int joinGame(char *IP, char *userName);
-
+ int addUser(char *shortName, char *longName);
+ int removeUser();
+ int whoSentThis();
+ int whoAmI();
private:
public: