Enhancement:

- SCROLL_SPEED_FACTOR in Ja2_Options.ini allows to modify scroll speed
- while reading MovementCosts.xml the game checks now for valid traversal type and asserts instead simply assigning type GROUNDBARRIER

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8295 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2016-09-11 11:42:48 +00:00
parent cedb77bffb
commit 9395fcc8a2
5 changed files with 52 additions and 42 deletions
+3
View File
@@ -948,6 +948,9 @@ void LoadGameExternalOptions()
gGameExternalOptions.giMilitiaTurnSpeedUpFactor = iniReader.ReadFloat("Graphics Settings","MILITIA_TURN_SPEED_UP_FACTOR",1.0, 0, 1.0);
gGameExternalOptions.giCivilianTurnSpeedUpFactor = iniReader.ReadFloat("Graphics Settings","CIVILIAN_TURN_SPEED_UP_FACTOR",1.0, 0, 1.0);
gGameExternalOptions.fScrollSpeedFactor = iniReader.ReadFloat("Graphics Settings","SCROLL_SPEED_FACTOR",1.0, 0.5, 2.0);
giTimerIntervals[ NEXTSCROLL ] = (INT16)(giTimerIntervals[ NEXTSCROLL ] / gGameExternalOptions.fScrollSpeedFactor);
gGameExternalOptions.gfUseExternalLoadscreens = iniReader.ReadBoolean("Graphics Settings","USE_EXTERNALIZED_LOADSCREENS", FALSE);
if (!is_networked)
+1
View File
@@ -461,6 +461,7 @@ typedef struct
FLOAT giCreatureTurnSpeedUpFactor;
FLOAT giMilitiaTurnSpeedUpFactor;
FLOAT giCivilianTurnSpeedUpFactor;
FLOAT fScrollSpeedFactor;
//Sound settings
UINT32 guiWeaponSoundEffectsVolume;
+9 -9
View File
@@ -15,9 +15,9 @@
#ifdef JA2EDITOR
#ifdef JA2UB
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8292 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8295 (Development Build)" };
#else
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8292 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8295 (Development Build)" };
#endif
// ------------------------------
@@ -27,11 +27,11 @@
//DEBUG BUILD VERSION
#ifdef JA2UB
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8292 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8295 (Development Build)" };
#elif defined (JA113DEMO)
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8292 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8295 (Development Build)" };
#else
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8292 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8295 (Development Build)" };
#endif
#elif defined CRIPPLED_VERSION
@@ -46,16 +46,16 @@
//RELEASE BUILD VERSION
#ifdef JA2UB
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8292 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8295 (Development Build)" };
#elif defined (JA113DEMO)
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8292 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8295 (Development Build)" };
#else
CHAR16 zVersionLabel[256] = { L"Release v1.13.8292 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Release v1.13.8295 (Development Build)" };
#endif
#endif
CHAR8 czVersionNumber[16] = { "Build 16.09.03" }; //YY.MM.DD
CHAR8 czVersionNumber[16] = { "Build 16.09.11" }; //YY.MM.DD
CHAR16 zTrackingNumber[16] = { L"Z" };
// SAVE_GAME_VERSION is defined in header, change it there
+7 -1
View File
@@ -257,6 +257,10 @@ smctableEndElementHandle(void *userData, const XML_Char *name)
{
trav_type = HILLS;
}
else if(strcmp(pData->szCharData, "GROUNDBARRIER") == 0)
{
trav_type = GROUNDBARRIER;
}
else if(strcmp(pData->szCharData, "NS_RIVER") == 0)
{
trav_type = NS_RIVER;
@@ -319,7 +323,9 @@ smctableEndElementHandle(void *userData, const XML_Char *name)
}
else
{
trav_type = GROUNDBARRIER;
// silversurfer: don't just assign type GROUNDBARRIER. Let modders know that the data is incorrect!
AssertMsg(0, String( "Incorrect traversal data '%s' for sector row=%d column=%d !", pData->szCharData, pData->uiRowNumber, pData->uiColNumber) );
//trav_type = GROUNDBARRIER;
}
// Now assign it to the correct directory using the close tag as a guide
if(strcmp(name, "North") == 0)
+32 -32
View File
@@ -3599,41 +3599,41 @@ void ScrollWorld( )
// Check for sliding
if (!TileIsOutOfBounds(gTacticalStatus.sSlideTarget))
{
// Ignore all input...
// Check if we have reached out dest!
if ( fFirstTimeInSlideToMode )
{
ubOldScrollSpeed = gubCurScrollSpeedID;
fFirstTimeInSlideToMode = FALSE;
}
// Ignore all input...
// Check if we have reached out dest!
if ( fFirstTimeInSlideToMode )
{
ubOldScrollSpeed = gubCurScrollSpeedID;
fFirstTimeInSlideToMode = FALSE;
}
// Make faster!
//gubCurScrollSpeedID = 2;
// Make faster!
//gubCurScrollSpeedID = 2;
ScrollFlags = 0;
fDoScroll = FALSE;
//
if ( SoldierLocationRelativeToScreen( gTacticalStatus.sSlideTarget, gTacticalStatus.sSlideReason, &bDirection, &ScrollFlags ) && GridNoOnVisibleWorldTile( gTacticalStatus.sSlideTarget ) )
{
ScrollFlags = gScrollDirectionFlags[ bDirection ];
fDoScroll = TRUE;
fIgnoreInput = TRUE;
}
else
{
// We've stopped!
gTacticalStatus.sSlideTarget = NOWHERE;
}
ScrollFlags = 0;
fDoScroll = FALSE;
//
if ( SoldierLocationRelativeToScreen( gTacticalStatus.sSlideTarget, gTacticalStatus.sSlideReason, &bDirection, &ScrollFlags ) && GridNoOnVisibleWorldTile( gTacticalStatus.sSlideTarget ) )
{
ScrollFlags = gScrollDirectionFlags[ bDirection ];
fDoScroll = TRUE;
fIgnoreInput = TRUE;
}
else
{
// We've stopped!
gTacticalStatus.sSlideTarget = NOWHERE;
}
}
else
{
// Restore old scroll speed
if ( !fFirstTimeInSlideToMode )
{
gubCurScrollSpeedID = ubOldScrollSpeed;
}
fFirstTimeInSlideToMode = TRUE;
}
else
{
// Restore old scroll speed
if ( !fFirstTimeInSlideToMode )
{
gubCurScrollSpeedID = ubOldScrollSpeed;
}
fFirstTimeInSlideToMode = TRUE;
}
}
if ( !fIgnoreInput )