LAB: Make processMap a bit more readable by using Rects

This commit is contained in:
Strangerke 2015-12-18 02:15:44 +01:00 committed by Willem Jan Palenstijn
parent b1fc785225
commit 15889e6fd2
3 changed files with 12 additions and 11 deletions

View file

@ -74,6 +74,10 @@ uint16 Utils::mapScaleY(uint16 y) {
return ((y - 35) >> 1) - (y >> 6);
}
Common::Rect Utils::mapRectScale(int16 x1, int16 y1, int16 x2, int16 y2) {
return Common::Rect(mapScaleX(x1), mapScaleY(y1), mapScaleX(x2), mapScaleY(y2));
}
/**
* Scales the VGA coords to SVGA if necessary; otherwise, returns VGA coords.
*/