The SGADE Documentation

the SGADE The Socrates Gameboy Advance Development Engine

The SGADE is a development library for the Nintendo Gameboy Advance. It's free for all uses and is distributed without guarantees. For more information visit the SGADE page.


Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

SoKeys.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00013 // ----------------------------------------------------------------------------
00014 
00015 #ifndef SO_KEYS_H
00016 #define SO_KEYS_H
00017 
00018 #ifdef __cplusplus
00019     extern "C" {
00020 #endif
00021 
00022 
00023 // ---------------------------------------------------------------------------- //! @{
00035 // ----------------------------------------------------------------------------
00036 
00037 // ----------------------------------------------------------------------------
00038 // Includes
00039 // ----------------------------------------------------------------------------
00040 #include "SoSystem.h"
00041 
00042 // ----------------------------------------------------------------------------
00043 // Defines;
00044 // ----------------------------------------------------------------------------
00045 #define SO_KEY_A        (SO_BIT_0)      
00046 #define SO_KEY_B        (SO_BIT_1)      
00047 #define SO_KEY_SELECT   (SO_BIT_2)      
00048 #define SO_KEY_START    (SO_BIT_3)      
00049 #define SO_KEY_RIGHT    (SO_BIT_4)      
00050 #define SO_KEY_LEFT     (SO_BIT_5)      
00051 #define SO_KEY_UP       (SO_BIT_6)      
00052 #define SO_KEY_DOWN     (SO_BIT_7)      
00053 #define SO_KEY_R        (SO_BIT_8)      
00054 #define SO_KEY_L        (SO_BIT_9)      
00055         
00056 #define SO_KEY_ANY      (SO_10_BITS)    
00057 
00058 // ----------------------------------------------------------------------------
00059 // Functions;
00060 // ----------------------------------------------------------------------------
00061 void SoKeysUpdate( void );
00062 
00063 u16  SoKeysGetState(void);
00064 
00065 bool SoKeysDown(     u16 a_Keys );
00066 bool SoKeysPressed(  u16 a_Keys );
00067 bool SoKeysReleased( u16 a_Keys );
00068 
00069 bool SoKeysPressedRepeat( u16 a_Keys );
00070 void SoKeysSetRepeatDelay( u16 a_nDelay );
00071 void SoKeysSetRepeatSpeed( u16 a_nSpeed );
00072 
00073 
00074 
00075 // ----------------------------------------------------------------------------
00076 // EOF
00077 // ----------------------------------------------------------------------------
00078 
00080 
00081 #ifdef __cplusplus
00082 } // extern "C"
00083 #endif
00084 
00085 #endif

Copyright 2002 by the SGADE authors. See SoLicense.h or Visit the SGADE page for more information.