From 34d7dcf3be24de04b2b9c64edb2666439b353a5b Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Wed, 12 Sep 2012 23:43:04 +0200 Subject: Simulation timestamps and input bindings - added new simulation time calculations in CApplication - added simulation frame updates - rewritten old input binding code and input state tracking --- src/common/event.h | 8 +++++++- src/common/global.h | 5 +++-- src/common/misc.h | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) (limited to 'src/common') diff --git a/src/common/event.h b/src/common/event.h index e57bd08..4df1e6d 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -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) diff --git a/src/common/global.h b/src/common/global.h index acc5b8f..88f753e 100644 --- a/src/common/global.h +++ b/src/common/global.h @@ -84,9 +84,8 @@ enum ResearchType /** * \enum KeyRank * \brief Slots for key assignment of user controls - * - * TODO: refactor */ +// TODO: remove (use the new InputSlot enum from app/app.h) enum KeyRank { KEYRANK_LEFT = 0, @@ -113,6 +112,8 @@ enum KeyRank KEYRANK_AIMUP = 21, KEYRANK_AIMDOWN = 22, KEYRANK_CBOT = 23, + + KEYRANK_MAX }; // TODO: move to CRobotMain diff --git a/src/common/misc.h b/src/common/misc.h index 66da478..235b7a3 100644 --- a/src/common/misc.h +++ b/src/common/misc.h @@ -22,7 +22,7 @@ #include -// TODO: to be removed +// TODO: to be removed (replaced by TrackedKey enum and mouse states in app.h) const int KS_PAGEUP = (1<<4); const int KS_PAGEDOWN = (1<<5); const int KS_SHIFT = (1<<6); -- cgit v1.2.3-1-g7c22