Skip to content
This repository
Browse code

Tidied the code

  • Loading branch information...
commit 36a0ca5c0066b7c397dd73ab825d42d7a19aba51 1 parent 64791fa
Kartik Thakore authored August 31, 2010
1,074  Build.PL
@@ -19,16 +19,16 @@ BROKENMSG
19 19
 
20 20
 ### we need the platform-specific module
21 21
 my %platforms = (
22  
-    MSWin32     => 'Windows',
23  
-    MacOS       => 'Darwin',
24  
-    darwin      => 'Darwin',
25  
-    cygwin      => 'Unix',
26  
-    freebsd     => 'Unix',
27  
-    gnukfreebsd => 'Unix',
28  
-    linux       => 'Unix',
29  
-    netbsd      => 'Unix',
30  
-    openbsd     => 'Unix',
31  
-    solaris     => 'Unix',
  22
+	MSWin32     => 'Windows',
  23
+	MacOS       => 'Darwin',
  24
+	darwin      => 'Darwin',
  25
+	cygwin      => 'Unix',
  26
+	freebsd     => 'Unix',
  27
+	gnukfreebsd => 'Unix',
  28
+	linux       => 'Unix',
  29
+	netbsd      => 'Unix',
  30
+	openbsd     => 'Unix',
  31
+	solaris     => 'Unix',
32 32
 );
33 33
 my $package = 'My::Builder::' . ( $platforms{$^O} || 'Unix' );
34 34
 print "Gonna use '$package' class ...\n";
@@ -41,400 +41,400 @@ eval "require $package" or croak "Require '$package' failed: $@\n";
41 41
 #            <to>   = location of build file to get name right
42 42
 #        <libraries> = list reqiured libraries, names the same as keys to hash %libraries
