AVALANCHE: Remove misc dead or useless code: useless arguments, stubbed ini file reading, etc

This commit is contained in:
Strangerke 2013-09-20 07:35:50 +02:00
parent bb58813eee
commit f88ca9dc81
4 changed files with 14 additions and 65 deletions

View File

@ -519,63 +519,15 @@ Common::Point AvalancheEngine::getMousePos() {
return _eventMan->getMousePos();
}
// From Bootstrp:
const char AvalancheEngine::kRuncodes[2][3] = {"et", "Go"};
void AvalancheEngine::bFlightOn() {
_storage._skellern = kReset;
// setintvec(0x1c, &b_flight);
}
void AvalancheEngine::getArguments() {
// This function should mess around with command line arguments,
// but I am not sure if there'll be use of these arguments at all...
warning("STUB: getArguments()");
}
void AvalancheEngine::getSlope() {
// Same as get_arguments()
warning("STUB: getSlope()");
}
void AvalancheEngine::callMenu() {
warning("STUB: callMenu()");
}
void AvalancheEngine::runAvalot() {
bFlightOn();
_avalot->run(Common::String(kRuncodes[_firstTime]) + _arguments);
// TODO: Check if parameters are ever used (probably not) and eventually remove them.
// If there's an error initializing avalot, i'll handle it in there, not here
_firstTime = false;
}
Common::Error AvalancheEngine::run() {
Common::ErrorCode err = initialize();
if (err != Common::kNoError)
return err;
// From bootstrp:
_firstTime = true;
getArguments();
getSlope();
_zoomy = true;
// Don't call the menu by default. Might be modified later, if get_slope() gets implemented,
// because zoomy's value is given there. Not sure yet what "zoomy" stands for.
if (!_zoomy)
callMenu(); // Not run when zoomy.
do {
runAvalot();
_avalot->runAvalot();
// Needed for later implementation!!! Don't remove these comments!!!
//if (dosexitcode != 77) quit(); // Didn't stop for us.
//switch (_storage._operation) {
//case kRunShootemup:
// run("seu.avx", kJsb, kBflight, kNormal);
@ -602,6 +554,11 @@ void AvalancheEngine::run(Common::String what, bool withJsb, bool withBflight, E
// Probably there'll be no need of this function, as all *.AVX-es will become classes.
}
void AvalancheEngine::bFlightOn() {
_storage._skellern = kReset;
// setintvec(0x1c, &b_flight);
}
void AvalancheEngine::bFlightOff() {
// setintvec(0x1c, old_1c);
}

View File

@ -122,28 +122,18 @@ private:
AvalancheConsole *_console;
Common::Platform _platform;
static const int16 kRunShootemup = 1, kRunDosshell = 2, kRunGhostroom = 3, kRunGolden = 4;
static const char kRuncodes[2][3];
static const int16 kReset = 0;
static const bool kJsb = true, kNoJsb = false, kBflight = true, kNoBflight = false;
#if 0
struct {
byte _operation;
uint16 _skellern;
byte _contents[1000];
} _storage;
Common::String _arguments;
bool _firstTime;
bool _zoomy;
static const int16 kRunShootemup = 1, kRunDosshell = 2, kRunGhostroom = 3, kRunGolden = 4;
static const int16 kReset = 0;
void bFlightOn();
void getArguments();
void getSlope();
void callMenu();
void runAvalot();
static const bool kJsb = true, kNoJsb = false, kBflight = true, kNoBflight = false;
#if 0
// From bootstrp:
enum Elm {kNormal, kMusical, kElmpoyten, kRegi};
@ -152,8 +142,10 @@ private:
byte *_old1c;
Common::String _segofs;
int32 _soundcard, _speed, _baseaddr, _irq, _dma;
bool _zoomy;
void run(Common::String what, bool withJsb, bool withBflight, Elm how);
void bFlightOn();
void bFlightOff();
Common::String elmToStr(Elm how);
bool keyPressed();

View File

@ -160,7 +160,7 @@ void Avalot::setup() {
}
}
void Avalot::run(Common::String arg) {
void Avalot::runAvalot() {
setup();
do {

View File

@ -42,7 +42,7 @@ public:
void handleKeyDown(Common::Event &event); // To replace Basher::keyboard_link() and Basher::typein().
void setup();
void run(Common::String arg);
void runAvalot();
private:
AvalancheEngine *_vm;