uKeyInput Class Reference

Collaboration diagram for uKeyInput:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 uKeyInput ()
 ~uKeyInput ()

Public Attributes

uInputsdl_keys [SDLK_LAST+1]


Detailed Description

Definition at line 175 of file uInput.cpp.


Constructor & Destructor Documentation

uKeyInput::uKeyInput (  )  [inline]

Definition at line 178 of file uInput.cpp.

References c, uInput::ID(), isblank(), su_NewInput(), and tASSERT.

00179     {
00180         for ( int i = 0; i <= SDLK_LAST; ++i )
00181         {
00182 #ifndef DEDICATED
00183             char const * ID_Raw = SDL_GetKeyName(static_cast< SDLKey >( i ) );
00184 #else
00185             char const * ID_Raw = "unknown key";
00186 #endif
00187             std::ostringstream id;
00188             id << "KEY_";
00189             if ( strcmp( ID_Raw, "unknown key" ) == 0 )
00190             {
00191                 id << "UNKNONW_" << i;
00192             }
00193             else
00194             {
00195                 for ( char const * c = ID_Raw; *c; ++c )
00196                 {
00197                     if ( isblank( *c ) )
00198                     {
00199                         id << "_";
00200                     }
00201                     else
00202                     {
00203                         id << char(toupper( *c ));
00204                     }
00205                 }
00206             }
00207 
00208             // store new input key
00209             sdl_keys[i] = su_NewInput( id.str(), tString(ID_Raw) );
00210 
00211             tASSERT( sdl_keys[i]->ID() == i );
00212         }

Here is the call graph for this function:

uKeyInput::~uKeyInput (  )  [inline]

Definition at line 214 of file uInput.cpp.

00216     {


Member Data Documentation

uInput* uKeyInput::sdl_keys[SDLK_LAST+1]

Definition at line 218 of file uInput.cpp.


The documentation for this class was generated from the following file:
Generated on Sun Mar 16 00:00:26 2008 for Armagetron Advanced by  doxygen 1.5.4