CGE: Remove _core from Startup class

This commit is contained in:
Strangerke 2011-07-25 19:09:12 +02:00
parent 2e5a041046
commit dad302b640
4 changed files with 6 additions and 24 deletions

View File

@ -102,20 +102,22 @@ void CGEEngine::setup() {
_eventManager = new EventManager();
_offUseCount = atoi(_text->getText(kOffUseCount));
_music = true;
_mini = new byte[MINI_EMM_SIZE];
for (int i = 0; i < kPocketNX; i++)
_pocref[i] = -1;
_volume[0] = 0;
_volume[1] = 0;
if (_isDemo) {
_mini = new byte[16384];
_maxCaveArr[0] = CAVE_MAX;
_maxCaveArr[1] = -1;
_maxCaveArr[2] = -1;
_maxCaveArr[3] = -1;
_maxCaveArr[4] = -1;
} else {
_mini = new byte[65536];
_maxCaveArr[0] = 1;
_maxCaveArr[1] = 8;
_maxCaveArr[2] = 16;

View File

@ -335,9 +335,6 @@ void CGEEngine::syncGame(Common::SeekableReadStream *readStream, Common::WriteSt
}
} else {
// Loading game
if (Startup::_core < CORE_HIG)
_music = false;
if (Startup::_soundOk == 1 && Startup::_mode == 0) {
// _sndDrvInfo.Vol2._d = _volume[0];
// _sndDrvInfo.Vol2._m = _volume[1];
@ -888,7 +885,7 @@ void System::tick() {
if (_snail->idle()) {
if (PAIN)
_vm->heroCover(9);
else if (Startup::_core >= CORE_MID) {
else { // CHECKME: Before, was: if (Startup::_core >= CORE_MID) {
int n = new_random(100);
if (n > 96)
_vm->heroCover(6 + (_hero->_x + _hero->_w / 2 < kScrWidth / 2));
@ -928,12 +925,8 @@ void CGEEngine::switchMusic() {
_snail->addCom2(kSnExec, -1, 0, kSelectSound);
}
} else {
if (Startup::_core < CORE_HIG)
_snail->addCom(kSnInf, -1, kNoMusic, NULL);
else {
_snail_->addCom(kSnSeq, 122, (_music = !_music), NULL);
keyClick();
}
_snail_->addCom(kSnSeq, 122, (_music = !_music), NULL);
keyClick();
}
if (_music)
loadMidi(_now);

View File

@ -40,7 +40,6 @@ extern char _copr[];
// static Startup _startUp;
int Startup::_mode = 0;
int Startup::_core;
int Startup::_soundOk = 0;
uint16 Startup::_summa;

View File

@ -47,22 +47,10 @@ namespace CGE {
#define CFG_EXT ".CFG"
#if defined(DEMO)
#define MINI_EMM_SIZE 0x00004000L
#define CORE_HIG 400
#else
#define MINI_EMM_SIZE 0x00010000L
#define CORE_HIG 450
#endif
#define CORE_MID (CORE_HIG - 20)
class Startup {
static bool getParms();
public:
static int _mode;
static int _core;
static int _soundOk;
static uint16 _summa;
Startup();