summaryrefslogtreecommitdiff
path: root/docs/html/class_screen.html
blob: 581ce340e53b139f1dbf52f7c36b1c1384fff769 (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
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
<!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: Screen 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>  </div>
  <div class="headertitle">
<div class="title">Screen Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Screen" -->
<p>Class for creating a window on the screen.  
 <a href="class_screen.html#details">More...</a></p>

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

<p><a href="class_screen-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_screen.html#aa430a980cb3dcca13c837f70bf801511">Screen</a> (unsigned int screenWidth, unsigned int screenHeight, bool fullscreen)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="class_screen.html" title="Class for creating a window on the screen.">Screen</a> with the given width and height in pixels, and the given fullscreen setting.  <a href="#aa430a980cb3dcca13c837f70bf801511"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#a4243bc17596af96415b09ac48205676d">~Screen</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor to ensure that the display and any ScreenPanels are destroyed properly.  <a href="#a4243bc17596af96415b09ac48205676d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#a45d06e513491e40f76013fb670c6c6cc">getLevel</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Presents the player with a file dialog, requesting a level file to be selected.  <a href="#a45d06e513491e40f76013fb670c6c6cc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#aec3c5c20e14d6ef033c8a6a559a84872">draw</a> (const <a class="el" href="class_maze.html">Maze</a> &amp;maze, const list&lt; <a class="el" href="class_player_car.html">PlayerCar</a> &gt; &amp;players, const list&lt; <a class="el" href="class_enemy_car.html">EnemyCar</a> &gt; &amp;enemies, const list&lt; <a class="el" href="class_checkpoint.html">Checkpoint</a> &gt; &amp;checkpoints, const list&lt; <a class="el" href="class_rock.html">Rock</a> &gt; &amp;rocks, const list&lt; <a class="el" href="class_smokescreen.html">Smokescreen</a> &gt; &amp;smokescreens, const list&lt; <a class="el" href="class_destroyed_object_popup.html">DestroyedObjectPopup</a> &gt; &amp;popups)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws the given objects on the screen.  <a href="#aec3c5c20e14d6ef033c8a6a559a84872"></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_screen.html#acca34443ba0ad97922069658d688ea9a">exitClicked</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to find if the player has chosen to exit the game.  <a href="#acca34443ba0ad97922069658d688ea9a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#ad4c1281e4d59eb89377dd87bba8a310e">drawWin</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a splash screen when the level has been won.  <a href="#ad4c1281e4d59eb89377dd87bba8a310e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#aab9ab8447df2b526985970d2ac80c919">drawLoss</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a splash screen when the level has been lost.  <a href="#aab9ab8447df2b526985970d2ac80c919"></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">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#af46d7f95b577627f99af02f241026f4c">Screen</a> (const <a class="el" href="class_screen.html">Screen</a> &amp;ref)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Unimplemented copy constructor, prevents copying of <a class="el" href="class_screen.html" title="Class for creating a window on the screen.">Screen</a> objects.  <a href="#af46d7f95b577627f99af02f241026f4c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_screen.html">Screen</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#a0e36165c330af54d9786b2c6dadbadb5">operator=</a> (const <a class="el" href="class_screen.html">Screen</a> &amp;rhs)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Unimplemented assignment operator.  <a href="#a0e36165c330af54d9786b2c6dadbadb5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#abd12bddd241c8d214d2423804fe20ffb">flip</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Flips the display's buffers, as well as those for all of the ScreenPanels.  <a href="#abd12bddd241c8d214d2423804fe20ffb"></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_screen.html#a6480d57328a39c579f312774b5fbf571">resolutionSupported</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks the current resolution (_screenWidth and _screenHeight) against the screen's supported resolutions.  <a href="#a6480d57328a39c579f312774b5fbf571"></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_init.html">AllegroInit</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#ae0863416022fcb59189d2aefd3345621">_allegro</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Ensures that Allegro has been installed, for event queues and creating the display.  <a href="#ae0863416022fcb59189d2aefd3345621"></a><br/></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_screen.html#a0c5cff1b93dae4d559a81d261a8bcee6">_keyboard</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Ensures that the keyboard has been installed, for checking for the ESC key.  <a href="#a0c5cff1b93dae4d559a81d261a8bcee6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_allegro_drawing_init.html">AllegroDrawingInit</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#a2dafde8aecbd3bc3c4394f36df913b64">_drawing</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Ensures that drawing operations have been installed, for drawing splash screens.  <a href="#a2dafde8aecbd3bc3c4394f36df913b64"></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_screen.html#ae7f213f79bf9680e0ff3f4b52ebf051f">_exitClicked</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set to true when the user chooses to quit the game.  <a href="#ae7f213f79bf9680e0ff3f4b52ebf051f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#a5931238a3eb8cf1a14b0f8b8d7044b65">_screenWidth</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Horizontal number of pixels per row on the screen.  <a href="#a5931238a3eb8cf1a14b0f8b8d7044b65"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#a8784c86e10d2b6af0dd99d710f3955e9">_screenHeight</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Vertical number of pixels per column on the screen.  <a href="#a8784c86e10d2b6af0dd99d710f3955e9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#a7cba9fb0069d763055ef351452a15227">_gameAreaWidth</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Width of the <a class="el" href="class_game_panel.html" title="ScreenPanel to be drawn on the screen to draw the area where the game takes place.">GamePanel</a> created.  <a href="#a7cba9fb0069d763055ef351452a15227"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#ab895e588a89e1943303487d47a2b9216">_infoPanelWidth</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Width of the <a class="el" href="class_info_panel.html" title="ScreenPanel to be drawn on the screen to give the player information.">InfoPanel</a> created. The <a class="el" href="class_info_panel.html" title="ScreenPanel to be drawn on the screen to give the player information.">InfoPanel</a> is placed directly to the right of the <a class="el" href="class_game_panel.html" title="ScreenPanel to be drawn on the screen to draw the area where the game takes place.">GamePanel</a>.  <a href="#ab895e588a89e1943303487d47a2b9216"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ALLEGRO_DISPLAY *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#a4972e24cf3677e51b18feac34a563ba0">_display</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The window created on the player's monitor to see the game.  <a href="#a4972e24cf3677e51b18feac34a563ba0"></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_screen.html#aa4ea622368bdf47a3b22d026048ee83a">_windowEvents</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Events caught by the screen, checked for an exit command.  <a href="#aa4ea622368bdf47a3b22d026048ee83a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ALLEGRO_FONT *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#a42a627863a8f9d1529278cb060d4102b">_font</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Font used in drawing splash screens.  <a href="#a42a627863a8f9d1529278cb060d4102b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">vector&lt; <a class="el" href="class_screen_panel.html">ScreenPanel</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_screen.html#a30ba66122613181e312e0d7586d2a814">_panels</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Polymorphic container used to encapsulate the different types of drawing to the screen.  <a href="#a30ba66122613181e312e0d7586d2a814"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Class for creating a window on the screen. </p>
<p>Anything involving drawing on the screen is the responsibility of this class. Most of these responsibilities are outsourced through creating ScreenPanels with more specialised tasks, such as drawing specifically the area where the gameplay takes place (<a class="el" href="class_game_panel.html" title="ScreenPanel to be drawn on the screen to draw the area where the game takes place.">GamePanel</a>) or the providing the player with information (<a class="el" href="class_info_panel.html" title="ScreenPanel to be drawn on the screen to give the player information.">InfoPanel</a>).</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="_screen_8h_source.html#l00044">44</a> of file <a class="el" href="_screen_8h_source.html">Screen.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa430a980cb3dcca13c837f70bf801511"></a><!-- doxytag: member="Screen::Screen" ref="aa430a980cb3dcca13c837f70bf801511" args="(unsigned int screenWidth, unsigned int screenHeight, bool fullscreen)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Screen::Screen </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>screenWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>screenHeight</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>fullscreen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a <a class="el" href="class_screen.html" title="Class for creating a window on the screen.">Screen</a> with the given width and height in pixels, and the given fullscreen setting. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">screenWidth</td><td>The width of the display that will be created in pixels. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">screenHeight</td><td>The height of the display that will be created in pixels. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fullscreen</td><td>True if the game should be in fullscreen mode. False otherwise. </td></tr>
  </table>
  </dd>
</dl>

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

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

<p>Destructor to ensure that the display and any ScreenPanels are destroyed properly. </p>

<p>Definition at line <a class="el" href="_screen_8cpp_source.html#l00052">52</a> of file <a class="el" href="_screen_8cpp_source.html">Screen.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="af46d7f95b577627f99af02f241026f4c"></a><!-- doxytag: member="Screen::Screen" ref="af46d7f95b577627f99af02f241026f4c" args="(const Screen &amp;ref)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Screen::Screen </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_screen.html">Screen</a> &amp;&#160;</td>
          <td class="paramname"><em>ref</em></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Unimplemented copy constructor, prevents copying of <a class="el" href="class_screen.html" title="Class for creating a window on the screen.">Screen</a> objects. </p>
<p>Copying a <a class="el" href="class_screen.html" title="Class for creating a window on the screen.">Screen</a> is unneccesary as there should only be a single <a class="el" href="class_screen.html" title="Class for creating a window on the screen.">Screen</a> object. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aec3c5c20e14d6ef033c8a6a559a84872"></a><!-- doxytag: member="Screen::draw" ref="aec3c5c20e14d6ef033c8a6a559a84872" args="(const Maze &amp;maze, const list&lt; PlayerCar &gt; &amp;players, const list&lt; EnemyCar &gt; &amp;enemies, const list&lt; Checkpoint &gt; &amp;checkpoints, const list&lt; Rock &gt; &amp;rocks, const list&lt; Smokescreen &gt; &amp;smokescreens, const list&lt; DestroyedObjectPopup &gt; &amp;popups)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Screen::draw </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_maze.html">Maze</a> &amp;&#160;</td>
          <td class="paramname"><em>maze</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const list&lt; <a class="el" href="class_player_car.html">PlayerCar</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>players</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const list&lt; <a class="el" href="class_enemy_car.html">EnemyCar</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>enemies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const list&lt; <a class="el" href="class_checkpoint.html">Checkpoint</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>checkpoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const list&lt; <a class="el" href="class_rock.html">Rock</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>rocks</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const list&lt; <a class="el" href="class_smokescreen.html">Smokescreen</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>smokescreens</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const list&lt; <a class="el" href="class_destroyed_object_popup.html">DestroyedObjectPopup</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>popups</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Draws the given objects on the screen. </p>
<p>The objects are passed to each of the ScreenPanels in turn, and then the buffers are flipped.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">maze</td><td>The <a class="el" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a> that all of the objects are in. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">players</td><td>The list of PlayerCars to be drawn. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">enemies</td><td>The list of EnemyCars to be drawn. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">checkpoints</td><td>The list of Checkpoints to be drawn. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rocks</td><td>The list of Rocks to be drawn. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">smokescreens</td><td>The list of Smokescreens to be drawn. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">popups</td><td>The list of DestroyedObjectPopups to be drawn. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_screen_8cpp_source.html#l00083">83</a> of file <a class="el" href="_screen_8cpp_source.html">Screen.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aab9ab8447df2b526985970d2ac80c919"></a><!-- doxytag: member="Screen::drawLoss" ref="aab9ab8447df2b526985970d2ac80c919" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Screen::drawLoss </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Draws a splash screen when the level has been lost. </p>

<p>Definition at line <a class="el" href="_screen_8cpp_source.html#l00114">114</a> of file <a class="el" href="_screen_8cpp_source.html">Screen.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ad4c1281e4d59eb89377dd87bba8a310e"></a><!-- doxytag: member="Screen::drawWin" ref="ad4c1281e4d59eb89377dd87bba8a310e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Screen::drawWin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Draws a splash screen when the level has been won. </p>

<p>Definition at line <a class="el" href="_screen_8cpp_source.html#l00101">101</a> of file <a class="el" href="_screen_8cpp_source.html">Screen.cpp</a>.</p>

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

<p>Function to find if the player has chosen to exit the game. </p>
<p>The game can be exited by clicking the x in the corner of the window, pressing the ESC key during the game, or by clicking 'cancel' on the file selection dialog.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if the game should be quit. </dd></dl>

<p>Definition at line <a class="el" href="_screen_8cpp_source.html#l00127">127</a> of file <a class="el" href="_screen_8cpp_source.html">Screen.cpp</a>.</p>

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

<p>Flips the display's buffers, as well as those for all of the ScreenPanels. </p>

<p>Definition at line <a class="el" href="_screen_8cpp_source.html#l00092">92</a> of file <a class="el" href="_screen_8cpp_source.html">Screen.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a45d06e513491e40f76013fb670c6c6cc"></a><!-- doxytag: member="Screen::getLevel" ref="a45d06e513491e40f76013fb670c6c6cc" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string Screen::getLevel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Presents the player with a file dialog, requesting a level file to be selected. </p>
<p>If the cancel button is clicked, and empty string is returned and <a class="el" href="class_screen.html#acca34443ba0ad97922069658d688ea9a" title="Function to find if the player has chosen to exit the game.">exitClicked()</a> will return true on its next call.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The path of the level file, or an empty string if no file was selected. </dd></dl>

<p>Definition at line <a class="el" href="_screen_8cpp_source.html#l00065">65</a> of file <a class="el" href="_screen_8cpp_source.html">Screen.cpp</a>.</p>

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

<p>Unimplemented assignment operator. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_screen.html#af46d7f95b577627f99af02f241026f4c" title="Unimplemented copy constructor, prevents copying of Screen objects.">Screen(const Screen&amp; ref)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a6480d57328a39c579f312774b5fbf571"></a><!-- doxytag: member="Screen::resolutionSupported" ref="a6480d57328a39c579f312774b5fbf571" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Screen::resolutionSupported </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Checks the current resolution (_screenWidth and _screenHeight) against the screen's supported resolutions. </p>
<p>Used to test if a fullscreen mode selection will launch without issue.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if the current resolution is supported. </dd></dl>

<p>Definition at line <a class="el" href="_screen_8cpp_source.html#l00145">145</a> of file <a class="el" href="_screen_8cpp_source.html">Screen.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="ae0863416022fcb59189d2aefd3345621"></a><!-- doxytag: member="Screen::_allegro" ref="ae0863416022fcb59189d2aefd3345621" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_allegro_init.html">AllegroInit</a> <a class="el" href="class_screen.html#ae0863416022fcb59189d2aefd3345621">Screen::_allegro</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Ensures that Allegro has been installed, for event queues and creating the display. </p>

<p>Definition at line <a class="el" href="_screen_8h_source.html#l00134">134</a> of file <a class="el" href="_screen_8h_source.html">Screen.h</a>.</p>

</div>
</div>
<a class="anchor" id="a4972e24cf3677e51b18feac34a563ba0"></a><!-- doxytag: member="Screen::_display" ref="a4972e24cf3677e51b18feac34a563ba0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ALLEGRO_DISPLAY* <a class="el" href="class_screen.html#a4972e24cf3677e51b18feac34a563ba0">Screen::_display</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The window created on the player's monitor to see the game. </p>

<p>Definition at line <a class="el" href="_screen_8h_source.html#l00146">146</a> of file <a class="el" href="_screen_8h_source.html">Screen.h</a>.</p>

</div>
</div>
<a class="anchor" id="a2dafde8aecbd3bc3c4394f36df913b64"></a><!-- doxytag: member="Screen::_drawing" ref="a2dafde8aecbd3bc3c4394f36df913b64" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_allegro_drawing_init.html">AllegroDrawingInit</a> <a class="el" href="class_screen.html#a2dafde8aecbd3bc3c4394f36df913b64">Screen::_drawing</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Ensures that drawing operations have been installed, for drawing splash screens. </p>

<p>Definition at line <a class="el" href="_screen_8h_source.html#l00136">136</a> of file <a class="el" href="_screen_8h_source.html">Screen.h</a>.</p>

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

<p>Set to true when the user chooses to quit the game. </p>

<p>Definition at line <a class="el" href="_screen_8h_source.html#l00138">138</a> of file <a class="el" href="_screen_8h_source.html">Screen.h</a>.</p>

</div>
</div>
<a class="anchor" id="a42a627863a8f9d1529278cb060d4102b"></a><!-- doxytag: member="Screen::_font" ref="a42a627863a8f9d1529278cb060d4102b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ALLEGRO_FONT* <a class="el" href="class_screen.html#a42a627863a8f9d1529278cb060d4102b">Screen::_font</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Font used in drawing splash screens. </p>

<p>Definition at line <a class="el" href="_screen_8h_source.html#l00148">148</a> of file <a class="el" href="_screen_8h_source.html">Screen.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7cba9fb0069d763055ef351452a15227"></a><!-- doxytag: member="Screen::_gameAreaWidth" ref="a7cba9fb0069d763055ef351452a15227" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="class_screen.html#a7cba9fb0069d763055ef351452a15227">Screen::_gameAreaWidth</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Width of the <a class="el" href="class_game_panel.html" title="ScreenPanel to be drawn on the screen to draw the area where the game takes place.">GamePanel</a> created. </p>

<p>Definition at line <a class="el" href="_screen_8h_source.html#l00143">143</a> of file <a class="el" href="_screen_8h_source.html">Screen.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab895e588a89e1943303487d47a2b9216"></a><!-- doxytag: member="Screen::_infoPanelWidth" ref="ab895e588a89e1943303487d47a2b9216" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="class_screen.html#ab895e588a89e1943303487d47a2b9216">Screen::_infoPanelWidth</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Width of the <a class="el" href="class_info_panel.html" title="ScreenPanel to be drawn on the screen to give the player information.">InfoPanel</a> created. The <a class="el" href="class_info_panel.html" title="ScreenPanel to be drawn on the screen to give the player information.">InfoPanel</a> is placed directly to the right of the <a class="el" href="class_game_panel.html" title="ScreenPanel to be drawn on the screen to draw the area where the game takes place.">GamePanel</a>. </p>

<p>Definition at line <a class="el" href="_screen_8h_source.html#l00144">144</a> of file <a class="el" href="_screen_8h_source.html">Screen.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0c5cff1b93dae4d559a81d261a8bcee6"></a><!-- doxytag: member="Screen::_keyboard" ref="a0c5cff1b93dae4d559a81d261a8bcee6" 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_screen.html#a0c5cff1b93dae4d559a81d261a8bcee6">Screen::_keyboard</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Ensures that the keyboard has been installed, for checking for the ESC key. </p>

<p>Definition at line <a class="el" href="_screen_8h_source.html#l00135">135</a> of file <a class="el" href="_screen_8h_source.html">Screen.h</a>.</p>

</div>
</div>
<a class="anchor" id="a30ba66122613181e312e0d7586d2a814"></a><!-- doxytag: member="Screen::_panels" ref="a30ba66122613181e312e0d7586d2a814" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt;<a class="el" href="class_screen_panel.html">ScreenPanel</a>*&gt; <a class="el" href="class_screen.html#a30ba66122613181e312e0d7586d2a814">Screen::_panels</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Polymorphic container used to encapsulate the different types of drawing to the screen. </p>
<p>Since the memory of the ScreenPanels in the vector is allocated dynamically, it must be deallocated in the destructor. </p>

<p>Definition at line <a class="el" href="_screen_8h_source.html#l00156">156</a> of file <a class="el" href="_screen_8h_source.html">Screen.h</a>.</p>

</div>
</div>
<a class="anchor" id="a8784c86e10d2b6af0dd99d710f3955e9"></a><!-- doxytag: member="Screen::_screenHeight" ref="a8784c86e10d2b6af0dd99d710f3955e9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="class_screen.html#a8784c86e10d2b6af0dd99d710f3955e9">Screen::_screenHeight</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Vertical number of pixels per column on the screen. </p>

<p>Definition at line <a class="el" href="_screen_8h_source.html#l00141">141</a> of file <a class="el" href="_screen_8h_source.html">Screen.h</a>.</p>

</div>
</div>
<a class="anchor" id="a5931238a3eb8cf1a14b0f8b8d7044b65"></a><!-- doxytag: member="Screen::_screenWidth" ref="a5931238a3eb8cf1a14b0f8b8d7044b65" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="class_screen.html#a5931238a3eb8cf1a14b0f8b8d7044b65">Screen::_screenWidth</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Horizontal number of pixels per row on the screen. </p>

<p>Definition at line <a class="el" href="_screen_8h_source.html#l00140">140</a> of file <a class="el" href="_screen_8h_source.html">Screen.h</a>.</p>

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

<p>Events caught by the screen, checked for an exit command. </p>

<p>Definition at line <a class="el" href="_screen_8h_source.html#l00147">147</a> of file <a class="el" href="_screen_8h_source.html">Screen.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="_screen_8h_source.html">Screen.h</a></li>
<li>source/presentation/<a class="el" href="_screen_8cpp_source.html">Screen.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>