mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-12-03 00:15:46 +00:00
8472718fb7
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.
57 lines
1 KiB
C++
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
|