+
+ switch(tool) {
+ case TOOL_DRAW:
+ if(bn == 0) {
+ sel->type = CELL_WALK;
+ } else if(bn == 2) {
+ sel->type = CELL_SOLID;
+ }
+ break;
+
+ case TOOL_PSTART:
+ cell_coords(sel, &cx, &cy);
+ if(bn == 0) {
+ if(sel->type == CELL_WALK) {
+ lvl->px = cx;
+ lvl->py = cy;
+ }
+ } else if(bn == 2) {
+ if(lvl->px == cx && lvl->py == cy) {
+ lvl->px = lvl->py = -1;
+ }
+ }
+ break;