diff --git a/configure.py b/configure.py index 5590fdf3..73ce5b87 100644 --- a/configure.py +++ b/configure.py @@ -413,7 +413,7 @@ def Rel(lib_name: str, objects: List[Object]) -> Dict[str, Any]: Object(NonMatching, "SB/Core/gc/iScrFX.cpp"), Object(NonMatching, "SB/Core/gc/iSnd.cpp"), Object(NonMatching, "SB/Core/gc/iSystem.cpp"), - Object(NonMatching, "SB/Core/gc/iTime.cpp"), + Object(Matching, "SB/Core/gc/iTime.cpp"), Object(NonMatching, "SB/Core/gc/ngcrad3d.c"), Object(Matching, "SB/Game/zNPCGoals.cpp"), Object(NonMatching, "SB/Game/zNPCGoalCommon.cpp"), # wrong function order diff --git a/src/SB/Core/gc/iTime.cpp b/src/SB/Core/gc/iTime.cpp index 6498f136..4412e6a9 100644 --- a/src/SB/Core/gc/iTime.cpp +++ b/src/SB/Core/gc/iTime.cpp @@ -1,11 +1,11 @@ #include "iTime.h" +#include "iSystem.h" #include #include -extern iTime sStartupTime; -extern float32 sGameTime; -extern float32 lbl_803CE1D8; +static iTime sStartupTime; +static float32 sGameTime; void iTimeInit() { @@ -21,15 +21,11 @@ iTime iTimeGet() return OSGetTime() - sStartupTime; } -#if 0 -// I can't seem to figure out the float operations going on here. It looks the setup is fairly right though? float32 iTimeDiffSec(iTime time) { - return (float32)time / (176 - lbl_803CE1D8); + return (float32)time / (GET_BUS_FREQUENCY() / 4); } -#endif - float32 iTimeDiffSec(iTime t0, iTime t1) { return iTimeDiffSec(t1 - t0);