Frame.cpp: move header constants into Frame.cpp and expose with accessor functions

This commit is contained in:
tomcw
2017-10-11 17:38:36 +01:00
parent 03b4e889e5
commit 018e338612
7 changed files with 143 additions and 80 deletions
+12 -3
View File
@@ -9687,9 +9687,18 @@ void DebuggerMouseClick( int x, int y )
// do picking
int cx = (x - VIEWPORTX) / nFontWidth;
int cy = (y - VIEWPORTY) / nFontHeight;
const int nOffsetX = IsFullScreen() ? GetFullScreenOffsetX() : Get3DBorderWidth();
const int nOffsetY = IsFullScreen() ? GetFullScreenOffsetY() : Get3DBorderHeight();
const int nOffsetInScreenX = x - nOffsetX;
const int nOffsetInScreenY = y - nOffsetY;
if (nOffsetInScreenX < 0 || nOffsetInScreenY < 0)
return;
int cx = nOffsetInScreenX / nFontWidth;
int cy = nOffsetInScreenY / nFontHeight;
#if _DEBUG
char sText[ CONSOLE_WIDTH ];
sprintf( sText, "x:%d y:%d cx:%d cy:%d", x, y, cx, cy );