33 lines
726 B
C++
33 lines
726 B
C++
#pragma once
|
|
#include <SDL.h>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
struct MapPoint {};
|
|
|
|
struct MapData {
|
|
std::vector<std::string> mapTiles;
|
|
std::vector<std::string> mapEnemys;
|
|
};
|
|
|
|
struct Map {
|
|
std::string mapName;
|
|
std::string mapVersion;
|
|
std::string mapAuthor;
|
|
int mapWidth; // Width of the map in tiles
|
|
int mapHeight;
|
|
int mapScaleX; // Rendering scale
|
|
int mapScaleY; // Rendering scale
|
|
int mapPlayerSpawnX;
|
|
int mapPlayerSpawnY;
|
|
|
|
MapData data;
|
|
};
|
|
|
|
Map PLoadMapFromFile(std::string filepath);
|
|
Map PCreateNewMap(std::string filepath);
|
|
void PSaveMapToFile(Map *map, std::string filepath);
|
|
void PRenderMap(Map *map, bool debug = false);
|
|
void PRenderMapBackground(Map *map);
|
|
SDL_Rect PGetMapRect(Map *map);
|