Input unit: Generalizados los tipos de input. Ya no son específicos de cada juego
This commit is contained in:
@@ -7,35 +7,44 @@
|
||||
#ifndef INPUT_H
|
||||
#define INPUT_H
|
||||
|
||||
enum inputs_e
|
||||
{
|
||||
// Inputs obligatorios
|
||||
input_null,
|
||||
input_up,
|
||||
input_down,
|
||||
input_left,
|
||||
input_right,
|
||||
input_pause,
|
||||
input_exit,
|
||||
input_accept,
|
||||
input_cancel,
|
||||
// Tipos diferentes de eventos de entrada
|
||||
#define INPUT_NULL 0
|
||||
#define INPUT_UP 1
|
||||
#define INPUT_DOWN 2
|
||||
#define INPUT_LEFT 3
|
||||
#define INPUT_RIGHT 4
|
||||
#define INPUT_BUTTON_1 5
|
||||
#define INPUT_BUTTON_2 6
|
||||
#define INPUT_BUTTON_3 7
|
||||
#define INPUT_BUTTON_4 8
|
||||
#define INPUT_BUTTON_5 9
|
||||
#define INPUT_BUTTON_6 10
|
||||
#define INPUT_BUTTON_7 11
|
||||
#define INPUT_BUTTON_8 12
|
||||
#define INPUT_BUTTON_9 13
|
||||
#define INPUT_BUTTON_10 14
|
||||
#define INPUT_BUTTON_11 15
|
||||
#define INPUT_BUTTON_12 16
|
||||
#define INPUT_BUTTON_13 17
|
||||
#define INPUT_BUTTON_14 18
|
||||
#define INPUT_BUTTON_15 19
|
||||
#define INPUT_BUTTON_16 20
|
||||
#define INPUT_BUTTON_17 21
|
||||
#define INPUT_BUTTON_18 22
|
||||
#define INPUT_BUTTON_19 23
|
||||
#define INPUT_BUTTON_20 24
|
||||
#define INPUT_PAUSE 25
|
||||
#define INPUT_EXIT 26
|
||||
#define INPUT_ACCEPT 27
|
||||
#define INPUT_CANCEL 28
|
||||
|
||||
// Inputs personalizados
|
||||
input_jump,
|
||||
input_window_fullscreen,
|
||||
input_window_inc_size,
|
||||
input_window_dec_size,
|
||||
input_toggle_border,
|
||||
input_switch_music,
|
||||
input_swap_palette,
|
||||
|
||||
// Input obligatorio
|
||||
input_number_of_inputs
|
||||
};
|
||||
#define INPUT_TOTAL 29
|
||||
|
||||
// Para saber si el input se puede repetir sin soltarlo
|
||||
#define REPEAT_TRUE true
|
||||
#define REPEAT_FALSE false
|
||||
|
||||
// Tipo de control asociado
|
||||
#define INPUT_USE_KEYBOARD 0
|
||||
#define INPUT_USE_GAMECONTROLLER 1
|
||||
#define INPUT_USE_ANY 2
|
||||
|
||||
Reference in New Issue
Block a user