diff options
author | uruk | 2013-06-19 16:59:12 +0200 |
---|---|---|
committer | uruk | 2013-06-19 16:59:12 +0200 |
commit | 17ee13f2c1d12f16d77a6f287c4fd1bf14010d9e (patch) | |
tree | 10eff3b8fd7365d46a121f8374c3467f07b6afc6 /engines/avalanche | |
parent | d2009c014f17f11472432eb7a160aacfb7eaae80 (diff) | |
download | scummvm-rg350-17ee13f2c1d12f16d77a6f287c4fd1bf14010d9e.tar.gz scummvm-rg350-17ee13f2c1d12f16d77a6f287c4fd1bf14010d9e.tar.bz2 scummvm-rg350-17ee13f2c1d12f16d77a6f287c4fd1bf14010d9e.zip |
AVALANCHE: Start stubbing with bootstrp.cpp.
Diffstat (limited to 'engines/avalanche')
-rw-r--r-- | engines/avalanche/avalanche.cpp | 158 | ||||
-rw-r--r-- | engines/avalanche/avalanche.h | 70 | ||||
-rw-r--r-- | engines/avalanche/module.mk | 1 |
3 files changed, 222 insertions, 7 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index d9599b7308..d1a19b89d2 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -78,11 +78,162 @@ namespace Avalanche { // _sound->syncVolume(); } + void AvalancheEngine::initialize() { + //debugC(1, kDebugEngine, "initialize"); + + _rnd = new Common::RandomSource("avalanche"); + _rnd->setSeed(42); // Kick random number generator + } + + + + // From Bootstrp: + + void AvalancheEngine::cursor_off() { + warning("STUB: cursor_off()"); + } + + void AvalancheEngine::cursor_on() { + warning("STUB: cursor_on()"); + } + + void AvalancheEngine::quit() { + cursor_on(); + } + + Common::String AvalancheEngine::strf(int32 x) { + Common::String q = Common::String::format("%d", x); + return q; + } + + Common::String AvalancheEngine::command_com() { + warning("STUB: command_com()"); + return ("STUB: command_com()"); + } + + void AvalancheEngine::explain(byte error) { + warning("STUB: explain()"); + } + + void AvalancheEngine::b_flight() { /*interrupt;*/ + _storage.skellern++; + } + + void AvalancheEngine::bflight_on() { + _storage.skellern = _reset_; + warning("STUB: bflight_on()"); + // setintvec(0x1c, &b_flight); + } + + void AvalancheEngine::bflight_off() { + warning("STUB: bflight_off()"); + // setintvec(0x1c, old_1c); + } + + Common::String AvalancheEngine::elm2str(elm how) { + Common::String elm2str_result; + switch (how) { + case Normal: + case Musical: + elm2str_result = "jsb"; + break; + case Regi: + elm2str_result = "REGI"; + break; + case Elmpoyten: + elm2str_result = "ELMPOYTEN"; + break; + } + return elm2str_result; + } + + void AvalancheEngine::run(Common::String what, bool with_jsb, bool with_bflight, elm how) { + warning("STUB: run()"); + // Probably there'll be no need of this function, as all *.AVX-es will become classes. + } + + void AvalancheEngine::run_avalot() { + warning("STUB: run_avalot()"); + } + + void AvalancheEngine::run_the_demo() { + warning("STUB: run_the_demo()"); + } + + void AvalancheEngine::get_arguments() { + warning("STUB: get_arguments()"); + } + + void AvalancheEngine::dos_shell() { + warning("STUB: dos_shell()"); + } + + bool AvalancheEngine::keypressed1() { + warning("STUB: keypressed1()"); + return false; + } + + void AvalancheEngine::flush_buffer() { + warning("STUB: flush_buffer()"); + } + + void AvalancheEngine::demo() { + warning("STUB: demo()"); + } + + void AvalancheEngine::call_menu() { + warning("STUB: call_menu()"); + } + + void AvalancheEngine::get_slope() { + warning("STUB: get_slope()"); + } + + + Common::Error AvalancheEngine::run() { s_Engine = this; initGraphics(320, 200, false); _console = new AvalancheConsole(this); + + + // From bootstrp: + + /*original_mode = mem[seg0040 * 0x49]; + getintvec(0x1c, old_1c);*/ + + first_time = true; + + get_arguments(); + get_slope(); + + if (! zoomy) call_menu(); /* Not run when zoomy. */ + + do { + run_avalot(); + + //if (dosexitcode != 77) quit(); /* Didn't stop for us. */ + + switch (_storage.operation) { + case _runShootemup: + run("seu.avx", _jsb, _bflight, Normal); + break; + case _runDosshell: + dos_shell(); + break; + case _runGhostroom: + run("g-room.avx", _jsb, _no_bflight, Normal); + break; + case _runGolden: + run("golden.avx", _jsb, _bflight, Musical); + break; + } + + } while (true); + + + // _mouse = new MouseHandler(this); // Setup mixer @@ -91,11 +242,6 @@ namespace Avalanche { return Common::kNoError; } - void AvalancheEngine::initialize() { - //debugC(1, kDebugEngine, "initialize"); - - _rnd = new Common::RandomSource("avalanche"); - _rnd->setSeed(42); // Kick random number generator - } + } // End of namespace Avalanche diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h index 13d20d00a4..b0b42ac409 100644 --- a/engines/avalanche/avalanche.h +++ b/engines/avalanche/avalanche.h @@ -76,6 +76,76 @@ private: Common::Platform _platform; void initialize(); + + // From bootstrp: + + enum elm {Normal, Musical, Elmpoyten, Regi}; + + static const int16 _runShootemup = 1, _runDosshell = 2, _runGhostroom = 3, _runGolden = 4; + + static const int16 _reset_ = 0; + + static const bool _jsb = true, _no_jsb = false, _bflight = true, _no_bflight = false; + + struct { + byte operation; + uint16 skellern; + byte contents[1000]; + } _storage; + + Common::String arguments, demo_args, args_with_no_filename; + + bool first_time; + + byte original_mode; + void *old_1c; + + Common::String segofs; + + bool zoomy; + + int32 soundcard, speed, baseaddr, irq, dma; + + void cursor_off(); + + void cursor_on(); + + void quit(); + + Common::String strf(int32 x); + + Common::String command_com(); + + void explain(byte error); + + void b_flight(); + + void bflight_on(); + + void bflight_off(); + + Common::String elm2str(elm how); + + void run(Common::String what, bool with_jsb, bool with_bflight, elm how); + + void run_avalot(); + + void run_the_demo(); + + void get_arguments(); + + void dos_shell(); + + bool keypressed1(); + + void flush_buffer(); + + void demo(); + + void call_menu(); + + void get_slope(); + }; } // End of namespace Avalanche diff --git a/engines/avalanche/module.mk b/engines/avalanche/module.mk index 9a919e6410..bd79833e76 100644 --- a/engines/avalanche/module.mk +++ b/engines/avalanche/module.mk @@ -18,7 +18,6 @@ MODULE_OBJS = \ avvymonk.o \ bakchunk.o \ basher.o \ - bootstrp.o \ cadburys.o \ celer.o \ ch_egats.o \ |