diff options
Diffstat (limited to 'src/common/event.h')
-rw-r--r-- | src/common/event.h | 60 |
1 files changed, 16 insertions, 44 deletions
diff --git a/src/common/event.h b/src/common/event.h index 3192931..4df1e6d 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -14,17 +14,17 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// event.h +/** + * \file common/event.h + * \brief Event types, structs and event queue + */ #pragma once -#include <common/key.h> -#include <common/event_ids.h> -#include <math/point.h> - -#include <string.h> - +#include "common/key.h" +#include "common/event_ids.h" +#include "math/point.h" class CInstanceManager; @@ -171,13 +171,19 @@ struct Event ActiveEventData active; }; - // TODO: refactor/rewrite + // TODO: remove long param; // parameter + + // TODO: remove? Math::Point pos; // mouse position (0 .. 1) + + // TODO: ? float axeX; // control the X axis (-1 .. 1) float axeY; // control of the Y axis (-1 .. 1) float axeZ; // control the Z axis (-1 .. 1) short keyState; // state of the keyboard (KS_ *) + + // TODO: remove in longer term (use CApplication's new time functions instead) float rTime; // relative time Event(EventType aType = EVENT_NULL) @@ -193,40 +199,8 @@ struct Event }; -/** - \enum KeyRank - \brief Slots for key assignment of user controls - */ - -// TODO: move to global.h ? - -enum KeyRank -{ - KEYRANK_LEFT = 0, - KEYRANK_RIGHT = 1, - KEYRANK_UP = 2, - KEYRANK_DOWN = 3, - KEYRANK_GUP = 4, - KEYRANK_GDOWN = 5, - KEYRANK_CAMERA = 6, - KEYRANK_DESEL = 7, - KEYRANK_ACTION = 8, - KEYRANK_NEAR = 9, - KEYRANK_AWAY = 10, - KEYRANK_NEXT = 11, - KEYRANK_HUMAN = 12, - KEYRANK_QUIT = 13, - KEYRANK_HELP = 14, - KEYRANK_PROG = 15, - KEYRANK_VISIT = 16, - KEYRANK_SPEED10 = 17, - KEYRANK_SPEED15 = 18, - KEYRANK_SPEED20 = 19, - KEYRANK_SPEED30 = 20, - KEYRANK_AIMUP = 21, - KEYRANK_AIMDOWN = 22, - KEYRANK_CBOT = 23, -}; +//! Returns an unique event type (above the standard IDs) +EventType GetUniqueEventType(); /** @@ -261,5 +235,3 @@ protected: int m_tail; int m_total; }; - - |