summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-09-12 23:43:04 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-09-12 23:43:04 +0200
commit34d7dcf3be24de04b2b9c64edb2666439b353a5b (patch)
tree28d389e5f17f05854371b66822bb95adbb1b380c /src/common
parent6c21dceb35f7aaf90e54d3c030130e9465f343f3 (diff)
downloadcolobot-34d7dcf3be24de04b2b9c64edb2666439b353a5b.tar.gz
colobot-34d7dcf3be24de04b2b9c64edb2666439b353a5b.tar.bz2
colobot-34d7dcf3be24de04b2b9c64edb2666439b353a5b.zip
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
Diffstat (limited to 'src/common')
-rw-r--r--src/common/event.h8
-rw-r--r--src/common/global.h5
-rw-r--r--src/common/misc.h2
3 files changed, 11 insertions, 4 deletions
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 <time.h>
-// 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);