SCUMM HE: Set up networking variable later during execution

This commit is contained in:
Eugene Sandulenko 2019-10-24 00:03:53 +02:00
parent a0c58a53b3
commit 22ba110e82
3 changed files with 13 additions and 3 deletions

View File

@ -611,6 +611,7 @@ public:
virtual void resetScumm();
virtual void setupScummVars();
virtual void resetScummVars();
protected:
virtual void setupOpcodes();

View File

@ -35,9 +35,6 @@ Moonbase::Moonbase(ScummEngine_v100he *vm) : _vm(vm) {
_ai = new AI(_vm);
#ifdef USE_CURL
_net = new Net(_vm);
_vm->VAR(_vm->VAR_NETWORK_AVAILABLE) = 1;
#else
_vm->VAR(_vm->VAR_NETWORK_AVAILABLE) = 0;
#endif
}

View File

@ -740,6 +740,18 @@ void ScummEngine_v99he::resetScummVars() {
}
#endif
void ScummEngine_v100he::resetScummVars() {
ScummEngine_v99he::resetScummVars();
if (_game.id == GID_MOONBASE) {
#ifdef USE_CURL
VAR(VAR_NETWORK_AVAILABLE) = 1;
#else
VAR(VAR_NETWORK_AVAILABLE) = 0;
#endif
}
}
void ScummEngine::resetScummVars() {
if (_game.heversion < 70 && _game.version <= 6) {
// VAR_SOUNDCARD modes