43 43
 my %subsystems = (
44  
-    SDL => {
45  
-        file => {
46  
-            from => 'src/SDL.xs',
47  
-            to   => 'lib/SDL_perl.xs',
48  
-        },
49  
-        libraries => [qw( SDL )],
50  
-    },
51  
-    Time => {
52  
-        file => {
53  
-            from => 'src/Core/Time.xs',
54  
-            to   => 'lib/SDL/Time.xs',
55  
-        },
56  
-        libraries => [qw( SDL )],
57  
-    },
58  
-    Events => {
59  
-        file => {
60  
-            from => 'src/Core/Events.xs',
61  
-            to   => 'lib/SDL/Events.xs',
62  
-        },
63  
-        libraries => [qw( SDL )],
64  
-    },
65  
-    Event => {
66  
-        file => {
67  
-            from => 'src/Core/objects/Event.xs',
68  
-            to   => 'lib/SDL/Event.xs',
69  
-        },
70  
-        libraries => [qw( SDL )],
71  
-    },
72  
-    GFX => {
73  
-        file => {
74  
-            from => 'src/GFX/GFX.xs',
75  
-            to   => 'lib/SDL/GFX.xs',
76  
-        },
77  
-        libraries => [qw( SDL SDL_gfx_primitives )],
78  
-    },
79  
-    BlitFunc => {
80  
-        file => {
81  
-            from => 'src/GFX/BlitFunc.xs',
82  
-            to   => 'lib/SDL/GFX/BlitFunc.xs',
83  
-        },
84  
-        libraries => [qw( SDL SDL_gfx_blitfunc )],
85  
-    },
86  
-    Framerate => {
87  
-        file => {
88  
-            from => 'src/GFX/Framerate.xs',
89  
-            to   => 'lib/SDL/GFX/Framerate.xs',
90  
-        },
91  
-        libraries => [qw( SDL SDL_gfx_framerate )],
92  
-    },
93  
-    FPSManager => {
94  
-        file => {
95  
-            from => 'src/GFX/FPSManager.xs',
96  
-            to   => 'lib/SDL/GFX/FPSManager.xs',
97  
-        },
98  
-        libraries => [qw( SDL SDL_gfx_framerate )],
99  
-    },
100  
-    ImageFilter => {
101  
-        file => {
102  
-            from => 'src/GFX/ImageFilter.xs',
103  
-            to   => 'lib/SDL/GFX/ImageFilter.xs',
104  
-        },
105  
-        libraries => [qw( SDL SDL_gfx_imagefilter )],
106  
-    },
107  
-    Primitives => {
108  
-        file => {
109  
-            from => 'src/GFX/Primitives.xs',
110  
-            to   => 'lib/SDL/GFX/Primitives.xs',
111  
-        },
112  
-        libraries => [qw( SDL SDL_gfx_primitives )],
113  
-    },
114  
-    Rotozoom => {
115  
-        file => {
116  
-            from => 'src/GFX/Rotozoom.xs',
117  
-            to   => 'lib/SDL/GFX/Rotozoom.xs',
118  
-        },
119  
-        libraries => [qw( SDL SDL_gfx_rotozoom )],
120  
-    },
121  
-    MultiThread => {
122  
-        file => {
123  
-            from => 'src/Core/MultiThread.xs',
124  
-            to   => 'lib/SDL/MultiThread.xs',
125  
-        },
126  
-        libraries => [qw( SDL )],
127  
-    },
128  
-    Video => {
129  
-        file => {
130  
-            from => 'src/Core/Video.xs',
131  
-            to   => 'lib/SDL/Video.xs',
132  
-        },
133  
-        libraries => [qw( SDL )],
134  
-    },
135  
-    Audio => {
136  
-        file => {
137  
-            from => 'src/Core/Audio.xs',
138  
-            to   => 'lib/SDL/Audio.xs',
139  
-        },
140  
-        libraries => [qw( SDL )],
141  
-    },
142  
-    Rect => {
143  
-        file => {
144  
-            from => 'src/Core/objects/Rect.xs',
145  
-            to   => 'lib/SDL/Rect.xs',
146  
-        },
147  
-        libraries => [qw( SDL )],
148  
-    },
149  
-    Color => {
150  
-        file => {
151  
-            from => 'src/Core/objects/Color.xs',
152  
-            to   => 'lib/SDL/Color.xs',
153  
-        },
154  
-        libraries => [qw( SDL )],
155  
-    },
156  
-    Surface => {
157  
-        file => {
158  
-            from => 'src/Core/objects/Surface.xs',
159  
-            to   => 'lib/SDL/Surface.xs',
160  
-        },
161  
-        libraries => [qw( SDL )],
162  
-    },
163  
-    SurfaceX => {
164  
-        file => {
165  
-            from => 'src/SDLx/Surface.xs',
166  
-            to   => 'lib/SDLx/Surface.xs',
167  
-        },
168  
-        libraries => [qw( SDL )],
169  
-    },
170  
-    TimerX => {
171  
-        file => {
172  
-            from => 'src/SDLx/Timer.xs',
173  
-            to   => 'lib/SDLx/Controller/Timer.xs',
174  
-        },
175  
-        libraries => [qw( SDL )],
176  
-    },
177  
-    ObjectX => {
178  
-        file => {
179  
-            from => 'src/SDLx/Controller/Object.xs',
180  
-            to   => 'lib/SDLx/Controller/Object.xs',
181  
-        },
182  
-        libraries => [qw( SDL  )],
183  
-    },
184  
-    StateX => {
185  
-        file => {
186  
-            from => 'src/SDLx/Controller/State.xs',
187  
-            to   => 'lib/SDLx/Controller/State.xs',
188  
-        },
189  
-        libraries => [qw( SDL  )],
190  
-    },
191  
-    Overlay => {
192  
-        file => {
193  
-            from => 'src/Core/objects/Overlay.xs',
194  
-            to   => 'lib/SDL/Overlay.xs',
195  
-        },
196  
-        libraries => [qw( SDL )],
197  
-    },
198  
-    RWOps => {
199  
-        file => {
200  
-            from => 'src/Core/objects/RWOps.xs',
201  
-            to   => 'lib/SDL/RWOps.xs',
202  
-        },
203  
-        libraries => [qw( SDL )],
204  
-    },
205  
-    PixelFormat => {
206  
-        file => {
207  
-            from => 'src/Core/objects/PixelFormat.xs',
208  
-            to   => 'lib/SDL/PixelFormat.xs',
209  
-        },
210  
-        libraries => [qw( SDL )],
211  
-    },
212  
-    LayerManagerX => {
213  
-        file => {
214  
-            from => 'src/SDLx/LayerManager.xs',
215  
-            to   => 'lib/SDLx/LayerManager.xs',
216  
-        },
217  
-        libraries => [qw( SDL )],
218  
-    },
219  
-    LayerX => {
220  
-        file => {
221  
-            from => 'src/SDLx/Layer.xs',
222  
-            to   => 'lib/SDLx/Layer.xs',
223  
-        },
224  
-        libraries => [qw( SDL SDL_image )],
225  
-    },
226  
-    AudioSpec => {
227  
-        file => {
228  
-            from => 'src/Core/objects/AudioSpec.xs',
229  
-            to   => 'lib/SDL/AudioSpec.xs',
230  
-        },
231  
-        libraries => [qw( SDL )],
232  
-    },
233  
-    AudioCVT => {
234  
-        file => {
235  
-            from => 'src/Core/objects/AudioCVT.xs',
236  
-            to   => 'lib/SDL/AudioCVT.xs',
237  
-        },
238  
-        libraries => [qw( SDL )],
239  
-    },
240  
-    Mixer => {
241  
-        file => {
242  
-            from => 'src/Mixer/Mixer.xs',
243  
-            to   => 'lib/SDL/Mixer.xs',
244  
-        },
245  
-        libraries => [qw( SDL SDL_mixer )],
246  
-    },
247  
-    MixerSamples => {
248  
-        file => {
249  
-            from => 'src/Mixer/Samples.xs',
250  
-            to   => 'lib/SDL/Mixer/Samples.xs',
251  
-        },
252  
-        libraries => [qw( SDL SDL_mixer )],
253  
-    },
254  
-    MixerChannels => {
255  
-        file => {
256  
-            from => 'src/Mixer/Channels.xs',
257  
-            to   => 'lib/SDL/Mixer/Channels.xs',
258  
-        },
259  
-        libraries => [qw( SDL SDL_mixer )],
260  
-    },
261  
-    MixerGroups => {
262  
-        file => {
263  
-            from => 'src/Mixer/Groups.xs',
264  
-            to   => 'lib/SDL/Mixer/Groups.xs',
265  
-        },
266  
-        libraries => [qw( SDL SDL_mixer )],
267  
-    },
268  
-    MixerMusic => {
269  
-        file => {
270  
-            from => 'src/Mixer/Music.xs',
271  
-            to   => 'lib/SDL/Mixer/Music.xs',
272  
-        },
273  
-        libraries => [qw( SDL SDL_mixer )],
274  
-    },
275  
-    MixerEffects => {
276  
-        file => {
277  
-            from => 'src/Mixer/Effects.xs',
278  
-            to   => 'lib/SDL/Mixer/Effects.xs',
279  
-        },
280  
-        libraries => [qw( SDL SDL_mixer )],
281  
-    },
282  
-    MixChunk => {
283  
-        file => {
284  
-            from => 'src/Mixer/objects/MixChunk.xs',
285  
-            to   => 'lib/SDL/Mixer/MixChunk.xs',
286  
-        },
287  
-        libraries => [qw( SDL SDL_mixer )],
288  
-    },
289  
-    MixMusic => {
290  
-        file => {
291  
-            from => 'src/Mixer/objects/MixMusic.xs',
292  
-            to   => 'lib/SDL/Mixer/MixMusic.xs',
293  
-        },
294  
-        libraries => [qw( SDL SDL_mixer )],
295  
-    },
296  
-    Palette => {
297  
-        file => {
298  
-            from => 'src/Core/objects/Palette.xs',
299  
-            to   => 'lib/SDL/Palette.xs',
300  
-        },
301  
-        libraries => [qw( SDL )],
302  
-    },
303  
-    VideoInfo => {
304  
-        file => {
305  
-            from => 'src/Core/objects/VideoInfo.xs',
306  
-            to   => 'lib/SDL/VideoInfo.xs',
307  
-        },
308  
-        libraries => [qw( SDL )],
309  
-    },
310  
-    Mouse => {
311  
-        file => {
312  
-            from => 'src/Core/Mouse.xs',
313  
-            to   => 'lib/SDL/Mouse.xs',
314  
-        },
315  
-        libraries => [qw( SDL )],
316  
-    },
317  
-    Cursor => {
318  
-        file => {
319  
-            from => 'src/Core/objects/Cursor.xs',
320  
-            to   => 'lib/SDL/Cursor.xs',
321  
-        },
322  
-        libraries => [qw( SDL )],
323  
-    },
324  
-    Joystick => {
325  
-        file => {
326  
-            from => 'src/Core/Joystick.xs',
327  
-            to   => 'lib/SDL/Joystick.xs',
328  
-        },
329  
-        libraries => [qw( SDL )],
330  
-    },
331  
-    CDROM => {
332  
-        file => {
333  
-            from => 'src/Core/CDROM.xs',
334  
-            to   => 'lib/SDL/CDROM.xs',
335  
-        },
336  
-        libraries => [qw( SDL )],
337  
-    },
338  
-    CDTrack => {
339  
-        file => {
340  
-            from => 'src/Core/objects/CDTrack.xs',
341  
-            to   => 'lib/SDL/CDTrack.xs',
342  
-        },
343  
-        libraries => [qw( SDL )],
344  
-    },
345  
-    CD => {
346  
-        file => {
347  
-            from => 'src/Core/objects/CD.xs',
348  
-            to   => 'lib/SDL/CD.xs',
349  
-        },
350  
-        libraries => [qw( SDL )],
351  
-    },
352  
-    TTF => {
353  
-        file => {
354  
-            from => 'src/TTF/TTF.xs',
355  
-            to   => 'lib/SDL/TTF.xs',
356  
-        },
357  
-        libraries => [qw( SDL SDL_ttf )],
358  
-    },
359  
-    TTF_Font => {
360  
-        file => {
361  
-            from => 'src/TTF/objects/Font.xs',
362  
-            to   => 'lib/SDL/TTF/Font.xs',
363  
-        },
364  
-        libraries => [qw( SDL SDL_ttf )],
365  
-    },
366  
-    Version => {
367  
-        file => {
368  
-            from => 'src/Core/objects/Version.xs',
369  
-            to   => 'lib/SDL/Version.xs',
370  
-        },
371  
-        libraries => [qw( SDL )],
372  
-    },
373  
-    Image => {
374  
-        file => {
375  
-            from => 'src/Image.xs',
376  
-            to   => 'lib/SDL/Image.xs',
377  
-        },
378  
-        libraries => [qw( SDL SDL_image )],
379  
-    },
380  
-    SFont => {
381  
-        file => {
382  
-            from => 'src/SDLx/SFont.xs',
383  
-            to   => 'lib/SDLx/SFont.xs',
384  
-        },
385  
-        libraries => [qw( SDL SDL_image )],
386  
-    },
  44
+	SDL => {
  45
+		file => {
  46
+			from => 'src/SDL.xs',
  47
+			to   => 'lib/SDL_perl.xs',
  48
+		},
  49
+		libraries => [qw( SDL )],
  50
+	},
  51
+	Time => {
  52
+		file => {
  53
+			from => 'src/Core/Time.xs',
  54
+			to   => 'lib/SDL/Time.xs',
  55
+		},
  56
+		libraries => [qw( SDL )],
  57
+	},
  58
+	Events => {
  59
+		file => {
  60
+			from => 'src/Core/Events.xs',
  61
+			to   => 'lib/SDL/Events.xs',
  62
+		},
  63
+		libraries => [qw( SDL )],
  64
+	},
  65
+	Event => {
  66
+		file => {
  67
+			from => 'src/Core/objects/Event.xs',
  68
+			to   => 'lib/SDL/Event.xs',
  69
+		},
  70
+		libraries => [qw( SDL )],
  71
+	},
  72
+	GFX => {
  73
+		file => {
  74
+			from => 'src/GFX/GFX.xs',
  75
+			to   => 'lib/SDL/GFX.xs',
  76
+		},
  77
+		libraries => [qw( SDL SDL_gfx_primitives )],
  78
+	},
  79
+	BlitFunc => {
  80
+		file => {
  81
+			from => 'src/GFX/BlitFunc.xs',
  82
+			to   => 'lib/SDL/GFX/BlitFunc.xs',
  83
+		},
  84
+		libraries => [qw( SDL SDL_gfx_blitfunc )],
  85
+	},
  86
+	Framerate => {
  87
+		file => {
  88
+			from => 'src/GFX/Framerate.xs',
  89
+			to   => 'lib/SDL/GFX/Framerate.xs',
  90
+		},
  91
+		libraries => [qw( SDL SDL_gfx_framerate )],
  92
+	},
  93
+	FPSManager => {
  94
+		file => {
  95
+			from => 'src/GFX/FPSManager.xs',
  96
+			to   => 'lib/SDL/GFX/FPSManager.xs',
  97
+		},
  98
+		libraries => [qw( SDL SDL_gfx_framerate )],
  99
+	},
  100
+	ImageFilter => {
  101
+		file => {
  102
+			from => 'src/GFX/ImageFilter.xs',
  103
+			to   => 'lib/SDL/GFX/ImageFilter.xs',
  104
+		},
  105
+		libraries => [qw( SDL SDL_gfx_imagefilter )],
  106
+	},
  107
+	Primitives => {
  108
+		file => {
  109
+			from => 'src/GFX/Primitives.xs',
  110
+			to   => 'lib/SDL/GFX/Primitives.xs',
  111
+		},
  112
+		libraries => [qw( SDL SDL_gfx_primitives )],
  113
+	},
  114
+	Rotozoom => {
  115
+		file => {
  116
+			from => 'src/GFX/Rotozoom.xs',
  117
+			to   => 'lib/SDL/GFX/Rotozoom.xs',
  118
+		},
  119
+		libraries => [qw( SDL SDL_gfx_rotozoom )],
  120
+	},
  121
+	MultiThread => {
  122
+		file => {
  123
+			from => 'src/Core/MultiThread.xs',
  124
+			to   => 'lib/SDL/MultiThread.xs',
  125
+		},
  126
+		libraries => [qw( SDL )],
  127
+	},
  128
+	Video => {
  129
+		file => {
  130
+			from => 'src/Core/Video.xs',
  131
+			to   => 'lib/SDL/Video.xs',
  132
+		},
  133
+		libraries => [qw( SDL )],
  134
+	},
  135
+	Audio => {
  136
+		file => {
  137
+			from => 'src/Core/Audio.xs',
  138
+			to   => 'lib/SDL/Audio.xs',
  139
+		},
  140
+		libraries => [qw( SDL )],
  141
+	},
  142
+	Rect => {
  143
+		file => {
  144
+			from => 'src/Core/objects/Rect.xs',
  145
+			to   => 'lib/SDL/Rect.xs',
  146
+		},
  147
+		libraries => [qw( SDL )],
  148
+	},
  149
+	Color => {
  150
+		file => {
  151
+			from => 'src/Core/objects/Color.xs',
  152
+			to   => 'lib/SDL/Color.xs',
  153
+		},
  154
+		libraries => [qw( SDL )],
  155
+	},
  156
+	Surface => {
  157
+		file => {
  158
+			from => 'src/Core/objects/Surface.xs',
  159
+			to   => 'lib/SDL/Surface.xs',
  160
+		},
  161
+		libraries => [qw( SDL )],
  162
+	},
  163
+	SurfaceX => {
  164
+		file => {
  165
+			from => 'src/SDLx/Surface.xs',
  166
+			to   => 'lib/SDLx/Surface.xs',
  167
+		},
  168
+		libraries => [qw( SDL )],
  169
+	},
  170
+	TimerX => {
  171
+		file => {
  172
+			from => 'src/SDLx/Timer.xs',
  173
+			to   => 'lib/SDLx/Controller/Timer.xs',
  174
+		},
  175
+		libraries => [qw( SDL )],
  176
+	},
  177
+	ObjectX => {
  178
+		file => {
  179
+			from => 'src/SDLx/Controller/Object.xs',
  180
+			to   => 'lib/SDLx/Controller/Object.xs',
  181
+		},
  182
+		libraries => [qw( SDL  )],
  183
+	},
  184
+	StateX => {
  185
+		file => {
  186
+			from => 'src/SDLx/Controller/State.xs',
  187
+			to   => 'lib/SDLx/Controller/State.xs',
  188
+		},
  189
+		libraries => [qw( SDL  )],
  190
+	},
  191
+	Overlay => {
  192
+		file => {
  193
+			from => 'src/Core/objects/Overlay.xs',
  194
+			to   => 'lib/SDL/Overlay.xs',
  195
+		},
  196
+		libraries => [qw( SDL )],
  197
+	},
  198
+	RWOps => {
  199
+		file => {
  200
+			from => 'src/Core/objects/RWOps.xs',
  201
+			to   => 'lib/SDL/RWOps.xs',
  202
+		},
  203
+		libraries => [qw( SDL )],
  204
+	},
  205
+	PixelFormat => {
  206
+		file => {
  207
+			from => 'src/Core/objects/PixelFormat.xs',
  208
+			to   => 'lib/SDL/PixelFormat.xs',
  209
+		},
  210
+		libraries => [qw( SDL )],
  211
+	},
  212
+	LayerManagerX => {
  213
+		file => {
  214
+			from => 'src/SDLx/LayerManager.xs',
  215
+			to   => 'lib/SDLx/LayerManager.xs',
  216
+		},
  217
+		libraries => [qw( SDL )],
  218
+	},
  219
+	LayerX => {
  220
+		file => {
  221
+			from => 'src/SDLx/Layer.xs',
  222
+			to   => 'lib/SDLx/Layer.xs',
  223
+		},
  224
+		libraries => [qw( SDL SDL_image )],
  225
+	},
  226
+	AudioSpec => {
  227
+		file => {
  228
+			from => 'src/Core/objects/AudioSpec.xs',
  229
+			to   => 'lib/SDL/AudioSpec.xs',
  230
+		},
  231
+		libraries => [qw( SDL )],
  232
+	},
  233
+	AudioCVT => {
  234
+		file => {
  235
+			from => 'src/Core/objects/AudioCVT.xs',
  236
+			to   => 'lib/SDL/AudioCVT.xs',
  237
+		},
  238
+		libraries => [qw( SDL )],
  239
+	},
  240
+	Mixer => {
  241
+		file => {
  242
+			from => 'src/Mixer/Mixer.xs',
  243
+			to   => 'lib/SDL/Mixer.xs',
  244
+		},
  245
+		libraries => [qw( SDL SDL_mixer )],
  246
+	},
  247
+	MixerSamples => {
  248
+		file => {
  249
+			from => 'src/Mixer/Samples.xs',
  250
+			to   => 'lib/SDL/Mixer/Samples.xs',
  251
+		},
  252
+		libraries => [qw( SDL SDL_mixer )],
  253
+	},
  254
+	MixerChannels => {
  255
+		file => {
  256
+			from => 'src/Mixer/Channels.xs',
  257
+			to   => 'lib/SDL/Mixer/Channels.xs',
  258
+		},
  259
+		libraries => [qw( SDL SDL_mixer )],
  260
+	},
  261
+	MixerGroups => {
  262
+		file => {
  263
+			from => 'src/Mixer/Groups.xs',
  264
+			to   => 'lib/SDL/Mixer/Groups.xs',
  265
+		},
  266
+		libraries => [qw( SDL SDL_mixer )],
  267
+	},
  268
+	MixerMusic => {
  269
+		file => {
  270
+			from => 'src/Mixer/Music.xs',
  271
+			to   => 'lib/SDL/Mixer/Music.xs',
  272
+		},
  273
+		libraries => [qw( SDL SDL_mixer )],
  274
+	},
  275
+	MixerEffects => {
  276
+		file => {
  277
+			from => 'src/Mixer/Effects.xs',
  278
+			to   => 'lib/SDL/Mixer/Effects.xs',
  279
+		},
  280
+		libraries => [qw( SDL SDL_mixer )],
  281
+	},
  282
+	MixChunk => {
  283
+		file => {
  284
+			from => 'src/Mixer/objects/MixChunk.xs',
  285
+			to   => 'lib/SDL/Mixer/MixChunk.xs',
  286
+		},
  287
+		libraries => [qw( SDL SDL_mixer )],
  288
+	},
  289
+	MixMusic => {
  290
+		file => {
  291
+			from => 'src/Mixer/objects/MixMusic.xs',
  292
+			to   => 'lib/SDL/Mixer/MixMusic.xs',
  293
+		},
  294
+		libraries => [qw( SDL SDL_mixer )],
  295
+	},
  296
+	Palette => {
  297
+		file => {
  298
+			from => 'src/Core/objects/Palette.xs',
  299
+			to   => 'lib/SDL/Palette.xs',
  300
+		},
  301
+		libraries => [qw( SDL )],
  302
+	},
  303
+	VideoInfo => {
  304
+		file => {
  305
+			from => 'src/Core/objects/VideoInfo.xs',
  306
+			to   => 'lib/SDL/VideoInfo.xs',
  307
+		},
  308
+		libraries => [qw( SDL )],
  309
+	},
  310
+	Mouse => {
  311
+		file => {
  312
+			from => 'src/Core/Mouse.xs',
  313
+			to   => 'lib/SDL/Mouse.xs',
  314
+		},
  315
+		libraries => [qw( SDL )],
  316
+	},
  317
+	Cursor => {
  318
+		file => {
  319
+			from => 'src/Core/objects/Cursor.xs',
  320
+			to   => 'lib/SDL/Cursor.xs',
  321
+		},
  322
+		libraries => [qw( SDL )],
  323
+	},
  324
+	Joystick => {
  325
+		file => {
  326
+			from => 'src/Core/Joystick.xs',
  327
+			to   => 'lib/SDL/Joystick.xs',
  328
+		},
  329
+		libraries => [qw( SDL )],
  330
+	},
  331
+	CDROM => {
  332
+		file => {
  333
+			from => 'src/Core/CDROM.xs',
  334
+			to   => 'lib/SDL/CDROM.xs',
  335
+		},
  336
+		libraries => [qw( SDL )],
  337
+	},
  338
+	CDTrack => {
  339
+		file => {
  340
+			from => 'src/Core/objects/CDTrack.xs',
  341
+			to   => 'lib/SDL/CDTrack.xs',
  342
+		},
  343
+		libraries => [qw( SDL )],
  344
+	},
  345
+	CD => {
  346
+		file => {
  347
+			from => 'src/Core/objects/CD.xs',
  348
+			to   => 'lib/SDL/CD.xs',
  349
+		},
  350
+		libraries => [qw( SDL )],
  351
+	},
  352
+	TTF => {
  353
+		file => {
  354
+			from => 'src/TTF/TTF.xs',
  355
+			to   => 'lib/SDL/TTF.xs',
  356
+		},
  357
+		libraries => [qw( SDL SDL_ttf )],
  358
+	},
  359
+	TTF_Font => {
  360
+		file => {
  361
+			from => 'src/TTF/objects/Font.xs',
  362
+			to   => 'lib/SDL/TTF/Font.xs',
  363
+		},
  364
+		libraries => [qw( SDL SDL_ttf )],
  365
+	},
  366
+	Version => {
  367
+		file => {
  368
+			from => 'src/Core/objects/Version.xs',
  369
+			to   => 'lib/SDL/Version.xs',
  370
+		},
  371
+		libraries => [qw( SDL )],
  372
+	},
  373
+	Image => {
  374
+		file => {
  375
+			from => 'src/Image.xs',
  376
+			to   => 'lib/SDL/Image.xs',
  377
+		},
  378
+		libraries => [qw( SDL SDL_image )],
  379
+	},
  380
+	SFont => {
  381
+		file => {
  382
+			from => 'src/SDLx/SFont.xs',
  383
+			to   => 'lib/SDLx/SFont.xs',
  384
+		},
  385
+		libraries => [qw( SDL SDL_image )],
  386
+	},
387 387
 
388  
-    #	SMPEG => {
389  
-    #		file	=> {
390  
-    #			from => 'src/SMPEG.xs',
391  
-    #			to   =>	'lib/SDL/SMPEG.xs',
392  
-    #		},
393  
-    #		libraries => [qw( SDL smpeg)],
394  
-    #	},
395  
-    Pango => {
396  
-        file => {
397  
-            from => 'src/Pango/Pango.xs',
398  
-            to   => 'lib/SDL/Pango.xs',
399  
-        },
400  
-        libraries => [qw( SDL SDL_Pango )],
401  
-    },
402  
-    Context => {
403  
-        file => {
404  
-            from => 'src/Pango/objects/Context.xs',
405  
-            to   => 'lib/SDL/Pango/Context.xs',
406  
-        },
407  
-        libraries => [qw( SDL SDL_Pango )],
408  
-    },
  388
+	#	SMPEG => {
  389
+	#		file	=> {
  390
+	#			from => 'src/SMPEG.xs',
  391
+	#			to   =>	'lib/SDL/SMPEG.xs',
  392
+	#		},
  393
+	#		libraries => [qw( SDL smpeg)],
  394
+	#	},
  395
+	Pango => {
  396
+		file => {
  397
+			from => 'src/Pango/Pango.xs',
  398
+			to   => 'lib/SDL/Pango.xs',
  399
+		},
  400
+		libraries => [qw( SDL SDL_Pango )],
  401
+	},
  402
+	Context => {
  403
+		file => {
  404
+			from => 'src/Pango/objects/Context.xs',
  405
+			to   => 'lib/SDL/Pango/Context.xs',
  406
+		},
  407
+		libraries => [qw( SDL SDL_Pango )],
  408
+	},
409 409
 
410  
-    #	Net => {
411  
-    #		file      => {
412  
-    #			from  => 'src/Net/Net.xs',
413  
-    #			to    => 'lib/SDL/Net.xs',
414  
-    #		},
415  
-    #		libraries => [qw( SDL SDL_net )],
416  
-    #	},
417  
-    #	TCP => {
418  
-    #		file      => {
419  
-    #			from  => 'src/Net/TCP.xs',
420  
-    #			to    => 'lib/SDL/Net/TCP.xs',
421  
-    #		},
422  
-    #		libraries => [qw( SDL SDL_net )],
423  
-    #	},
424  
-    #	UDP => {
425  
-    #		file      => {
426  
-    #			from  => 'src/Net/UDP.xs',
427  
-    #			to    => 'lib/SDL/Net/UDP.xs',
428  
-    #		},
429  
-    #		libraries => [qw( SDL SDL_net )],
430  
-    #	},
431  
-    #	IPaddress => {
432  
-    #		file      => {
433  
-    #			from  => 'src/Net/objects/IPaddress.xs',
434  
-    #			to    => 'lib/SDL/Net/IPaddress.xs',
435  
-    #		},
436  
-    #		libraries => [qw( SDL SDL_net )],
437  
-    #	},
  410
+	#	Net => {
  411
+	#		file      => {
  412
+	#			from  => 'src/Net/Net.xs',
  413
+	#			to    => 'lib/SDL/Net.xs',
  414
+	#		},
  415
+	#		libraries => [qw( SDL SDL_net )],
  416
+	#	},
  417
+	#	TCP => {
  418
+	#		file      => {
  419
+	#			from  => 'src/Net/TCP.xs',
  420
+	#			to    => 'lib/SDL/Net/TCP.xs',
  421
+	#		},
  422
+	#		libraries => [qw( SDL SDL_net )],
  423
+	#	},
  424
+	#	UDP => {
  425
+	#		file      => {
  426
+	#			from  => 'src/Net/UDP.xs',
  427
+	#			to    => 'lib/SDL/Net/UDP.xs',
  428
+	#		},
  429
+	#		libraries => [qw( SDL SDL_net )],
  430
+	#	},
  431
+	#	IPaddress => {
  432
+	#		file      => {
  433
+	#			from  => 'src/Net/objects/IPaddress.xs',
  434
+	#			to    => 'lib/SDL/Net/IPaddress.xs',
  435
+	#		},
  436
+	#		libraries => [qw( SDL SDL_net )],
  437
+	#	},
438 438
 
439 439
 );
