35 lines
903 B
C
35 lines
903 B
C
// ============================================================================
|
|
// INPUT EVENT HEADER
|
|
// ============================================================================
|
|
// Shared input event structures used by InputManager and Game classes
|
|
// Extracted from basic1.cpp for modular game architecture
|
|
|
|
#ifndef INPUT_EVENT_H
|
|
#define INPUT_EVENT_H
|
|
|
|
#include <stdint.h>
|
|
|
|
// Input event types
|
|
enum InputType {
|
|
INPUT_NONE = 0,
|
|
INPUT_TOUCH_DOWN,
|
|
INPUT_TOUCH_MOVE,
|
|
INPUT_TOUCH_UP,
|
|
INPUT_BUTTON_0,
|
|
INPUT_BUTTON_1,
|
|
INPUT_GESTURE
|
|
};
|
|
|
|
// Unified input event structure
|
|
struct InputEvent {
|
|
InputType type;
|
|
int16_t x;
|
|
int16_t y;
|
|
uint8_t gesture_code; // For gesture events
|
|
uint8_t button_id; // For button events
|
|
uint8_t pressure; // Touch pressure/weight
|
|
bool valid; // Set to true if event is valid
|
|
};
|
|
|
|
#endif // INPUT_EVENT_H
|