aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2013-09-05 12:59:01 +0200
committeruruk2013-09-05 12:59:01 +0200
commitce95f738be9bc4cdc1a32f538e7cfdd893d24e47 (patch)
treebb85e3b27d58815101ffe19bfa34fdc5af633443
parenta698a2a2f93e420ded9a7714cd759360d689f486 (diff)
downloadscummvm-rg350-ce95f738be9bc4cdc1a32f538e7cfdd893d24e47.tar.gz
scummvm-rg350-ce95f738be9bc4cdc1a32f538e7cfdd893d24e47.tar.bz2
scummvm-rg350-ce95f738be9bc4cdc1a32f538e7cfdd893d24e47.zip
AVALANCHE: Do renaming in Enid. (Keep the refactoring for the implementation of it.)
-rw-r--r--engines/avalanche/acci2.cpp2
-rw-r--r--engines/avalanche/dropdown2.cpp8
-rw-r--r--engines/avalanche/dropdown2.h12
-rw-r--r--engines/avalanche/enid2.cpp100
-rw-r--r--engines/avalanche/enid2.h70
-rw-r--r--engines/avalanche/timeout2.cpp2
-rw-r--r--engines/avalanche/trip6.cpp2
7 files changed, 75 insertions, 121 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp
index 9bf400fe2c..520b2a8e99 100644
--- a/engines/avalanche/acci2.cpp
+++ b/engines/avalanche/acci2.cpp
@@ -1246,7 +1246,7 @@ void Acci::giveGeidaTheLute() {
_vm->_visa->dixi('q', 64); // She plays it.
_vm->_timeout->set_up_timer(1, _vm->_timeout->procgive_lute_to_geida, _vm->_timeout->reason_geida_sings);
- _vm->_enid->back_to_bootstrap(4);
+ _vm->_enid->backToBootstrap(4);
}
void Acci::playHarp() {
diff --git a/engines/avalanche/dropdown2.cpp b/engines/avalanche/dropdown2.cpp
index a578288791..282f2f888f 100644
--- a/engines/avalanche/dropdown2.cpp
+++ b/engines/avalanche/dropdown2.cpp
@@ -221,8 +221,6 @@ void MenuItem::parseKey(char c) {
_dr->_vm->_gyro->blip();
}
-
-
void MenuBar::init(Dropdown *dr) {
_dr = dr;
_menuNum = 0;
@@ -282,8 +280,6 @@ void MenuBar::chooseMenuItem(int16 x) {
} while (i < _menuNum);
}
-
-
Dropdown::Dropdown(AvalancheEngine *vm) {
_vm = vm;
_activeMenuItem.init(this);
@@ -599,7 +595,7 @@ void Dropdown::runMenuFile() {
warning("STUB: Dropdown::runMenuFile()");
break;
case 4:
- _vm->_enid->back_to_bootstrap(2);
+ _vm->_enid->backToBootstrap(2);
break;
case 5:
_vm->_lucerna->callverb(_vm->_acci->kVerbCodeQuit);
@@ -710,8 +706,6 @@ void Dropdown::runMenuWith() {
_vm->_lucerna->callverb(_vm->_gyro->verbstr[_activeMenuItem._choiceNum]);
}
-
-
void Dropdown::setupMenu() {
_menuBar.init(this);
_activeMenuItem.init(this);
diff --git a/engines/avalanche/dropdown2.h b/engines/avalanche/dropdown2.h
index 8912e60a75..ad9dc77501 100644
--- a/engines/avalanche/dropdown2.h
+++ b/engines/avalanche/dropdown2.h
@@ -42,12 +42,8 @@ class AvalancheEngine;
class Dropdown;
-
-
typedef void (Dropdown::*DropdownFunc)();
-
-
class HeadType {
public:
Common::String _title;
@@ -65,8 +61,6 @@ private:
Dropdown *_dr;
};
-
-
struct OptionType {
Common::String _title;
byte _trigger;
@@ -74,8 +68,6 @@ struct OptionType {
bool _valid;
};
-
-
class MenuItem {
public:
OptionType _options[12];
@@ -104,8 +96,6 @@ private:
Dropdown *_dr;
};
-
-
class MenuBar {
public:
HeadType _menuItems[8];
@@ -122,8 +112,6 @@ private:
Dropdown *_dr;
};
-
-
class Dropdown {
public:
friend class HeadType;
diff --git a/engines/avalanche/enid2.cpp b/engines/avalanche/enid2.cpp
index 4477fe7332..e6b7bc3f3f 100644
--- a/engines/avalanche/enid2.cpp
+++ b/engines/avalanche/enid2.cpp
@@ -39,53 +39,49 @@
#include "common/textconsole.h"
-//#include "fileunit.h"
-//#include "basher.h"
-
-
namespace Avalanche {
Enid::Enid(AvalancheEngine *vm) {
_vm = vm;
}
-const Common::String Enid::crlf = Common::String(char(15)) + Common::String(char(12));
-const char Enid::tab = '\t';
-const char Enid::eof_ = '\n';
+const Common::String Enid::kCrlf = Common::String(char(15)) + Common::String(char(12));
+const char Enid::kTab = '\t';
+const char Enid::kEof = '\n';
-const Common::String Enid::ednafirst =
+const Common::String Enid::kEdnaFirst =
Common::String("This is an EDNA-based file, saved by a Thorsoft game. Good luck!") + // 64
- crlf + eof_ + crlf + crlf + // 7
- tab + "Glory to God in the highest," + crlf + // 31
- tab + "and on earth peace, goodwill toward men." + // 42
- crlf + tab + tab + tab + tab + // 6
+ kCrlf + kEof + kCrlf + kCrlf + // 7
+ kTab + "Glory to God in the highest," + kCrlf + // 31
+ kTab + "and on earth peace, goodwill toward men." + // 42
+ kCrlf + kTab + kTab + kTab + kTab + // 6
"Luke 2:14." + // 10
- crlf + crlf + crlf + // 6
- "1234567890" +crlf; // 11
+ kCrlf + kCrlf + kCrlf + // 6
+ "1234567890" +kCrlf; // 11
-const Common::String Enid::ednaid = Common::String("TT") + char(261) + char(60) + char(1) + char(165) + char(261) + char(231) + char(261);
+const Common::String Enid::kEdnaId = Common::String("TT") + char(261) + char(60) + char(1) + char(165) + char(261) + char(231) + char(261);
-const int16 Enid::ttage = 18;
-const Common::String Enid::ttwashere = "Thomas was here ";
+const int16 Enid::kAge = 18;
+const Common::String Enid::kWasHere = "Thomas was here ";
-const Enid::fourtype Enid::avaricius_file = "Avvy";
+const Enid::FourType Enid::kAvariciusFile = "Avvy";
void Enid::addon(Common::String x) {
//month[0]--;
- month = month + x;
+ _month = _month + x;
}
-Common::String Enid::expanddate(byte d, byte m, uint16 y) {
+Common::String Enid::expandDate(byte d, byte m, uint16 y) {
const Common::String months[12] = {
"Jan#", "Febr#", "March", "April", "May", "June", "July", "August",
"Septem*", "Octo*", "Novem*", "Decem*"
};
Common::String expanddate_result;
- month = months[m];
- switch (month[month.size()]) {
+ _month = months[m];
+ switch (_month[_month.size()]) {
case '#':
addon("uary");
break;
@@ -94,34 +90,34 @@ Common::String Enid::expanddate(byte d, byte m, uint16 y) {
break;
}
- day = _vm->_gyro->strf(d);
+ _day = _vm->_gyro->strf(d);
// d is always positive
if ((d <= 9) || ((d >= 21) && (d <= 31))) {
switch (d % 10) {
case 1:
- day = day + "st";
+ _day = _day + "st";
break;
case 2:
- day = day + "nd";
+ _day = _day + "nd";
break;
case 3:
- day = day + "rd";
+ _day = _day + "rd";
break;
default:
- day = day + "th";
+ _day = _day + "th";
}
}
- expanddate_result = day + ' ' + month + ' ' + _vm->_gyro->strf(y);
+ expanddate_result = _day + ' ' + _month + ' ' + _vm->_gyro->strf(y);
return expanddate_result;
}
-void Enid::show_bug(char icon, Common::String strn) {
+void Enid::showBug(char icon, Common::String strn) {
_vm->_scrolls->display(Common::String("\7\6\23") + icon + "\26\r" + strn + '\15');
}
-bool Enid::test_bug(byte what) {
+bool Enid::testBug(byte what) {
bool test_bug_result;
if (what == 0) {
test_bug_result = false;
@@ -129,47 +125,47 @@ bool Enid::test_bug(byte what) {
}
switch (what) {
case 2:
- show_bug('7', "Error in filename!");
+ showBug('7', "Error in filename!");
break;
case 101:
- show_bug('6', "Disk full!");
+ showBug('6', "Disk full!");
break;
case 150:
- show_bug('4', "Disk is write-protected!");
+ showBug('4', "Disk is write-protected!");
break;
default:
- show_bug('B', "Saving error!");
+ showBug('B', "Saving error!");
}
test_bug_result = true;
return test_bug_result;
}
-void Enid::edna_save(Common::String name) {
- warning("STUB: Enid::edna_save()");
+void Enid::ednaSave(Common::String name) {
+ warning("STUB: Enid::ednaSave()");
}
-void Enid::loaderror(Common::String x, char icon) {
+void Enid::loadError(Common::String x, char icon) {
if (_vm->_gyro->holdthedawn) {
_vm->_gyro->holdthedawn = false;
_vm->_lucerna->dawn();
}
_vm->_scrolls->display(Common::String('\7') + '\6' + '\23' + icon + '\26' + "Loading error: " + "\r\r\22" + x);
- bug = true;
+ _bug = true;
}
-void Enid::edna_load(Common::String name) {
- warning("STUB: Enid::edna_load()");
+void Enid::ednaLoad(Common::String name) {
+ warning("STUB: Enid::ednaLoad()");
}
-void Enid::showheader() {
- _vm->_scrolls->display(Common::String("Dir: ") + path + "\r\r\4");
+void Enid::showHeader() {
+ _vm->_scrolls->display(Common::String("Dir: ") + _path + "\r\r\4");
}
void Enid::dir(Common::String where) { // OK, it worked in Avaricius, let's do it in Avalot!
warning("STUB: Enid::dir()");
}
-void Enid::avvy_background() {
+void Enid::avvyBackground() {
// Not really a filing procedure,
// but it's only called just before edna_load, so I thought I'd put it
// in Enid instead of, say, Lucerna.
@@ -251,30 +247,30 @@ void Enid::avvy_background() {
#endif
}
-void Enid::to_sundry(sundry &sund) {
+void Enid::toSundry(sundry &sund) {
sund.qenid_filename = _vm->_gyro->enid_filename;
sund.qsoundfx = _vm->_gyro->soundfx;
sund.qthinks = _vm->_gyro->thinks;
sund.qthinkthing = _vm->_gyro->thinkthing;
}
-void Enid::from_sundry(sundry sund) {
+void Enid::fromSundry(sundry sund) {
_vm->_gyro->enid_filename = sund.qenid_filename;
_vm->_gyro->soundfx = sund.qsoundfx;
_vm->_gyro->thinks = sund.qthinks;
_vm->_gyro->thinkthing = sund.qthinkthing;
}
-void Enid::restore_dna() {
+void Enid::restoreDna() {
// uint16 here, fv;
// sundry sund;
- warning("STUB: Enid::restore_dna()");
+ warning("STUB: Enid::restoreDna()");
}
-void Enid::edna_reload() {
+void Enid::ednaReload() {
- restore_dna();
+ restoreDna();
_vm->_gyro->seescroll = true; // This prevents display of the new sprites before the
// new picture is loaded.
@@ -293,12 +289,12 @@ void Enid::edna_reload() {
}
}
-void Enid::back_to_bootstrap(byte what) {
+void Enid::backToBootstrap(byte what) {
warning("STUB: Enid::back_to_bootstrap()");
}
-bool Enid::there_was_a_problem() {
- return bug;
+bool Enid::thereWasAProblem() {
+ return _bug;
}
diff --git a/engines/avalanche/enid2.h b/engines/avalanche/enid2.h
index 2237d352af..6f76a74718 100644
--- a/engines/avalanche/enid2.h
+++ b/engines/avalanche/enid2.h
@@ -32,72 +32,48 @@
#include "common/scummsys.h"
-
namespace Avalanche {
class AvalancheEngine;
class Enid {
public:
Enid(AvalancheEngine *vm);
-
- void edna_save(Common::String name);
-
- void edna_load(Common::String name);
-
- void edna_reload(); // From Bootstrap's storage.
-
+ void ednaSave(Common::String name);
+ void ednaLoad(Common::String name);
+ void ednaReload(); // From Bootstrap's storage.
void dir(Common::String where);
-
- void avvy_background();
-
- void back_to_bootstrap(byte what);
-
- bool there_was_a_problem();
+ void avvyBackground();
+ void backToBootstrap(byte what);
+ bool thereWasAProblem();
private:
AvalancheEngine *_vm;
- static const Common::String crlf;
- static const char tab;
- static const char eof_;
-
- static const Common::String ednafirst;
-
- static const Common::String ednaid;
-
- static const int16 ttage;
- static const Common::String ttwashere;
-
- typedef char fourtype[5];
- static const fourtype avaricius_file;
-
-
-
- bool bug;
-
- Common::String path, groi;
-
- Common::String month;
- Common::String day;
+ static const Common::String kCrlf;
+ static const char kTab, kEof;
+ static const Common::String kEdnaFirst, kEdnaId, kWasHere;
+ static const int16 kAge;
+ typedef char FourType[5];
+ static const FourType kAvariciusFile;
+ bool _bug;
+ Common::String _path, _groi;
+ Common::String _month, _day;
void addon(Common::String x);
- Common::String expanddate(byte d, byte m, uint16 y);
-
- void show_bug(char icon, Common::String strn);
- bool test_bug(byte what);
-
- void loaderror(Common::String x, char icon);
+ Common::String expandDate(byte d, byte m, uint16 y);
- void showheader();
+ void showBug(char icon, Common::String strn);
+ bool testBug(byte what);
- void to_sundry(sundry &sund);
- void from_sundry(sundry sund);
+ void loadError(Common::String x, char icon);
+ void showHeader();
- void restore_dna();
+ void toSundry(sundry &sund);
+ void fromSundry(sundry sund);
-
+ void restoreDna();
};
} // End of namespace Avalanche.
diff --git a/engines/avalanche/timeout2.cpp b/engines/avalanche/timeout2.cpp
index 3a2271a384..078963aca6 100644
--- a/engines/avalanche/timeout2.cpp
+++ b/engines/avalanche/timeout2.cpp
@@ -337,7 +337,7 @@ void Timeout::hang_around2() {
_vm->_gyro->dna.tied_up = false;
- _vm->_enid->back_to_bootstrap(1); // Call the shoot-'em-up.
+ _vm->_enid->backToBootstrap(1); // Call the shoot-'em-up.
}
void Timeout::after_the_shootemup() {
diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp
index 790619e72a..7b13f13833 100644
--- a/engines/avalanche/trip6.cpp
+++ b/engines/avalanche/trip6.cpp
@@ -878,7 +878,7 @@ void Trip::call_special(uint16 which) {
_vm->_lucerna->dusk();
tr[0].turn(right); // you'll see this after we get back from bootstrap
_vm->_timeout->set_up_timer(1, _vm->_timeout->procghost_room_phew, _vm->_timeout->reason_ghost_room_phew);
- _vm->_enid->back_to_bootstrap(3);
+ _vm->_enid->backToBootstrap(3);
break;
case 5:
if (_vm->_gyro->dna.friar_will_tie_you_up) {