A number of built in methods take separate x and y values, while Unit coordinates are only ever returned as LOCATION structs. Perhaps we should provide helper methods to help paper over the difference.
We could perhaps provide the reverse of the MkXY macro, which instead takes a LOCATION and converts it to the x and y pairs. That maybe wouldn't be very pretty though.
We could also provide overloads or new methods to paper over the difference. Example:
void CenterViewOn(enum PlayerNum playerNum, const LOCATION& location) {
Player[playerNum].CenterViewOn(location.x, location.y);
}
A number of built in methods take separate
xandyvalues, whileUnitcoordinates are only ever returned asLOCATIONstructs. Perhaps we should provide helper methods to help paper over the difference.We could perhaps provide the reverse of the
MkXYmacro, which instead takes aLOCATIONand converts it to thexandypairs. That maybe wouldn't be very pretty though.We could also provide overloads or new methods to paper over the difference. Example: