Timer patches

This commit is contained in:
nastys
2019-10-13 02:10:42 +02:00
parent ace2ea03f3
commit 42bee2ffaf
8 changed files with 26 additions and 75 deletions
@@ -4,7 +4,6 @@
#include "Input/InputEmulator.h"
#include "Input/TouchSliderEmulator.h"
#include "Input/TouchPanelEmulator.h"
#include "SysTimer.h"
#include "PlayerDataManager.h"
#include "FrameRateManager.h"
#include "FastLoader.h"
@@ -37,7 +36,6 @@ namespace TLAC::Components
new InputEmulator(),
new TouchSliderEmulator(),
new TouchPanelEmulator(),
new SysTimer(),
new PlayerDataManager(),
new FrameRateManager(),
new FastLoader(),
@@ -1,34 +0,0 @@
#include "SysTimer.h"
#include "../Constants.h"
namespace TLAC::Components
{
SysTimer::SysTimer()
{
}
SysTimer::~SysTimer()
{
}
const char* SysTimer::GetDisplayName()
{
return "sys_timer";
}
void SysTimer::Initialize(ComponentsManager*)
{
selPvTime = GetSysTimePtr((void*)SEL_PV_TIME_ADDRESS);
}
void SysTimer::Update()
{
// account for the decrement that occures during this frame
*selPvTime = SEL_PV_FREEZE_TIME * SYS_TIME_FACTOR + 1;
}
int* SysTimer::GetSysTimePtr(void *address)
{
return (int*)address;
}
}
@@ -1,25 +0,0 @@
#pragma once
#include "EmulatorComponent.h"
namespace TLAC::Components
{
class SysTimer : public EmulatorComponent
{
const int SYS_TIME_FACTOR = 60;
const int SEL_PV_FREEZE_TIME = 39;
public:
SysTimer();
~SysTimer();
virtual const char* GetDisplayName() override;
virtual void Initialize(ComponentsManager*) override;
virtual void Update() override;
private:
int* selPvTime;
int* GetSysTimePtr(void *address);
};
}
@@ -197,7 +197,6 @@
<ClInclude Include="Components\ScaleComponent.h" />
<ClInclude Include="Components\ScoreSaver.h" />
<ClInclude Include="Components\StageManager.h" />
<ClInclude Include="Components\SysTimer.h" />
<ClInclude Include="Constants.h" />
<ClInclude Include="FileSystem\ConfigFile.h" />
<ClInclude Include="FileSystem\TextFile.h" />
@@ -250,7 +249,6 @@
<ClCompile Include="Components\ScaleComponent.cpp" />
<ClCompile Include="Components\ScoreSaver.cpp" />
<ClCompile Include="Components\StageManager.cpp" />
<ClCompile Include="Components\SysTimer.cpp" />
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="FileSystem\ConfigFile.cpp" />
<ClCompile Include="FileSystem\TextFile.cpp" />
@@ -54,9 +54,6 @@
<ClInclude Include="Components\StageManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\SysTimer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Components\Input\InputBufferType.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -230,9 +227,6 @@
<ClCompile Include="Components\StageManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\SysTimer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Components\Input\InputEmulator.cpp">
<Filter>Source Files</Filter>
</ClCompile>