440 440
 
@@ -445,156 +445,156 @@ my %subsystems = (
445 445
 #                   could be a sigle value or an array of values
446 446
 #        <lib>    = value that will be used as -l<value> option when linking XS code
447 447
 my %libraries = (
448  
-    SDL => {
449  
-        define => 'HAVE_SDL',
450  
-        header => 'SDL.h',
451  
-        lib    => 'SDL',
452  
-    },
453  
-    SDL_image => {
454  
-        define => 'HAVE_SDL_IMAGE',
455  
-        header => 'SDL_image.h',
456  
-        lib    => 'SDL_image',
457  
-    },
458  
-    SDL_mixer => {
459  
-        define => 'HAVE_SDL_MIXER',
460  
-        header => 'SDL_mixer.h',
461  
-        lib    => 'SDL_mixer',
462  
-    },
  448
+	SDL => {
  449
+		define => 'HAVE_SDL',
  450
+		header => 'SDL.h',
  451
+		lib    => 'SDL',
  452
+	},
  453
+	SDL_image => {
  454
+		define => 'HAVE_SDL_IMAGE',
  455
+		header => 'SDL_image.h',
  456
+		lib    => 'SDL_image',
  457
+	},
  458
+	SDL_mixer => {
  459
+		define => 'HAVE_SDL_MIXER',
  460
+		header => 'SDL_mixer.h',
  461
+		lib    => 'SDL_mixer',
  462
+	},
463 463
 
464  
-    #	SDL_net     => {
465  
-    #		define => 'HAVE_SDL_NET',
466  
-    #		header => 'SDL_net.h',
467  
-    #		lib    => 'SDL_net',
468  
-    #	},
469  
-    SDL_ttf => {
470  
-        define => 'HAVE_SDL_TTF',
471  
-        header => 'SDL_ttf.h',
472  
-        lib    => 'SDL_ttf',
473  
-    },
474  
-    SDL_gfx => {
475  
-        define => 'HAVE_SDL_GFX',
476  
-        header => 'SDL_gfxPrimitives.h',
477  
-        lib    => 'SDL_gfx',
478  
-    },
479  
-    SDL_gfx_blitfunc => {
480  
-        define => 'HAVE_SDL_GFX_BLITFUNC',
481  
-        header => 'SDL_gfxBlitFunc.h',
482  
-        lib    => 'SDL_gfx',
483  
-    },
484  
-    SDL_gfx_framerate => {
485  
-        define => 'HAVE_SDL_GFX_FRAMERATE',
486  
-        header => 'SDL_framerate.h',
487  
-        lib    => 'SDL_gfx',
488  
-    },
489  
-    SDL_gfx_imagefilter => {
490  
-        define => 'HAVE_SDL_GFX_IMAGEFILTER',
491  
-        header => 'SDL_imageFilter.h',
492  
-        lib    => 'SDL_gfx',
493  
-    },
494  
-    SDL_gfx_primitives => {
495  
-        define => 'HAVE_SDL_GFX_PRIMITIVES',
496  
-        header => 'SDL_gfxPrimitives.h',
497  
-        lib    => 'SDL_gfx',
498  
-    },
499  
-    SDL_gfx_rotozoom => {
500  
-        define => 'HAVE_SDL_GFX_ROTOZOOM',
501  
-        header => 'SDL_rotozoom.h',
502  
-        lib    => 'SDL_gfx',
503  
-    },
504  
-    SDL_Pango => {
505  
-        define => 'HAVE_SDL_PANGO',
506  
-        header => 'SDL_Pango.h',
507  
-        lib    => 'SDL_Pango',
508  
-    },
509  
-    png => {
510  
-        define => 'HAVE_PNG',
511  
-        header => 'png.h',
512  
-        lib    => 'png',
513  
-    },
514  
-    jpeg => {
515  
-        define => 'HAVE_JPEG',
516  
-        header => 'jpeglib.h',
517  
-        lib    => 'jpeg',
518  
-    },
519  
-    tiff => {
520  
-        define => 'HAVE_TIFF',
521  
-        header => 'tiff.h',
522  
-        lib    => 'tiff',
523  
-    },
  464
+	#	SDL_net     => {
  465
+	#		define => 'HAVE_SDL_NET',
  466
+	#		header => 'SDL_net.h',
  467
+	#		lib    => 'SDL_net',
  468
+	#	},
  469
+	SDL_ttf => {
  470
+		define => 'HAVE_SDL_TTF',
  471
+		header => 'SDL_ttf.h',
  472
+		lib    => 'SDL_ttf',
  473
+	},
  474
+	SDL_gfx => {
  475
+		define => 'HAVE_SDL_GFX',
  476
+		header => 'SDL_gfxPrimitives.h',
  477
+		lib    => 'SDL_gfx',
  478
+	},
  479
+	SDL_gfx_blitfunc => {
  480
+		define => 'HAVE_SDL_GFX_BLITFUNC',
  481
+		header => 'SDL_gfxBlitFunc.h',
  482
+		lib    => 'SDL_gfx',
  483
+	},
  484
+	SDL_gfx_framerate => {
  485
+		define => 'HAVE_SDL_GFX_FRAMERATE',
  486
+		header => 'SDL_framerate.h',
  487
+		lib    => 'SDL_gfx',
  488
+	},
  489
+	SDL_gfx_imagefilter => {
  490
+		define => 'HAVE_SDL_GFX_IMAGEFILTER',
  491
+		header => 'SDL_imageFilter.h',
  492
+		lib    => 'SDL_gfx',
  493
+	},
  494
+	SDL_gfx_primitives => {
  495
+		define => 'HAVE_SDL_GFX_PRIMITIVES',
  496
+		header => 'SDL_gfxPrimitives.h',
  497
+		lib    => 'SDL_gfx',
  498
+	},
  499
+	SDL_gfx_rotozoom => {
  500
+		define => 'HAVE_SDL_GFX_ROTOZOOM',
  501
+		header => 'SDL_rotozoom.h',
  502
+		lib    => 'SDL_gfx',
  503
+	},
  504
+	SDL_Pango => {
  505
+		define => 'HAVE_SDL_PANGO',
  506
+		header => 'SDL_Pango.h',
  507
+		lib    => 'SDL_Pango',
  508
+	},
  509
+	png => {
  510
+		define => 'HAVE_PNG',
  511
+		header => 'png.h',
  512
+		lib    => 'png',
  513
+	},
  514
+	jpeg => {
  515
+		define => 'HAVE_JPEG',
  516
+		header => 'jpeglib.h',
  517
+		lib    => 'jpeg',
  518
+	},
  519
+	tiff => {
  520
+		define => 'HAVE_TIFF',
  521
+		header => 'tiff.h',
  522
+		lib    => 'tiff',
  523
+	},
524 524
 
525  
-    smpeg => {
526  
-        define => 'HAVE_SMPEG',
527  
-        header => 'smpeg/smpeg.h',
528  
-        lib    => 'smpeg',
529  
-    },
530  
-    GL => {
531  
-        define => 'HAVE_GL',
532  
-        header => [ 'GL/gl.h', 'GL/glext.h' ],
533  
-        lib    => ( $^O =~ /^(MSWin32|cygwin)$/ )
534  
-        ? 'opengl32'
535  
-        : 'GL',    # xxx not nice
536  
-    },
537  
-    GLU => {
538  
-        define => 'HAVE_GLU',
539  
-        header => 'GL/glu.h',
540  
-        lib => ( $^O =~ /^(MSWin32|cygwin)$/ ) ? 'glu32' : 'GLU', # xxx not nice
541  
-    },
  525
+	smpeg => {
  526
+		define => 'HAVE_SMPEG',
  527
+		header => 'smpeg/smpeg.h',
  528
+		lib    => 'smpeg',
  529
+	},
  530
+	GL => {
  531
+		define => 'HAVE_GL',
  532
+		header => [ 'GL/gl.h', 'GL/glext.h' ],
  533
+		lib    => ( $^O =~ /^(MSWin32|cygwin)$/ )
  534
+		? 'opengl32'
  535
+		: 'GL', # xxx not nice
  536
+	},
  537
+	GLU => {
  538
+		define => 'HAVE_GLU',
  539
+		header => 'GL/glu.h',
  540
+		lib    => ( $^O =~ /^(MSWin32|cygwin)$/ ) ? 'glu32' : 'GLU', # xxx not nice
  541
+	},
542 542
 );
543 543
 
544 544
 ### mangle the compilable files into a format Module::Build can understand
545 545
 my %xs =
546  
-  map { $subsystems{$_}{file}{from} => $subsystems{$_}{file}{to} }
547  
-  keys %subsystems;
  546
+	map { $subsystems{$_}{file}{from} => $subsystems{$_}{file}{to} }
  547
+	keys %subsystems;
548 548
 
549 549
 ### stadard Module::Build stuff
550 550
 my $build = $package->new(
551  
-    module_name        => 'SDL',
552  
-    dist_name          => 'SDL',
553  
-    license            => 'lgpl',
554  
-    dist_version_from  => 'lib/SDL.pm',
555  
-    configure_requires => {
556  
-        'ExtUtils::CBuilder' => '0.260301',
557  
-        'Alien::SDL'         => '1.413',
558  
-        'File::Find'         => '0',
559  
-        'File::ShareDir'     => '0',
560  
-        'Tie::Simple'        => '0',
561  
-        'IO::CaptureOutput'  => '0',
562  
-    },
563  
-    build_requires => {
564  
-        'Test::Simple'      => '0.88',
565  
-        'IO::CaptureOutput' => '0',
566  
-        'Test::Most'        => '0.21',
567  
-        'Alien::SDL'        => '1.413',
568  
-        'File::ShareDir'    => '0',
569  
-        'Tie::Simple'       => '0'
570  
-    },
571  
-    requires => { 
572  
-	'Tie::Simple' => '0',
573  
-	'CPAN'        => '1.92'
574  
-    },
  551
+	module_name        => 'SDL',
  552
+	dist_name          => 'SDL',
  553
+	license            => 'lgpl',
  554
+	dist_version_from  => 'lib/SDL.pm',
  555
+	configure_requires => {
  556
+		'ExtUtils::CBuilder' => '0.260301',
  557
+		'Alien::SDL'         => '1.413',
  558
+		'File::Find'         => '0',
  559
+		'File::ShareDir'     => '0',
  560
+		'Tie::Simple'        => '0',
  561
+		'IO::CaptureOutput'  => '0',
  562
+	},
  563
+	build_requires => {
  564
+		'Test::Simple'      => '0.88',
  565
+		'IO::CaptureOutput' => '0',
  566
+		'Test::Most'        => '0.21',
  567
+		'Alien::SDL'        => '1.413',
  568
+		'File::ShareDir'    => '0',
  569
+		'Tie::Simple'       => '0'
  570
+	},
  571
+	requires => {
  572
+		'Tie::Simple' => '0',
  573
+		'CPAN'        => '1.92'
  574
+	},
575 575
 
576  
-    build_recommends => {
577  
-        'Pod::ToDemo' => '0.20'
  576
+	build_recommends => {
  577
+		'Pod::ToDemo' => '0.20'
578 578
 
579  
-    },
580  
-    c_source => 'src',
581  
-    xs_files => \%xs,
582  
-    meta_add => {},
  579
+	},
  580
+	c_source => 'src',
  581
+	xs_files => \%xs,
  582
+	meta_add => {},
583 583
 
584  
-#create_readme => 1, ### make sense only if there is some POD doc in the file specified by dist_version_from
585  
-    meta_merge => {
586  
-        resources => {
587  
-            bugtracker => 'http://sdlperl.ath.cx/projects/SDLPerl',
588  
-            repository => 'http://github.com/PerlGameDev/SDL'
589  
-        }
590  
-    },
591  
-    dist_abstract => 'SDL bindings to Perl',
592  
-    dist_author   => 'Kartik Thakore <KTHAKORE@cpan.org>',
  584
+	#create_readme => 1, ### make sense only if there is some POD doc in the file specified by dist_version_from
  585
+	meta_merge => {
  586
+		resources => {
  587
+			bugtracker => 'http://sdlperl.ath.cx/projects/SDLPerl',
  588
+			repository => 'http://github.com/PerlGameDev/SDL'
  589
+		}
  590
+	},
  591
+	dist_abstract => 'SDL bindings to Perl',
  592
+	dist_author   => 'Kartik Thakore <KTHAKORE@cpan.org>',
593 593
 );
594 594
 
595 595
 ### Alien::SDL quick check
596 596
 warn "###WARNING### Alien::SDL seems to be broken"
597  
-  unless Alien::SDL->config('prefix');
  597
+	unless Alien::SDL->config('prefix');
598 598
 
599 599
 ### see which subsystems can be built -- do we have headers for them?
600 600
 print "Gonna autodetect available libraries ...\n";
@@ -619,7 +619,7 @@ $build->notes( 'libraries',     \%libraries );
619 619
 $build->notes( 'build_systems', $build_systems );
620 620
 $build->notes( 'sdl_cflags',    Alien::SDL->config('cflags') );
621 621
 $build->notes( 'sdl_libs',      Alien::SDL->config('libs') );
622  
-$build->set_file_flags();    # creates notes('file_flags')
  622
+$build->set_file_flags(); # creates notes('file_flags')
623 623
 
624 624
 =pod
625 625
 
10  examples/SDLx/SDLx_C_Object.pl
@@ -9,7 +9,7 @@
9 9
 use SDLx::Controller::Object;
10 10
 my $app = SDLx::App->new( w => 200, h => 200, title => "timestep" );
11 11
 
12  
-#The initial x and y for this object. 
  12
+#The initial x and y for this object.
13 13
 my $spring = SDLx::Controller::Object->new( x => 100, y => 100 );
14 14
 
15 15
 #we have a constant x velocity of 20
@@ -24,7 +24,7 @@
24 24
 	my $k  = 10;
25 25
 	my $b  = 1;
26 26
 	my $ax = ( ( -1 * $k ) * ( $state->x ) - $b * $state->v_x );
27  
-	
  27
+
28 28
 	return ( $ax, 0, 0 );
29 29
 };
