spoonedit/Tools/MapTools/include/Map.h

44 lines
772 B
C
Raw Permalink Normal View History

2023-07-02 22:21:26 +02:00
//
// Created by tv on 30.04.23.
//
#ifndef SPOONTOOL_MAP_H
#define SPOONTOOL_MAP_H
#include<boost/filesystem.hpp>
#include<LevelObject.h>
#include<Rail.h>
2023-11-12 16:29:22 +01:00
#include<filesystem>
2023-07-02 22:21:26 +02:00
2023-11-12 16:29:22 +01:00
struct FieldOptions{
std::string m_fieldName = "Fld_Unk";
};
2023-07-02 22:21:26 +02:00
struct Map {
Map();
2023-11-12 16:29:22 +01:00
//Loads file from custom map format
Map(boost::filesystem::path file);
2023-07-02 22:21:26 +02:00
void Save(boost::filesystem::path FileLocation);
boost::filesystem::path ActiveLocation = "";
void Export(boost::filesystem::path YamlOut);
2023-11-12 16:29:22 +01:00
std::list<LevelObject> Objects;
2023-07-02 22:21:26 +02:00
2023-11-12 16:29:22 +01:00
std::list<Rail> Rails;
2023-07-02 22:21:26 +02:00
2023-11-12 16:29:22 +01:00
std::filesystem::path m_filePath;
2023-11-12 16:29:22 +01:00
FieldOptions m_fieldOptions;
2023-07-02 22:21:26 +02:00
2023-11-12 16:29:22 +01:00
Element* GetElementById(std::string id);
2023-07-02 22:21:26 +02:00
};
Map ConvertFromYaml(boost::filesystem::path File);
2023-11-12 16:29:22 +01:00
2023-07-02 22:21:26 +02:00
#endif //SPOONTOOL_MAP_H