| 117 | static unordered_map<df::coord, int32_t, CoordHash> locationToBuilding; |
| 118 | |
| 119 | static df::building_extents_type *getExtentTile(const df::building::T_room &room, df::coord2d tile) |
| 120 | { |
| 121 | if (!room.extents) |
| 122 | return NULL; |
| 123 | int dx = tile.x - room.x; |
| 124 | int dy = tile.y - room.y; |
| 125 | if (dx < 0 || dy < 0 || dx >= room.width || dy >= room.height) |
| 126 | return NULL; |
| 127 | return &room.extents[dx + dy*room.width]; |
| 128 | } |
| 129 | |
| 130 | /* |
| 131 | * A monitor to work around this bug, in its application to buildings: |
no outgoing calls
no test coverage detected