aboutsummaryrefslogtreecommitdiff
path: root/sword2/sword2.h
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-01-28 16:33:14 +0000
committerTorbjörn Andersson2005-01-28 16:33:14 +0000
commitc0a3816e1790182b7b4b3854846f01247b00ebbe (patch)
tree65e6fd93a7dcff1bb2111c802f283ff511b8b027 /sword2/sword2.h
parent6feb7ae90f38c11b85868c54fb5b328d50844856 (diff)
downloadscummvm-rg350-c0a3816e1790182b7b4b3854846f01247b00ebbe.tar.gz
scummvm-rg350-c0a3816e1790182b7b4b3854846f01247b00ebbe.tar.bz2
scummvm-rg350-c0a3816e1790182b7b4b3854846f01247b00ebbe.zip
Began what I hope is the final major restructuring of the BS2 engine.
In this first step, I have moved all opcode functions into functions.cpp, instead of having them scattered all over the place. To get things to compile again, I had to rewrite the overly complicated sound effects handling. It's much simpler now. The next step will be to move any non-trivial code out of the opcode functions and into the appropriate object. This, I hope, will make it easier to create well-separated objects, instead of the current mess. I also want to tear down the artificial boundary between the main directory and the "driver" directory. We already have a cross-platform layer; there's no need to have yet another one. (Actually, the rewriting of the sound effects code took one first step in this direction.) At the final stage, I'd like to get rid of the "drivers" directory completely, but I'll probably need some help with that if I want to preserve the CVS history of the code. Things will probably be a bit bumpy along the way, but I seem to have reached a point of relative stability again, which is why I'm commiting this now. svn-id: r16668
Diffstat (limited to 'sword2/sword2.h')
-rw-r--r--sword2/sword2.h44
1 files changed, 25 insertions, 19 deletions
diff --git a/sword2/sword2.h b/sword2/sword2.h
index cac3119f55..c51202b447 100644
--- a/sword2/sword2.h
+++ b/sword2/sword2.h
@@ -41,6 +41,9 @@
#include "sword2/object.h"
#include "sword2/save_rest.h"
+#define MAX_starts 100
+#define MAX_description 100
+
class GameDetector;
class OSystem;
@@ -171,6 +174,24 @@ private:
MenuObject _masterMenuList[TOTAL_engine_pockets];
uint32 _totalMasters;
+ uint32 _totalStartups;
+ uint32 _totalScreenManagers;
+ uint32 _startRes;
+
+ struct StartUp {
+ char description[MAX_description];
+
+ // id of screen manager object
+ uint32 start_res_id;
+
+ // tell the manager which startup you want (if there are more
+ // than 1) (i.e more than 1 entrance to a screen and/or
+ // separate game boots)
+ uint32 key;
+ };
+
+ StartUp _startList[MAX_starts];
+
public:
Sword2Engine(GameDetector *detector, OSystem *syst);
~Sword2Engine();
@@ -378,25 +399,6 @@ public:
void setScrolling();
- // used to store id of tunes that loop, for save & restore
- uint32 _loopingMusicId;
-
- // to be called during system initialisation
- void initFxQueue();
-
- // to be called from the main loop, once per cycle
- void processFxQueue();
-
- // stops all fx & clears the queue - eg. when leaving a location
- void clearFxQueue();
-
- void pauseAllSound();
- void unpauseAllSound();
-
- void killMusic();
-
- void triggerFx(uint8 j);
-
bool _gamePaused;
bool _graphicsLevelFudged;
@@ -410,6 +412,10 @@ public:
void initialiseFontResourceFlags();
void initialiseFontResourceFlags(uint8 language);
+ bool initStartMenu();
+ void registerStartPoint(int32 key, char *name);
+ void conPrintStartMenu();
+ void conStart(int start);
// Convenience alias for OSystem::getMillis().
// This is a bit hackish, of course :-).