From 408acfb90e5c0e90893e490ddf5add9a9bf3e723 Mon Sep 17 00:00:00 2001 From: escape209 Date: Wed, 9 Oct 2024 16:11:10 +0100 Subject: [PATCH] xParMgr: enable match --- configure.py | 2 +- src/SB/Core/x/xParMgr.cpp | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/configure.py b/configure.py index 48564e9a..89b9cc1a 100644 --- a/configure.py +++ b/configure.py @@ -317,7 +317,7 @@ def Rel(lib_name: str, objects: List[Object]) -> Dict[str, Any]: Object(NonMatching, "SB/Core/x/xPar.cpp"), Object(NonMatching, "SB/Core/x/xParCmd.cpp"), Object(NonMatching, "SB/Core/x/xParGroup.cpp"), - Object(NonMatching, "SB/Core/x/xParMgr.cpp"), + Object(Matching, "SB/Core/x/xParMgr.cpp"), Object(NonMatching, "SB/Core/x/xPartition.cpp"), Object(NonMatching, "SB/Core/x/xpkrsvc.cpp"), Object(NonMatching, "SB/Core/x/xQuickCull.cpp"), diff --git a/src/SB/Core/x/xParMgr.cpp b/src/SB/Core/x/xParMgr.cpp index 0b6e4121..0a5a3f99 100644 --- a/src/SB/Core/x/xParMgr.cpp +++ b/src/SB/Core/x/xParMgr.cpp @@ -5,8 +5,8 @@ #include -U32 sFrameCount; -S32 sParMgrInit; +volatile static U32 sFrameCount; +static S32 sParMgrInit; void xParMgrInit() { @@ -27,22 +27,21 @@ void xParMgrKillAllParticles() { } -#if 0 -// If statement and statement above are wrong. void xParMgrUpdate(F32 elapsedTime) { iParMgrUpdate(elapsedTime); - sFrameCount = (S32)sFrameCount; - if (++sFrameCount > 10) + + sFrameCount++; + + if (sFrameCount > 10) { sFrameCount = 1; } - while (sFrameCount >= 1) - { - sFrameCount--; - } + + U32 i; + for (i = sFrameCount; i >= 1; i--); + sFrameCount = i; } -#endif void xParMgrRender() {