| 945 | } |
| 946 | |
| 947 | df::coord2d Maps::getBlockTileBiomeRgn(df::map_block *block, df::coord2d pos) |
| 948 | { |
| 949 | if (!block || !world->world_data) |
| 950 | return df::coord2d(); |
| 951 | |
| 952 | auto des = index_tile(block->designation,pos); |
| 953 | unsigned idx = des.bits.biome; |
| 954 | if (idx < 9) |
| 955 | { |
| 956 | idx = block->region_offset[idx]; |
| 957 | if (idx < 9) |
| 958 | return getBiomeRgnPos(block->region_pos, idx); |
| 959 | } |
| 960 | |
| 961 | return df::coord2d(); |
| 962 | } |
| 963 | |
| 964 | /* |
| 965 | * Layer geology |
nothing calls this directly
no test coverage detected