devilutionX
devilutionX copied to clipboard
Update RectTrans to operate on rectangle range like normal
Using <= instead of < made this function behave differently to other loops over a Rectangle (it was correct when it operated on two points). Added a constructor for Rectangle taking two points to allow expressing the logic in both cases with natural behaviour each time.
This does mean there are now two constructors that could match Rectangle { { int, int }, { int, int } } so all uses of the initialiser list had to be updated to use an explicit Size constructor call or directly use an existing/new Size variable.