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>
|
2014-02-17 10:38:11 +01:00
|
|
|
#include "Utilities.h"
|
2014-01-24 10:22:18 +01:00
|
|
|
#include "ObjectDefines.h"
|
|
|
|
|
|
|
|
namespace GameLogic
|
|
|
|
{
|
2014-02-03 14:50:15 +01:00
|
|
|
class LevelLoader
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
LevelLoader();
|
2014-02-10 16:24:05 +01:00
|
|
|
/***********************************************************
|
|
|
|
* Lets you set the standard folderpath for the levels
|
|
|
|
********************************************************/
|
|
|
|
LevelLoader(std::string folderPath);
|
2014-02-03 14:50:15 +01:00
|
|
|
~LevelLoader();
|
|
|
|
|
|
|
|
/********************************************************
|
|
|
|
* Loads the level and objects from file.
|
2014-02-10 16:24:05 +01:00
|
|
|
* @param fileName: Path/name to the level-file that you want to load.
|
2014-02-03 14:50:15 +01:00
|
|
|
* @return: Returns all structs with objects and information about the level.
|
|
|
|
********************************************************/
|
|
|
|
std::vector<Utility::DynamicMemory::SmartPointer<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-02-10 16:24:05 +01:00
|
|
|
/***********************************************************
|
|
|
|
* @return: Returns the current standard folder path
|
|
|
|
********************************************************/
|
|
|
|
std::string GetFolderPath();
|
|
|
|
|
|
|
|
/***********************************************************
|
|
|
|
* Sets the standard folder path
|
|
|
|
********************************************************/
|
|
|
|
void SetFolderPath(std::string folderPath);
|
|
|
|
|
2014-02-03 14:50:15 +01:00
|
|
|
private:
|
|
|
|
struct PrivData;
|
|
|
|
Utility::DynamicMemory::SmartPointer<PrivData> pData;
|
2014-02-10 16:24:05 +01:00
|
|
|
};
|
2014-01-24 10:22:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|