Refactoring
[Lilanci.git] / map.h
blobf31f3ddbcdc6ebab302b8d3e67eabab308868963
1 #pragma once
2 #include "geometry.h"
3 #include "gr.h"
5 typedef struct{
6 Area **FArea; //forbidden Area
7 int noFArea; //no used FArea
8 }TMapLayer;
10 typedef struct{
11 TMapLayer **Layer;
12 int noLayer;
13 Area *BoundingArea; // ALL OBJECTS MUST BE IN THIS POLY
14 double XX,YY; //margins for random placement
15 double X,Y; //left top corner MUST be != [0,0]
16 int noSprites;
17 Sprite **Sprites;
18 Vect *SpritePos;
19 }TMap;
21 int AreaInMap(TMap *m, Area *p, int FromLayer, int ToLayer); //returns 0 if p collides with something in m otherwise 1