Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions | Variables
Globals.h File Reference
#include "lib/input.h"
#include "lib/frequency_filter.h"
#include <map>

Go to the source code of this file.

Functions

InReaction GlobalsInputHandler (const SDL_Event_ *ev)
 

Variables

bool g_app_minimized
 
bool g_app_has_focus
 
int g_mouse_x
 
int g_mouse_y
 
bool g_mouse_active
 Indicates whether the mouse is focused on the game window (mouse positions should usually be considered inaccurate if this is false) More...
 
std::map< int32_t, bool > g_keys
 g_keys: Key states, indexed by SDLK* constants. More...
 
bool g_mouse_buttons [6]
 g_mouse_buttons: Mouse buttons states, indexed by SDL_BUTTON_* constants. More...
 
PIFrequencyFilter g_frequencyFilter
 

Function Documentation

InReaction GlobalsInputHandler ( const SDL_Event_ ev)

Definition at line 40 of file Globals.cpp.

Variable Documentation

bool g_app_has_focus

Definition at line 27 of file Globals.cpp.

bool g_app_minimized

Definition at line 26 of file Globals.cpp.

PIFrequencyFilter g_frequencyFilter

Definition at line 37 of file Globals.cpp.

std::map<int32_t, bool> g_keys

g_keys: Key states, indexed by SDLK* constants.

If an entry is true, it represents a pressed key. Updated by GlobalsInputHandler in response to key press/release events.

Definition at line 29 of file Globals.cpp.

bool g_mouse_active

Indicates whether the mouse is focused on the game window (mouse positions should usually be considered inaccurate if this is false)

Definition at line 31 of file Globals.cpp.

bool g_mouse_buttons[6]

g_mouse_buttons: Mouse buttons states, indexed by SDL_BUTTON_* constants.

If an entry is true, it represents a pressed button. Updated by GlobalsInputHandler in response to mouse button up/down events.

Be aware that SDL_BUTTON_* constants start at 1. Therefore, g_mouse_buttons[0] is unused. The order of entries is: { unused, left, right, middle, wheel up, wheel down }

Definition at line 35 of file Globals.cpp.

int g_mouse_x

Definition at line 30 of file Globals.cpp.

int g_mouse_y

Definition at line 30 of file Globals.cpp.