Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Core/GameEngine/Include/Common/OptionPreferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,6 @@ class OptionPreferences : public UserPreferences
Real getResolutionFontAdjustment();

Bool getShowMoneyPerMinute() const;

Real getGameWindowTransitionSpeed() const;
};
12 changes: 12 additions & 0 deletions Core/GameEngine/Source/Common/OptionPreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,3 +884,15 @@ Bool OptionPreferences::getShowMoneyPerMinute() const
}
return FALSE;
}

Real OptionPreferences::getGameWindowTransitionSpeed() const
{
OptionPreferences::const_iterator it = find("GameWindowTransitionSpeed");
if (it == end())
return 1.0f;

Real speed = (Real) atof(it->second.str());
if (speed <= 0.0f)
return 1.0f;
return min(speed, 1000.0f);
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include "GameClient/GameWindow.h"
#include "GameClient/GameWindowManager.h"
#include "Common/FramePacer.h"
#include "Common/GlobalData.h"
//-----------------------------------------------------------------------------
// DEFINES ////////////////////////////////////////////////////////////////////
//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -274,7 +275,8 @@ void TransitionGroup::update()
// TheSuperHackers @tweak bobtista GUI transition timing is now decoupled from the render update.
// Step every integer frame between the old and new accumulator value so discrete-state-machine
// transitions cannot skip a state when the render frame rate dips below the base rate.
const Real timeScale = TheFramePacer->getBaseOverUpdateFpsRatio();
// TheSuperHackers @feature bobtista 28/06/2026 Scale by the user game window transition speed preference.
const Real timeScale = TheFramePacer->getBaseOverUpdateFpsRatio() * TheGlobalData->m_gameWindowTransitionSpeed;
const Int prevFrame = (Int)m_currentFrame;
m_currentFrame += m_directionMultiplier * timeScale;
const Int newFrame = (Int)m_currentFrame;
Expand Down
3 changes: 3 additions & 0 deletions Generals/Code/GameEngine/Include/Common/GlobalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,9 @@ class GlobalData : public SubsystemInterface
Bool m_showMoneyPerMinute;
Bool m_allowMoneyPerMinuteForPlayer;

// TheSuperHackers @feature bobtista 28/06/2026 user-configurable speed multiplier for game window transitions
Real m_gameWindowTransitionSpeed;

Real m_shakeSubtleIntensity; ///< Intensity for shaking a camera with SHAKE_SUBTLE
Real m_shakeNormalIntensity; ///< Intensity for shaking a camera with SHAKE_NORMAL
Real m_shakeStrongIntensity; ///< Intensity for shaking a camera with SHAKE_STRONG
Expand Down
3 changes: 3 additions & 0 deletions Generals/Code/GameEngine/Source/Common/GlobalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,8 @@ GlobalData::GlobalData()
m_showMoneyPerMinute = FALSE;
m_allowMoneyPerMinuteForPlayer = FALSE;

m_gameWindowTransitionSpeed = 1.0f;

m_debugShowGraphicalFramerate = FALSE;

// By default, show all asserts.
Expand Down Expand Up @@ -1217,6 +1219,7 @@ void GlobalData::parseGameDataDefinition( INI* ini )
TheWritableGlobalData->m_gameTimeFontSize = optionPref.getGameTimeFontSize();
TheWritableGlobalData->m_playerInfoListFontSize = optionPref.getPlayerInfoListFontSize();
TheWritableGlobalData->m_showMoneyPerMinute = optionPref.getShowMoneyPerMinute();
TheWritableGlobalData->m_gameWindowTransitionSpeed = optionPref.getGameWindowTransitionSpeed();

TheWritableGlobalData->m_antiAliasLevel = optionPref.getAntiAliasing();
TheWritableGlobalData->m_textureFilteringMode = optionPref.getTextureFilterMode();
Expand Down
3 changes: 3 additions & 0 deletions GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@ class GlobalData : public SubsystemInterface
Bool m_showMoneyPerMinute;
Bool m_allowMoneyPerMinuteForPlayer;

// TheSuperHackers @feature bobtista 28/06/2026 user-configurable speed multiplier for game window transitions
Real m_gameWindowTransitionSpeed;

Real m_shakeSubtleIntensity; ///< Intensity for shaking a camera with SHAKE_SUBTLE
Real m_shakeNormalIntensity; ///< Intensity for shaking a camera with SHAKE_NORMAL
Real m_shakeStrongIntensity; ///< Intensity for shaking a camera with SHAKE_STRONG
Expand Down
3 changes: 3 additions & 0 deletions GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,8 @@ GlobalData::GlobalData()
m_showMoneyPerMinute = FALSE;
m_allowMoneyPerMinuteForPlayer = FALSE;

m_gameWindowTransitionSpeed = 1.0f;

m_debugShowGraphicalFramerate = FALSE;

// By default, show all asserts.
Expand Down Expand Up @@ -1224,6 +1226,7 @@ void GlobalData::parseGameDataDefinition( INI* ini )
TheWritableGlobalData->m_gameTimeFontSize = optionPref.getGameTimeFontSize();
TheWritableGlobalData->m_playerInfoListFontSize = optionPref.getPlayerInfoListFontSize();
TheWritableGlobalData->m_showMoneyPerMinute = optionPref.getShowMoneyPerMinute();
TheWritableGlobalData->m_gameWindowTransitionSpeed = optionPref.getGameWindowTransitionSpeed();

TheWritableGlobalData->m_antiAliasLevel = optionPref.getAntiAliasing();
TheWritableGlobalData->m_textureFilteringMode = optionPref.getTextureFilterMode();
Expand Down
Loading