diff options
author | Alexander Tkachev | 2016-08-17 14:43:53 +0600 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-30 23:26:29 +0200 |
commit | da35b451d6b7f5f2289b6991b642ec9852b726f6 (patch) | |
tree | 83b747af368ac56c22add8f41fd138d3a6b137d8 /engines/scumm | |
parent | 0ffca9c03a8ed84ee319fce367b8227f8488ee7f (diff) | |
download | scummvm-rg350-da35b451d6b7f5f2289b6991b642ec9852b726f6.tar.gz scummvm-rg350-da35b451d6b7f5f2289b6991b642ec9852b726f6.tar.bz2 scummvm-rg350-da35b451d6b7f5f2289b6991b642ec9852b726f6.zip |
SCUMM HE: Add more LogicHEmoonbase kludges
Less stubs there, more stubs in Net.
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/he/logic/moonbase_logic.cpp | 21 | ||||
-rw-r--r-- | engines/scumm/he/moonbase/net_main.cpp | 22 | ||||
-rw-r--r-- | engines/scumm/he/moonbase/net_main.h | 7 |
3 files changed, 40 insertions, 10 deletions
diff --git a/engines/scumm/he/logic/moonbase_logic.cpp b/engines/scumm/he/logic/moonbase_logic.cpp index 9c2145d0f6..1e18b6030f 100644 --- a/engines/scumm/he/logic/moonbase_logic.cpp +++ b/engines/scumm/he/logic/moonbase_logic.cpp @@ -455,24 +455,27 @@ 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; + return _vm1->_moonbase->_net->joinSession(args[0] - 1); } + int LogicHEmoonbase::op_net_end_session(int op, int numArgs, int32 *args) { - warning("STUB: op_net_end_session()"); - return 1; + return _vm1->_moonbase->_net->endSession(); } + int LogicHEmoonbase::op_net_disable_session_player_join(int op, int numArgs, int32 *args) { - warning("STUB: op_net_disable_session_player_join()"); + _vm1->_moonbase->_net->disableSessionJoining(); return 1; } + int LogicHEmoonbase::op_net_enable_session_player_join(int op, int numArgs, int32 *args) { - warning("STUB: op_net_enable_session_player_join()"); + _vm1->_moonbase->_net->enableSessionJoining(); return 1; } + int LogicHEmoonbase::op_net_set_ai_player_count(int op, int numArgs, int32 *args) { - warning("STUB: op_net_set_ai_player_count()"); + _vm1->_moonbase->_net->setBotsCount(args[0]); return 1; } @@ -507,7 +510,7 @@ void LogicHEmoonbase::op_net_set_fake_latency(int op, int numArgs, int32 *args) int LogicHEmoonbase::op_net_get_host_name(int op, int numArgs, int32 *args) { char name[MAX_HOSTNAME_SIZE]; - if (_vm1->_moonbase->_net->getHostName(name, MAX_HOSTNAME_SIZE)) { // PN_GetHostName + if (_vm1->_moonbase->_net->getHostName(name, MAX_HOSTNAME_SIZE)) { return _vm1->setupStringArrayFromString(name); } @@ -520,7 +523,7 @@ int LogicHEmoonbase::op_net_get_ip_from_name(int op, int numArgs, int32 *args) { char ip[MAX_IP_SIZE]; - if (_vm1->_moonbase->_net->getIPfromName(ip, MAX_IP_SIZE, name)) { // PN_GetIPfromName + if (_vm1->_moonbase->_net->getIPfromName(ip, MAX_IP_SIZE, name)) { return _vm1->setupStringArrayFromString(ip); } diff --git a/engines/scumm/he/moonbase/net_main.cpp b/engines/scumm/he/moonbase/net_main.cpp index 2d92313b1d..3d251266d1 100644 --- a/engines/scumm/he/moonbase/net_main.cpp +++ b/engines/scumm/he/moonbase/net_main.cpp @@ -60,6 +60,28 @@ int Net::whoAmI() { return 0; } +int Net::joinSession(int sessionIndex) { + warning("STUB: Net::joinSession(%d)", sessionIndex); // PN_JoinSession + return 0; +} + +int Net::endSession() { + warning("STUB: Net::endSession()"); // PN_EndSession + return 0; +} + +void Net::disableSessionJoining() { + warning("STUB: Net::disableSessionJoining()"); // PN_DisableSessionPlayerJoin +} + +void Net::enableSessionJoining() { + warning("STUB: Net::enableSessionJoining()"); // PN_EnableSessionPlayerJoin +} + +void Net::setBotsCount(int botsCount) { + warning("STUB: Net::setBotsCount(%d)", botsCount); // PN_SetAIPlayerCountKludge +} + bool Net::getHostName(char *hostname, int length) { warning("STUB: Net::getHostName(\"%s\", %d)", hostname, length); // PN_GetHostName return false; diff --git a/engines/scumm/he/moonbase/net_main.h b/engines/scumm/he/moonbase/net_main.h index 8b555942dd..fb7dffe0ac 100644 --- a/engines/scumm/he/moonbase/net_main.h +++ b/engines/scumm/he/moonbase/net_main.h @@ -39,7 +39,12 @@ public: int removeUser(); int whoSentThis(); int whoAmI(); - + int joinSession(int sessionIndex); + int endSession(); + void disableSessionJoining(); + void enableSessionJoining(); + void setBotsCount(int botsCount); + private: public: |