This new script and the associated configuration files lint our source
code (JS and C++). This will be extended in the future, refs #4833.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D213
This was SVN commit r20364.
Keep now unused, yet unalteredly useful paintHeightmap JS function
(until CMapReader::LoadRandomMap can load PMP files, refs #4816),
bicubicInterpolation and randomPlayerPlacementAt.
This was SVN commit r20362.
Document the difference between the two types of classes, refs #4831.
Move RectPlacer (as of 7d0cc59136 unreferenced but possibly useful)to
placer_noncentered.js and remove three redundant checks there.
This was SVN commit r20360.
Define what an Object is, refs #4831.
Remove RandomObject duplication from c02818ceea by just calling the
SimpleObject with a random template, refs #4805.
Remove the tautologous (!fail) check and replace needless multilevel
fail-check nesting with two && operators.
Move default parameters from the function body to the function header
and rename resultObjs to entities.
Throw errors instead of printing something if min > max.
This was SVN commit r20357.
Document what a Group is, refs #4831.
Remove duplicate place function by calling the SimpleGroup from the
RandomGroup, refs #4805.
Move the default parameters from the function body to the function
header, remove duplicate CELL_SIZE division, pointless comment and use
let instead of var.
This was SVN commit r20355.
It should have been added to the painters file instead of to the map if
a copy was acceptable.
Add the only simple capability it added (an unnoticeable random
elevation difference to each vertex) to the SmoothElevationPainter to
make it universally accessible.
That painter also had a bug, because it replaced the roughness with 5 if
0 was given.
This was SVN commit r20354.
Doesn't change the result perceptibly while removing otherwise
incomprehensible magic numbers from 61387e95b2.
The equations are so similar that one might expect that the averaging
was the intended algorithm.
This was SVN commit r20353.
(The spread operator is not faster in sm45 according to my test.)
Differential Revision: https://code.wildfiregames.com/D980
Refs 6590f301c2.
Not accepted by anyone.
This was SVN commit r20351.
Document the two classes, the new function and every step of their
execution, refs #4831.
Unify SmoothElevationPainter height computation duplication, remove
pointless comments, use array functions and the prefix increment
operator.
This was SVN commit r20350.
Remove two unneeded variables and reduce the performance by some
milliseconds by using for...of loops, the destructing assignment and
inlining the unified DX/DZ array.
Fix a wrong comment in the BorderTileClassConstraint of 86d3cdf2d5.
Differential Revision: https://code.wildfiregames.com/D984
Not accepted by anyone
This was SVN commit r20349.
Move the least complex rmgen painters (TileClassPainter,
TileClassPainter, MultiPainter, TerrainPainter) to the top of the
painters file, refs #4804.
Group the TerrainPainter with the LayeredPainter which both draw a
texture on the terrain contrary to the others.
Use for-of loops and remove unneeded variables.
(Diff split for auditability.)
This was SVN commit r20347.
It didn't add a benefit, hid a bug (see 0c9205e5b8), required the
inheriting classes to use terrainObjects, added confusing indirection
and none of the other classes (painters, placers, constraints) use that
inheritance.
Define what the Terrain classes do, refs #4831.
Rename treeType to templateName.
Remove unneeded round in the validT condition.
This was SVN commit r20338.
Start unifying the euclidian distance functions instead of adding yet
another helper function to the random map script library after this
diff.
Differential Revision: https://code.wildfiregames.com/D969
Math.square accepted by mimo
Includes changes proposed by bb, fatherbushido
This was SVN commit r20328.