aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorAlexander Tkachev2016-08-15 19:10:27 +0600
committerEugene Sandulenko2016-08-30 23:26:29 +0200
commit75c48fd195e510167d02fdc603411fcee4343b00 (patch)
tree1f8d482832d35661030b1e00f427efca42949c5e /engines
parentd7377c43edb818580213b7da1e78b68647065e45 (diff)
downloadscummvm-rg350-75c48fd195e510167d02fdc603411fcee4343b00.tar.gz
scummvm-rg350-75c48fd195e510167d02fdc603411fcee4343b00.tar.bz2
scummvm-rg350-75c48fd195e510167d02fdc603411fcee4343b00.zip
HE: Replacing some Logic stubs with Net stubs
Slowly moving kludge switch case contents into ScummVM Logic methods and thus adding more Net stubs.
Diffstat (limited to 'engines')
-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: