eventually maybe we can move to fixed point approximations instead of using hypot and casts to double/float? probably way slower than using the FPU on modern systems though :D
Identified and removed an instance of Direction being used as an argument for a bool parameter
Removed a single-use temporary variable being cast from sprite frame to direction to size_t
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
Fix alignment of WalkSettings array
We'll leverage this for consistency with other conversions which similarly use a conversion constructor instead of a static method like 'fromDirection'.
Due to the way this function is used it was easiest to also change ObjIndex to return a reference to the object instead of the index. Also added an explicit conversion from Size to Displacement to make one of the uses slightly cleaner to express.