30 30
 $spring->set_acceleration($accel);
@@ -45,7 +45,7 @@
45 45
 $app->add_event_handler($event);
46 46
 
47 47
 #clear the screen
48  
-$app->add_show_handler( sub{ $app->draw_rect([0,0,$app->w, $app->h], 0x000000)} );
  48
+$app->add_show_handler( sub { $app->draw_rect( [ 0, 0, $app->w, $app->h ], 0x000000 ) } );
49 49
 
50 50
 #add the spring
51 51
 $app->add_object( $spring, $render );
@@ -55,12 +55,12 @@
55 55
 	$constant,
56 56
 	sub {
57 57
 		my $state = shift;
58  
-		$app->draw_rect( [ $state->x, $state->y, 4,       4 ],       0xFFFFFF );
  58
+		$app->draw_rect( [ $state->x, $state->y, 4, 4 ], 0xFFFFFF );
59 59
 	}
60 60
 );
61 61
 
62 62
 #add the final update
63  
-$app->add_show_handler( sub{ $app->update() } );
  63
+$app->add_show_handler( sub { $app->update() } );
64 64
 
65 65
 $app->run_test();
66 66
 
194  examples/SDLx/SDLx_LayerManager_Chess.pl
@@ -20,116 +20,120 @@
20 20
 use SDLx::FPS;
