|
|
@@ -0,0 +1,102 @@ |
|
|
|
#ifndef IZ_ACTION_H |
|
|
|
#define IZ_ACTION_H |
|
|
|
|
|
|
|
/** |
|
|
|
* Enumeration for the actions available in the application. |
|
|
|
*/ |
|
|
|
typedef enum { |
|
|
|
/** |
|
|
|
* Index for the right (eastward) directional action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_RIGHT = 0x0u, |
|
|
|
/** |
|
|
|
* Index for the down (southward) directional action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_DOWN = 0x1u, |
|
|
|
/** |
|
|
|
* Index for the left (westward) directional action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_LEFT = 0x2u, |
|
|
|
/** |
|
|
|
* Index for the up (northward) directional action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_UP = 0x3u, |
|
|
|
/** |
|
|
|
* Index for the affirmative action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_YES = 0x4u, |
|
|
|
/** |
|
|
|
* Index for the negative action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_NO = 0x5u, |
|
|
|
/** |
|
|
|
* Index for the first implementation-defined action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_ACTION0 = 0x6u, |
|
|
|
/** |
|
|
|
* Index for the second implementation-defined action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_ACTION1 = 0x7u, |
|
|
|
/** |
|
|
|
* Index for the third implementation-defined action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_ACTION2 = 0x8u, |
|
|
|
/** |
|
|
|
* Index for the fourth implementation-defined action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_ACTION3 = 0x9u, |
|
|
|
/** |
|
|
|
* Index for the fifth implementation-defined action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_ACTION4 = 0xAu, |
|
|
|
/** |
|
|
|
* Index for the sixth implementation-defined action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_ACTION5 = 0xBu, |
|
|
|
/** |
|
|
|
* Index for the seventh implementation-defined action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_ACTION6 = 0xCu, |
|
|
|
/** |
|
|
|
* Index for the eighth implementation-defined action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_ACTION7 = 0xDu, |
|
|
|
/** |
|
|
|
* Index for the ninth implementation-defined action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_ACTION8 = 0xEu, |
|
|
|
/** |
|
|
|
* Index for the tenth implementation-defined action. |
|
|
|
*/ |
|
|
|
IZ_ACTION_INDEX_ACTION9 = 0xFu, |
|
|
|
} IZ_ActionIndex; |
|
|
|
|
|
|
|
typedef short IZ_ActionFlag; |
|
|
|
|
|
|
|
inline IZ_ActionFlag IZ_ActionFlagValue(IZ_ActionIndex index) { |
|
|
|
return (IZ_ActionFlag) (0x1 << index); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Names of the actions. |
|
|
|
*/ |
|
|
|
static const char* IZ_ACTION_NAMES[] = { |
|
|
|
"Right", |
|
|
|
"Down", |
|
|
|
"Left", |
|
|
|
"Up", |
|
|
|
"Yes", |
|
|
|
"No", |
|
|
|
"Action0", |
|
|
|
"Action1", |
|
|
|
"Action2", |
|
|
|
"Action3", |
|
|
|
"Action4", |
|
|
|
"Action5", |
|
|
|
"Action6", |
|
|
|
"Action7", |
|
|
|
"Action8", |
|
|
|
"Action9", |
|
|
|
}; |
|
|
|
|
|
|
|
#endif |