OpenXcom Forum
Contributions => Programming => Topic started by: kevL on August 03, 2013, 07:47:25 am
-
the 1x1px offset was really bothering me, so I tracked down the code and this works:
Battlescape/MiniMapView.cpp, ~line 150+
drawLine(centerX - CELL_WIDTH -1, centerY - CELL_HEIGHT -1,
centerX - xOffset -1, centerY - yOffset -1,
color); https:// top left
drawLine(centerX + xOffset -1, centerY - yOffset -1,
centerX + CELL_WIDTH -1, centerY - CELL_HEIGHT -1,
color); https:// top right
drawLine(centerX - CELL_WIDTH -1, centerY + CELL_HEIGHT -1,
centerX - xOffset -1, centerY + yOffset -1,
color); https:// bottom left
drawLine(centerX + CELL_WIDTH -1, centerY + CELL_HEIGHT -1,
centerX + xOffset -1, centerY + yOffset -1,
color); https:// bottom right
If someone with git-fu would like to toss it into a nightly build Pls do. All those "-1"s are yours truly,
-
Pull request made.
-
thanks but, whoever altered the code mucked things up. It *should* look like this:
-
here's how to get soldiers properly centered on the main battle map also:
in Battlescape/Camera.cpp, Camera::centerOnPosition()
change
_mapOffset.x = -(screenPos.x - (_screenWidth / 2));
_mapOffset.y = -(screenPos.y - (_visibleMapHeight / 2));
to
_mapOffset.x = -(screenPos.x - (_screenWidth / 2) +16);
_mapOffset.y = -(screenPos.y - (_visibleMapHeight / 2) +16);
great game. It's really shaping up!!!
-
fixt
-
et tu, brutus
jk
-
ah, apologies that I effed it up. :) Cheers for cleaning it, Warboy.