21 21
 
22 22
 SDL::init(SDL_INIT_VIDEO);
23  
-my $display         = SDL::Video::set_video_mode(800, 600, 32, SDL_HWSURFACE | SDL_HWACCEL);
  23
+my $display         = SDL::Video::set_video_mode( 800, 600, 32, SDL_HWSURFACE | SDL_HWACCEL );
24 24
 my $layers          = SDLx::LayerManager->new();
25 25
 my $event           = SDL::Event->new();
26 26
 my $loop            = 1;
27 27
 my $last_click      = Time::HiRes::time;
28  
-my $fps             = SDLx::FPS->new(fps => 60);
  28
+my $fps             = SDLx::FPS->new( fps => 60 );
29 29
 my @selected_cards  = ();
30 30
 my $left_mouse_down = 0;
31 31
 my @rects           = ();
32 32
 
33 33
 init_surfaces();
34 34
 $layers->blit($display);
35  
-SDL::Video::update_rect($display, 0, 0, 0, 0);
  35
+SDL::Video::update_rect( $display, 0, 0, 0, 0 );
36 36
 game();
37 37
 
38  
-sub event_loop
39  
-{
40  
-    my $handler = shift;
41  
-    
42  
-    SDL::Events::pump_events();
43  
-    while(SDL::Events::poll_event($event))
44  
-    {
45  
-        $left_mouse_down = 1            if $event->type == SDL_MOUSEBUTTONDOWN && $event->button_button == SDL_BUTTON_LEFT;
46  
-        $left_mouse_down = 0            if $event->type == SDL_MOUSEBUTTONUP   && $event->button_button == SDL_BUTTON_LEFT;
47  
-    
48  
-        $handler->{on_quit}->()         if defined $handler->{on_quit}      && ($event->type == SDL_QUIT || ($event->type == SDL_KEYDOWN && $event->key_sym == SDLK_ESCAPE));
49  
-        $handler->{on_drop}->()         if defined $handler->{on_drop}      && $event->type == SDL_MOUSEBUTTONUP;
50  
-        $handler->{on_click}->()        if defined $handler->{on_click}     && $event->type == SDL_MOUSEBUTTONDOWN && Time::HiRes::time - $last_click >= 0.3;
51  
-        
52  
-        $last_click = Time::HiRes::time if $event->type == SDL_MOUSEBUTTONDOWN;
53  
-    }
  38
+sub event_loop {
  39
+	my $handler = shift;
  40
+
  41
+	SDL::Events::pump_events();
  42
+	while ( SDL::Events::poll_event($event) ) {
  43
+		$left_mouse_down = 1 if $event->type == SDL_MOUSEBUTTONDOWN && $event->button_button == SDL_BUTTON_LEFT;
  44
+		$left_mouse_down = 0 if $event->type == SDL_MOUSEBUTTONUP   && $event->button_button == SDL_BUTTON_LEFT;
  45
+
  46
+		$handler->{on_quit}->()
  47
+			if defined $handler->{on_quit}
  48
+				&& ( $event->type == SDL_QUIT || ( $event->type == SDL_KEYDOWN && $event->key_sym == SDLK_ESCAPE ) );
  49
+		$handler->{on_drop}->() if defined $handler->{on_drop} && $event->type == SDL_MOUSEBUTTONUP;
  50
+		$handler->{on_click}->()
  51
+			if defined $handler->{on_click}
  52
+				&& $event->type == SDL_MOUSEBUTTONDOWN
  53
+				&& Time::HiRes::time- $last_click >= 0.3;
  54
+
  55
+		$last_click = Time::HiRes::time if $event->type == SDL_MOUSEBUTTONDOWN;
  56
+	}
54 57
 }
55 58
 
56  
-sub game
57  
-{
58  
-    my @selected_cards = ();
59  
-    my $x = 0;
60  
-    my $y = 0;
61  
-    my $handler = {
62  
-        on_quit    => sub {
63  
-            $loop = 0;
64