aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-10-24 18:08:54 +0200
committerEugene Sandulenko2019-10-24 18:08:54 +0200
commitec121da0753259e83bd5219d529a2bdc26ba2d19 (patch)
treed6df7f14d85cf13bbbe9edc3b8f7f3ef7298dd96
parent45d9824c49b0f2c044f347956c3f7fe84358dea1 (diff)
downloadscummvm-rg350-ec121da0753259e83bd5219d529a2bdc26ba2d19.tar.gz
scummvm-rg350-ec121da0753259e83bd5219d529a2bdc26ba2d19.tar.bz2
scummvm-rg350-ec121da0753259e83bd5219d529a2bdc26ba2d19.zip
SCUMM HE: Set server prefix as variable
-rw-r--r--engines/scumm/he/moonbase/net_main.cpp6
-rw-r--r--engines/scumm/he/moonbase/net_main.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/scumm/he/moonbase/net_main.cpp b/engines/scumm/he/moonbase/net_main.cpp
index a2d76fef4f..b0a58b96e9 100644
--- a/engines/scumm/he/moonbase/net_main.cpp
+++ b/engines/scumm/he/moonbase/net_main.cpp
@@ -37,6 +37,8 @@ Net::Net(ScummEngine_v100he *vm) : _latencyTime(1), _fakeLatency(false), _vm(vm)
_lastResult = 0;
_sessionid = -1;
+
+ _serverprefix = "http://localhost/moonbase";
}
Net::~Net() {
@@ -94,7 +96,7 @@ int Net::whoAmI() {
int Net::createSession(char *name) {
warning("STUB: Net::createSession(\"%s\")", name); // PN_CreateSession
- Networking::PostRequest rq("http://localhost/moonbase/createsession",
+ Networking::PostRequest rq(_serverprefix + "/createsession",
new Common::Callback<Net, Common::JSONValue *>(this, &Net::startQuerySessionsCallback),
new Common::Callback<Net, Networking::ErrorResponse>(this, &Net::startQuerySessionsErrorCallback));
@@ -185,7 +187,7 @@ bool Net::destroyPlayer(int32 playerDPID) {
int32 Net::startQuerySessions() {
warning("STUB: Net::startQuerySessions()"); // StartQuerySessions
- Networking::PostRequest rq("http://localhost/moonbase/lobbies",
+ Networking::PostRequest rq(_serverprefix + "/lobbies",
new Common::Callback<Net, Common::JSONValue *>(this, &Net::startQuerySessionsCallback),
new Common::Callback<Net, Networking::ErrorResponse>(this, &Net::startQuerySessionsErrorCallback));
diff --git a/engines/scumm/he/moonbase/net_main.h b/engines/scumm/he/moonbase/net_main.h
index 2a399d3f83..757fa1ba40 100644
--- a/engines/scumm/he/moonbase/net_main.h
+++ b/engines/scumm/he/moonbase/net_main.h
@@ -103,6 +103,8 @@ public:
int _lastResult;
int _sessionid;
+
+ Common::String _serverprefix;
};
} // End of namespace Scumm