Sigrid Solveig Haflínudóttirwip Plan 9 port8024a895 years agoHistory
54 lines · 1.2 KB · C
RawDownload
#ifndef _input_h_#define _input_h_ #include <SDL2/SDL.h> /*Copyright (c) 2013-2021 Devine Lu Linvega2018 web port by rezmason2021 C89 port by rezmason Permission to use, copy, modify, and distribute this software for anypurpose with or without fee is hereby granted, provided that the abovecopyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIESWITH REGARD TO THIS SOFTWARE.*/ /*	As a game with discrete controls, this Input module	is where we interpret certain mouse clicks and key presses	as user input. 	The input module also directs the GUI to hide	or update the cursor when appropriate.*/ typedef enum {#ifdef DEBUG	DEBUGINPUTTYPE_ENERGY,	DEBUGINPUTTYPE_CLOCK,	DEBUGINPUTTYPE_STUDIO,	DEBUGINPUTTYPE_SEAL_1,	DEBUGINPUTTYPE_SEAL_2,	DEBUGINPUTTYPE_SECRET,	DEBUGINPUTTYPE_TIME,	DEBUGINPUTTYPE_CHAPTER,	DEBUGINPUTTYPE_UNLOCK_DOORS,#endif	INPUTTYPE_LEFT,	INPUTTYPE_RIGHT,	INPUTTYPE_CENTER,	INPUTTYPE_FORWARD,	INPUTTYPE_BACK,	INPUTTYPE_ACTION,	INPUTTYPE_RESET,	INPUTTYPE_WALKTHROUGH} InputType; void Input_Init(void (*handler)(InputType, int));void Input_Quit(void);void Input_ProcessEvent(SDL_Event *event); #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t