2014-03-15 16:59:03 +00:00
|
|
|
// SONIC ROBO BLAST 2
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
|
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
2023-03-31 12:53:31 +00:00
|
|
|
// Copyright (C) 1999-2023 by Sonic Team Junior.
|
2014-03-15 16:59:03 +00:00
|
|
|
//
|
|
|
|
// This program is free software distributed under the
|
|
|
|
// terms of the GNU General Public License, version 2.
|
|
|
|
// See the 'LICENSE' file for more details.
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
/// \file d_event.h
|
|
|
|
/// \brief Event handling
|
|
|
|
|
|
|
|
#ifndef __D_EVENT__
|
|
|
|
#define __D_EVENT__
|
|
|
|
|
|
|
|
#include "doomtype.h"
|
|
|
|
#include "g_state.h"
|
|
|
|
|
|
|
|
// Input event types.
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
ev_keydown,
|
|
|
|
ev_keyup,
|
2023-12-26 20:53:38 +00:00
|
|
|
ev_text,
|
2014-03-15 16:59:03 +00:00
|
|
|
ev_console,
|
|
|
|
ev_mouse,
|
2023-01-27 01:26:28 +00:00
|
|
|
ev_joystick,
|
2014-03-15 16:59:03 +00:00
|
|
|
ev_mouse2,
|
2023-01-27 01:26:28 +00:00
|
|
|
ev_joystick2,
|
2014-03-15 16:59:03 +00:00
|
|
|
} evtype_t;
|
|
|
|
|
|
|
|
// Event structure.
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
evtype_t type;
|
2023-01-27 01:26:28 +00:00
|
|
|
INT32 key; // keys/mouse/joystick buttons
|
|
|
|
INT32 x; // mouse/joystick x move
|
|
|
|
INT32 y; // mouse/joystick y move
|
|
|
|
boolean repeated; // key repeat
|
2014-03-15 16:59:03 +00:00
|
|
|
} event_t;
|
|
|
|
|
|
|
|
//
|
|
|
|
// GLOBAL VARIABLES
|
|
|
|
//
|
|
|
|
#define MAXEVENTS 128
|
|
|
|
|
|
|
|
extern event_t events[MAXEVENTS];
|
|
|
|
extern INT32 eventhead, eventtail;
|
|
|
|
|
|
|
|
#endif
|