From e1d75dfdf0727776adf0b3d44995ccf0e03487b3 Mon Sep 17 00:00:00 2001 From: tom Date: Thu, 30 Apr 2015 22:20:53 -0500 Subject: first commit --- src/event.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/event.cpp (limited to 'src/event.cpp') diff --git a/src/event.cpp b/src/event.cpp new file mode 100644 index 0000000..369edbc --- /dev/null +++ b/src/event.cpp @@ -0,0 +1,32 @@ +#include "event.h" + +Event::Event() +{ + run = true; +}; + +int Event::Poll() +{ + SDL_PollEvent(&v); +}; + +void Event::off() +{ + run = false; +} + +bool Event::gRun() +{ + return run; +}; + +SDL_Event& Event::gEvent() +{ + SDL_Event* x = &v; + return *x; +}; + +int Event::gEventType() +{ + return v.type; +}; -- cgit v1.2.3