34 lines
775 B
C
34 lines
775 B
C
/**
|
|
* Copyright (c) 2025 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#pragma once
|
|
#include "time/time.h"
|
|
|
|
#ifndef INPUT_CSV_GENERATED
|
|
#error "Input CSV has not been generated. Run dusk_input_csv in CMake."
|
|
#endif
|
|
#include "input/inputactiontype.h"
|
|
#include "input/inputactionname.h"
|
|
|
|
typedef struct {
|
|
inputaction_t action;
|
|
float_t lastValue;
|
|
float_t currentValue;
|
|
|
|
#if TIME_FIXED == 0
|
|
float_t lastDynamicValue;
|
|
float_t currentDynamicValue;
|
|
#endif
|
|
} inputactiondata_t;
|
|
|
|
/**
|
|
* Gets an input action by its name.
|
|
*
|
|
* @param name The name of the input action.
|
|
* @return The input action, or INPUT_ACTION_COUNT if not found.
|
|
*/
|
|
inputaction_t inputActionGetByName(const char_t *name); |