Skip to content

QoL: Right Click to fast forward one hour#488

Merged
majcosta merged 1 commit into
1dot13:masterfrom
BeatAroundTheBuscher:fast_forward_one_hour
Aug 24, 2025
Merged

QoL: Right Click to fast forward one hour#488
majcosta merged 1 commit into
1dot13:masterfrom
BeatAroundTheBuscher:fast_forward_one_hour

Conversation

@BeatAroundTheBuscher
Copy link
Copy Markdown
Contributor

@BeatAroundTheBuscher BeatAroundTheBuscher commented Aug 17, 2025

This is a quality of life feature to auto stop time compression once HandleHourlyUpdate is called. By right clicking on the relevant button for MAP_TIME_COMPRESS_MORE (strategic screen bottom right), time compression is set to 60 minutes and is automatically reset once a full hour has passed. This doesn't affect the normal behaviour with left click.

By setting the new bool stopTimeCompressionNextHour in SetGameTimeCompressionLevel, it is also set to false when an event happens inside the hour (for example moving into a new sector)

Some minor reformatting was done in BtnTimeCompressMoreMapScreenCallback to indent lines with the expected amounts of whitespace.

Comment thread Strategic/Game Clock.cpp Outdated
BOOLEAN fTimeCompressHasOccured = FALSE;

// run time compression till next hour?
BOOLEAN fStopTimeCompressionNextHour = FALSE;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is new code, you can just use bool. Also no need for the "f" prefix.

}

btn->uiFlags|=(BUTTON_CLICKED_ON);
btn->uiFlags|=(BUTTON_CLICKED_ON);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid mixing formatting changes with code changes. Separate functional and non-functional changes.

Comment on lines +711 to +712
}
else if(reason & MSYS_CALLBACK_REASON_RBUTTON_DWN )
else if(reason & MSYS_CALLBACK_REASON_RBUTTON_DWN )
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.


btn->uiFlags|=(BUTTON_CLICKED_ON);
}
// Buscher
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this, git has Snitch and it knows it was you.

fMapScreenBottomDirty = TRUE;

fStopTimeCompressionNextHour = TRUE;
//RequestIncreaseInTimeCompression();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

@majcosta majcosta merged commit 1004ab6 into 1dot13:master Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants