1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 21:49:56 +00:00
openmw-tes3mp/components/esm/loadpgrd.hpp
2012-04-06 21:04:30 +02:00

49 lines
1.1 KiB
C++

#ifndef _ESM_PGRD_H
#define _ESM_PGRD_H
#include "esm_reader.hpp"
#include "esm_writer.hpp"
namespace ESM
{
/*
* Path grid.
*/
struct Pathgrid
{
struct DATAstruct
{
int x, y; // Grid location, matches cell for exterior cells
short s1; // ?? Usually but not always a power of 2. Doesn't seem
// to have any relation to the size of PGRC.
short s2; // Number of path points.
}; // 12 bytes
struct Point // path grid point
{
int x, y, z; // Location of point
unsigned char autogenerated; // autogenerated vs. user coloring flag?
unsigned char connectionNum; // number of connections for this point
short unknown;
}; // 16 bytes
struct Edge // path grid edge
{
int v0, v1; // index of points connected with this edge
}; // 8 bytes
std::string cell; // Cell name
DATAstruct data;
typedef std::vector<Point> PointList;
PointList points;
typedef std::vector<Edge> EdgeList;
EdgeList edges;
void load(ESMReader &esm);
void save(ESMWriter &esm);
};
}
#endif