Last change
on this file since 495 was
480,
checked in by nicolape, 17 years ago
|
Level loader working, see test1 class
|
File size:
1.0 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> |
---|
| 9 | #include <iostream> |
---|
| 10 | |
---|
[474] | 11 | #include "loader_platform.h" |
---|
| 12 | #include "tinyxml/tinyxml.h" |
---|
| 13 | |
---|
[471] | 14 | //#include "xml/xmlParser.h" |
---|
[164] | 15 | |
---|
| 16 | #ifndef __MODULE_LEVELLOADER__ |
---|
| 17 | #define __MODULE_LEVELLOADER__ |
---|
| 18 | |
---|
| 19 | using namespace std; |
---|
| 20 | |
---|
| 21 | namespace loader |
---|
| 22 | { |
---|
[379] | 23 | class _LoaderExport LevelLoader |
---|
[164] | 24 | { |
---|
| 25 | private: |
---|
| 26 | // Level information |
---|
[470] | 27 | std::string name_; |
---|
| 28 | std::string description_; |
---|
| 29 | std::string image_; |
---|
[474] | 30 | std::string loadingBackgroundColor_; |
---|
| 31 | std::string loadingBackgroundImage_; |
---|
| 32 | std::string loadingBarImage_; |
---|
| 33 | std::string loadingBarTop_; |
---|
| 34 | std::string loadingBarLeft_; |
---|
| 35 | std::string loadingBarWidth_; |
---|
| 36 | std::string loadingBarHeight_; |
---|
[480] | 37 | |
---|
| 38 | bool valid_; |
---|
[164] | 39 | |
---|
[480] | 40 | TiXmlDocument doc; |
---|
| 41 | TiXmlElement* rootElement; |
---|
[164] | 42 | public: |
---|
| 43 | |
---|
| 44 | // Constructors |
---|
| 45 | LevelLoader(string file, string dir="levels"); |
---|
| 46 | ~LevelLoader(); |
---|
| 47 | |
---|
[470] | 48 | void showLoadingScreen(); |
---|
[480] | 49 | void loadLevel(); |
---|
[164] | 50 | |
---|
| 51 | // Getters |
---|
| 52 | string name(); |
---|
| 53 | string description(); |
---|
| 54 | string image(); |
---|
| 55 | |
---|
| 56 | // Managers |
---|
| 57 | |
---|
| 58 | |
---|
| 59 | }; |
---|
| 60 | } |
---|
| 61 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.