diff --git a/code/redalert/display.cpp b/code/redalert/display.cpp index e0b0d67..4d3e3a9 100644 --- a/code/redalert/display.cpp +++ b/code/redalert/display.cpp @@ -1839,6 +1839,10 @@ bool DisplayClass::Push_Onto_TacMap(COORDINATE & source, COORDINATE & dest) *=============================================================================================*/ ObjectClass * DisplayClass::Cell_Object(CELL cell, int x, int y) const { + int tileX, tileY; + CellClass::ScreenCoordsToIsoTile(x, y, tileX, tileY); + x = tileX * CELL_PIXEL_W; + y = tileY * CELL_PIXEL_H; return(*this)[cell].Cell_Object(x, y); } diff --git a/code/redalert/mapedsel.cpp b/code/redalert/mapedsel.cpp index 78532a6..829f83d 100644 --- a/code/redalert/mapedsel.cpp +++ b/code/redalert/mapedsel.cpp @@ -81,8 +81,8 @@ int MapEditClass::Select_Object(void) /* ** Convert x,y to offset from cell upper-left */ - x = (x-TacPixelX) % ICON_PIXEL_W; - y = (y-TacPixelY) % ICON_PIXEL_H; + x = (x - TacPixelX) % ICON_PIXEL_W; + y = (y - TacPixelY) % ICON_PIXEL_H; /* ** Get object at that x,y