Last change
on this file since 8914 was
3629,
checked in by patrick, 19 years ago
|
orxonox/trunk: some changes in the storyentity framework: added a preLoad() function, since there is some stuff to be initialized before load(). written some comments to level loading doxygen stuff. now the worldinterface works
|
File size:
1.8 KB
|
Line | |
---|
1 | /*! |
---|
2 | \file game_loader.h |
---|
3 | \brief loads campaigns, worlds and all other story_entities |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _GAME_LOADER_H |
---|
7 | #define _GAME_LOADER_H |
---|
8 | |
---|
9 | //#include "stdincl.h" |
---|
10 | #include "story_def.h" |
---|
11 | #include "comincl.h" |
---|
12 | |
---|
13 | //----------------------------------------------------------------------------- |
---|
14 | // Forward declarations |
---|
15 | //----------------------------------------------------------------------------- |
---|
16 | class Campaign; |
---|
17 | class World; |
---|
18 | class Camera; |
---|
19 | class CammandNode; |
---|
20 | |
---|
21 | //! The GameLoader |
---|
22 | /** |
---|
23 | The game loader loads all game date. this is performed in the following way: |
---|
24 | 1. Read the structure of campaings and worlds |
---|
25 | 2. Create the instances of the tree: here _ALL_ StoryEntities are created |
---|
26 | also if they are not yet used. the worlds should load their data in |
---|
27 | the StoryEntity::load() and StoryEntity::init() functions! NOWHERE ELSE! |
---|
28 | Elsewhere, all the data will be allocated at the beginning... mess... |
---|
29 | 3. StoryEntities are load() and init() before they start |
---|
30 | 4. once the gamloader starts the game there will be a campaing starting a |
---|
31 | world. this is done by callaing those StoryEntity::start() |
---|
32 | */ |
---|
33 | class GameLoader |
---|
34 | { |
---|
35 | |
---|
36 | public: |
---|
37 | static GameLoader* getInstance(); |
---|
38 | |
---|
39 | ErrorMessage init(); |
---|
40 | ErrorMessage loadCampaign(char* name); |
---|
41 | ErrorMessage start(); |
---|
42 | ErrorMessage stop(); |
---|
43 | ErrorMessage pause(); |
---|
44 | ErrorMessage resume(); |
---|
45 | ErrorMessage destroy(); |
---|
46 | |
---|
47 | void nextLevel(); |
---|
48 | void previousLevel(); |
---|
49 | |
---|
50 | bool worldCommand(Command* cmd); |
---|
51 | ErrorMessage loadDebugCampaign(Uint32 campaignID); |
---|
52 | |
---|
53 | private: |
---|
54 | GameLoader (); |
---|
55 | ~GameLoader (); |
---|
56 | Uint32 startTime; //!> start time of the campaign |
---|
57 | static GameLoader* singletonRef; |
---|
58 | bool isPaused; |
---|
59 | |
---|
60 | Campaign* currentCampaign; //!> the current campaign playing |
---|
61 | |
---|
62 | Campaign* fileToCampaign(char* name); |
---|
63 | |
---|
64 | }; |
---|
65 | |
---|
66 | #endif /* _GAME_LOADER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.