1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Partial encapsulation of AdvMapInt

This commit is contained in:
Ivan Savenko
2023-02-10 23:29:13 +02:00
parent e15c7dcd33
commit 91b17bed79
17 changed files with 247 additions and 231 deletions

View File

@@ -168,15 +168,15 @@ void CMinimap::showAll(SDL_Surface * to)
Canvas target(to);
int3 mapSizes = LOCPLINT->cb->getMapSize();
int3 tileCountOnScreen = adventureInt->terrain->tileCountOnScreen();
Rect screenArea = adventureInt->terrainAreaTiles();
//draw radar
Rect radar =
{
adventureInt->position.x * pos.w / mapSizes.x,
adventureInt->position.y * pos.h / mapSizes.y,
tileCountOnScreen.x * pos.w / mapSizes.x - 1,
tileCountOnScreen.y * pos.h / mapSizes.y - 1
screenArea.x * pos.w / mapSizes.x,
screenArea.y * pos.h / mapSizes.y,
screenArea.w * pos.w / mapSizes.x - 1,
screenArea.h * pos.h / mapSizes.y - 1
};
Canvas clippedTarget(target, pos);