mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-30 16:02:18 -04:00
0f5a248401
* Don't Use OSCalendarTime for Speedrun Timing - Shouldn't rely on OSTicksToCalendarTime since it will be changed to handle time zone conversion, and that doesn't make sense on elapsed time * Use OSGetSystemTime Extension - Fixes desyncing issues with save file time and a couple other odd instances, particularly on mobile platforms that suspend apps * Time revamp * Update aurora * Split IGT/RTA calculations * Shift-Turbo to slow down --------- Co-authored-by: SuperDude88 <82904174+SuperDude88@users.noreply.github.com>
53 lines
1.1 KiB
C++
53 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <unordered_map>
|
|
|
|
#include "dusk/config_var.hpp"
|
|
|
|
namespace dusk {
|
|
|
|
enum class ActionBinds {
|
|
FIRST_PERSON_CAMERA,
|
|
CALL_MIDNA,
|
|
OPEN_MAP_SCREEN,
|
|
TOGGLE_MINIMAP,
|
|
OPEN_DUSKLIGHT_MENU,
|
|
TURBO_SPEED_BUTTON,
|
|
COUNT,
|
|
};
|
|
|
|
struct ActionBindData {
|
|
std::array<config::ActionBindConfigVar, 4>* configVars{};
|
|
std::string actionName{};
|
|
};
|
|
|
|
struct ActionBindPressData {
|
|
bool pressedCurFrame{false};
|
|
bool pressedPrevFrame{false};
|
|
};
|
|
|
|
using ActionBindsMap = std::unordered_map<ActionBinds, ActionBindData>;
|
|
|
|
ActionBindsMap& getActionBinds();
|
|
|
|
bool isActionBound(ActionBinds action, u32 port);
|
|
bool isActionBoundAnyPort(ActionBinds action);
|
|
|
|
void updateActionBindings();
|
|
|
|
void setVirtualActionBind(ActionBinds action, u32 port, bool pressed, bool available = true);
|
|
|
|
void clearVirtualActionBind(ActionBinds action, u32 port);
|
|
|
|
void clearAllVirtualActionBinds();
|
|
|
|
bool getActionBindTrig(ActionBinds action, u32 port);
|
|
|
|
bool getActionBindHold(ActionBinds action, u32 port);
|
|
|
|
bool getActionBindHoldAnyPort(ActionBinds action);
|
|
|
|
int getActionBindButton(ActionBinds action, u32 port);
|
|
|
|
}
|