f***ed up and needed to rework packages
This commit is contained in:
parent
f4592ae8d0
commit
b43ab1702f
73 changed files with 194 additions and 2045 deletions
|
|
@ -1,21 +0,0 @@
|
|||
#ifndef ARC_GLFW_KEYBOARD_H_
|
||||
#define ARC_GLFW_KEYBOARD_H_
|
||||
|
||||
#ifdef ARC_GLFW_INPUT
|
||||
#include <GLFW/glfw3.h>
|
||||
#include "arc/input/keyboard.h"
|
||||
|
||||
struct ARC_Keyboard {
|
||||
GLFWwindow *window;
|
||||
|
||||
ARC_KeyboardState *keys;
|
||||
ARC_KeyboardState *released;
|
||||
};
|
||||
|
||||
struct ARC_KeyboardInfo {
|
||||
GLFWwindow *window;
|
||||
};
|
||||
|
||||
#endif // !ARC_GLFW_INPUT
|
||||
|
||||
#endif // !ARC_GLFW_KEYBOARD_H_
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
#ifndef ARC_GLFW_MOUSE_H_
|
||||
#define ARC_GLFW_MOUSE_H_
|
||||
|
||||
#ifdef ARC_GLFW_INPUT
|
||||
#include <GLFW/glfw3.h>
|
||||
#include "arc/input/mouse.h"
|
||||
#include "arc/math/point.h"
|
||||
|
||||
struct ARC_Mouse {
|
||||
GLFWwindow *window;
|
||||
|
||||
ARC_Point *coords;
|
||||
int32_t *scrollY;
|
||||
|
||||
ARC_MouseState *buttons;
|
||||
uint8_t *buttonsReleased;
|
||||
};
|
||||
|
||||
struct ARC_MouseInfo {
|
||||
GLFWwindow *window;
|
||||
};
|
||||
|
||||
#endif // !ARC_GLFW_INPUT
|
||||
|
||||
#endif // !ARC_GLFW_MOUSE_H_
|
||||
|
|
@ -7,6 +7,11 @@ extern "C" {
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @brief predefien ARC_Input so as not to get circular reference
|
||||
*/
|
||||
typedef struct ARC_Input ARC_Input;
|
||||
|
||||
typedef struct ARC_Keyboard ARC_Keyboard;
|
||||
|
||||
typedef struct ARC_KeyboardInfo ARC_KeyboardInfo;
|
||||
|
|
@ -19,7 +24,8 @@ typedef enum ARC_KeyboardState {
|
|||
|
||||
#define ARC_KEYBOARD_BUTTON_NUM 239
|
||||
|
||||
void ARC_Keyboard_Create(ARC_Keyboard **keyboard, ARC_KeyboardInfo *info);
|
||||
void ARC_Keyboard_CreateWithInput(ARC_Keyboard **keyboard, ARC_Input *input);
|
||||
|
||||
void ARC_Keyboard_Destroy(ARC_Keyboard *keyboard);
|
||||
void ARC_Keyboard_Update(ARC_Keyboard *keyboard);
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,12 @@ extern "C" {
|
|||
#include "arc/math/point.h"
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct ARC_Mouse ARC_Mouse;
|
||||
/**
|
||||
* @brief predefien ARC_Input so as not to get circular reference
|
||||
*/
|
||||
typedef struct ARC_Input ARC_Input;
|
||||
|
||||
typedef struct ARC_MouseInfo ARC_MouseInfo;
|
||||
typedef struct ARC_Mouse ARC_Mouse;
|
||||
|
||||
typedef enum ARC_MouseState {
|
||||
ARC_MOUSE_NONE,
|
||||
|
|
@ -28,7 +31,8 @@ typedef enum ARC_MouseButton {
|
|||
|
||||
#define ARC_MOUSE_BUTTON_NUM 5
|
||||
|
||||
void ARC_Mouse_Create(ARC_Mouse **mouse, ARC_MouseInfo *info);
|
||||
void ARC_Mouse_CreateWithInput(ARC_Mouse **mouse, ARC_Input *input);
|
||||
|
||||
void ARC_Mouse_Destroy(ARC_Mouse *mouse);
|
||||
void ARC_Mouse_Update(ARC_Mouse *mouse);
|
||||
ARC_Point *ARC_Mouse_GetCoords(ARC_Mouse *mouse);
|
||||
|
|
@ -39,4 +43,4 @@ int32_t *ARC_Mouse_GetScrollY(ARC_Mouse *mouse);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif // !ARC_GRAPHICS_MOUSE_H_
|
||||
#endif // !ARC_GRAPHICS_MOUSE_H_
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
#ifndef ARC_SDL_KEYBOARD_H_
|
||||
#define ARC_SDL_KEYBOARD_H_
|
||||
|
||||
#ifdef ARC_SDL2_INPUT
|
||||
#include "arc/input/keyboard.h"
|
||||
#include <SDL.h>
|
||||
|
||||
struct ARC_Keyboard {
|
||||
SDL_Event *event;
|
||||
|
||||
ARC_KeyboardState *keys;
|
||||
ARC_KeyboardState *released;
|
||||
};
|
||||
|
||||
struct ARC_KeyboardInfo {
|
||||
SDL_Event *event;
|
||||
};
|
||||
|
||||
#endif // ARC_SDL2_INPUT
|
||||
|
||||
#endif // !ARC_SDL_KEYBOARD_H_
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
#ifndef ARC_SDL_MOUSE_H_
|
||||
#define ARC_SDL_MOUSE_H_
|
||||
|
||||
#ifdef ARC_SDL2_INPUT
|
||||
#include <SDL.h>
|
||||
#include "arc/input/mouse.h"
|
||||
#include "arc/math/point.h"
|
||||
|
||||
struct ARC_Mouse {
|
||||
SDL_Event *event;
|
||||
ARC_Point *coords;
|
||||
int32_t *scrollY;
|
||||
|
||||
ARC_MouseState *buttons;
|
||||
uint8_t *buttonsReleased;
|
||||
};
|
||||
|
||||
struct ARC_MouseInfo {
|
||||
SDL_Event *event;
|
||||
};
|
||||
|
||||
#endif // ARC_SDL2_INPUT
|
||||
|
||||
#endif // !ARC_SDL_MOUSE_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue