Reimplement tick orchestration and document game-loop ownership - #226
Open
Krarilotus wants to merge 4 commits into
Open
Krarilotus wants to merge 4 commits into
Krarilotus wants to merge 4 commits into
Conversation
TheRedDaemon
requested changes
Sep 11, 2026
Comment on lines
+95
to
+109
| if (MACRO_CALL_MEMBER(GameCore_Func::getAreWeInAInGameMenu, DAT_GameCore::ptr)()) { | ||
| if (DAT_GameCore::instance.gamePausedLogical != 0 | ||
| && static_cast<int>(DAT_TileMapState::instance.DAT_FutureMapOrientation) >= 8) { | ||
| goto maintenance; | ||
| } | ||
| if (!MACRO_CALL_MEMBER(GameCore_Func::isGameHaltingMenuOpen, DAT_GameCore::ptr)()) { | ||
| MACRO_CALL_MEMBER(Random::RNG_Func::nextRandomNumber2, SEC_RNG::ptr)(); | ||
| MACRO_CALL_MEMBER(Random::RNG_Func::nextRandomNumber1, SEC_RNG::ptr)(); | ||
| ++DAT_GameCore::instance.mapTimeInTicks; | ||
| MACRO_CALL_MEMBER(Game::GameStateStructures_Func::processSingleTimeTick, DAT_GameState::ptr)(); | ||
| } | ||
| } | ||
| if (static_cast<int>(DAT_TileMapState::instance.DAT_FutureMapOrientation) < 8) { | ||
| DAT_RotateMapOrPullDownTerrain::instance = 1; | ||
| } |
Contributor
There was a problem hiding this comment.
Is the remaining mismatch related to this goto?
If yes and you not have tried it, you could invert the if block and pack the following block inside.
Naturally, this would mean if static_cast<int>(DAT_TileMapState::instance.DAT_FutureMapOrientation) < 8 would be tested (since the if is inverted) and this would be false, then compiler would know that it can skip the other if-block before the jmp target and you can avoid the goto.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR: Reconstruct the tick coordinator while preserving native pause and update order.
A call to the tick coordinator is not always a completed simulation step; paused maintenance and synchronization can take different paths.
Changes: Implement
GameStateStructures::processGameTickat0x45CD10with existing resolvers. Add a short game-loop reference and the soft status entry.Review / testing: DLL build passed. Structural comparison resolves the 54 helper targets and finds one unused ECX setup difference; linked raw reccmp remains 35.98% and soft status is 99.0%. Those are different measures, not a claim of identical DLL bytes. No live deployment was reported.