Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
KeyMap Class Reference

#include <KeyMap.h>

List of all members.

Public Types

enum  KEY_CATEGORY { KEY_FLIGHT, KEY_WEAPONS, KEY_VIEW, KEY_MISC }

Public Member Functions

 KeyMap ()
virtual ~KeyMap ()
int DefaultKeyMap (int max_keys=256)
int LoadKeyMap (const char *filename, int max_keys=256)
int SaveKeyMap (const char *filename, int max_keys=256)
int GetCategory (int i)
const char * DescribeAction (int i)
const char * DescribeKey (int i)
int FindMapIndex (int act)
int GetNumKeys ()
KeyMapEntryGetMapping ()
KeyMapEntryGetKeyMap (int i)
KeyMapEntryGetDefault (int i)
void Bind (int a, int k, int s)

Static Public Member Functions

static const char * DescribeKey (int vk, int shift, int joy)
static int GetMappableVKey (int n)
static int GetKeyAction (const char *act_str)
static int GetKeyActionIndex (int act)
static int GetKeyKey (const char *key_str)
static int GetKeyKeyIndex (int key)

Protected Member Functions

int BuildDefaultKeyMap ()

Protected Attributes

KeyMapEntry map [256]
KeyMapEntry defmap [256]
int nkeys

Detailed Description

Definition at line 24 of file KeyMap.h.


Member Enumeration Documentation

Enumerator:
KEY_FLIGHT 
KEY_WEAPONS 
KEY_VIEW 
KEY_MISC 

Definition at line 34 of file KeyMap.h.


Constructor & Destructor Documentation

KeyMap::KeyMap ( )

Definition at line 389 of file KeyMap.cpp.

KeyMap::~KeyMap ( )
virtual

Definition at line 396 of file KeyMap.cpp.


Member Function Documentation

void KeyMap::Bind ( int  a,
int  k,
int  s 
)

Definition at line 557 of file KeyMap.cpp.

int KeyMap::BuildDefaultKeyMap ( )
protected

Definition at line 402 of file KeyMap.cpp.

int KeyMap::DefaultKeyMap ( int  max_keys = 256)

Definition at line 547 of file KeyMap.cpp.

const char * KeyMap::DescribeAction ( int  i)

Definition at line 731 of file KeyMap.cpp.

const char * KeyMap::DescribeKey ( int  i)

Definition at line 752 of file KeyMap.cpp.

const char * KeyMap::DescribeKey ( int  vk,
int  shift,
int  joy 
)
static

Definition at line 761 of file KeyMap.cpp.

int KeyMap::FindMapIndex ( int  act)

Definition at line 720 of file KeyMap.cpp.

int KeyMap::GetCategory ( int  i)

Definition at line 704 of file KeyMap.cpp.

KeyMapEntry* KeyMap::GetDefault ( int  i)
inline

Definition at line 47 of file KeyMap.h.

int KeyMap::GetKeyAction ( const char *  act_str)
static

Definition at line 326 of file KeyMap.cpp.

int KeyMap::GetKeyActionIndex ( int  act)
static

Definition at line 341 of file KeyMap.cpp.

int KeyMap::GetKeyKey ( const char *  key_str)
static

Definition at line 354 of file KeyMap.cpp.

int KeyMap::GetKeyKeyIndex ( int  key)
static

Definition at line 375 of file KeyMap.cpp.

KeyMapEntry* KeyMap::GetKeyMap ( int  i)
inline

Definition at line 46 of file KeyMap.h.

int KeyMap::GetMappableVKey ( int  n)
static

Definition at line 818 of file KeyMap.cpp.

KeyMapEntry* KeyMap::GetMapping ( )
inline

Definition at line 45 of file KeyMap.h.

int KeyMap::GetNumKeys ( )
inline

Definition at line 44 of file KeyMap.h.

int KeyMap::LoadKeyMap ( const char *  filename,
int  max_keys = 256 
)

Definition at line 576 of file KeyMap.cpp.

int KeyMap::SaveKeyMap ( const char *  filename,
int  max_keys = 256 
)

Definition at line 637 of file KeyMap.cpp.


Member Data Documentation

KeyMapEntry KeyMap::defmap[256]
protected

Definition at line 60 of file KeyMap.h.

KeyMapEntry KeyMap::map[256]
protected

Definition at line 59 of file KeyMap.h.

int KeyMap::nkeys
protected

Definition at line 61 of file KeyMap.h.


The documentation for this class was generated from the following files: