diff --git a/SCREENS.cpp b/SCREENS.cpp index 323a6956..ebfe0053 100644 --- a/SCREENS.cpp +++ b/SCREENS.cpp @@ -6,6 +6,7 @@ int iResolution; // INI file int iPlayIntro; +int iDisableMouseScrolling; /* WANNE, Sgt.Kolja * INI file (Windowed or Fullscreen) * REPLACE all defines WINDOWED_MODE with this variable diff --git a/Standard Gaming Platform/sgp.cpp b/Standard Gaming Platform/sgp.cpp index d2932869..de7967af 100644 --- a/Standard Gaming Platform/sgp.cpp +++ b/Standard Gaming Platform/sgp.cpp @@ -1678,6 +1678,10 @@ void GetRuntimeSettings( ) // WANNE: Should we play the intro? iPlayIntro = (int) GetPrivateProfileInt( "Ja2 Settings","PLAY_INTRO", iPlayIntro, INIFile ); + + + // haydent: mouse scrolling + iDisableMouseScrolling = (int) GetPrivateProfileInt( "Ja2 Settings","DISABLE_MOUSE_SCROLLING", iDisableMouseScrolling, INIFile ); #else gbPixelDepth = PIXEL_DEPTH; @@ -1716,6 +1720,9 @@ void GetRuntimeSettings( ) // WANNE: Should we play the intro? iPlayIntro = (int)oProps.getIntProperty("Ja2 Settings","PLAY_INTRO", iPlayIntro); + // haydent: mouse scrolling + iDisableMouseScrolling = (int)oProps.getIntProperty("Ja2 Settings","DISABLE_MOUSE_SCROLLING", iDisableMouseScrolling); + #ifdef USE_CODE_PAGE s_DebugKeyboardInput = oProps.getBoolProperty(L"Ja2 Settings", L"DEBUG_KEYS", false); s_CodePage = oProps.getStringProperty(L"Ja2 Settings", L"CODE_PAGE"); diff --git a/TileEngine/renderworld.cpp b/TileEngine/renderworld.cpp index 2b70cc3b..9e3da6b9 100644 --- a/TileEngine/renderworld.cpp +++ b/TileEngine/renderworld.cpp @@ -3654,6 +3654,10 @@ void ScrollWorld( ) } + //hayden - disable mouse scrolling for window dev ease + if(iDisableMouseScrolling)break; + + // Do mouse - PUT INTO A TIMER! // Put a counter on starting from mouse, if we have not started already! if ( !gfScrollInertia && gfScrollPending == FALSE ) diff --git a/local.h b/local.h index 4ac7bc2e..615decb7 100644 --- a/local.h +++ b/local.h @@ -31,6 +31,7 @@ extern UINT16 SCREEN_HEIGHT; extern int iResolution; // Resolution id from the ini file extern int iPlayIntro; +extern int iDisableMouseScrolling; extern INT16 iScreenWidthOffset; extern INT16 iScreenHeightOffset;