Modernise Pause functionality - Use GameSpeed instead of dedicated Pause states#3187
Modernise Pause functionality - Use GameSpeed instead of dedicated Pause states#3187LeftofZen wants to merge 8 commits intoOpenLoco:masterfrom
Conversation
60411f0 to
1b049a7
Compare
|
This conflicts with #3186. Did you intend to offer an alternative solution? |
yes there was a discussion on discord about it |
| Audio::unpauseSound(); | ||
| WindowManager::invalidate(WindowType::timeToolbar); | ||
| } | ||
| { } |
There was a problem hiding this comment.
this functionality is now all handled by the setGameSpeed command/method
|
I'm not sure this will work in the long term and we will probably need to undo parts of it in the future. There are parts that depends on us having the mini ui processing loops which is something we've wanted to remove for a long time. It would be best we design assuming that mini ui processing loops disappear and there is only the main processing loop. How will this work in multiplayer as well? Need to account for game commands not being run immediately. Its hard to work out at the moment if this will make it harder in the future to make the bigger improvements we want to make. Also unsure if anything we haven't implemented is still accessing these variables there shouldn't be but can't be 100% sure. |
|
I'm also not a fan of this, this removes the ability to toggle pause and have the game speed not changed. |
I don't understand what you mean. What "mini processing loops" are there and how does this change rely on them, that the previous code doesn't? I would put the pause/unpause functionality into the OnOpen and OnClose of the window, except that this code need to be copied and pasted for each window that wants to support that, and I'm sure you understand copy/paste is bad design. If there was an OO style window it'd be easy to put it in the base class's OnOpen and OnClose so that all child windows inherit the behaviour, but the code currently isn't structured li ke that. I'd love to know what you would do here.
The same as it does now? I don't understand the problem, I didn't change any of the actual semantics of things, its just pause is now communicated through the SetGameSpeed command, not the TogglePause command
This comment doesn't help in any way to determine what I've done wrong or how I should fix it. Can you elaborate and suggest a better way?
This is fair, I can probably remove/undo this change |
Yep it does remove that functionality. Because there is no use for this functionality and no way to trigger it in-game. So my questions are:
|
d54d506 to
cec2b42
Compare
…ter prompt windows are closed
cec2b42 to
246afcd
Compare
src/OpenLoco/src/Game.cpp
Outdated
|
|
||
| namespace OpenLoco::Game | ||
| { | ||
| static loco_global<LoadOrQuitMode, 0x0050A002> _savePromptType; |
There was a problem hiding this comment.
Looks like this file was accidentally reformatted using tabs instead of spaces. Could you correct this?
|
Closing this in favour of #3186 |
Uh oh!
There was an error while loading. Please reload this page.