Last change
on this file since 591 was
525,
checked in by nicolape, 17 years ago
|
Running again, but only with hack, don't know why the loader can't set up the steering
|
File size:
1.2 KB
|
Rev | Line | |
---|
[164] | 1 | /** |
---|
| 2 | * Orxonox - www.orxonox.net |
---|
| 3 | * Level Loader class |
---|
| 4 | * |
---|
| 5 | * @author Nicolas Perrenoud <nicolape@ee.ethz.ch> |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include <string> |
---|
[507] | 9 | #include <vector> |
---|
[164] | 10 | #include <iostream> |
---|
| 11 | |
---|
[474] | 12 | #include "loader_platform.h" |
---|
| 13 | #include "tinyxml/tinyxml.h" |
---|
[507] | 14 | |
---|
[471] | 15 | //#include "xml/xmlParser.h" |
---|
[164] | 16 | |
---|
| 17 | #ifndef __MODULE_LEVELLOADER__ |
---|
| 18 | #define __MODULE_LEVELLOADER__ |
---|
| 19 | |
---|
| 20 | using namespace std; |
---|
| 21 | |
---|
| 22 | namespace loader |
---|
| 23 | { |
---|
[379] | 24 | class _LoaderExport LevelLoader |
---|
[164] | 25 | { |
---|
[507] | 26 | public: |
---|
| 27 | // Constructors, loads the level file and some information data |
---|
| 28 | LevelLoader(string file, string dir="levels"); |
---|
| 29 | // Destructor |
---|
| 30 | ~LevelLoader(); |
---|
| 31 | // Loads all level data |
---|
| 32 | void loadLevel(); |
---|
| 33 | |
---|
| 34 | // Getters |
---|
| 35 | string name(); |
---|
| 36 | string description(); |
---|
| 37 | string image(); |
---|
[164] | 38 | private: |
---|
| 39 | // Level information |
---|
[470] | 40 | std::string name_; |
---|
| 41 | std::string description_; |
---|
| 42 | std::string image_; |
---|
[474] | 43 | std::string loadingBackgroundColor_; |
---|
| 44 | std::string loadingBackgroundImage_; |
---|
| 45 | std::string loadingBarImage_; |
---|
| 46 | std::string loadingBarTop_; |
---|
| 47 | std::string loadingBarLeft_; |
---|
| 48 | std::string loadingBarWidth_; |
---|
| 49 | std::string loadingBarHeight_; |
---|
[480] | 50 | |
---|
[507] | 51 | // Set to true if it was possible to load the level file |
---|
[480] | 52 | bool valid_; |
---|
[164] | 53 | |
---|
[507] | 54 | // Xml-Stuff |
---|
[480] | 55 | TiXmlDocument doc; |
---|
| 56 | TiXmlElement* rootElement; |
---|
[164] | 57 | |
---|
| 58 | |
---|
| 59 | }; |
---|
| 60 | } |
---|
| 61 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.