Initial commit

This commit is contained in:
Segey Lapin
2021-07-31 03:30:12 +03:00
commit 91cf9d2d34
249 changed files with 27582 additions and 0 deletions

35
modules/world/road_map.h Normal file
View File

@@ -0,0 +1,35 @@
#include <core/object.h>
class RoadMap: public Object {
GDCLASS(RoadMap, Object)
public:
RoadMap();
~RoadMap();
static RoadMap *get_singleton();
static void create_singleton();
static void destroy_singleton();
protected:
Vector<int> vertices;
struct segment {
int v1, v2;
uint32_t flags;
};
Vector<segment> segments;
struct intersection {
#define MAX_NEIGHBORS 4
int neighbors[MAX_NEIGHBORS];
int ncount;
uint32_t flags;
};
Vector<intersection> intersections;
/* cylindric area to define road */
struct area {
int x, z;
int radius;
int type;
};
Vector<area> areas;
};