Skip to content
Browse files

Initial XS for Timer

  • Loading branch information...
1 parent 5738124 commit 9af5927ab34e7c505b275f6d32d7b60f774c5da2 @kthakore kthakore committed Jul 23, 2010
Showing with 38 additions and 0 deletions.
  1. +7 −0 Build.PL
  2. +13 −0 src/SDLx/Timer.h
  3. +17 −0 src/SDLx/Timer.xs
  4. +1 −0 typemap
View
7 Build.PL
@@ -167,6 +167,13 @@ my %subsystems = (
},
libraries => [qw( SDL )],
},
+ TimerX => {
+ file => {
+ from => 'src/SDLx/Timer.xs',
+ to => 'lib/SDLx/Controller/Timer.xs',
+ },
+ libraries => [qw( SDL )],
+ },
Overlay => {
file => {
from => 'src/Core/objects/Overlay.xs',
View
13 src/SDLx/Timer.h
@@ -0,0 +1,13 @@
+/*
+ * Controller Timer Header
+ */
+
+
+typedef struct TIMER {
+
+ int started_ticks;
+ int paused_ticks;
+ int started;
+ int paused;
+
+} sdlx_timer;
View
17 src/SDLx/Timer.xs
@@ -0,0 +1,17 @@
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+#include "ppport.h"
+
+#ifndef aTHX_
+#define aTHX_
+#endif
+
+#include <SDL.h>
+#include "SDLx/Timer.h"
+
+MODULE = SDLx::Controller::Timer PACKAGE = SDLx::Controller::Timer PREFIX = timerx_
+
+
+
+
View
1 typemap
@@ -54,6 +54,7 @@ Mix_Chunk * O_OBJECT
Mix_Music * O_OBJECT
SDL_GLattr T_IV
SDLPango_Context * O_OBJECT
+sdlx_timer * O_OBJECT
SDLPango_Alignment T_UV
int * T_PTR
int ** T_PTR

0 comments on commit 9af5927

Please sign in to comment.
Something went wrong with that request. Please try again.