Single selection and action should be more accurate.

This commit is contained in:
Justin Marshall
2020-07-19 14:30:36 -07:00
parent 9f31118e03
commit e721d781e5
2 changed files with 3 additions and 11 deletions
+1 -9
View File
@@ -3169,18 +3169,10 @@ int DisplayClass::TacticalClass::Action(unsigned flags, KeyNumType & key)
x = Get_Mouse_X();
y = Get_Mouse_Y();
// jmarshall
int tileX, tileY;
int screenX, screenY;
screenX = x;
screenY = y;
if (!CellClass::ScreenCoordsToIsoTile(x, y, tileX, tileY)) {
return 0;
}
x = tileX * CELL_PIXEL_W;
y = tileY * CELL_PIXEL_H;
// jmarshall end
CellClass::ConvertIsoCoordsToScreen(x, y);
bool edge = (y == 0 || x == 0 || x == SeenBuff.Get_Width()-1 || y == SeenBuff.Get_Height()-1);
COORDINATE coord = Map.Pixel_To_Coord(x, y);