| 656 | } |
| 657 | |
| 658 | static const char * get_tile_construct(color_ostream &out, const df::coord &pos, const tile_context &ctx) { |
| 659 | if (ctx.b && ctx.b->getType() == building_type::Construction) |
| 660 | return get_construction_str(ctx.b); |
| 661 | |
| 662 | df::tiletype *tt = Maps::getTileType(pos); |
| 663 | if (!tt || tileMaterial(*tt) != df::tiletype_material::CONSTRUCTION) |
| 664 | return NULL; |
| 665 | |
| 666 | switch (tileShape(*tt)) { |
| 667 | case tiletype_shape::WALL: return get_constructed_wall_str(pos); |
| 668 | case tiletype_shape::FLOOR: return get_constructed_floor_str(tt); |
| 669 | case tiletype_shape::RAMP: return get_constructed_ramp_str(tt); |
| 670 | case tiletype_shape::FORTIFICATION: return "CF"; |
| 671 | case tiletype_shape::STAIR_UP: return "Cu"; |
| 672 | case tiletype_shape::STAIR_DOWN: return "Cd"; |
| 673 | case tiletype_shape::STAIR_UPDOWN: return "Cx"; |
| 674 | default: |
| 675 | return "~"; |
| 676 | } |
| 677 | |
| 678 | return NULL; |
| 679 | } |
| 680 | |
| 681 | static pair<uint32_t, uint32_t> get_building_size(const df::building *b) { |
| 682 | return pair<uint32_t, uint32_t>(b->x2 - b->x1 + 1, b->y2 - b->y1 + 1); |
nothing calls this directly
no test coverage detected