Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/loader/LevelLoader.h @ 516

Last change on this file since 516 was 507, checked in by nicolape, 17 years ago
  • Skybox and ambient light load now from level file sample.oxw. Added objects to and methods to parse this tags. Added a tokenizer function to split strings into smaller strings (for reading out the light colours for examle). Moved Tokenizer and String2number into misc directory. deleted old unised xml class
File size: 1.2 KB
Line 
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 <vector>
10#include <iostream>
11
12#include "loader_platform.h"
13#include "tinyxml/tinyxml.h"
14
15//#include "xml/xmlParser.h"
16
17#ifndef __MODULE_LEVELLOADER__
18#define __MODULE_LEVELLOADER__
19
20using namespace std;
21
22namespace loader
23{
24        class _LoaderExport LevelLoader
25        {
26        public:
27                // Constructors, loads the level file and some information data
28                LevelLoader(string file, string dir="levels");
29                // Destructor
30                ~LevelLoader();
31                // Shows a simple loading screen
32                void showLoadingScreen();
33                // Loads all level data
34                void loadLevel();
35       
36                // Getters
37                string name();
38                string description();
39                string image();         
40        private:
41                // Level information
42                std::string name_;
43                std::string description_;
44                std::string image_;
45                std::string loadingBackgroundColor_;
46                std::string loadingBackgroundImage_;
47                std::string loadingBarImage_;
48                std::string loadingBarTop_;
49                std::string loadingBarLeft_;
50                std::string loadingBarWidth_;
51                std::string loadingBarHeight_;
52               
53                // Set to true if it was possible to load the level file
54                bool valid_;
55                       
56                // Xml-Stuff
57                TiXmlDocument doc;
58                TiXmlElement* rootElement;     
59
60                       
61        };     
62}
63#endif
Note: See TracBrowser for help on using the repository browser.