Skip to content
Merged
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
6 changes: 6 additions & 0 deletions Strategic/Game Clock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ BOOLEAN fClockMouseRegionCreated = FALSE;

BOOLEAN fTimeCompressHasOccured = FALSE;

// run time compression till next hour
bool stopTimeCompressionNextHour = false;

//This value represents the time that the sector was loaded. If you are in sector A9, and leave
//the game clock at that moment will get saved into the temp file associated with it. The next time you
//enter A9, this value will contain that time. Used for scheduling purposes.
Expand Down Expand Up @@ -525,6 +528,9 @@ void SetGameTimeCompressionLevel( UINT32 uiCompressionRate )
{
Assert( uiCompressionRate < NUM_TIME_COMPRESS_SPEEDS );

if( uiCompressionRate == TIME_COMPRESS_X0 )
stopTimeCompressionNextHour = false;

if( guiCurrentScreen == GAME_SCREEN )
{
if( uiCompressionRate != TIME_COMPRESS_X1 )
Expand Down
3 changes: 3 additions & 0 deletions Strategic/Game Clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ extern INT32 giTimeCompressSpeeds[ NUM_TIME_COMPRESS_SPEEDS ];
// compress mode now in use
extern INT32 giTimeCompressMode;

// run time compression till next hour
extern bool stopTimeCompressionNextHour;


enum
{
Expand Down
5 changes: 5 additions & 0 deletions Strategic/Hourly Update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ CHAR16 zString[128];
if(is_networked)
return;

if (stopTimeCompressionNextHour)
{
SetGameTimeCompressionLevel( TIME_COMPRESS_X0);
}

// hourly update of town loyalty
HandleTownLoyalty();

Expand Down
21 changes: 21 additions & 0 deletions Strategic/Map Screen Interface Bottom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,27 @@ void BtnTimeCompressMoreMapScreenCallback( GUI_BUTTON *btn,INT32 reason )
{
if ( CommonTimeCompressionChecks() == TRUE )
return;

// redraw region
if( btn->uiFlags & MSYS_HAS_BACKRECT )
{
fMapScreenBottomDirty = TRUE;
}

btn->uiFlags|=(BUTTON_CLICKED_ON);
}
// Start time compression which stops at the next hour
// Button down removes the pop up/tooltip, Button up calls the functionality
else if(reason & MSYS_CALLBACK_REASON_RBUTTON_UP )
{
if (btn->uiFlags & BUTTON_CLICKED_ON)
{
btn->uiFlags&=~(BUTTON_CLICKED_ON);
fMapScreenBottomDirty = TRUE;

stopTimeCompressionNextHour = true;
SetGameTimeCompressionLevel( TIME_COMPRESS_60MINS );
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion i18n/_EnglishText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4453,7 +4453,7 @@ STR16 pMapScreenBottomFastHelp[] =
L"|Laptop",
L"Tactical (|E|s|c)",
L"|Options",
L"Time Compress (|+)", // time compress more
L"Time Compress (|+)\nRight Click to fast forward one hour", // time compress more
L"Time Compress (|-)", // time compress less
L"Previous Message (|U|p)\nPrevious Page (|P|g|U|p)", // previous message in scrollable list
L"Next Message (|D|o|w|n)\nNext Page (|P|g|D|n)", // next message in the scrollable list
Expand Down