diff options
Diffstat (limited to 'docs/html/class_game.html')
-rw-r--r-- | docs/html/class_game.html | 643 |
1 files changed, 643 insertions, 0 deletions
diff --git a/docs/html/class_game.html b/docs/html/class_game.html new file mode 100644 index 0000000..f56b7df --- /dev/null +++ b/docs/html/class_game.html @@ -0,0 +1,643 @@ +<!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: Game 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 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 List</span></a></li> + <li><a href="classes.html"><span>Class Index</span></a></li> + <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> + <li><a href="functions.html"><span>Class Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#pub-methods">Public Member Functions</a> | +<a href="#pub-static-attribs">Static Public Attributes</a> | +<a href="#pri-methods">Private Member Functions</a> | +<a href="#pri-attribs">Private Attributes</a> </div> + <div class="headertitle"> +<div class="title">Game Class Reference</div> </div> +</div> +<div class="contents"> +<!-- doxytag: class="Game" --> +<p>The object that controls the flow of the game, and the launch point of the game. + <a href="class_game.html#details">More...</a></p> + +<p><code>#include <<a class="el" href="_game_8h_source.html">Game.h</a>></code></p> + +<p><a href="class_game-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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#ad59df6562a58a614fda24622d3715b65">Game</a> ()</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor, that creates the relevant Allegro entities. <a href="#ad59df6562a58a614fda24622d3715b65"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#ae3d112ca6e0e55150d2fdbc704474530">~Game</a> ()</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor, that destroys the relevant Allegro entities. <a href="#ae3d112ca6e0e55150d2fdbc704474530"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a3d9b98f7c4a96ecf578f75b96c9f0e90">start</a> ()</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Entry point for the program. This should be called from main. <a href="#a3d9b98f7c4a96ecf578f75b96c9f0e90"></a><br/></td></tr> +<tr><td colspan="2"><h2><a name="pub-static-attribs"></a> +Static Public Attributes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">static const unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a636d6897103fd12d230489d512bf2be1">FPS</a> = 30</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Frames per second, the number of times the gameloop is run every second. <a href="#a636d6897103fd12d230489d512bf2be1"></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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a22c1dee02ec8e0050a66eb851f2cf212">Game</a> (const <a class="el" href="class_game.html">Game</a> &ref)</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Unimplemented copy constructor, prevents copying of <a class="el" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a> objects. <a href="#a22c1dee02ec8e0050a66eb851f2cf212"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_game.html">Game</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#abf375a1957b6fdb5cbe67ef70fa818f5">operator=</a> (const <a class="el" href="class_game.html">Game</a> &rhs)</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Unimplemented assignment operator. <a href="#abf375a1957b6fdb5cbe67ef70fa818f5"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a2bd8589c18470f644445d97c1c35d169">initLevel</a> (const string &levelFile)</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialises all of the <a class="el" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a> lists using a file. <a href="#a2bd8589c18470f644445d97c1c35d169"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a069837f5f3f3b91b581e41dd74667211">runloop</a> ()</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Main part of the game, performs the actions in each frame FPS times per second until the game is over. <a href="#a069837f5f3f3b91b581e41dd74667211"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a79df6376b332d63c9eca0dcee30305c3">update</a> ()</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Calls the update method on each of the GameObjects in the game. <a href="#a79df6376b332d63c9eca0dcee30305c3"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a961f632fbe7f4ba08d23fe9edc7711be">cleanup</a> ()</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes any GameObjects that have been destroyed from their lists. <a href="#a961f632fbe7f4ba08d23fe9edc7711be"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a03cf795e9aaa4c5950b4b5e918ab9ab6">clearLists</a> ()</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys all GameObjects in the game, resetting the lists for a new level to be loaded. <a href="#a03cf795e9aaa4c5950b4b5e918ab9ab6"></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> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a3bbe8c0dadbdf9e9e1d499f10509ef4e">_allegro</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Handles dependencies on Allegro being installed. <a href="#a3bbe8c0dadbdf9e9e1d499f10509ef4e"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_config.html">Config</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#aa60fe2dc0d1d53ebf49c2d87af6ee2d5">_config</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Loads configuration from file on construction, used to set resolution of screen. <a href="#aa60fe2dc0d1d53ebf49c2d87af6ee2d5"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_screen.html">Screen</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a9bc904a37fe9b3e85a597b6b5c6a66d5">_screen</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Handles all drawing operations. <a href="#a9bc904a37fe9b3e85a597b6b5c6a66d5"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">ALLEGRO_TIMER * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#af153fc1d94c473114cfbd63728d21f91">_timer</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates FPS events per second, that are put into _timerEvents. <a href="#af153fc1d94c473114cfbd63728d21f91"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">ALLEGRO_EVENT_QUEUE * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a2b7303df1b6d0163b78c2c306164859f">_timerEvents</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Catches events from _timer, used to regulate speed of runloop. <a href="#a2b7303df1b6d0163b78c2c306164859f"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_maze.html">Maze</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a33457b2c7fa4f43b89e54ce9c5ac6f83">_maze</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">The environment that confines the movements of GameObjects, specifically Cars. <a href="#a33457b2c7fa4f43b89e54ce9c5ac6f83"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">list< <a class="el" href="class_player_car.html">PlayerCar</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac">_players</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Typically a single <a class="el" href="class_player_car.html" title="A GameObject that is controlled by the player.">PlayerCar</a>, controlled by the person playing the game. <a href="#a75bf3282da1519766a6b75e2d83293ac"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">list< <a class="el" href="class_enemy_car.html">EnemyCar</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#afbd3e358076a6cf2e72faefe1c202df9">_enemies</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">List of all EnemyCars chasing the player. <a href="#afbd3e358076a6cf2e72faefe1c202df9"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">list< <a class="el" href="class_checkpoint.html">Checkpoint</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a856252e94c580f59b926affc7d45b4bf">_checkpoints</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">List of checkpoints that the player needs to collect. <a href="#a856252e94c580f59b926affc7d45b4bf"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">list< <a class="el" href="class_rock.html">Rock</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a9f14643bfc4d595dc7dfa3160a59d71b">_rocks</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">List of rocks that the player and EnemyCars need to avoid. <a href="#a9f14643bfc4d595dc7dfa3160a59d71b"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">list< <a class="el" href="class_smokescreen.html">Smokescreen</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a88916ad9e8095b99a9c870a053180c1c">_smokescreens</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">List of <a class="el" href="class_smokescreen.html" title="GameObject that causes the EnemyCar to be delayed if they crash into it.">Smokescreen</a> objects that are currently able to delay EnemyCars. <a href="#a88916ad9e8095b99a9c870a053180c1c"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">list< <a class="el" href="class_destroyed_object_popup.html">DestroyedObjectPopup</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a9bea5a0ee430443effa418d42a903f83">_popups</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">List of purely visual DestroyedObjectPopups that need to be drawn. <a href="#a9bea5a0ee430443effa418d42a903f83"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_collision_detector.html">CollisionDetector</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#ab88620fda0d1fa729dcab6013e8f1efc">_collisionDetector</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Object that checks for collisions each frame. <a href="#ab88620fda0d1fa729dcab6013e8f1efc"></a><br/></td></tr> +</table> +<hr/><a name="details" id="details"></a><h2>Detailed Description</h2> +<div class="textblock"><p>The object that controls the flow of the game, and the launch point of the game. </p> +<p><a class="el" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a> contains the various components, including the screen, the maze, and all of the objects in the maze. The timing of the gameloop also falls under Game's control. Essencially, <a class="el" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a> is the central point that everything connects to.</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="_game_8h_source.html#l00036">36</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> +</div><hr/><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" id="ad59df6562a58a614fda24622d3715b65"></a><!-- doxytag: member="Game::Game" ref="ad59df6562a58a614fda24622d3715b65" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">Game::Game </td> + <td>(</td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Constructor, that creates the relevant Allegro entities. </p> + +<p>Definition at line <a class="el" href="_game_8cpp_source.html#l00003">3</a> of file <a class="el" href="_game_8cpp_source.html">Game.cpp</a>.</p> + +</div> +</div> +<a class="anchor" id="ae3d112ca6e0e55150d2fdbc704474530"></a><!-- doxytag: member="Game::~Game" ref="ae3d112ca6e0e55150d2fdbc704474530" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">Game::~Game </td> + <td>(</td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Constructor, that destroys the relevant Allegro entities. </p> + +<p>Definition at line <a class="el" href="_game_8cpp_source.html#l00012">12</a> of file <a class="el" href="_game_8cpp_source.html">Game.cpp</a>.</p> + +</div> +</div> +<a class="anchor" id="a22c1dee02ec8e0050a66eb851f2cf212"></a><!-- doxytag: member="Game::Game" ref="a22c1dee02ec8e0050a66eb851f2cf212" args="(const Game &ref)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">Game::Game </td> + <td>(</td> + <td class="paramtype">const <a class="el" href="class_game.html">Game</a> & </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_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a> objects. </p> +<p>Copying a <a class="el" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a> is unneccesary as there should only be a single <a class="el" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a> object. </p> + +</div> +</div> +<hr/><h2>Member Function Documentation</h2> +<a class="anchor" id="a961f632fbe7f4ba08d23fe9edc7711be"></a><!-- doxytag: member="Game::cleanup" ref="a961f632fbe7f4ba08d23fe9edc7711be" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Game::cleanup </td> + <td>(</td> + <td class="paramname"></td><td>)</td> + <td><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Removes any GameObjects that have been destroyed from their lists. </p> + +<p>Definition at line <a class="el" href="_game_8cpp_source.html#l00104">104</a> of file <a class="el" href="_game_8cpp_source.html">Game.cpp</a>.</p> + +</div> +</div> +<a class="anchor" id="a03cf795e9aaa4c5950b4b5e918ab9ab6"></a><!-- doxytag: member="Game::clearLists" ref="a03cf795e9aaa4c5950b4b5e918ab9ab6" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Game::clearLists </td> + <td>(</td> + <td class="paramname"></td><td>)</td> + <td><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Destroys all GameObjects in the game, resetting the lists for a new level to be loaded. </p> +<p>This should always be called before a new level is loaded. </p> + +<p>Definition at line <a class="el" href="_game_8cpp_source.html#l00177">177</a> of file <a class="el" href="_game_8cpp_source.html">Game.cpp</a>.</p> + +</div> +</div> +<a class="anchor" id="a2bd8589c18470f644445d97c1c35d169"></a><!-- doxytag: member="Game::initLevel" ref="a2bd8589c18470f644445d97c1c35d169" args="(const string &levelFile)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Game::initLevel </td> + <td>(</td> + <td class="paramtype">const string & </td> + <td class="paramname"><em>levelFile</em></td><td>)</td> + <td><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Initialises all of the <a class="el" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a> lists using a file. </p> +<dl><dt><b>Parameters:</b></dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">levelFile</td><td>The path of the file that contains the level layout. </td></tr> + </table> + </dd> +</dl> + +<p>Definition at line <a class="el" href="_game_8cpp_source.html#l00032">32</a> of file <a class="el" href="_game_8cpp_source.html">Game.cpp</a>.</p> + +</div> +</div> +<a class="anchor" id="abf375a1957b6fdb5cbe67ef70fa818f5"></a><!-- doxytag: member="Game::operator=" ref="abf375a1957b6fdb5cbe67ef70fa818f5" args="(const Game &rhs)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="class_game.html">Game</a>& Game::operator= </td> + <td>(</td> + <td class="paramtype">const <a class="el" href="class_game.html">Game</a> & </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_game.html#a22c1dee02ec8e0050a66eb851f2cf212" title="Unimplemented copy constructor, prevents copying of Game objects.">Game::Game(const Game& ref)</a> </dd></dl> + +</div> +</div> +<a class="anchor" id="a069837f5f3f3b91b581e41dd74667211"></a><!-- doxytag: member="Game::runloop" ref="a069837f5f3f3b91b581e41dd74667211" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Game::runloop </td> + <td>(</td> + <td class="paramname"></td><td>)</td> + <td><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Main part of the game, performs the actions in each frame FPS times per second until the game is over. </p> +<p>Each frame runs the update methods of each of the GameObjects in the lists. The <a class="el" href="class_collision_detector.html" title="Object for handling collisions between GameObjects.">CollisionDetector</a> then checks for collisions between objects. Any GameObjects that have been destroyed are then removed from their lists. Finally, the <a class="el" href="class_screen.html" title="Class for creating a window on the screen.">Screen</a> is called to draw all of the GameObjects that still exist in their new positions.</p> +<p>Before the next iteration begins, a check is done for the victory and loss conditions. The loop is ended if either of these are met, or if the player has quit the game. </p> + +<p>Definition at line <a class="el" href="_game_8cpp_source.html#l00039">39</a> of file <a class="el" href="_game_8cpp_source.html">Game.cpp</a>.</p> + +</div> +</div> +<a class="anchor" id="a3d9b98f7c4a96ecf578f75b96c9f0e90"></a><!-- doxytag: member="Game::start" ref="a3d9b98f7c4a96ecf578f75b96c9f0e90" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Game::start </td> + <td>(</td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Entry point for the program. This should be called from main. </p> + +<p>Definition at line <a class="el" href="_game_8cpp_source.html#l00019">19</a> of file <a class="el" href="_game_8cpp_source.html">Game.cpp</a>.</p> + +</div> +</div> +<a class="anchor" id="a79df6376b332d63c9eca0dcee30305c3"></a><!-- doxytag: member="Game::update" ref="a79df6376b332d63c9eca0dcee30305c3" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Game::update </td> + <td>(</td> + <td class="paramname"></td><td>)</td> + <td><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Calls the update method on each of the GameObjects in the game. </p> + +<p>Definition at line <a class="el" href="_game_8cpp_source.html#l00082">82</a> of file <a class="el" href="_game_8cpp_source.html">Game.cpp</a>.</p> + +</div> +</div> +<hr/><h2>Member Data Documentation</h2> +<a class="anchor" id="a3bbe8c0dadbdf9e9e1d499f10509ef4e"></a><!-- doxytag: member="Game::_allegro" ref="a3bbe8c0dadbdf9e9e1d499f10509ef4e" 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_game.html#a3bbe8c0dadbdf9e9e1d499f10509ef4e">Game::_allegro</a><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Handles dependencies on Allegro being installed. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00106">106</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<a class="anchor" id="a856252e94c580f59b926affc7d45b4bf"></a><!-- doxytag: member="Game::_checkpoints" ref="a856252e94c580f59b926affc7d45b4bf" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">list<<a class="el" href="class_checkpoint.html">Checkpoint</a>> <a class="el" href="class_game.html#a856252e94c580f59b926affc7d45b4bf">Game::_checkpoints</a><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>List of checkpoints that the player needs to collect. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00127">127</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<a class="anchor" id="ab88620fda0d1fa729dcab6013e8f1efc"></a><!-- doxytag: member="Game::_collisionDetector" ref="ab88620fda0d1fa729dcab6013e8f1efc" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="class_collision_detector.html">CollisionDetector</a> <a class="el" href="class_game.html#ab88620fda0d1fa729dcab6013e8f1efc">Game::_collisionDetector</a><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Object that checks for collisions each frame. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00132">132</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<a class="anchor" id="aa60fe2dc0d1d53ebf49c2d87af6ee2d5"></a><!-- doxytag: member="Game::_config" ref="aa60fe2dc0d1d53ebf49c2d87af6ee2d5" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="class_config.html">Config</a> <a class="el" href="class_game.html#aa60fe2dc0d1d53ebf49c2d87af6ee2d5">Game::_config</a><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Loads configuration from file on construction, used to set resolution of screen. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00108">108</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<a class="anchor" id="afbd3e358076a6cf2e72faefe1c202df9"></a><!-- doxytag: member="Game::_enemies" ref="afbd3e358076a6cf2e72faefe1c202df9" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">list<<a class="el" href="class_enemy_car.html">EnemyCar</a>> <a class="el" href="class_game.html#afbd3e358076a6cf2e72faefe1c202df9">Game::_enemies</a><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>List of all EnemyCars chasing the player. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00126">126</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<a class="anchor" id="a33457b2c7fa4f43b89e54ce9c5ac6f83"></a><!-- doxytag: member="Game::_maze" ref="a33457b2c7fa4f43b89e54ce9c5ac6f83" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="class_maze.html">Maze</a> <a class="el" href="class_game.html#a33457b2c7fa4f43b89e54ce9c5ac6f83">Game::_maze</a><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>The environment that confines the movements of GameObjects, specifically Cars. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00113">113</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<a class="anchor" id="a75bf3282da1519766a6b75e2d83293ac"></a><!-- doxytag: member="Game::_players" ref="a75bf3282da1519766a6b75e2d83293ac" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">list<<a class="el" href="class_player_car.html">PlayerCar</a>> <a class="el" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac">Game::_players</a><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Typically a single <a class="el" href="class_player_car.html" title="A GameObject that is controlled by the player.">PlayerCar</a>, controlled by the person playing the game. </p> +<p>A list was used for _players to allow the <a class="el" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a> object to be constructed without needing to initialise a meaningless <a class="el" href="class_player_car.html" title="A GameObject that is controlled by the player.">PlayerCar</a> object. This also allows the <a class="el" href="class_player_car.html" title="A GameObject that is controlled by the player.">PlayerCar</a> to be destroyed by Rocks or EnemyCars. An added benefit is that it adds the ease of extending the game to allow multiple players. To add multiplayer, the <a class="el" href="class_keyboard_handler.html" title="Class for handling keyboard related game inputs from the player.">KeyboardHandler</a> would need to be modified to allow different sets of input keys, and the <a class="el" href="class_screen.html" title="Class for creating a window on the screen.">Screen</a> would need to be modified to keep all players visible, but the <a class="el" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a> class would be able to remain largely unchanged. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00124">124</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<a class="anchor" id="a9bea5a0ee430443effa418d42a903f83"></a><!-- doxytag: member="Game::_popups" ref="a9bea5a0ee430443effa418d42a903f83" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">list<<a class="el" href="class_destroyed_object_popup.html">DestroyedObjectPopup</a>> <a class="el" href="class_game.html#a9bea5a0ee430443effa418d42a903f83">Game::_popups</a><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>List of purely visual DestroyedObjectPopups that need to be drawn. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00130">130</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<a class="anchor" id="a9f14643bfc4d595dc7dfa3160a59d71b"></a><!-- doxytag: member="Game::_rocks" ref="a9f14643bfc4d595dc7dfa3160a59d71b" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">list<<a class="el" href="class_rock.html">Rock</a>> <a class="el" href="class_game.html#a9f14643bfc4d595dc7dfa3160a59d71b">Game::_rocks</a><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>List of rocks that the player and EnemyCars need to avoid. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00128">128</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<a class="anchor" id="a9bc904a37fe9b3e85a597b6b5c6a66d5"></a><!-- doxytag: member="Game::_screen" ref="a9bc904a37fe9b3e85a597b6b5c6a66d5" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="class_screen.html">Screen</a> <a class="el" href="class_game.html#a9bc904a37fe9b3e85a597b6b5c6a66d5">Game::_screen</a><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Handles all drawing operations. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00109">109</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<a class="anchor" id="a88916ad9e8095b99a9c870a053180c1c"></a><!-- doxytag: member="Game::_smokescreens" ref="a88916ad9e8095b99a9c870a053180c1c" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">list<<a class="el" href="class_smokescreen.html">Smokescreen</a>> <a class="el" href="class_game.html#a88916ad9e8095b99a9c870a053180c1c">Game::_smokescreens</a><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>List of <a class="el" href="class_smokescreen.html" title="GameObject that causes the EnemyCar to be delayed if they crash into it.">Smokescreen</a> objects that are currently able to delay EnemyCars. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00129">129</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<a class="anchor" id="af153fc1d94c473114cfbd63728d21f91"></a><!-- doxytag: member="Game::_timer" ref="af153fc1d94c473114cfbd63728d21f91" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">ALLEGRO_TIMER* <a class="el" href="class_game.html#af153fc1d94c473114cfbd63728d21f91">Game::_timer</a><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Creates FPS events per second, that are put into _timerEvents. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00110">110</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<a class="anchor" id="a2b7303df1b6d0163b78c2c306164859f"></a><!-- doxytag: member="Game::_timerEvents" ref="a2b7303df1b6d0163b78c2c306164859f" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">ALLEGRO_EVENT_QUEUE* <a class="el" href="class_game.html#a2b7303df1b6d0163b78c2c306164859f">Game::_timerEvents</a><code> [private]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Catches events from _timer, used to regulate speed of runloop. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00111">111</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<a class="anchor" id="a636d6897103fd12d230489d512bf2be1"></a><!-- doxytag: member="Game::FPS" ref="a636d6897103fd12d230489d512bf2be1" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">const unsigned int <a class="el" href="class_game.html#a636d6897103fd12d230489d512bf2be1">Game::FPS</a> = 30<code> [static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>Frames per second, the number of times the gameloop is run every second. </p> + +<p>Definition at line <a class="el" href="_game_8h_source.html#l00039">39</a> of file <a class="el" href="_game_8h_source.html">Game.h</a>.</p> + +</div> +</div> +<hr/>The documentation for this class was generated from the following files:<ul> +<li>source/logic/<a class="el" href="_game_8h_source.html">Game.h</a></li> +<li>source/logic/<a class="el" href="_game_8cpp_source.html">Game.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"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </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  <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> |