File: keyb.h

package info (click to toggle)
bomberclone 0.11.5-1sarge2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 9,608 kB
  • ctags: 1,437
  • sloc: ansic: 13,356; sh: 3,292; makefile: 183
file content (47 lines) | stat: -rw-r--r-- 788 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* $:ID $
 * keyboard handling */

#ifndef _KEYB_H_
#define _KEYB_H_

#include "menu.h"

enum _bcplayerkeys {
	BCPK_up = 0,
	BCPK_down,
	BCPK_left,
	BCPK_right,
	BCPK_drop,
	BCPK_special,
	
	BCPK_max 
};

enum _bckeys {
	BCK_help = BCPK_max * 3,
	BCK_esc,
	BCK_fullscreen,
	BCK_chat,
	BCK_pause,
	BCK_playermenu,
	BCK_mapmenu,

	BCK_max
};

struct {
	Uint8 state [BCK_max];	// current state
	Uint8 old [BCK_max];	// old state
	int keycode [BCK_max];	// keycode
} typedef BCGameKeys;

extern BCGameKeys keyb_gamekeys;

extern void keyb_config ();
extern void keyb_config_reset ();
extern void keyb_config_createkeymenu (_menu *menu, int key, int x, int y, int menu_nr);
extern void keyb_config_readkey (int key);
extern void keyb_init ();
extern void keyb_loop (SDL_Event *event);

#endif