1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
/*
* FloorMaker.h
* Sludge Dev Kit
*
* Created by Rikard Peterson on 2009-07-27.
* Copyright 2009 __MyCompanyName__. All rights reserved.
*
*/
#ifdef __cplusplus
extern "C" {
#endif
struct vertexList {
int x, y;
struct vertexList * next;
};
struct polyList {
struct vertexList * firstVertex;
struct polyList * next;
};
bool loadFloorFromFile (char * name, struct polyList **firstPoly);
bool saveFloorToFile (char * filename, struct polyList **firstPoly);
void noFloor (struct polyList **firstPoly);
int addVertex (int x, int y, struct polyList *firstPoly);
bool moveVertices (int x1, int y1, int x2, int y2, struct polyList *firstPoly);
void killVertex (int x, int y, struct polyList **firstPoly);
struct polyList * addPoly (struct polyList *firstPoly);
void splitPoly (int x1, int y1, int x2, int y2, struct polyList **firstPoly);
void splitLine (int x1, int y1, int x2, int y2, struct polyList *firstPoly);
void drawFloor (struct polyList * pL, float r, float g, float b);
bool snapToClosest (int *x, int *y, struct polyList * firstPoly);
#ifdef __cplusplus
}
#endif
|