The island mask should actually contain islands, not water.
This commit is contained in:
parent
69eb4be737
commit
3a83772a09
3 changed files with 9 additions and 2 deletions
|
@ -471,7 +471,7 @@ bool TGClipper::clip_all(const point2d& min, const point2d& max) {
|
|||
water_mask =
|
||||
tgPolygonUnion( water_mask, polys_in.polys[i][j] );
|
||||
}
|
||||
} else if ( is_water_area( i ) ) {
|
||||
} else if ( is_island_area( i ) ) {
|
||||
for (unsigned int j = 0; j < polys_in.polys[i].size(); j++) {
|
||||
island_mask =
|
||||
tgPolygonUnion( island_mask, polys_in.polys[i][j] );
|
||||
|
|
|
@ -149,7 +149,13 @@ bool is_water_area( AreaType area ) {
|
|||
}
|
||||
|
||||
bool is_landmass_area( AreaType area ) {
|
||||
return get_area_descriptor( area ).kind==Landmass;
|
||||
const AreaKind kind = get_area_descriptor( area ).kind;
|
||||
return (kind==Landmass);
|
||||
}
|
||||
|
||||
bool is_island_area( AreaType area ) {
|
||||
const AreaKind kind = get_area_descriptor( area ).kind;
|
||||
return (kind==Island);
|
||||
}
|
||||
|
||||
bool is_lake_area( AreaType area ) {
|
||||
|
|
|
@ -33,6 +33,7 @@ typedef unsigned int AreaType;
|
|||
int load_area_types( const std::string& filename );
|
||||
bool is_hole_area(AreaType areaType);
|
||||
bool is_landmass_area(AreaType areaType);
|
||||
bool is_island_area(AreaType areaType);
|
||||
bool is_water_area(AreaType areaType);
|
||||
bool is_lake_area(AreaType areaType);
|
||||
bool is_stream_area(AreaType areaType);
|
||||
|
|
Loading…
Reference in a new issue