2014-01-24 10:22:18 +01:00
|
|
|
//////////////////////////////////
|
|
|
|
// Created by Sam Svensson 2013 //
|
|
|
|
//////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef LEVELLOADER_H
|
|
|
|
#define LEVELLOADER_H
|
|
|
|
|
2014-01-24 10:42:19 +01:00
|
|
|
#include <string>
|
2014-01-24 10:22:18 +01:00
|
|
|
#include <vector>
|
|
|
|
#include <Vector.h>
|
|
|
|
#include "ObjectDefines.h"
|
|
|
|
#include "LevelParser.h"
|
|
|
|
|
|
|
|
namespace GameLogic
|
|
|
|
{
|
|
|
|
class LevelLoader
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
2014-01-28 16:15:10 +01:00
|
|
|
LevelLoader(){this->parser = GameLogic::LevelFileLoader::LevelParser(); }
|
2014-01-24 10:42:19 +01:00
|
|
|
~LevelLoader(){}
|
2014-01-28 11:27:29 +01:00
|
|
|
|
|
|
|
/********************************************************
|
|
|
|
* Loads the level and objects from file.
|
|
|
|
* @param fileName: Path to the level-file that you want to load.
|
|
|
|
* @return: Returns all structs with objects and information about the level.
|
|
|
|
********************************************************/
|
|
|
|
std::vector<ObjectTypeHeader> LoadLevel(std::string fileName);
|
|
|
|
|
|
|
|
/********************************************************
|
|
|
|
* Just for fast access for the meta information about the level.
|
|
|
|
* @param fileName: Path to the level-file that you want to load.
|
|
|
|
* @return: Returns the meta information about the level.
|
|
|
|
********************************************************/
|
|
|
|
LevelMetaData LoadLevelHeader(std::string fileName); //.
|
2014-01-24 10:22:18 +01:00
|
|
|
|
|
|
|
private:
|
2014-01-28 16:15:10 +01:00
|
|
|
GameLogic::LevelFileLoader::LevelParser parser;
|
2014-01-24 10:22:18 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|