mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
- Developer feature: This is great for when in windowed mode eg development and your mouse is leaving the game window all the time to go to VS or another game instance on your desktop. (by haydent)
o this just means the screen stays put and not scrolling around like mad o also the way it is coded, if the setting isnt there in the ini it just acts like usual. o this also requires matching setting in Ja2.ini ;****************************************************************************************************************************** ; Enable/Disable Mouse Scrolling of tactical view ;****************************************************************************************************************************** DISABLE_MOUSE_SCROLLING = 1 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5602 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
int iResolution; // INI file
|
int iResolution; // INI file
|
||||||
int iPlayIntro;
|
int iPlayIntro;
|
||||||
|
int iDisableMouseScrolling;
|
||||||
/* WANNE, Sgt.Kolja
|
/* WANNE, Sgt.Kolja
|
||||||
* INI file (Windowed or Fullscreen)
|
* INI file (Windowed or Fullscreen)
|
||||||
* REPLACE all defines WINDOWED_MODE with this variable
|
* REPLACE all defines WINDOWED_MODE with this variable
|
||||||
|
|||||||
@@ -1678,6 +1678,10 @@ void GetRuntimeSettings( )
|
|||||||
|
|
||||||
// WANNE: Should we play the intro?
|
// WANNE: Should we play the intro?
|
||||||
iPlayIntro = (int) GetPrivateProfileInt( "Ja2 Settings","PLAY_INTRO", iPlayIntro, INIFile );
|
iPlayIntro = (int) GetPrivateProfileInt( "Ja2 Settings","PLAY_INTRO", iPlayIntro, INIFile );
|
||||||
|
|
||||||
|
|
||||||
|
// haydent: mouse scrolling
|
||||||
|
iDisableMouseScrolling = (int) GetPrivateProfileInt( "Ja2 Settings","DISABLE_MOUSE_SCROLLING", iDisableMouseScrolling, INIFile );
|
||||||
#else
|
#else
|
||||||
gbPixelDepth = PIXEL_DEPTH;
|
gbPixelDepth = PIXEL_DEPTH;
|
||||||
|
|
||||||
@@ -1716,6 +1720,9 @@ void GetRuntimeSettings( )
|
|||||||
// WANNE: Should we play the intro?
|
// WANNE: Should we play the intro?
|
||||||
iPlayIntro = (int)oProps.getIntProperty("Ja2 Settings","PLAY_INTRO", iPlayIntro);
|
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
|
#ifdef USE_CODE_PAGE
|
||||||
s_DebugKeyboardInput = oProps.getBoolProperty(L"Ja2 Settings", L"DEBUG_KEYS", false);
|
s_DebugKeyboardInput = oProps.getBoolProperty(L"Ja2 Settings", L"DEBUG_KEYS", false);
|
||||||
s_CodePage = oProps.getStringProperty(L"Ja2 Settings", L"CODE_PAGE");
|
s_CodePage = oProps.getStringProperty(L"Ja2 Settings", L"CODE_PAGE");
|
||||||
|
|||||||
@@ -3654,6 +3654,10 @@ void ScrollWorld( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//hayden - disable mouse scrolling for window dev ease
|
||||||
|
if(iDisableMouseScrolling)break;
|
||||||
|
|
||||||
|
|
||||||
// Do mouse - PUT INTO A TIMER!
|
// Do mouse - PUT INTO A TIMER!
|
||||||
// Put a counter on starting from mouse, if we have not started already!
|
// Put a counter on starting from mouse, if we have not started already!
|
||||||
if ( !gfScrollInertia && gfScrollPending == FALSE )
|
if ( !gfScrollInertia && gfScrollPending == FALSE )
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ extern UINT16 SCREEN_HEIGHT;
|
|||||||
|
|
||||||
extern int iResolution; // Resolution id from the ini file
|
extern int iResolution; // Resolution id from the ini file
|
||||||
extern int iPlayIntro;
|
extern int iPlayIntro;
|
||||||
|
extern int iDisableMouseScrolling;
|
||||||
extern INT16 iScreenWidthOffset;
|
extern INT16 iScreenWidthOffset;
|
||||||
extern INT16 iScreenHeightOffset;
|
extern INT16 iScreenHeightOffset;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user