Last change
on this file since 2974 was
2636,
checked in by patrick, 20 years ago
|
- Added a GameLoader to the game. This enables orxonox to load a campaign consisting of multimple worlds and cinematics etc. However, cinematics are not yet implemented.
In the game you can jump from one level to the other by pressing x. Currently there are only two very simple levels defined. (DEBUG_LEVEL_0, DEBUG_LEVEL_1).
- Added Error Handling structs to signal the error source and code
|
File size:
1.2 KB
|
Line | |
---|
1 | /*! |
---|
2 | \file orxonox.h |
---|
3 | \brief Orxonox core functions |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef ORXONOX_H |
---|
7 | #define ORXONOX_H |
---|
8 | |
---|
9 | #include <SDL/SDL.h> |
---|
10 | |
---|
11 | #include "stdincl.h" |
---|
12 | |
---|
13 | class CommandNode; |
---|
14 | class WorldEntity; |
---|
15 | class DataTank; |
---|
16 | class World; |
---|
17 | class Camera; |
---|
18 | class GameLoader; |
---|
19 | |
---|
20 | //! Orxonox core singleton class |
---|
21 | /** |
---|
22 | */ |
---|
23 | class Orxonox { |
---|
24 | |
---|
25 | private: |
---|
26 | static Orxonox* singleton_ref; |
---|
27 | Orxonox (); |
---|
28 | ~Orxonox (); |
---|
29 | |
---|
30 | char configfilename[256]; |
---|
31 | World* world; |
---|
32 | DataTank* resources; |
---|
33 | CommandNode* localinput; |
---|
34 | Camera* localcamera; |
---|
35 | SDL_Surface* screen; |
---|
36 | GameLoader* gameLoader; |
---|
37 | |
---|
38 | bool bQuitOrxonox; |
---|
39 | bool pause; |
---|
40 | Uint32 lastframe; |
---|
41 | |
---|
42 | void get_config_file (int argc, char** argv); |
---|
43 | |
---|
44 | // main loop functions |
---|
45 | void synchronize (); |
---|
46 | void handle_input (); |
---|
47 | void time_slice (); |
---|
48 | void collision (); |
---|
49 | void display (); |
---|
50 | |
---|
51 | // subsystem initialization |
---|
52 | int init_video (); |
---|
53 | int init_sound (); |
---|
54 | int init_input (); |
---|
55 | int init_networking (); |
---|
56 | int init_resources (); |
---|
57 | int init_world (); |
---|
58 | |
---|
59 | public: |
---|
60 | static Orxonox* getInstance (); |
---|
61 | void start(); |
---|
62 | void quitGame(); |
---|
63 | |
---|
64 | void event_handler (SDL_Event* event); |
---|
65 | bool system_command (Command* cmd); |
---|
66 | |
---|
67 | int init (int argc, char** argv); |
---|
68 | |
---|
69 | CommandNode* get_localinput(); |
---|
70 | Camera* get_camera(); |
---|
71 | World* get_world(); |
---|
72 | |
---|
73 | void mainLoop(); |
---|
74 | }; |
---|
75 | |
---|
76 | #endif |
---|
77 | |
---|
Note: See
TracBrowser
for help on using the repository browser.