diff options
author | Alexander Tkachev | 2016-08-17 15:05:12 +0600 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-30 23:26:29 +0200 |
commit | 0f82e2acdc594b96ca7016215f24b879336de6fd (patch) | |
tree | b5108969cea86d07777a492f34a4f4264b023ef0 /engines/scumm | |
parent | da35b451d6b7f5f2289b6991b642ec9852b726f6 (diff) | |
download | scummvm-rg350-0f82e2acdc594b96ca7016215f24b879336de6fd.tar.gz scummvm-rg350-0f82e2acdc594b96ca7016215f24b879336de6fd.tar.bz2 scummvm-rg350-0f82e2acdc594b96ca7016215f24b879336de6fd.zip |
SCUMM HE: Add two more kludges
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/he/logic/moonbase_logic.cpp | 5 | ||||
-rw-r--r-- | engines/scumm/he/moonbase/net_main.cpp | 13 | ||||
-rw-r--r-- | engines/scumm/he/moonbase/net_main.h | 4 |
3 files changed, 18 insertions, 4 deletions
diff --git a/engines/scumm/he/logic/moonbase_logic.cpp b/engines/scumm/he/logic/moonbase_logic.cpp index 1e18b6030f..bea5672b71 100644 --- a/engines/scumm/he/logic/moonbase_logic.cpp +++ b/engines/scumm/he/logic/moonbase_logic.cpp @@ -500,11 +500,10 @@ int LogicHEmoonbase::op_net_who_am_i(int op, int numArgs, int32 *args) { 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; + return _vm1->_moonbase->_net->setProviderByName(args[0], args[1]); } void LogicHEmoonbase::op_net_set_fake_latency(int op, int numArgs, int32 *args) { - warning("STUB: op_net_set_fake_latency()"); + _vm1->_moonbase->_net->setFakeLatency(args[0]); } int LogicHEmoonbase::op_net_get_host_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 3d251266d1..fb835ebfd4 100644 --- a/engines/scumm/he/moonbase/net_main.cpp +++ b/engines/scumm/he/moonbase/net_main.cpp @@ -26,7 +26,7 @@ namespace Scumm { -Net::Net(ScummEngine_v100he *vm) : _vm(vm) { +Net::Net(ScummEngine_v100he *vm) : _latencyTime(1), _fakeLatency(false), _vm(vm) { //some defaults for fields } @@ -82,6 +82,17 @@ void Net::setBotsCount(int botsCount) { warning("STUB: Net::setBotsCount(%d)", botsCount); // PN_SetAIPlayerCountKludge } +int32 Net::setProviderByName(int32 parameter1, int32 parameter2) { + warning("STUB: Net::setProviderByName(%d, %d)", parameter1, parameter2); // PN_SetProviderByName + return 0; +} + +void Net::setFakeLatency(int time) { + _latencyTime = time; + debug("NETWORK: Setting Fake Latency to %d ms \n", _latencyTime); // TODO: is it OK to use debug instead of SPUTM_xprintf? + _fakeLatency = true; +} + 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 fb7dffe0ac..41dc45a14b 100644 --- a/engines/scumm/he/moonbase/net_main.h +++ b/engines/scumm/he/moonbase/net_main.h @@ -44,6 +44,8 @@ public: void disableSessionJoining(); void enableSessionJoining(); void setBotsCount(int botsCount); + int32 setProviderByName(int32 parameter1, int32 parameter2); + void setFakeLatency(int time); private: @@ -57,6 +59,8 @@ private: public: //fields + int _latencyTime; // ms + bool _fakeLatency; ScummEngine_v100he *_vm; }; |