MCPcopy Create free account
hub / github.com/DFHack/dfhack / getBiomeRgnPos

Function getBiomeRgnPos

library/modules/Maps.cpp:937–945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

935};
936
937inline df::coord2d getBiomeRgnPos(df::coord2d base, int idx)
938{
939 auto r = base + biome_offsets[idx];
940
941 int world_width = world->world_data->world_width;
942 int world_height = world->world_data->world_height;
943
944 return df::coord2d(clip_range(r.x,0,world_width-1),clip_range(r.y,0,world_height-1));
945}
946
947df::coord2d Maps::getBlockTileBiomeRgn(df::map_block *block, df::coord2d pos)
948{

Callers 2

getBlockTileBiomeRgnMethod · 0.85
ReadGeologyMethod · 0.85

Calls 1

clip_rangeFunction · 0.85

Tested by

no test coverage detected