HomeWildfire Games

Add quadratic scaling function in rmgen library and use it for decorations.
AuditedrP25894

Description

Add quadratic scaling function in rmgen library and use it for decorations.

Patch By: FeldeFeld
Reviewed By: Stan, smiley
Differential Revision: D4212

Event Timeline

Feldfeld raised a concern with this commit.Feb 25 2024, 2:42 PM
Feldfeld added a subscriber: Feldfeld.

The function scaleByMapArea takes its default max area from a map size of 256 which is incorrect, as it should be 512 like the above function scaleByMapSize. Calling that function with that default would lead to incorrect results.
Since all random maps call it by the intermediary of scaleByMapAreaAbsolute, which uses its own maxMapArea, this has no consequences on current maps, and the fix is trivial (change the default value in scaleByMapArea to 512).

This commit now has outstanding concerns.Feb 25 2024, 2:42 PM
marder added a subscriber: marder.

The function scaleByMapArea takes its default max area from a map size of 256 which is incorrect, as it should be 512 like the above function scaleByMapSize. Calling that function with that default would lead to incorrect results.
Since all random maps call it by the intermediary of scaleByMapAreaAbsolute, which uses its own maxMapArea, this has no consequences on current maps, and the fix is trivial (change the default value in scaleByMapArea to 512).

thanks for noticing. See D5248.

Feldfeld accepted this commit.Feb 29 2024, 10:55 PM
All concerns with this commit have now been addressed.Feb 29 2024, 10:55 PM