mirror of
https://github.com/zeldaret/botw
synced 2026-06-25 09:22:29 -04:00
Add ksysDebugInput Singleton
This commit is contained in:
@@ -24,4 +24,6 @@ add_subdirectory(XLink)
|
||||
target_sources(uking PRIVATE
|
||||
ksys.cpp
|
||||
ksys.h
|
||||
ksysDebugInput.cpp
|
||||
ksysDebugInput.h
|
||||
)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#include "KingSystem/ksysDebugInput.h"
|
||||
#include "KingSystem/System/VFR.h"
|
||||
|
||||
namespace ksys {
|
||||
|
||||
SEAD_SINGLETON_DISPOSER_IMPL(DebugInput)
|
||||
|
||||
void DebugInput::update() {
|
||||
if (mFlags.isOnBit(0)) {
|
||||
mLastDelta += VFR::instance()->getDeltaTime();
|
||||
while (mLastDelta > 30.0) {
|
||||
mLastDelta -= 30.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ksys
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include <heap/seadDisposer.h>
|
||||
#include <prim/seadTypedBitFlag.h>
|
||||
|
||||
namespace ksys {
|
||||
|
||||
class DebugInput {
|
||||
SEAD_SINGLETON_DISPOSER(DebugInput)
|
||||
|
||||
public:
|
||||
DebugInput() = default;
|
||||
virtual ~DebugInput() = default;
|
||||
void update();
|
||||
|
||||
private:
|
||||
sead::BitFlag8 mFlags;
|
||||
float mLastDelta = 0;
|
||||
};
|
||||
|
||||
} // namespace ksys
|
||||
Reference in New Issue
Block a user