diff options
Diffstat (limited to 'edit.cpp')
-rw-r--r-- | edit.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,4 +1,3 @@ -#include "Level.h" #include "edit.h" @@ -14,6 +13,8 @@ static Room addRoom; static Vertex hoveredVertex; static int hasHoveredVertex = 0; +static IdManager idManager; + int getEditMode() { return editMode; } @@ -67,7 +68,7 @@ void setHoveredVertex(Vertex *v) { } void startAddMode() { - addRoom = Room(); + addRoom = Room(idManager.generate("room")); activeRoom = &addRoom; editMode = EDIT_MODE_ADD; @@ -81,6 +82,10 @@ Room *getHoveredRoom() { return hoveredRoom; } +IdManager *getIdManager() { + return &idManager; +} + static bool isLineOk(Line *l) { Line l2; |