nuke all the #if 0's

scripted commit:

find . -not -path '*/.*' -and -not -path '*/ext*' -type d -exec coan source -R -E {} ';'

https://coan2.sourceforge.net/coan_man_1.html
This commit is contained in:
Marco Antonio Jaguaribe Costa
2023-01-19 00:13:08 +02:00
committed by Asdow
parent 6afe785f4b
commit 8b1c4effa0
72 changed files with 0 additions and 6657 deletions
-19
View File
@@ -1609,25 +1609,6 @@ BOOLEAN IsCursorRestricted( void )
void SimulateMouseMovement( UINT32 uiNewXPos, UINT32 uiNewYPos )
{
#if 0
FLOAT flNewXPos, flNewYPos;
// Wizardry NOTE: This function currently doesn't quite work right for in any Windows resolution other than 640x480.
// mouse_event() uses your current Windows resolution to calculate the resulting x,y coordinates. So in order to get
// the right coordinates, you'd have to find out the current Windows resolution through a system call, and then do:
// uiNewXPos = uiNewXPos * SCREEN_WIDTH / WinScreenResX;
// uiNewYPos = uiNewYPos * SCREEN_HEIGHT / WinScreenResY;
//
// JA2 doesn't have this problem, 'cause they use DirectDraw calls that change the Windows resolution properly.
//
// Alex Meduna, Dec. 3, 1997
// Adjust coords based on our resolution
flNewXPos = ( (FLOAT)uiNewXPos / SCREEN_WIDTH ) * 65536;
flNewYPos = ( (FLOAT)uiNewYPos / SCREEN_HEIGHT ) * 65536;
mouse_event( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, (UINT32)flNewXPos, (UINT32)flNewYPos, 0, 0 );
#endif
// 0verhaul:
// The above is a bad hack. Especially in windowed mode. We don't want coords relative to the entire screen in that case.
// So instead, get screen coords and then use the setcursorpos call.