2023-11-12 20:47:38 +01:00
|
|
|
#ifndef __INPUT_H__
|
|
|
|
#define __INPUT_H__
|
|
|
|
|
|
|
|
#ifdef MIPS
|
|
|
|
#include "ultra64.h"
|
|
|
|
#else
|
|
|
|
#include "recomp.h"
|
|
|
|
#endif
|
|
|
|
|
2023-12-01 16:56:20 +01:00
|
|
|
typedef enum {
|
|
|
|
RECOMP_CAMERA_NORMAL,
|
|
|
|
RECOMP_CAMERA_DUALANALOG,
|
|
|
|
} RecompCameraMode;
|
|
|
|
|
|
|
|
extern RecompCameraMode recomp_camera_mode;
|
|
|
|
|
2023-11-12 20:47:38 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef MIPS
|
|
|
|
# define DECLARE_FUNC(type, name, ...) \
|
|
|
|
type name(__VA_ARGS__);
|
|
|
|
#else
|
|
|
|
# define DECLARE_FUNC(type, name, ...) \
|
|
|
|
void name(uint8_t* rdram, recomp_context* ctx);
|
|
|
|
#endif
|
|
|
|
|
2023-12-13 08:06:56 +01:00
|
|
|
enum RecompDigitalInput {
|
|
|
|
RECOMP_DIGITAL_INPUT_ITEM1,
|
|
|
|
RECOMP_DIGITAL_INPUT_ITEM2,
|
|
|
|
RECOMP_DIGITAL_INPUT_ITEM3,
|
|
|
|
RECOMP_DIGITAL_INPUT_MAX
|
|
|
|
};
|
|
|
|
|
|
|
|
enum RecompAnalogInput {
|
|
|
|
RECOMP_ANALOG_INPUT_MOVEMENT_X,
|
|
|
|
RECOMP_ANALOG_INPUT_MOVEMENT_Y,
|
|
|
|
RECOMP_ANALOG_INPUT_CAMERA_X,
|
|
|
|
RECOMP_ANALOG_INPUT_CAMERA_Y,
|
|
|
|
RECOMP_ANALOG_INPUT_MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
DECLARE_FUNC(u32, recomp_get_digital_input, u32 which);
|
|
|
|
DECLARE_FUNC(float, recomp_get_analog_input, u32 which);
|
2023-11-24 23:10:21 +01:00
|
|
|
DECLARE_FUNC(void, recomp_get_item_inputs, u32* buttons);
|
2023-12-01 16:56:20 +01:00
|
|
|
DECLARE_FUNC(void, recomp_get_camera_inputs, float* x_out, float* y_out);
|
2023-12-27 23:56:26 +01:00
|
|
|
// TODO move these
|
2023-11-24 23:10:21 +01:00
|
|
|
DECLARE_FUNC(void, recomp_puts, const char* data, u32 size);
|
2023-12-27 23:56:26 +01:00
|
|
|
DECLARE_FUNC(void, recomp_exit);
|
2023-11-12 20:47:38 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|