summaryrefslogtreecommitdiff
path: root/docs/html/class_keyboard_handler.html
blob: 97b08177618e1d72b4900abf09c68077f1f3fe6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Rally X: KeyboardHandler Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="car.PNG"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Rally X
   
   </div>
   <div id="projectbrief">ELEN3009 Project by Justin Wernick and David Schneider</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#pri-static-attribs">Static Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">KeyboardHandler Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="KeyboardHandler" -->
<p>Class for handling keyboard related game inputs from the player.  
 <a href="class_keyboard_handler.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>&gt;</code></p>

<p><a href="class_keyboard_handler-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#acd0d5781016f792207464bb720d2f994">KeyboardHandler</a> (<a class="el" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f">Maze::Direction</a> currentFacing)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="class_keyboard_handler.html" title="Class for handling keyboard related game inputs from the player.">KeyboardHandler</a> with a given initial state.  <a href="#acd0d5781016f792207464bb720d2f994"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#a8942a24f122f96b2b5d7c91f1c6ff332">KeyboardHandler</a> (const <a class="el" href="class_keyboard_handler.html">KeyboardHandler</a> &amp;ref)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor that ensures that a copy of a <a class="el" href="class_keyboard_handler.html" title="Class for handling keyboard related game inputs from the player.">KeyboardHandler</a> will have its own event queue.  <a href="#a8942a24f122f96b2b5d7c91f1c6ff332"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_keyboard_handler.html">KeyboardHandler</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#a5135c450b82394496457a0a51d5240f5">operator=</a> (const <a class="el" href="class_keyboard_handler.html">KeyboardHandler</a> &amp;rhs)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator that ensures that an assigned <a class="el" href="class_keyboard_handler.html" title="Class for handling keyboard related game inputs from the player.">KeyboardHandler</a> will have its own event queue.  <a href="#a5135c450b82394496457a0a51d5240f5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#ab090fe5afdee856604b0aa0d9eb918a4">~KeyboardHandler</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Cleans up the keyboard event queue.  <a href="#ab090fe5afdee856604b0aa0d9eb918a4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f">Maze::Direction</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#ae17ed4bf0abae7d95f9b772a6d704a70">getFacing</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gives the last direction that the player entered on the keyboard.  <a href="#ae17ed4bf0abae7d95f9b772a6d704a70"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#ab66797a37a1c54a630187519870d9a5b">getSmokescreen</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gives whether or not the key for creating a <a class="el" href="class_smokescreen.html" title="GameObject that causes the EnemyCar to be delayed if they crash into it.">Smokescreen</a> is currently pressed.  <a href="#ab66797a37a1c54a630187519870d9a5b"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#a9f53a546420f3d02363c9e1e4e346420">updateFlags</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Processes all pending keyboard inputs, and updates flags as appropriate.  <a href="#a9f53a546420f3d02363c9e1e4e346420"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_allegro_keyboard_init.html">AllegroKeyboardInit</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#a0ec33ec0de48e563e9137294fb7577da">_keyboard</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Ensures that dependencies on the Allegro keyboard library are installed.  <a href="#a0ec33ec0de48e563e9137294fb7577da"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#ad323844aad47f1bc263ec2fd4a19ac3a">_up</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">True if the up arrow key is depressed.  <a href="#ad323844aad47f1bc263ec2fd4a19ac3a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#aa6d1c75e1a98d4aae96d8ac1c8aaa539">_down</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">True if the down arrow key is depressed.  <a href="#aa6d1c75e1a98d4aae96d8ac1c8aaa539"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#a3bc780470d7cbaf9f4ea239e0613ce3c">_left</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">True if the left arrow key is depressed.  <a href="#a3bc780470d7cbaf9f4ea239e0613ce3c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#a81d37831d958ff21c2ce08cfa97ca420">_right</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">True if the right arrow key is depressed.  <a href="#a81d37831d958ff21c2ce08cfa97ca420"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#a7769dc815c493fb5962d52c3d5bc7b16">_smokescreen</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">True if the smokescreen key is depressed.  <a href="#a7769dc815c493fb5962d52c3d5bc7b16"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f">Maze::Direction</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#a90120a85c62481b3a2c0330511cffbac">_previousFacing</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The direction that was returned on the last call of getFacing.  <a href="#a90120a85c62481b3a2c0330511cffbac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ALLEGRO_EVENT_QUEUE *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#a44116ed8745f3a3360e1d7c29ea86d56">_keyboardEvents</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Queue for all keyboard events.  <a href="#a44116ed8745f3a3360e1d7c29ea86d56"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-static-attribs"></a>
Static Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#a3ed342ff89f15b752a9957fd435e9094">UP_KEY</a> = ALLEGRO_KEY_UP</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Key that must be pressed to turn up.  <a href="#a3ed342ff89f15b752a9957fd435e9094"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#a3d8d985fdc3c3ac543e84647967f78e4">DOWN_KEY</a> = ALLEGRO_KEY_DOWN</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Key that must be pressed to turn down.  <a href="#a3d8d985fdc3c3ac543e84647967f78e4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#ab285a229f4f5c7c1be5504fdb629e10a">LEFT_KEY</a> = ALLEGRO_KEY_LEFT</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Key that must be pressed to turn left.  <a href="#ab285a229f4f5c7c1be5504fdb629e10a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#a0822e8b6338b01cb09d08589d778af86">RIGHT_KEY</a> = ALLEGRO_KEY_RIGHT</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Key that must be pressed to turn right.  <a href="#a0822e8b6338b01cb09d08589d778af86"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html#a2de5780311975180c0b78e7b0457eae1">SMOKESCREEN_KEY</a> = ALLEGRO_KEY_SPACE</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Key that must be pressed to create a smokescreen.  <a href="#a2de5780311975180c0b78e7b0457eae1"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Class for handling keyboard related game inputs from the player. </p>
<p>Written with controlling a <a class="el" href="class_player_car.html" title="A GameObject that is controlled by the player.">PlayerCar</a> in mind. The handler keeps track of the last direction pushed and responds to requests from the <a class="el" href="class_player_car.html" title="A GameObject that is controlled by the player.">PlayerCar</a> for which direction it should face next, and whether the player is pressing the <a class="el" href="class_smokescreen.html" title="GameObject that causes the EnemyCar to be delayed if they crash into it.">Smokescreen</a> button.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Justin Wernick </dd>
<dd>
David Schneider </dd></dl>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00019">19</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="acd0d5781016f792207464bb720d2f994"></a><!-- doxytag: member="KeyboardHandler::KeyboardHandler" ref="acd0d5781016f792207464bb720d2f994" args="(Maze::Direction currentFacing)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KeyboardHandler::KeyboardHandler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f">Maze::Direction</a>&#160;</td>
          <td class="paramname"><em>currentFacing</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a <a class="el" href="class_keyboard_handler.html" title="Class for handling keyboard related game inputs from the player.">KeyboardHandler</a> with a given initial state. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">currentFacing</td><td>The initial value for the previous facing of the object being controlled. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_keyboard_handler_8cpp_source.html#l00003">3</a> of file <a class="el" href="_keyboard_handler_8cpp_source.html">KeyboardHandler.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a8942a24f122f96b2b5d7c91f1c6ff332"></a><!-- doxytag: member="KeyboardHandler::KeyboardHandler" ref="a8942a24f122f96b2b5d7c91f1c6ff332" args="(const KeyboardHandler &amp;ref)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KeyboardHandler::KeyboardHandler </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_keyboard_handler.html">KeyboardHandler</a> &amp;&#160;</td>
          <td class="paramname"><em>ref</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copy constructor that ensures that a copy of a <a class="el" href="class_keyboard_handler.html" title="Class for handling keyboard related game inputs from the player.">KeyboardHandler</a> will have its own event queue. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8cpp_source.html#l00015">15</a> of file <a class="el" href="_keyboard_handler_8cpp_source.html">KeyboardHandler.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ab090fe5afdee856604b0aa0d9eb918a4"></a><!-- doxytag: member="KeyboardHandler::~KeyboardHandler" ref="ab090fe5afdee856604b0aa0d9eb918a4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KeyboardHandler::~KeyboardHandler </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Cleans up the keyboard event queue. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8cpp_source.html#l00044">44</a> of file <a class="el" href="_keyboard_handler_8cpp_source.html">KeyboardHandler.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ae17ed4bf0abae7d95f9b772a6d704a70"></a><!-- doxytag: member="KeyboardHandler::getFacing" ref="ae17ed4bf0abae7d95f9b772a6d704a70" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f">Maze::Direction</a> KeyboardHandler::getFacing </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gives the last direction that the player entered on the keyboard. </p>
<p>All pending keyboard events are processed, then a key out of those currently depressed is returned. The precendence for keys held down (up, down, left, then right) is arbitrary, since the player should not be holding down more than one arrow key at a time. If no keys are currently depressed, the value returned on the last call is returned again.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The direction that the player has chosen through pressing arrow keys. </dd></dl>

<p>Definition at line <a class="el" href="_keyboard_handler_8cpp_source.html#l00099">99</a> of file <a class="el" href="_keyboard_handler_8cpp_source.html">KeyboardHandler.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ab66797a37a1c54a630187519870d9a5b"></a><!-- doxytag: member="KeyboardHandler::getSmokescreen" ref="ab66797a37a1c54a630187519870d9a5b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KeyboardHandler::getSmokescreen </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gives whether or not the key for creating a <a class="el" href="class_smokescreen.html" title="GameObject that causes the EnemyCar to be delayed if they crash into it.">Smokescreen</a> is currently pressed. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if a <a class="el" href="class_smokescreen.html" title="GameObject that causes the EnemyCar to be delayed if they crash into it.">Smokescreen</a> should be created. </dd></dl>

<p>Definition at line <a class="el" href="_keyboard_handler_8cpp_source.html#l00111">111</a> of file <a class="el" href="_keyboard_handler_8cpp_source.html">KeyboardHandler.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a5135c450b82394496457a0a51d5240f5"></a><!-- doxytag: member="KeyboardHandler::operator=" ref="a5135c450b82394496457a0a51d5240f5" args="(const KeyboardHandler &amp;rhs)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_keyboard_handler.html">KeyboardHandler</a> &amp; KeyboardHandler::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_keyboard_handler.html">KeyboardHandler</a> &amp;&#160;</td>
          <td class="paramname"><em>rhs</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Assignment operator that ensures that an assigned <a class="el" href="class_keyboard_handler.html" title="Class for handling keyboard related game inputs from the player.">KeyboardHandler</a> will have its own event queue. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8cpp_source.html#l00027">27</a> of file <a class="el" href="_keyboard_handler_8cpp_source.html">KeyboardHandler.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a9f53a546420f3d02363c9e1e4e346420"></a><!-- doxytag: member="KeyboardHandler::updateFlags" ref="a9f53a546420f3d02363c9e1e4e346420" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KeyboardHandler::updateFlags </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Processes all pending keyboard inputs, and updates flags as appropriate. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8cpp_source.html#l00049">49</a> of file <a class="el" href="_keyboard_handler_8cpp_source.html">KeyboardHandler.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="aa6d1c75e1a98d4aae96d8ac1c8aaa539"></a><!-- doxytag: member="KeyboardHandler::_down" ref="aa6d1c75e1a98d4aae96d8ac1c8aaa539" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_keyboard_handler.html#aa6d1c75e1a98d4aae96d8ac1c8aaa539">KeyboardHandler::_down</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>True if the down arrow key is depressed. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00069">69</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0ec33ec0de48e563e9137294fb7577da"></a><!-- doxytag: member="KeyboardHandler::_keyboard" ref="a0ec33ec0de48e563e9137294fb7577da" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_allegro_keyboard_init.html">AllegroKeyboardInit</a> <a class="el" href="class_keyboard_handler.html#a0ec33ec0de48e563e9137294fb7577da">KeyboardHandler::_keyboard</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Ensures that dependencies on the Allegro keyboard library are installed. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00061">61</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>

</div>
</div>
<a class="anchor" id="a44116ed8745f3a3360e1d7c29ea86d56"></a><!-- doxytag: member="KeyboardHandler::_keyboardEvents" ref="a44116ed8745f3a3360e1d7c29ea86d56" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ALLEGRO_EVENT_QUEUE* <a class="el" href="class_keyboard_handler.html#a44116ed8745f3a3360e1d7c29ea86d56">KeyboardHandler::_keyboardEvents</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Queue for all keyboard events. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00074">74</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>

</div>
</div>
<a class="anchor" id="a3bc780470d7cbaf9f4ea239e0613ce3c"></a><!-- doxytag: member="KeyboardHandler::_left" ref="a3bc780470d7cbaf9f4ea239e0613ce3c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_keyboard_handler.html#a3bc780470d7cbaf9f4ea239e0613ce3c">KeyboardHandler::_left</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>True if the left arrow key is depressed. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00070">70</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>

</div>
</div>
<a class="anchor" id="a90120a85c62481b3a2c0330511cffbac"></a><!-- doxytag: member="KeyboardHandler::_previousFacing" ref="a90120a85c62481b3a2c0330511cffbac" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f">Maze::Direction</a> <a class="el" href="class_keyboard_handler.html#a90120a85c62481b3a2c0330511cffbac">KeyboardHandler::_previousFacing</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The direction that was returned on the last call of getFacing. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00073">73</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>

</div>
</div>
<a class="anchor" id="a81d37831d958ff21c2ce08cfa97ca420"></a><!-- doxytag: member="KeyboardHandler::_right" ref="a81d37831d958ff21c2ce08cfa97ca420" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_keyboard_handler.html#a81d37831d958ff21c2ce08cfa97ca420">KeyboardHandler::_right</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>True if the right arrow key is depressed. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00071">71</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7769dc815c493fb5962d52c3d5bc7b16"></a><!-- doxytag: member="KeyboardHandler::_smokescreen" ref="a7769dc815c493fb5962d52c3d5bc7b16" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_keyboard_handler.html#a7769dc815c493fb5962d52c3d5bc7b16">KeyboardHandler::_smokescreen</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>True if the smokescreen key is depressed. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00072">72</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>

</div>
</div>
<a class="anchor" id="ad323844aad47f1bc263ec2fd4a19ac3a"></a><!-- doxytag: member="KeyboardHandler::_up" ref="ad323844aad47f1bc263ec2fd4a19ac3a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_keyboard_handler.html#ad323844aad47f1bc263ec2fd4a19ac3a">KeyboardHandler::_up</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>True if the up arrow key is depressed. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00068">68</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>

</div>
</div>
<a class="anchor" id="a3d8d985fdc3c3ac543e84647967f78e4"></a><!-- doxytag: member="KeyboardHandler::DOWN_KEY" ref="a3d8d985fdc3c3ac543e84647967f78e4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int <a class="el" href="class_keyboard_handler.html#a3d8d985fdc3c3ac543e84647967f78e4">KeyboardHandler::DOWN_KEY</a> = ALLEGRO_KEY_DOWN<code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Key that must be pressed to turn down. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00077">77</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab285a229f4f5c7c1be5504fdb629e10a"></a><!-- doxytag: member="KeyboardHandler::LEFT_KEY" ref="ab285a229f4f5c7c1be5504fdb629e10a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int <a class="el" href="class_keyboard_handler.html#ab285a229f4f5c7c1be5504fdb629e10a">KeyboardHandler::LEFT_KEY</a> = ALLEGRO_KEY_LEFT<code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Key that must be pressed to turn left. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00078">78</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0822e8b6338b01cb09d08589d778af86"></a><!-- doxytag: member="KeyboardHandler::RIGHT_KEY" ref="a0822e8b6338b01cb09d08589d778af86" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int <a class="el" href="class_keyboard_handler.html#a0822e8b6338b01cb09d08589d778af86">KeyboardHandler::RIGHT_KEY</a> = ALLEGRO_KEY_RIGHT<code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Key that must be pressed to turn right. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00079">79</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>

</div>
</div>
<a class="anchor" id="a2de5780311975180c0b78e7b0457eae1"></a><!-- doxytag: member="KeyboardHandler::SMOKESCREEN_KEY" ref="a2de5780311975180c0b78e7b0457eae1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int <a class="el" href="class_keyboard_handler.html#a2de5780311975180c0b78e7b0457eae1">KeyboardHandler::SMOKESCREEN_KEY</a> = ALLEGRO_KEY_SPACE<code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Key that must be pressed to create a smokescreen. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00080">80</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>

</div>
</div>
<a class="anchor" id="a3ed342ff89f15b752a9957fd435e9094"></a><!-- doxytag: member="KeyboardHandler::UP_KEY" ref="a3ed342ff89f15b752a9957fd435e9094" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int <a class="el" href="class_keyboard_handler.html#a3ed342ff89f15b752a9957fd435e9094">KeyboardHandler::UP_KEY</a> = ALLEGRO_KEY_UP<code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Key that must be pressed to turn up. </p>

<p>Definition at line <a class="el" href="_keyboard_handler_8h_source.html#l00076">76</a> of file <a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>source/presentation/<a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a></li>
<li>source/presentation/<a class="el" href="_keyboard_handler_8cpp_source.html">KeyboardHandler.cpp</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Wed Oct 5 2011 20:08:31 for Rally X by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>