Skip to content

Commit

Permalink
Correct "symetry" to "symmetry"
Browse files Browse the repository at this point in the history
See RM #787

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
  • Loading branch information
cazfi committed Aug 16, 2024
1 parent 15bdcff commit f6d2b64
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions server/generator/mapgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -2665,50 +2665,50 @@ static int fair_team_placement_vertical(const void *a, const void *b)
}

/**********************************************************************//**
Symetry matrix.
Symmetry matrix.
**************************************************************************/
static void fair_do_symetry1(int *x, int *y)
static void fair_do_symmetry1(int *x, int *y)
{
*x = -*x;
}

/**********************************************************************//**
Symetry matrix.
Symmetry matrix.
**************************************************************************/
static void fair_do_symetry2(int *x, int *y)
static void fair_do_symmetry2(int *x, int *y)
{
*y = -*y;
}

/**********************************************************************//**
Symetry matrix for hexagonal topologies.
Symmetry matrix for hexagonal topologies.
**************************************************************************/
static void fair_do_hex_symetry1(int *x, int *y)
static void fair_do_hex_symmetry1(int *x, int *y)
{
*x = -(*x + *y);
}

/**********************************************************************//**
Symetry matrix for hexagonal topologies.
Symmetry matrix for hexagonal topologies.
**************************************************************************/
static void fair_do_hex_symetry2(int *x, int *y)
static void fair_do_hex_symmetry2(int *x, int *y)
{
*x = -*x;
*y = -*y;
}

/**********************************************************************//**
Symetry matrix for hexgonal-isometric topology.
Symmetry matrix for hexgonal-isometric topology.
**************************************************************************/
static void fair_do_iso_hex_symetry1(int *x, int *y)
static void fair_do_iso_hex_symmetry1(int *x, int *y)
{
*y = *x - *y;
}

#define fair_do_iso_hex_symetry2 fair_do_rotation
#define fair_do_iso_hex_symmetry2 fair_do_rotation

/**********************************************************************//**
Rotation matrix, also symetry matrix for hexagonal-isometric topology.
Rotation matrix, also symmetry matrix for hexagonal-isometric topology.
**************************************************************************/
static void fair_do_rotation(int *x, int *y)
{
Expand Down Expand Up @@ -2762,10 +2762,10 @@ static void fair_geometry_rand(struct fair_geometry_data *data)

if (!current_topo_has_flag(TF_HEX)) {
if (fc_rand(100) < 50) {
data->transform[i++] = fair_do_symetry1;
data->transform[i++] = fair_do_symmetry1;
}
if (fc_rand(100) < 50) {
data->transform[i++] = fair_do_symetry2;
data->transform[i++] = fair_do_symmetry2;
}
if (fc_rand(100) < 50) {
data->transform[i++] = fair_do_rotation;
Expand All @@ -2774,10 +2774,10 @@ static void fair_geometry_rand(struct fair_geometry_data *data)
int steps;

if (fc_rand(100) < 50) {
data->transform[i++] = fair_do_hex_symetry1;
data->transform[i++] = fair_do_hex_symmetry1;
}
if (fc_rand(100) < 50) {
data->transform[i++] = fair_do_hex_symetry2;
data->transform[i++] = fair_do_hex_symmetry2;
}
/* Rotations have 2 steps on hexgonal topologies. */
for (steps = fc_rand(99) % 3; steps > 0; steps--) {
Expand All @@ -2787,10 +2787,10 @@ static void fair_geometry_rand(struct fair_geometry_data *data)
int steps;

if (fc_rand(100) < 50) {
data->transform[i++] = fair_do_iso_hex_symetry1;
data->transform[i++] = fair_do_iso_hex_symmetry1;
}
if (fc_rand(100) < 50) {
data->transform[i++] = fair_do_iso_hex_symetry2;
data->transform[i++] = fair_do_iso_hex_symmetry2;
}
/* Rotations have 2 steps on hexgonal topologies. */
for (steps = fc_rand(99) % 3; steps > 0; steps--) {
Expand Down

0 comments on commit f6d2b64

Please sign in to comment.