unsuccessful experimentation
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "Global.h"
|
||||
#include "Input.h"
|
||||
#include "Instance.h"
|
||||
#include "Log.h"
|
||||
#include "Setup.h"
|
||||
@@ -53,11 +54,21 @@ namespace Game
|
||||
|
||||
void Update()
|
||||
{
|
||||
++GetInstance().Time.FrameCounter;
|
||||
double newNow = (bx::getHPCounter() - GetInstance().Time.StartTime) / (double)(bx::getHPFrequency());
|
||||
GetInstance().Time.Delta = newNow - GetInstance().Time.Now;
|
||||
GetInstance().Time.Now = newNow;
|
||||
auto& inst = GetInstance();
|
||||
int64_t newNowHP = bx::getHPCounter() - GetInstance().Time.StartTime;
|
||||
inst.Time.DeltaHP = newNowHP - inst.Time.NowHP;
|
||||
inst.Time.NowHP = newNowHP;
|
||||
inst.Time.Now = (double)inst.Time.NowHP / bx::getHPFrequency();
|
||||
inst.Time.Delta = (double)inst.Time.DeltaHP / bx::getHPFrequency();
|
||||
GetShared().Window.PerfCounters[(int32_t)PerfCounterType::GameDelta].Write(inst.Time.DeltaHP,
|
||||
GetShared().Window.FrameCounter);
|
||||
|
||||
if (GetKeyPressedNow(ScanCode::R))
|
||||
{
|
||||
GetInstance().Size = 0;
|
||||
Shutdown();
|
||||
Setup(GetShared());
|
||||
}
|
||||
SetupInstance.Rendering.Update();
|
||||
|
||||
auto& win = GetShared().Window;
|
||||
|
||||
Reference in New Issue
Block a user