aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2013-09-03 12:09:29 +0200
committeruruk2013-09-03 12:09:29 +0200
commit0afbcf1cf0530d8a71e5ec12ef3c4ec9cbe91686 (patch)
tree97e5e33a155a8009a54d0388d03cf330388b9a25 /engines/avalanche
parent9b7f138659e5b9b3772c578bb70d9d4a01153098 (diff)
downloadscummvm-rg350-0afbcf1cf0530d8a71e5ec12ef3c4ec9cbe91686.tar.gz
scummvm-rg350-0afbcf1cf0530d8a71e5ec12ef3c4ec9cbe91686.tar.bz2
scummvm-rg350-0afbcf1cf0530d8a71e5ec12ef3c4ec9cbe91686.zip
AVALANCHE: Rename/refactor avalanche.h/.cpp.
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/avalanche.cpp119
-rw-r--r--engines/avalanche/avalanche.h62
2 files changed, 88 insertions, 93 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 73b39d6407..5c140ca1e5 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -557,29 +557,29 @@ Common::Point AvalancheEngine::getMousePos() {
// From Bootstrp:
-const char AvalancheEngine::runcodes[2][3] = {"et", "Go"};
+const char AvalancheEngine::kRuncodes[2][3] = {"et", "Go"};
// The original ones were all commented out, so porbably there's no need
// of these two cursor functions at all. TODO: Remove later.
-void AvalancheEngine::cursor_off() {
- warning("STUB: cursor_off()");
+void AvalancheEngine::cursorOff() {
+ warning("STUB: cursorOff()");
}
-void AvalancheEngine::cursor_on() {
- warning("STUB: cursor_on()");
+void AvalancheEngine::cursorOn() {
+ warning("STUB: cursorOn()");
}
// Needed later.
void AvalancheEngine::quit() {
- cursor_on();
+ cursorOn();
}
// Needed in dos_shell(). TODO: Remove later.
-Common::String AvalancheEngine::command_com() {
- warning("STUB: command_com()");
- return ("STUB: command_com()");
+Common::String AvalancheEngine::commandCom() {
+ warning("STUB: commandCom()");
+ return ("STUB: commandCom()");
}
// Needed for run_avalot()'s errors. TODO: Remove later.
@@ -591,75 +591,70 @@ void AvalancheEngine::explain(byte error) {
//TODO: Remove these (b_flight) functions later ( https://github.com/tthurman/avalot/wiki/B-Flight )
-void AvalancheEngine::b_flight() { /*interrupt;*/
- _storage.skellern++;
+void AvalancheEngine::bFlight() { /*interrupt;*/
+ _storage._skellern++;
}
-void AvalancheEngine::bflight_on() {
- _storage.skellern = _reset_;
+void AvalancheEngine::bFlightOn() {
+ _storage._skellern = kReset;
// setintvec(0x1c, &b_flight);
}
-void AvalancheEngine::bflight_off() {
+void AvalancheEngine::bFlightOff() {
// setintvec(0x1c, old_1c);
}
-Common::String AvalancheEngine::elm2str(elm how) {
- Common::String elm2str_result;
+Common::String AvalancheEngine::elm2Str(Elm how) {
switch (how) {
- case Normal:
- case Musical:
- elm2str_result = "jsb";
- break;
- case Regi:
- elm2str_result = "REGI";
- break;
- case Elmpoyten:
- elm2str_result = "ELMPOYTEN";
- break;
+ case kNormal:
+ case kMusical:
+ return "jsb";
+ case kRegi:
+ return "REGI";
+ case kElmpoyten:
+ return "ELMPOYTEN";
}
- return elm2str_result;
}
-void AvalancheEngine::run(Common::String what, bool with_jsb, bool with_bflight, elm how) {
+void AvalancheEngine::run(Common::String what, bool withJsb, bool withBflight, Elm how) {
warning("STUB: run(%s)", what.c_str());
// Probably there'll be no need of this function, as all *.AVX-es will become classes.
}
-void AvalancheEngine::get_arguments() {
+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: get_arguments()");
+ warning("STUB: getArguments()");
}
-void AvalancheEngine::get_slope() {
+void AvalancheEngine::getSlope() {
// Same as get_arguments()
- warning("STUB: get_slope()");
+ warning("STUB: getSlope()");
}
-void AvalancheEngine::call_menu() {
- warning("STUB: call_menu()");
+void AvalancheEngine::callMenu() {
+ warning("STUB: callMenu()");
}
-void AvalancheEngine::run_the_demo() {
- warning("STUB: run_the_demo()");
+void AvalancheEngine::runDemo() {
+ warning("STUB: runDemo()");
}
-void AvalancheEngine::dos_shell() {
- warning("STUB: dos_shell()");
+void AvalancheEngine::dosShell() {
+ warning("STUB: dosShell()");
}
// Getting used only in demo() / call_menu(). Going to be implemented at the same time with these.
-bool AvalancheEngine::keypressed1() {
- warning("STUB: keypressed1()");
+bool AvalancheEngine::keyPressed() {
+ warning("STUB: keyPressed()");
return false;
}
// Same as keypressed1().
-void AvalancheEngine::flush_buffer() {
- warning("STUB: flush_buffer()");
+void AvalancheEngine::flushBuffer() {
+ warning("STUB: flushBuffer()");
}
// Same as keypressed1().
@@ -670,14 +665,14 @@ void AvalancheEngine::demo() {
-void AvalancheEngine::run_avalot() {
- bflight_on();
+void AvalancheEngine::runAvalot() {
+ bFlightOn();
- _avalot->run(Common::String(runcodes[first_time]) + arguments);
+ _avalot->run(Common::String(kRuncodes[_firstTime]) + _arguments);
// TODO: Check if parameteres are ever used (probably not) and eventually remove them.
// If there's an error initalizing avalot, i'll handle it in there, not here
- first_time = false;
+ _firstTime = false;
}
@@ -691,36 +686,36 @@ Common::Error AvalancheEngine::run() {
// From bootstrp:
- first_time = true;
+ _firstTime = true;
- get_arguments();
- get_slope();
+ getArguments();
+ getSlope();
- zoomy = true;
+ _zoomy = true;
// Don't call the menu by default. Might be modified later, if get_slope() gets implemented,
// becouse zoomy's value is given there. Not sure yet what "zoomy" stands for.
- if (!zoomy)
- call_menu(); /* Not run when zoomy. */
+ if (!_zoomy)
+ callMenu(); /* Not run when zoomy. */
do {
- run_avalot();
+ runAvalot();
//if (dosexitcode != 77) quit(); /* Didn't stop for us. */
- switch (_storage.operation) {
- case _runShootemup:
- run("seu.avx", _jsb, _bflight, Normal);
+ switch (_storage._operation) {
+ case kRunShootemup:
+ run("seu.avx", kJsb, kBflight, kNormal);
break;
- case _runDosshell:
- dos_shell();
+ case kRunDosshell:
+ dosShell();
break;
- case _runGhostroom:
- run("g-room.avx", _jsb, _no_bflight, Normal);
+ case kRunGhostroom:
+ run("g-room.avx", kJsb, kNoBflight, kNormal);
break;
- case _runGolden:
- run("golden.avx", _jsb, _bflight, Musical);
+ case kRunGolden:
+ run("golden.avx", kJsb, kBflight, kMusical);
break;
}
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index 6b62ad7886..f8f2ce1ee2 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -150,70 +150,70 @@ private:
// From bootstrp:
- enum elm {Normal, Musical, Elmpoyten, Regi};
+ enum Elm {kNormal, kMusical, kElmpoyten, kRegi};
- static const int16 _runShootemup = 1, _runDosshell = 2, _runGhostroom = 3, _runGolden = 4;
+ static const int16 kRunShootemup = 1, kRunDosshell = 2, kRunGhostroom = 3, kRunGolden = 4;
- static const char runcodes[2][3];
+ static const char kRuncodes[2][3];
- static const int16 _reset_ = 0;
+ static const int16 kReset = 0;
- static const bool _jsb = true, _no_jsb = false, _bflight = true, _no_bflight = false;
+ static const bool kJsb = true, kNoJsb = false, kBflight = true, kNoBflight = false;
struct {
- byte operation;
- uint16 skellern;
- byte contents[1000];
+ byte _operation;
+ uint16 _skellern;
+ byte _contents[1000];
} _storage;
- Common::String arguments, demo_args, args_with_no_filename;
+ Common::String _arguments, _demoArgs, _argsWithNoFilename;
- bool first_time;
+ bool _firstTime;
- byte original_mode;
- void *old_1c;
+ byte _originalMode;
+ byte *_old1c;
- Common::String segofs;
+ Common::String _segofs;
- bool zoomy;
+ bool _zoomy;
- int32 soundcard, speed, baseaddr, irq, dma;
+ int32 _soundcard, _speed, _baseaddr, _irq, _dma;
- void cursor_off();
+ void cursorOff();
- void cursor_on();
+ void cursorOn();
void quit();
- Common::String command_com();
+ Common::String commandCom();
void explain(byte error);
- void b_flight();
+ void bFlight();
- void bflight_on();
+ void bFlightOn();
- void bflight_off();
+ void bFlightOff();
- Common::String elm2str(elm how);
+ Common::String elm2Str(Elm how);
- void run(Common::String what, bool with_jsb, bool with_bflight, elm how);
+ void run(Common::String what, bool withJsb, bool withBflight, Elm how);
- void get_arguments();
+ void getArguments();
- void get_slope();
+ void getSlope();
- void call_menu();
+ void callMenu();
- void run_avalot();
+ void runAvalot();
- void run_the_demo();
+ void runDemo();
- void dos_shell();
+ void dosShell();
- bool keypressed1();
+ bool keyPressed();
- void flush_buffer();
+ void flushBuffer();
void demo();
};