| 1001 | } |
| 1002 | |
| 1003 | void DeleteObject(int oi, int i) |
| 1004 | { |
| 1005 | const Object &object = Objects[oi]; |
| 1006 | Point position = object.position; |
| 1007 | dObject[position.x][position.y] = 0; |
| 1008 | AvailableObjects[-ActiveObjectCount + MAXOBJECTS] = oi; |
| 1009 | ActiveObjectCount--; |
| 1010 | if (ObjectUnderCursor == &object) // Unselect object if this was highlighted by player |
| 1011 | ObjectUnderCursor = nullptr; |
| 1012 | if (ActiveObjectCount > 0 && i != ActiveObjectCount) |
| 1013 | ActiveObjects[i] = ActiveObjects[ActiveObjectCount]; |
| 1014 | } |
| 1015 | |
| 1016 | void AddChest(Object &chest) |
| 1017 | { |