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
+2 -2
View File
@@ -1040,8 +1040,8 @@ void CellClass::ConvertIsoCoordsToScreen(int& x, int& y) {
//x = floor(tempPt_x / (CELL_PIXEL_W)) * CELL_PIXEL_W;
//y = floor(tempPt_y / (CELL_PIXEL_H)) * CELL_PIXEL_H;
x = tempPt_x - CELL_PIXEL_W;
y = tempPt_y - CELL_PIXEL_H;
x = tempPt_x;
y = tempPt_y;
//Console_Printf("%d %d\n", x, y);
}
+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);