summaryrefslogtreecommitdiffstats
path: root/src/common/event.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-06-25 19:59:17 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-06-25 19:59:17 +0200
commitb08a63790c0fbeacb3f96a74e3eb15abe8c70dab (patch)
tree7260140ae1ea308bd256370c6fcbbc57dbd13441 /src/common/event.cpp
parentf58918031c001a0159eaf8f18d4e451e70089d30 (diff)
downloadcolobot-b08a63790c0fbeacb3f96a74e3eb15abe8c70dab.tar.gz
colobot-b08a63790c0fbeacb3f96a74e3eb15abe8c70dab.tar.bz2
colobot-b08a63790c0fbeacb3f96a74e3eb15abe8c70dab.zip
SDL project
- added (very basic) SDL template in CApplication and CEngine - split project into two targets: colobot_old (dependent on DirectX and WinAPI) and colobot_new (dependent on SDL and OpenGL) - moved sound.h/cpp to old/ and created new template in Snd namespace - added platform-independent dialog boxes in app/system.h/cpp
Diffstat (limited to 'src/common/event.cpp')
-rw-r--r--src/common/event.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/common/event.cpp b/src/common/event.cpp
index b323e43..0a56fb9 100644
--- a/src/common/event.cpp
+++ b/src/common/event.cpp
@@ -16,15 +16,22 @@
// event.cpp
-
-#include <windows.h>
-#include <stdio.h>
-
-#include "common/struct.h"
#include "common/iman.h"
#include "common/event.h"
+#include <string.h>
+
+Event::Event()
+{
+ event = EVENT_NULL;
+ param = 0;
+ axeX = 0.0f;
+ axeY = 0.0f;
+ axeZ = 0.0f;
+ keyState = 0;
+ rTime = 0.0f;
+}
// Object's constructor.
@@ -57,7 +64,7 @@ void CEvent::Flush()
void CEvent::MakeEvent(Event &event, EventMsg msg)
{
- ZeroMemory(&event, sizeof(Event));
+ memset(&event, 0, sizeof(Event));
event.event = msg;
}