mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
Single selection and action should be more accurate.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user