SCUMM HE: Set server prefix as variable

This commit is contained in:
Eugene Sandulenko 2019-10-24 18:08:54 +02:00
parent 45d9824c49
commit ec121da075
2 changed files with 6 additions and 2 deletions

View File

@ -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));

View File

@ -103,6 +103,8 @@ public:
int _lastResult;
int _sessionid;
Common::String _serverprefix;
};
} // End of namespace Scumm