camera stuff

This commit is contained in:
Asuro
2025-02-18 02:46:25 +01:00
parent 2c32a261c1
commit b992a826ea
11 changed files with 95 additions and 29 deletions

View File

@@ -45,6 +45,7 @@ namespace Game
Log("Game instance size changed, resetting!");
instance = {};
}
instance.UsedScratchAmount = 0;
SetShared(shared);
SetInstance(instance);
SetupInstance.Rendering.Setup();
@@ -55,7 +56,7 @@ namespace Game
void Update()
{
auto& inst = GetInstance();
int64_t newNowHP = bx::getHPCounter() - GetInstance().Time.StartTime;
int64_t newNowHP = bx::getHPCounter() - inst.Time.StartTime;
inst.Time.DeltaHP = newNowHP - inst.Time.NowHP;
inst.Time.NowHP = newNowHP;
inst.Time.Now = (double)inst.Time.NowHP / bx::getHPFrequency();