mirror of https://github.com/zeldaret/botw.git
Add ksysDebugInput Singleton
This commit is contained in:
parent
0e1500b6f8
commit
0542fa53b5
|
@ -94367,10 +94367,10 @@ Address,Quality,Size,Name
|
|||
0x0000007101266ea0,U,000004,nullsub_4747
|
||||
0x0000007101266ea4,U,000040,
|
||||
0x0000007101266ecc,U,000060,
|
||||
0x0000007101266f08,U,000100,
|
||||
0x0000007101266f6c,U,000108,
|
||||
0x0000007101266fd8,U,000152,DebugInput::createInstance
|
||||
0x0000007101267070,U,000160,
|
||||
0x0000007101266f08,O,000100,_ZN4ksys10DebugInput18SingletonDisposer_D1Ev
|
||||
0x0000007101266f6c,O,000108,_ZN4ksys10DebugInput18SingletonDisposer_D0Ev
|
||||
0x0000007101266fd8,O,000152,_ZN4ksys10DebugInput14createInstanceEPN4sead4HeapE
|
||||
0x0000007101267070,O,000160,_ZN4ksys10DebugInput6updateEv
|
||||
0x0000007101267110,U,000004,j__ZdlPv_1269
|
||||
0x0000007101267114,U,000004,nullsub_4748
|
||||
0x0000007101267118,U,000004,nullsub_4749
|
||||
|
|
Can't render this file because it is too large.
|
|
@ -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
|
Loading…
Reference in New Issue