diff options
Diffstat (limited to 'level.c')
-rw-r--r-- | level.c | 32 |
1 files changed, 0 insertions, 32 deletions
@@ -19,38 +19,6 @@ void deleteRoom(LEVEL *lvl, unsigned int n) { lvl->rooms = realloc(lvl->rooms, lvl->nRooms*sizeof(ROOM)); } -void addVertex(ROOM *room, VERTEX *v) { - room->nVertices++; - room->vertices = realloc(room->vertices, room->nVertices*sizeof(VERTEX)); - room->vertices[room->nVertices-1] = *v; -} - -void insertVertex(ROOM *room, VERTEX *v, unsigned int n) { - int i; - - if(n > room->nVertices) - n = room->nVertices; - - room->nVertices++; - room->vertices = realloc(room->vertices, room->nVertices*sizeof(VERTEX)); - - for(i = room->nVertices-1; i > n; i--) - room->vertices[i] = room->vertices[i-1]; - - room->vertices[n] = *v; -} - -void deleteVertex(ROOM *room, unsigned int n) { - int i; - - room->nVertices--; - - for(i = n; i < room->nVertices; i++) - room->vertices[i] = room->vertices[i+1]; - - room->vertices = realloc(room->vertices, room->nVertices*sizeof(VERTEX)); -} - void freeLevel(LEVEL *lvl) { int i; |