aboutsummaryrefslogtreecommitdiff
path: root/queen/logic.h
diff options
context:
space:
mode:
authorGregory Montoir2004-01-06 16:53:35 +0000
committerGregory Montoir2004-01-06 16:53:35 +0000
commite90f846df9f1d0e31b933d1cd0a8c28c0fbb7d1f (patch)
tree714b85c17eb01f882261814c137f5975bb91556b /queen/logic.h
parent60b59de181befcebc3515d54d8c18a7b05383bb7 (diff)
downloadscummvm-rg350-e90f846df9f1d0e31b933d1cd0a8c28c0fbb7d1f.tar.gz
scummvm-rg350-e90f846df9f1d0e31b933d1cd0a8c28c0fbb7d1f.tar.bz2
scummvm-rg350-e90f846df9f1d0e31b933d1cd0a8c28c0fbb7d1f.zip
- enabled debugger in QueenEngine::errorString
- initialise Cutaway::_personCount* when the Cutaway starts - minor tweaks in BankManager svn-id: r12185
Diffstat (limited to 'queen/logic.h')
-rw-r--r--queen/logic.h48
1 files changed, 29 insertions, 19 deletions
diff --git a/queen/logic.h b/queen/logic.h
index 8608b9ce38..b95a334cd0 100644
--- a/queen/logic.h
+++ b/queen/logic.h
@@ -60,7 +60,7 @@ class Logic {
public:
Logic(QueenEngine *vm);
- ~Logic();
+ virtual ~Logic();
uint16 currentRoom() const { return _currentRoom; }
void currentRoom(uint16 room) {
@@ -241,18 +241,6 @@ public:
bool subtitles() const { return _subtitles; }
void subtitles(bool enable) { _subtitles = enable; }
- void registerDefaultSettings();
- void checkOptionSettings();
- void readOptionSettings();
- void writeOptionSettings();
-
- bool preChangeRoom_Demo();
- bool preChangeRoom_Interview();
- bool preChangeRoom_Game();
-
- bool executeSpecialMove_Demo(uint16 sm);
- bool executeSpecialMove_Interview(uint16 sm);
- bool executeSpecialMove_Game(uint16 sm);
void executeSpecialMove(uint16 sm);
void asmMakeJoeUseDress();
@@ -299,9 +287,6 @@ public:
void startCredits(const char *filename);
void stopCredits();
- typedef bool (Logic::*ExecuteSpecialMoveProc)(uint16);
- typedef bool (Logic::*PreChangeRoomProc)();
-
enum {
MAX_ZONES_NUMBER = 32,
MAX_AREAS_NUMBER = 11,
@@ -315,6 +300,10 @@ protected:
void initialise();
+ virtual bool preChangeRoom() = 0;
+ virtual bool handleSpecialMove(uint16 sm) = 0;
+
+
LineReader *_queen2jas;
uint16 _currentRoom;
@@ -438,13 +427,34 @@ protected:
bool _subtitles;
- ExecuteSpecialMoveProc _executeSpecialMove;
- PreChangeRoomProc _preChangeRoom;
-
QueenEngine *_vm;
Credits *_credits;
};
+class LogicDemo : public Logic {
+public:
+ LogicDemo(QueenEngine *vm) : Logic(vm) {}
+protected:
+ bool preChangeRoom();
+ bool handleSpecialMove(uint16 sm);
+};
+
+class LogicInterview : public Logic {
+public:
+ LogicInterview(QueenEngine *vm) : Logic(vm) {}
+protected:
+ bool preChangeRoom();
+ bool handleSpecialMove(uint16 sm);
+};
+
+class LogicGame : public Logic {
+public:
+ LogicGame(QueenEngine *vm) : Logic(vm) {}
+protected:
+ bool preChangeRoom();
+ bool handleSpecialMove(uint16 sm);
+};
+
} // End of namespace Queen