Create coordinate system conversion wrapper around Mirror
The Symmetry.Mirror enum was previously documented as defined in terms of the WPos system, which happens to align with CPos for Rectangular grid types. However, the existing code gets confused when attempting to support RectangularIsometric, due to a lack of appropriate conversion logic. This change makes Mirror agnostic to specific coordinate systems and introduces a WMirror wrapper that provides getters for the correct Mirror configuration given the coordinate system being used.
This commit is contained in:
committed by
Gustas Kažukauskas
parent
91ddfd6fc1
commit
00cd438190
@@ -189,7 +189,7 @@ namespace OpenRA.Mods.Common.MapGenerator
|
||||
MersenneTwister random,
|
||||
CellLayer<int> cellLayer,
|
||||
int rotations,
|
||||
Symmetry.Mirror mirror,
|
||||
Symmetry.WMirror wmirror,
|
||||
int featureSize,
|
||||
Func<int, int> ampFunc)
|
||||
{
|
||||
@@ -199,7 +199,7 @@ namespace OpenRA.Mods.Common.MapGenerator
|
||||
random,
|
||||
size,
|
||||
rotations,
|
||||
mirror,
|
||||
wmirror.ForCPos(),
|
||||
featureSize,
|
||||
ampFunc);
|
||||
CellLayerUtils.FromMatrix(cellLayer, noise);
|
||||
|
||||
Reference in New Issue
Block a user