1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-03 00:15:46 +00:00
Aquaria/Aquaria/WorldMap.h
fgenesis 8472718fb7 Major include refactor; changes to pretty much everything
This untangles some of the gigantic kitchen sink headers
in an attempt to split things into smaller files.
Also don't include gl.h, glext.h, windows.h,
and other such nonsense *everywhere*.

Lots of cleanups on the way too. More dead/unused code removal.

Remove incrFlag(), decrFlag() Lua functions.
2016-07-09 04:18:40 +02:00

57 lines
1 KiB
C++

#ifndef WORLDMAP_H
#define WORLDMAP_H
#include <string>
#include "Vector.h"
#include "GameEnums.h"
#define MAPVIS_SUBDIV 64
class Quad;
struct WorldMapTile
{
WorldMapTile();
~WorldMapTile();
void markVisited(int left, int top, int right, int bottom);
void dataToString(std::ostringstream &os);
void stringToData(std::istringstream &is);
const unsigned char *getData() const {return data;}
std::string name;
Vector gridPos;
float scale, scale2;
bool revealed, prerevealed;
int layer, index;
int stringIndex;
Quad *q;
protected:
unsigned char *data;
};
struct WorldMap
{
WorldMap();
void load();
void save();
void hideMap();
void revealMap(const std::string &name);
WorldMapTile *getWorldMapTile(const std::string &name);
int getNumWorldMapTiles();
WorldMapTile *getWorldMapTile(int index);
WorldMapTile *getWorldMapTileByIndex(int index);
void revealMapIndex(int index);
int gw, gh;
typedef std::vector<WorldMapTile> WorldMapTiles;
WorldMapTiles worldMapTiles;
private:
void _load(const std::string &file);
};
#endif