| 1105 | } |
| 1106 | |
| 1107 | int MapExtras::Block::biomeIndexAt(df::coord2d p) |
| 1108 | { |
| 1109 | if (!block) |
| 1110 | return -1; |
| 1111 | |
| 1112 | auto des = index_tile(designation,p); |
| 1113 | uint8_t idx = des.bits.biome; |
| 1114 | if (idx >= 9) |
| 1115 | return -1; |
| 1116 | idx = block->region_offset[idx]; |
| 1117 | if (idx >= parent->biomes.size()) |
| 1118 | return -1; |
| 1119 | return idx; |
| 1120 | } |
| 1121 | |
| 1122 | const BiomeInfo &Block::biomeInfoAt(df::coord2d p) |
| 1123 | { |
no test coverage detected