Common::Error Parallaction_br::init() { _screenWidth = 640; _screenHeight = 400; if (getPlatform() == Common::kPlatformPC) { if (getFeatures() & GF_DEMO) { _disk = new DosDemoDisk_br(this); } else { _disk = new DosDisk_br(this); } _disk->setLanguage(2); // NOTE: language is now hardcoded to English. Original used command-line parameters. MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM); MidiDriver *driver = MidiDriver::createMidi(dev); _soundManI = new DosSoundMan_br(this, driver); } else { _disk = new AmigaDisk_br(this); _disk->setLanguage(2); // NOTE: language is now hardcoded to English. Original used command-line parameters. _soundManI = new AmigaSoundMan_br(this); } _disk->init(); _soundMan = new SoundMan(_soundManI); initResources(); initFonts(); _locationParser = new LocationParser_br(this); _locationParser->init(); _programParser = new ProgramParser_br(this); _programParser->init(); _cmdExec = new CommandExec_br(this); _programExec = new ProgramExec_br(this); _walker = new PathWalker_BR; _part = -1; _nextPart = -1; _subtitle[0] = 0; _subtitle[1] = 0; memset(_zoneFlags, 0, sizeof(_zoneFlags)); _countersNames = 0; _saveLoad = new SaveLoad_br(this, _saveFileMan); initInventory(); setupBalloonManager(); Parallaction::init(); return Common::kNoError; }
Common::Error Parallaction_ns::init() { _screenWidth = 320; _screenHeight = 200; if (getPlatform() == Common::kPlatformPC) { _disk = new DosDisk_ns(this); } else { if (getFeatures() & GF_DEMO) { strcpy(_location._name, "fognedemo"); } _disk = new AmigaDisk_ns(this); } _disk->init(); if (getPlatform() == Common::kPlatformPC) { _soundManI = new DosSoundMan_ns(this); _soundManI->setMusicVolume(ConfMan.getInt("music_volume")); } else { _soundManI = new AmigaSoundMan_ns(this); } _soundMan = new SoundMan(_soundManI); initResources(); initFonts(); _locationParser = new LocationParser_ns(this); _locationParser->init(); _programParser = new ProgramParser_ns(this); _programParser->init(); _cmdExec = new CommandExec_ns(this); _programExec = new ProgramExec_ns(this); _walker = new PathWalker_NS(this); _sarcophagusDeltaX = 0; _movingSarcophagus = false; _freeSarcophagusSlotX = INITIAL_FREE_SARCOPHAGUS_SLOT_X; num_foglie = 0; _intro = false; _inTestResult = false; _location._animations.push_front(_char._ani); _saveLoad = new SaveLoad_ns(this, _saveFileMan); initInventory(); setupBalloonManager(); _score = 1; _testResultLabels[0] = 0; _testResultLabels[1] = 0; Parallaction::init(); return Common::kNoError; }