HomeWildfire Games

Replaces CPos by more a consistent CVector2D, reduces geometry code duplication.

Description

Replaces CPos by more a consistent CVector2D, reduces geometry code duplication.

Tested By: Freagarach, Langbart

Differential Revision: https://code.wildfiregames.com/D3759

Event Timeline

lyv added a subscriber: lyv.Mar 29 2021, 9:35 AM
lyv added inline comments.
/ps/trunk/binaries/data/mods/public/gui/summary/summary.js
353

Why not Vector2D? here as well?

lyv added inline comments.Mar 29 2021, 9:38 AM
/ps/trunk/binaries/data/mods/public/gui/summary/summary.js
353

(Perhaps a nonexistent conversion interface?)

vladislavbelov added inline comments.Mar 29 2021, 9:55 AM
/ps/trunk/binaries/data/mods/public/gui/summary/summary.js
353

On the C++ side we have CVector2D for graphics/ui and CFixedVector2D for simulation, on the JS side Vector2D is used everywhere. To use Vector2D here we need to have a strict design about conversions first.

vladislavbelov added inline comments.Mar 29 2021, 9:57 AM
/ps/trunk/binaries/data/mods/public/gui/summary/summary.js
353

One might use Vector2D here and it will work, but it'll be a coincidence that it requires the same fields.