2021-11-30 21:29:18 -06:00
|
|
|
#ifndef INPUT_H
|
|
|
|
#define INPUT_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2022-02-06 10:14:57 -06:00
|
|
|
#include "window.h"
|
2023-02-02 17:52:15 -06:00
|
|
|
#include <chipmunk/chipmunk.h>
|
2022-12-19 18:15:38 -06:00
|
|
|
#include "script.h"
|
|
|
|
|
2021-11-30 21:29:18 -06:00
|
|
|
extern int32_t mouseWheelX;
|
|
|
|
extern int32_t mouseWheelY;
|
2023-02-02 17:52:15 -06:00
|
|
|
|
|
|
|
extern cpVect mouse_pos;
|
|
|
|
extern cpVect mouse_delta;
|
|
|
|
|
2021-11-30 21:29:18 -06:00
|
|
|
extern float deltaT;
|
|
|
|
|
2022-02-06 10:14:57 -06:00
|
|
|
void input_init();
|
2022-08-12 14:03:56 -05:00
|
|
|
void input_poll(double wait);
|
2021-11-30 21:29:18 -06:00
|
|
|
|
2022-02-06 10:14:57 -06:00
|
|
|
void cursor_hide();
|
|
|
|
void cursor_show();
|
|
|
|
|
2023-02-02 17:52:15 -06:00
|
|
|
void call_input_signal(char *signal);
|
2022-02-06 10:14:57 -06:00
|
|
|
int action_down(int scancode);
|
|
|
|
|
2022-12-16 11:54:05 -06:00
|
|
|
int want_quit();
|
|
|
|
void quit();
|
|
|
|
|
2022-08-12 14:03:56 -05:00
|
|
|
void win_key_callback(GLFWwindow *w, int key, int scancode, int action, int mods);
|
|
|
|
|
2022-02-06 10:14:57 -06:00
|
|
|
struct inputaction
|
|
|
|
{
|
|
|
|
int scancode;
|
|
|
|
};
|
|
|
|
|
2023-01-10 14:02:24 -06:00
|
|
|
void set_pawn(void *pawn);
|
2023-01-13 08:05:36 -06:00
|
|
|
void remove_pawn(void *pawn);
|
2022-12-19 18:15:38 -06:00
|
|
|
|
2021-11-30 21:29:18 -06:00
|
|
|
#endif
|