Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 7, 2008, 5:01:44 PM (17 years ago)
Author:
nicolasc
Message:

merged FICN back into trunk
awaiting release.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

    • Property svn:ignore set to
      dependencies
  • code/trunk/src/loader/LevelLoader.h

    r164 r790  
    22* Orxonox - www.orxonox.net
    33* Level Loader class
    4 * 
     4*
    55* @author Nicolas Perrenoud <nicolape@ee.ethz.ch>
    66*/
    77
     8#ifndef _LevelLoader_H__
     9#define _LevelLoader_H__
     10
    811#include <string>
    9 #include <iostream>
    1012
    11 #include "../xml/xmlParser.h"
     13#include "LoaderPrereqs.h"
     14#include "util/tinyxml/tinyxml.h"
    1215
    13 #ifndef __MODULE_LEVELLOADER__
    14 #define __MODULE_LEVELLOADER__
    15 
    16 using namespace std;
     16class TiXmlDocument;   // Forward declaration
     17class TiXmlElement;    // Forward declaration
    1718
    1819namespace loader
    1920{
    20         class LevelLoader
    21         {
    22         private:
    23                
    24                 // XML Nodes
    25                 XMLNode rootNode; 
    26                 XMLNode worldNode;
    27                 XMLNode scriptNode;
    28                 XMLNode cameraNode;
    29                 XMLNode lightNode;
    30                
    31                 // Level information
    32                 string name_;
    33                 string description_;
    34                 string image_;
    35                        
    36         public:
     21  class _LoaderExport LevelLoader
     22  {
     23  public:
     24    // Constructors, loads the level file and some information data
     25    LevelLoader(std::string file, std::string dir = "levels");
     26    // Destructor
     27    virtual ~LevelLoader();
     28    // Loads all level data
     29    void loadLevel();
    3730
    38                 // Constructors
    39                 LevelLoader(string file, string dir="levels");
    40                 ~LevelLoader();
    41                
    42                 void loadingScreen();
    43                
    44                 // Getters
    45                 string name();
    46                 string description();
    47                 string image();         
    48                
    49                 // Managers
    50                
    51                        
    52         };     
     31    // Getters
     32    inline std::string name() {return name_; };
     33    inline std::string description() {return description_; };
     34    inline std::string image() {return image_; };
     35  private:
     36    //! Level information
     37    std::string name_;
     38    std::string description_;
     39    std::string image_;
     40    std::string loadingBackgroundColor_;
     41    std::string loadingBackgroundImage_;
     42    std::string loadingBarImage_;
     43    std::string loadingBarTop_;
     44    std::string loadingBarLeft_;
     45    std::string loadingBarWidth_;
     46    std::string loadingBarHeight_;
     47
     48    //! Set to true if it was possible to load the level file
     49    bool valid_;
     50
     51    // Xml-Stuff
     52    TiXmlDocument doc_;
     53    TiXmlElement *rootElement_;
     54  };
    5355}
    54 #endif
     56
     57#endif /* _LevelLoader_H__ */
Note: See TracChangeset for help on using the changeset viewer.