aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2013-06-28 18:29:59 +0200
committeruruk2013-06-28 18:29:59 +0200
commit7c43ab471fb051ecd6c3e77d37419f2d9304fcfe (patch)
tree281ac6260a960618de1f1d074295a770e9b2359f
parentedaba46087a5d5adf8623ecd9b3cfa16b0ea0de5 (diff)
downloadscummvm-rg350-7c43ab471fb051ecd6c3e77d37419f2d9304fcfe.tar.gz
scummvm-rg350-7c43ab471fb051ecd6c3e77d37419f2d9304fcfe.tar.bz2
scummvm-rg350-7c43ab471fb051ecd6c3e77d37419f2d9304fcfe.zip
AVALANCHE: Lucerna: replace namespace with class.
-rw-r--r--engines/avalanche/lucerna2.cpp69
-rw-r--r--engines/avalanche/lucerna2.h30
2 files changed, 59 insertions, 40 deletions
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index 88db23e541..3c1d59c8b3 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -25,6 +25,10 @@
* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
*/
+/* LUCERNA The screen, [keyboard] and mouse handler.*/
+
+#include "avalanche/avalanche.h"
+
#include "common/system.h"
#include "avalanche/lucerna2.h"
#include "avalanche/gyro2.h"
@@ -32,50 +36,43 @@
#include "avalanche/logger2.h"
#include "avalanche/enhanced2.h"
-//#include "Graph.h"
-///*#include "Dos.h"*/
-///*#include "Crt.h"*/
-//#include "trip5.h"
-//#include "Acci.h"
-//#include "pingo.h"
-//#include "dropdown.h"
-//#include "visa.h"
-//#include "celer.h"
-//#include "timeout.h"
-//#include "basher.h"
-//#include "sequence.h"
-namespace Avalanche {
+#include "avalanche/visa2.h"
+#include "avalanche/timeout2.h"
+#include "avalanche/trip6.h"
+#include "avalanche/enid2.h"
+#include "avalanche/celer2.h"
+#include "avalanche/pingo2.h"
+#include "avalanche/sequence2.h"
+#include "avalanche/acci2.h"
- namespace Lucerna {
- bool fxhidden;
+//#include "dropdown.h"
+//#include "basher.h"
- struct rgbrec {
- int16 red;
- int16 green;
- int16 blue;
- };
- struct palettetype {
- int32 size;
- rgbrec colors[256];
- };
+namespace Avalanche {
+
+Lucerna::Lucerna() {
+ // Will be needed.
+}
- palettetype fxpal[4];
+void Lucerna::setParent(AvalancheEngine *vm) {
+ _vm = vm;
+}
+
+void Lucerna::callverb(char n) {
+ /*if (n == pardon)
+ Scrolls::display(
+ "The f5 key lets you do a particular action in certain "
+ "situations. However, at the moment there is nothing "
+ "assigned to it. You may press alt-A to see what the "
+ "current setting of this key is.");*/
- void callverb(char n) {
- /*if (n == pardon)
- Scrolls::display(
- "The f5 key lets you do a particular action in certain "
- "situations. However, at the moment there is nothing "
- "assigned to it. You may press alt-A to see what the "
- "current setting of this key is.");*/
+ // Needs const char pardon located in Acci.
- // Needs const char pardon located in Acci.
+}
- }
- } // End of namespace Lucerna
-} // End of namespace Avalanche \ No newline at end of file
+} // End of namespace Avalanche
diff --git a/engines/avalanche/lucerna2.h b/engines/avalanche/lucerna2.h
index bee9c107d2..259b639b6f 100644
--- a/engines/avalanche/lucerna2.h
+++ b/engines/avalanche/lucerna2.h
@@ -25,18 +25,23 @@
* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
*/
+/* LUCERNA The screen, [keyboard] and mouse handler.*/
+
#ifndef LUCERNA2_H
#define LUCERNA2_H
#include "common/scummsys.h"
namespace Avalanche {
+class AvalancheEngine;
- namespace Lucerna {
-
+class Lucerna {
+public:
// Call it where Lucerna is first used.
// Procuded to replace the initizalization part of the original Pascal unit.
- void initialize_lucerna();
+ Lucerna();
+
+ void setParent(AvalancheEngine *vm);
void callverb(char n);
@@ -106,7 +111,24 @@ namespace Avalanche {
void fix_flashers();
- } // End of namespace Lucerna
+private:
+ AvalancheEngine *_vm;
+
+ bool fxhidden;
+
+ struct rgbrec {
+ int16 red;
+ int16 green;
+ int16 blue;
+ };
+
+ struct palettetype {
+ int32 size;
+ rgbrec colors[256];
+ };
+
+ palettetype fxpal[4];
+};
} // End of namespace Avalanche