diff options
381 files changed, 48956 insertions, 0 deletions
diff --git a/docs/html/_allegro_wrappers_8cpp.html b/docs/html/_allegro_wrappers_8cpp.html new file mode 100644 index 0000000..3b59859 --- /dev/null +++ b/docs/html/_allegro_wrappers_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/logic/AllegroWrappers.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/AllegroWrappers.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_allegro_wrappers_8h_source.html">AllegroWrappers.h</a>"</code><br/> +</div> +<p><a href="_allegro_wrappers_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_allegro_wrappers_8cpp_source.html b/docs/html/_allegro_wrappers_8cpp_source.html new file mode 100644 index 0000000..60278e3 --- /dev/null +++ b/docs/html/_allegro_wrappers_8cpp_source.html @@ -0,0 +1,223 @@ +<!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: source/logic/AllegroWrappers.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/AllegroWrappers.cpp</div> </div> +</div> +<div class="contents"> +<a href="_allegro_wrappers_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_allegro_wrappers_8h.html">AllegroWrappers.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a>00003 <span class="keywordtype">int</span> <a class="code" href="class_allegro_init.html#ab8d20b549d0b996dde5cdbe8acd7186c" title="Count of the current number of initialised AllegroInit objects.">AllegroInit::_initCount</a> = 0; +<a name="l00004"></a>00004 +<a name="l00005"></a><a class="code" href="class_allegro_init.html#a14e28ffed7456b158cf919d310920af4">00005</a> <a class="code" href="class_allegro_init.html#a14e28ffed7456b158cf919d310920af4" title="Constructor calls al_init() if it is the first instance.">AllegroInit::AllegroInit</a>() +<a name="l00006"></a>00006 { +<a name="l00007"></a>00007 <span class="keywordflow">if</span> (<a class="code" href="class_allegro_init.html#ab8d20b549d0b996dde5cdbe8acd7186c" title="Count of the current number of initialised AllegroInit objects.">_initCount</a>==0) +<a name="l00008"></a>00008 { +<a name="l00009"></a>00009 <span class="keywordflow">if</span> (!al_init()) +<a name="l00010"></a>00010 { +<a name="l00011"></a>00011 <span class="keywordflow">throw</span> <a class="code" href="class_install_failure.html" title="Exception to be thrown if any component of Allegro fails to install at runtime.">InstallFailure</a>(); +<a name="l00012"></a>00012 } +<a name="l00013"></a>00013 } +<a name="l00014"></a>00014 ++<a class="code" href="class_allegro_init.html#ab8d20b549d0b996dde5cdbe8acd7186c" title="Count of the current number of initialised AllegroInit objects.">_initCount</a>; +<a name="l00015"></a>00015 } +<a name="l00016"></a>00016 +<a name="l00017"></a><a class="code" href="class_allegro_init.html#a81588c1ce0fe3646a188683f1598a66b">00017</a> <a class="code" href="class_allegro_init.html#a14e28ffed7456b158cf919d310920af4" title="Constructor calls al_init() if it is the first instance.">AllegroInit::AllegroInit</a>(<span class="keyword">const</span> <a class="code" href="class_allegro_init.html" title="Class ensures that Allegro is initialized and uninstalled when appropriate.">AllegroInit</a>& ref) +<a name="l00018"></a>00018 { +<a name="l00019"></a>00019 <span class="keywordflow">if</span> (<a class="code" href="class_allegro_init.html#ab8d20b549d0b996dde5cdbe8acd7186c" title="Count of the current number of initialised AllegroInit objects.">_initCount</a>==0) +<a name="l00020"></a>00020 { +<a name="l00021"></a>00021 <span class="keywordflow">if</span> (!al_init()) +<a name="l00022"></a>00022 { +<a name="l00023"></a>00023 <span class="keywordflow">throw</span> <a class="code" href="class_install_failure.html" title="Exception to be thrown if any component of Allegro fails to install at runtime.">InstallFailure</a>(); +<a name="l00024"></a>00024 } +<a name="l00025"></a>00025 } +<a name="l00026"></a>00026 ++<a class="code" href="class_allegro_init.html#ab8d20b549d0b996dde5cdbe8acd7186c" title="Count of the current number of initialised AllegroInit objects.">_initCount</a>; +<a name="l00027"></a>00027 } +<a name="l00028"></a>00028 +<a name="l00029"></a><a class="code" href="class_allegro_init.html#a41fb85a1de21168ec2a93e79e0e20b89">00029</a> <a class="code" href="class_allegro_init.html#a41fb85a1de21168ec2a93e79e0e20b89" title="Destructor calls al_uninstall_system() if it is the last instant.">AllegroInit::~AllegroInit</a>() +<a name="l00030"></a>00030 { +<a name="l00031"></a>00031 --<a class="code" href="class_allegro_init.html#ab8d20b549d0b996dde5cdbe8acd7186c" title="Count of the current number of initialised AllegroInit objects.">_initCount</a>; +<a name="l00032"></a>00032 <span class="keywordflow">if</span> (<a class="code" href="class_allegro_init.html#ab8d20b549d0b996dde5cdbe8acd7186c" title="Count of the current number of initialised AllegroInit objects.">_initCount</a>==0) +<a name="l00033"></a>00033 { +<a name="l00034"></a>00034 al_uninstall_system(); +<a name="l00035"></a>00035 } +<a name="l00036"></a>00036 } +<a name="l00037"></a>00037 +<a name="l00038"></a>00038 +<a name="l00039"></a>00039 <span class="keywordtype">int</span> <a class="code" href="class_allegro_keyboard_init.html#ac7f75bcc5cb56a1c2f4e9ce653d9dfd7" title="Count of the current number of initialised AllegroKeyboardInit objects.">AllegroKeyboardInit::_initCount</a> = 0; +<a name="l00040"></a>00040 +<a name="l00041"></a><a class="code" href="class_allegro_keyboard_init.html#a42fce2d97b6b7c0c0c666d0f5804a45e">00041</a> <a class="code" href="class_allegro_keyboard_init.html#a42fce2d97b6b7c0c0c666d0f5804a45e" title="Constructor calls al_install_keyboard() if it is the first instance.">AllegroKeyboardInit::AllegroKeyboardInit</a>() +<a name="l00042"></a>00042 { +<a name="l00043"></a>00043 <span class="keywordflow">if</span> (<a class="code" href="class_allegro_keyboard_init.html#ac7f75bcc5cb56a1c2f4e9ce653d9dfd7" title="Count of the current number of initialised AllegroKeyboardInit objects.">_initCount</a>==0) +<a name="l00044"></a>00044 { +<a name="l00045"></a>00045 <span class="keywordflow">if</span> (!al_install_keyboard()) +<a name="l00046"></a>00046 { +<a name="l00047"></a>00047 <span class="keywordflow">throw</span> <a class="code" href="class_install_failure.html" title="Exception to be thrown if any component of Allegro fails to install at runtime.">InstallFailure</a>(); +<a name="l00048"></a>00048 } +<a name="l00049"></a>00049 } +<a name="l00050"></a>00050 ++<a class="code" href="class_allegro_keyboard_init.html#ac7f75bcc5cb56a1c2f4e9ce653d9dfd7" title="Count of the current number of initialised AllegroKeyboardInit objects.">_initCount</a>; +<a name="l00051"></a>00051 } +<a name="l00052"></a>00052 +<a name="l00053"></a><a class="code" href="class_allegro_keyboard_init.html#ae28cb5cbafdba3372f21ddb95a9ed134">00053</a> <a class="code" href="class_allegro_keyboard_init.html#a42fce2d97b6b7c0c0c666d0f5804a45e" title="Constructor calls al_install_keyboard() if it is the first instance.">AllegroKeyboardInit::AllegroKeyboardInit</a>(<span class="keyword">const</span> <a class="code" href="class_allegro_keyboard_init.html" title="Class ensures that Allegro's keyboard is installed and uninstalled when appropriate.">AllegroKeyboardInit</a>& ref) +<a name="l00054"></a>00054 { +<a name="l00055"></a>00055 <span class="keywordflow">if</span> (<a class="code" href="class_allegro_keyboard_init.html#ac7f75bcc5cb56a1c2f4e9ce653d9dfd7" title="Count of the current number of initialised AllegroKeyboardInit objects.">_initCount</a>==0) +<a name="l00056"></a>00056 { +<a name="l00057"></a>00057 <span class="keywordflow">if</span> (!al_install_keyboard()) +<a name="l00058"></a>00058 { +<a name="l00059"></a>00059 <span class="keywordflow">throw</span> <a class="code" href="class_install_failure.html" title="Exception to be thrown if any component of Allegro fails to install at runtime.">InstallFailure</a>(); +<a name="l00060"></a>00060 } +<a name="l00061"></a>00061 } +<a name="l00062"></a>00062 ++<a class="code" href="class_allegro_keyboard_init.html#ac7f75bcc5cb56a1c2f4e9ce653d9dfd7" title="Count of the current number of initialised AllegroKeyboardInit objects.">_initCount</a>; +<a name="l00063"></a>00063 } +<a name="l00064"></a>00064 +<a name="l00065"></a><a class="code" href="class_allegro_keyboard_init.html#a7d1b1cda1d2220ad522ee955ba8a2c5d">00065</a> <a class="code" href="class_allegro_keyboard_init.html#a7d1b1cda1d2220ad522ee955ba8a2c5d" title="Destructor calls al_uninstall_keyboard() if it is the last instant.">AllegroKeyboardInit::~AllegroKeyboardInit</a>() +<a name="l00066"></a>00066 { +<a name="l00067"></a>00067 --<a class="code" href="class_allegro_keyboard_init.html#ac7f75bcc5cb56a1c2f4e9ce653d9dfd7" title="Count of the current number of initialised AllegroKeyboardInit objects.">_initCount</a>; +<a name="l00068"></a>00068 <span class="keywordflow">if</span> (<a class="code" href="class_allegro_keyboard_init.html#ac7f75bcc5cb56a1c2f4e9ce653d9dfd7" title="Count of the current number of initialised AllegroKeyboardInit objects.">_initCount</a>==0) al_uninstall_keyboard(); +<a name="l00069"></a>00069 } +<a name="l00070"></a>00070 +<a name="l00071"></a>00071 <span class="keywordtype">int</span> <a class="code" href="class_allegro_drawing_init.html#a78e8f792c6dba89eddf42e74d4a3d577">AllegroDrawingInit::_initCount</a> = 0; +<a name="l00072"></a>00072 +<a name="l00073"></a><a class="code" href="class_allegro_drawing_init.html#ab7cf79c71bf662f897bd8cba32f42cda">00073</a> <a class="code" href="class_allegro_drawing_init.html#ab7cf79c71bf662f897bd8cba32f42cda" title="Constructor calls al_init_primitives_addon(), al_init_font_addon(), and al_init_ttf_addon() if it is ...">AllegroDrawingInit::AllegroDrawingInit</a>() +<a name="l00074"></a>00074 { +<a name="l00075"></a>00075 <span class="keywordflow">if</span> (<a class="code" href="class_allegro_drawing_init.html#a78e8f792c6dba89eddf42e74d4a3d577">_initCount</a>==0) +<a name="l00076"></a>00076 { +<a name="l00077"></a>00077 <span class="keywordflow">if</span> (!al_init_primitives_addon()) +<a name="l00078"></a>00078 { +<a name="l00079"></a>00079 <span class="keywordflow">throw</span> <a class="code" href="class_install_failure.html" title="Exception to be thrown if any component of Allegro fails to install at runtime.">InstallFailure</a>(); +<a name="l00080"></a>00080 } +<a name="l00081"></a>00081 al_init_font_addon(); +<a name="l00082"></a>00082 <span class="keywordflow">if</span> (!al_init_ttf_addon()) +<a name="l00083"></a>00083 { +<a name="l00084"></a>00084 <span class="keywordflow">throw</span> <a class="code" href="class_install_failure.html" title="Exception to be thrown if any component of Allegro fails to install at runtime.">InstallFailure</a>(); +<a name="l00085"></a>00085 } +<a name="l00086"></a>00086 } +<a name="l00087"></a>00087 ++<a class="code" href="class_allegro_drawing_init.html#a78e8f792c6dba89eddf42e74d4a3d577">_initCount</a>; +<a name="l00088"></a>00088 } +<a name="l00089"></a>00089 +<a name="l00090"></a><a class="code" href="class_allegro_drawing_init.html#a36fe883267f017f3832feb1f615d7488">00090</a> <a class="code" href="class_allegro_drawing_init.html#ab7cf79c71bf662f897bd8cba32f42cda" title="Constructor calls al_init_primitives_addon(), al_init_font_addon(), and al_init_ttf_addon() if it is ...">AllegroDrawingInit::AllegroDrawingInit</a>(<span class="keyword">const</span> <a class="code" href="class_allegro_drawing_init.html" title="Class ensures that Allegro's primitive and text drawing is installed and uninstalled when appropriate...">AllegroDrawingInit</a>& ref) +<a name="l00091"></a>00091 { +<a name="l00092"></a>00092 <span class="keywordflow">if</span> (<a class="code" href="class_allegro_drawing_init.html#a78e8f792c6dba89eddf42e74d4a3d577">_initCount</a>==0) +<a name="l00093"></a>00093 { +<a name="l00094"></a>00094 <span class="keywordflow">if</span> (!al_init_primitives_addon()) +<a name="l00095"></a>00095 { +<a name="l00096"></a>00096 <span class="keywordflow">throw</span> <a class="code" href="class_install_failure.html" title="Exception to be thrown if any component of Allegro fails to install at runtime.">InstallFailure</a>(); +<a name="l00097"></a>00097 } +<a name="l00098"></a>00098 al_init_font_addon(); +<a name="l00099"></a>00099 <span class="keywordflow">if</span> (!al_init_ttf_addon()) +<a name="l00100"></a>00100 { +<a name="l00101"></a>00101 <span class="keywordflow">throw</span> <a class="code" href="class_install_failure.html" title="Exception to be thrown if any component of Allegro fails to install at runtime.">InstallFailure</a>(); +<a name="l00102"></a>00102 } +<a name="l00103"></a>00103 } +<a name="l00104"></a>00104 ++<a class="code" href="class_allegro_drawing_init.html#a78e8f792c6dba89eddf42e74d4a3d577">_initCount</a>; +<a name="l00105"></a>00105 } +<a name="l00106"></a>00106 +<a name="l00107"></a><a class="code" href="class_allegro_drawing_init.html#aa1c05a296b0c63f8f20276cce6472e6b">00107</a> <a class="code" href="class_allegro_drawing_init.html#aa1c05a296b0c63f8f20276cce6472e6b" title="Destructor calls al_shutdown_primitives_addon(), al_shutdown_font_addon(), and al_shutdown_ttf_addon(...">AllegroDrawingInit::~AllegroDrawingInit</a>() +<a name="l00108"></a>00108 { +<a name="l00109"></a>00109 --<a class="code" href="class_allegro_drawing_init.html#a78e8f792c6dba89eddf42e74d4a3d577">_initCount</a>; +<a name="l00110"></a>00110 <span class="keywordflow">if</span> (<a class="code" href="class_allegro_drawing_init.html#a78e8f792c6dba89eddf42e74d4a3d577">_initCount</a>==0) +<a name="l00111"></a>00111 { +<a name="l00112"></a>00112 al_shutdown_ttf_addon(); +<a name="l00113"></a>00113 al_shutdown_font_addon(); +<a name="l00114"></a>00114 al_shutdown_primitives_addon(); +<a name="l00115"></a>00115 } +<a name="l00116"></a>00116 } +</pre></div></div> +</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:30 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> diff --git a/docs/html/_allegro_wrappers_8h.html b/docs/html/_allegro_wrappers_8h.html new file mode 100644 index 0000000..275e146 --- /dev/null +++ b/docs/html/_allegro_wrappers_8h.html @@ -0,0 +1,127 @@ +<!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: source/logic/AllegroWrappers.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/logic/AllegroWrappers.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include <allegro5/allegro.h></code><br/> +<code>#include <allegro5/allegro_primitives.h></code><br/> +<code>#include <allegro5/allegro_font.h></code><br/> +<code>#include <allegro5/allegro_ttf.h></code><br/> +</div> +<p><a href="_allegro_wrappers_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_install_failure.html">InstallFailure</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Exception to be thrown if any component of Allegro fails to install at runtime. <a href="class_install_failure.html#details">More...</a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_allegro_init.html">AllegroInit</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Class ensures that Allegro is initialized and uninstalled when appropriate. <a href="class_allegro_init.html#details">More...</a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_allegro_keyboard_init.html">AllegroKeyboardInit</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Class ensures that Allegro's keyboard is installed and uninstalled when appropriate. <a href="class_allegro_keyboard_init.html#details">More...</a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_allegro_drawing_init.html">AllegroDrawingInit</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Class ensures that Allegro's primitive and text drawing is installed and uninstalled when appropriate. <a href="class_allegro_drawing_init.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_allegro_wrappers_8h_source.html b/docs/html/_allegro_wrappers_8h_source.html new file mode 100644 index 0000000..5325bcd --- /dev/null +++ b/docs/html/_allegro_wrappers_8h_source.html @@ -0,0 +1,159 @@ +<!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: source/logic/AllegroWrappers.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/AllegroWrappers.h</div> </div> +</div> +<div class="contents"> +<a href="_allegro_wrappers_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef ALLEGRO_WRAPPERS_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define ALLEGRO_WRAPPERS_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include <allegro5/allegro.h></span> +<a name="l00005"></a>00005 <span class="preprocessor">#include <allegro5/allegro_primitives.h></span> +<a name="l00006"></a>00006 <span class="preprocessor">#include <allegro5/allegro_font.h></span> +<a name="l00007"></a>00007 <span class="preprocessor">#include <allegro5/allegro_ttf.h></span> +<a name="l00008"></a>00008 +<a name="l00015"></a><a class="code" href="class_install_failure.html">00015</a> <span class="keyword">class </span><a class="code" href="class_install_failure.html" title="Exception to be thrown if any component of Allegro fails to install at runtime.">InstallFailure</a> {}; +<a name="l00016"></a>00016 +<a name="l00025"></a><a class="code" href="class_allegro_init.html">00025</a> <span class="keyword">class </span><a class="code" href="class_allegro_init.html" title="Class ensures that Allegro is initialized and uninstalled when appropriate.">AllegroInit</a> +<a name="l00026"></a>00026 { +<a name="l00027"></a>00027 <span class="keyword">public</span>: +<a name="l00031"></a>00031 <a class="code" href="class_allegro_init.html#a14e28ffed7456b158cf919d310920af4" title="Constructor calls al_init() if it is the first instance.">AllegroInit</a>(); +<a name="l00035"></a>00035 <a class="code" href="class_allegro_init.html#a14e28ffed7456b158cf919d310920af4" title="Constructor calls al_init() if it is the first instance.">AllegroInit</a>(<span class="keyword">const</span> <a class="code" href="class_allegro_init.html" title="Class ensures that Allegro is initialized and uninstalled when appropriate.">AllegroInit</a>& ref); +<a name="l00040"></a>00040 <span class="comment">//assignment operator provided by compiler. _initCount does not need incrementing on assignment,</span> +<a name="l00041"></a>00041 <span class="comment">//because assignment does not make a new instance, just changes one.</span> +<a name="l00042"></a>00042 +<a name="l00043"></a>00043 <a class="code" href="class_allegro_init.html#a41fb85a1de21168ec2a93e79e0e20b89" title="Destructor calls al_uninstall_system() if it is the last instant.">~AllegroInit</a>(); +<a name="l00044"></a>00044 <span class="keyword">private</span>: +<a name="l00045"></a><a class="code" href="class_allegro_init.html#ab8d20b549d0b996dde5cdbe8acd7186c">00045</a> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="class_allegro_init.html#ab8d20b549d0b996dde5cdbe8acd7186c" title="Count of the current number of initialised AllegroInit objects.">_initCount</a>; +<a name="l00046"></a>00046 }; +<a name="l00047"></a>00047 +<a name="l00057"></a><a class="code" href="class_allegro_keyboard_init.html">00057</a> <span class="keyword">class </span><a class="code" href="class_allegro_keyboard_init.html" title="Class ensures that Allegro's keyboard is installed and uninstalled when appropriate.">AllegroKeyboardInit</a> +<a name="l00058"></a>00058 { +<a name="l00059"></a>00059 <span class="keyword">public</span>: +<a name="l00063"></a>00063 <a class="code" href="class_allegro_keyboard_init.html#a42fce2d97b6b7c0c0c666d0f5804a45e" title="Constructor calls al_install_keyboard() if it is the first instance.">AllegroKeyboardInit</a>(); +<a name="l00067"></a>00067 <a class="code" href="class_allegro_keyboard_init.html#a42fce2d97b6b7c0c0c666d0f5804a45e" title="Constructor calls al_install_keyboard() if it is the first instance.">AllegroKeyboardInit</a>(<span class="keyword">const</span> <a class="code" href="class_allegro_keyboard_init.html" title="Class ensures that Allegro's keyboard is installed and uninstalled when appropriate.">AllegroKeyboardInit</a>& ref); +<a name="l00071"></a>00071 <a class="code" href="class_allegro_keyboard_init.html#a7d1b1cda1d2220ad522ee955ba8a2c5d" title="Destructor calls al_uninstall_keyboard() if it is the last instant.">~AllegroKeyboardInit</a>(); +<a name="l00072"></a>00072 <span class="keyword">private</span>: +<a name="l00073"></a><a class="code" href="class_allegro_keyboard_init.html#ac7f75bcc5cb56a1c2f4e9ce653d9dfd7">00073</a> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="class_allegro_keyboard_init.html#ac7f75bcc5cb56a1c2f4e9ce653d9dfd7" title="Count of the current number of initialised AllegroKeyboardInit objects.">_initCount</a>; +<a name="l00074"></a><a class="code" href="class_allegro_keyboard_init.html#af8655fcd2e20750f965e55304500bc3b">00074</a> <a class="code" href="class_allegro_init.html" title="Class ensures that Allegro is initialized and uninstalled when appropriate.">AllegroInit</a> <a class="code" href="class_allegro_keyboard_init.html#af8655fcd2e20750f965e55304500bc3b" title="Depends on Allegro being initialised.">_allegro</a>; +<a name="l00075"></a>00075 +<a name="l00076"></a>00076 <span class="comment">//assignment operator provided by compiler. _initCount does not need incrementing on assignment,</span> +<a name="l00077"></a>00077 <span class="comment">//because assignment does not make a new instance, just changes one.</span> +<a name="l00078"></a>00078 }; +<a name="l00079"></a>00079 +<a name="l00089"></a><a class="code" href="class_allegro_drawing_init.html">00089</a> <span class="keyword">class </span><a class="code" href="class_allegro_drawing_init.html" title="Class ensures that Allegro's primitive and text drawing is installed and uninstalled when appropriate...">AllegroDrawingInit</a> +<a name="l00090"></a>00090 { +<a name="l00091"></a>00091 <span class="keyword">public</span>: +<a name="l00095"></a>00095 <a class="code" href="class_allegro_drawing_init.html#ab7cf79c71bf662f897bd8cba32f42cda" title="Constructor calls al_init_primitives_addon(), al_init_font_addon(), and al_init_ttf_addon() if it is ...">AllegroDrawingInit</a>(); +<a name="l00099"></a>00099 <a class="code" href="class_allegro_drawing_init.html#ab7cf79c71bf662f897bd8cba32f42cda" title="Constructor calls al_init_primitives_addon(), al_init_font_addon(), and al_init_ttf_addon() if it is ...">AllegroDrawingInit</a>(<span class="keyword">const</span> <a class="code" href="class_allegro_drawing_init.html" title="Class ensures that Allegro's primitive and text drawing is installed and uninstalled when appropriate...">AllegroDrawingInit</a>& ref); +<a name="l00103"></a>00103 <a class="code" href="class_allegro_drawing_init.html#aa1c05a296b0c63f8f20276cce6472e6b" title="Destructor calls al_shutdown_primitives_addon(), al_shutdown_font_addon(), and al_shutdown_ttf_addon(...">~AllegroDrawingInit</a>(); +<a name="l00104"></a>00104 <span class="keyword">private</span>: +<a name="l00105"></a><a class="code" href="class_allegro_drawing_init.html#a78e8f792c6dba89eddf42e74d4a3d577">00105</a> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="class_allegro_drawing_init.html#a78e8f792c6dba89eddf42e74d4a3d577">_initCount</a>; +<a name="l00106"></a><a class="code" href="class_allegro_drawing_init.html#a8254ecb9b3ad13409ff1ec1cfeee66ef">00106</a> <a class="code" href="class_allegro_init.html" title="Class ensures that Allegro is initialized and uninstalled when appropriate.">AllegroInit</a> <a class="code" href="class_allegro_drawing_init.html#a8254ecb9b3ad13409ff1ec1cfeee66ef">_allegro</a>; +<a name="l00107"></a>00107 +<a name="l00108"></a>00108 <span class="comment">//assignment operator provided by compiler. _initCount does not need incrementing on assignment,</span> +<a name="l00109"></a>00109 <span class="comment">//because assignment does not make a new instance, just changes one.</span> +<a name="l00110"></a>00110 }; +<a name="l00111"></a>00111 +<a name="l00112"></a>00112 <span class="preprocessor">#endif</span> +</pre></div></div> +</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:30 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> diff --git a/docs/html/_bitmap_store_8cpp.html b/docs/html/_bitmap_store_8cpp.html new file mode 100644 index 0000000..c21a751 --- /dev/null +++ b/docs/html/_bitmap_store_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/presentation/BitmapStore.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/BitmapStore.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_bitmap_store_8h_source.html">BitmapStore.h</a>"</code><br/> +</div> +<p><a href="_bitmap_store_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_bitmap_store_8cpp_source.html b/docs/html/_bitmap_store_8cpp_source.html new file mode 100644 index 0000000..0f739cf --- /dev/null +++ b/docs/html/_bitmap_store_8cpp_source.html @@ -0,0 +1,345 @@ +<!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: source/presentation/BitmapStore.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/BitmapStore.cpp</div> </div> +</div> +<div class="contents"> +<a href="_bitmap_store_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_bitmap_store_8h.html">BitmapStore.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a><a class="code" href="class_bitmap_store.html#abca96ce53be18eb07150745871a3165c">00003</a> <a class="code" href="class_bitmap_store.html#abca96ce53be18eb07150745871a3165c" title="Constructor for creating a BitmapStore with a set image size.">BitmapStore::BitmapStore</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> blockWidth) +<a name="l00004"></a>00004 :_blockWidth(blockWidth) +<a name="l00005"></a>00005 { +<a name="l00006"></a>00006 <a class="code" href="class_bitmap_store.html#a0c73c3c20f8093c83707cde15c4fed5f" title="Font used for writing text on bitmaps.">_bitmapFont</a> = al_load_font(<span class="stringliteral">"junction 02.ttf"</span>, blockWidth/6, 0); +<a name="l00007"></a>00007 <span class="keywordflow">if</span> (<a class="code" href="class_bitmap_store.html#a0c73c3c20f8093c83707cde15c4fed5f" title="Font used for writing text on bitmaps.">_bitmapFont</a> == NULL) +<a name="l00008"></a>00008 { +<a name="l00009"></a>00009 al_show_native_message_box(NULL, <span class="stringliteral">"Fatal error"</span>, <span class="stringliteral">"Fatal error"</span>, <span class="stringliteral">"The file 'junction 02.ttf' was not found. Ensure that it is located in the working directory."</span>, NULL, ALLEGRO_MESSAGEBOX_ERROR); +<a name="l00010"></a>00010 <span class="keywordflow">throw</span> <a class="code" href="class_install_failure.html" title="Exception to be thrown if any component of Allegro fails to install at runtime.">InstallFailure</a>(); +<a name="l00011"></a>00011 } +<a name="l00012"></a>00012 } +<a name="l00013"></a>00013 +<a name="l00014"></a><a class="code" href="class_bitmap_store.html#a1e34f2fb55475f16ade380fa1e8829f7">00014</a> <a class="code" href="class_bitmap_store.html#a1e34f2fb55475f16ade380fa1e8829f7" title="Destructor for clearing cache.">BitmapStore::~BitmapStore</a>() +<a name="l00015"></a>00015 { +<a name="l00016"></a>00016 <span class="keywordflow">for</span> (map<Image,ALLEGRO_BITMAP*>::iterator iter = <a class="code" href="class_bitmap_store.html#ae3d18969f61f97fce6622cb6f7004711" title="map containing pairs of Images (the enumerated type) and the actual images.">_bitmaps</a>.begin(); +<a name="l00017"></a>00017 iter != <a class="code" href="class_bitmap_store.html#ae3d18969f61f97fce6622cb6f7004711" title="map containing pairs of Images (the enumerated type) and the actual images.">_bitmaps</a>.end(); ++iter) +<a name="l00018"></a>00018 { +<a name="l00019"></a>00019 al_destroy_bitmap(iter->second); +<a name="l00020"></a>00020 } +<a name="l00021"></a>00021 <a class="code" href="class_bitmap_store.html#ae3d18969f61f97fce6622cb6f7004711" title="map containing pairs of Images (the enumerated type) and the actual images.">_bitmaps</a>.clear(); +<a name="l00022"></a>00022 al_destroy_font(<a class="code" href="class_bitmap_store.html#a0c73c3c20f8093c83707cde15c4fed5f" title="Font used for writing text on bitmaps.">_bitmapFont</a>); +<a name="l00023"></a>00023 } +<a name="l00024"></a>00024 +<a name="l00025"></a><a class="code" href="class_bitmap_store.html#aadd437c869c5856c36d920dfafbc6ee4">00025</a> ALLEGRO_BITMAP* <a class="code" href="class_bitmap_store.html#aadd437c869c5856c36d920dfafbc6ee4" title="Function to get image for drawing to the screen.">BitmapStore::getBitmap</a>(<a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386" title="Type used to define which image should be returned.">Image</a> image) +<a name="l00026"></a>00026 { +<a name="l00027"></a>00027 map<Image,ALLEGRO_BITMAP*>::const_iterator iter = <a class="code" href="class_bitmap_store.html#ae3d18969f61f97fce6622cb6f7004711" title="map containing pairs of Images (the enumerated type) and the actual images.">_bitmaps</a>.find(image); +<a name="l00028"></a>00028 <span class="keywordflow">if</span> (iter != <a class="code" href="class_bitmap_store.html#ae3d18969f61f97fce6622cb6f7004711" title="map containing pairs of Images (the enumerated type) and the actual images.">_bitmaps</a>.end()) +<a name="l00029"></a>00029 { +<a name="l00030"></a>00030 <span class="keywordflow">return</span> iter->second; +<a name="l00031"></a>00031 } +<a name="l00032"></a>00032 <span class="keywordflow">else</span> +<a name="l00033"></a>00033 { +<a name="l00034"></a>00034 ALLEGRO_BITMAP* newImage = al_create_bitmap(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>); +<a name="l00035"></a>00035 <span class="keywordflow">switch</span> (image) +<a name="l00036"></a>00036 { +<a name="l00037"></a>00037 <span class="keywordflow">case</span> <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386acdaf29947fecd91b452e554a75fb9e92">PLAYER</a>: +<a name="l00038"></a>00038 <a class="code" href="class_bitmap_store.html#af645b30d96761f401770336a555b6429" title="Draws the image representing the player.">drawPlayerCar</a>(newImage); +<a name="l00039"></a>00039 <span class="keywordflow">break</span>; +<a name="l00040"></a>00040 <span class="keywordflow">case</span> <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a8a7d9a89e243914ca702660237d4f81d">ENEMY</a>: +<a name="l00041"></a>00041 <a class="code" href="class_bitmap_store.html#aff7a6fc2b35ff6cd38ef74730523f5a9" title="Draws the image representing an enemy.">drawEnemyCar</a>(newImage); +<a name="l00042"></a>00042 <span class="keywordflow">break</span>; +<a name="l00043"></a>00043 <span class="keywordflow">case</span> <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a780d6b9e20ec37fbaf5a40ca846795d9">CHECKPOINT</a>: +<a name="l00044"></a>00044 <a class="code" href="class_bitmap_store.html#ae5d12fa60b03a7ea2119c67938650352" title="Draws the image representing a checkpoint.">drawCheckpoint</a>(newImage); +<a name="l00045"></a>00045 <span class="keywordflow">break</span>; +<a name="l00046"></a>00046 <span class="keywordflow">case</span> <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386abf3851dc0110fc83020981fcbb5773eb">ROCK</a>: +<a name="l00047"></a>00047 <a class="code" href="class_bitmap_store.html#a2132a5ec8dfb43f06f75accf8bb9a50e" title="Draws the image representing a rock.">drawRock</a>(newImage); +<a name="l00048"></a>00048 <span class="keywordflow">break</span>; +<a name="l00049"></a>00049 <span class="keywordflow">case</span> <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386ae662e77b349a8e22c5826ef35b1b5d9a">MAZE_WALL</a>: +<a name="l00050"></a>00050 <a class="code" href="class_bitmap_store.html#a90680d174c1d77e19ace8c2ba0eef6ac" title="Draws the image representing a solid part of the maze.">drawMazeWall</a>(newImage); +<a name="l00051"></a>00051 <span class="keywordflow">break</span>; +<a name="l00052"></a>00052 <span class="keywordflow">case</span> <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a4e2a075dff2c02bf40b134c9090d1f02">MAZE_FLOOR</a>: +<a name="l00053"></a>00053 <a class="code" href="class_bitmap_store.html#a8a7d5fe7cc38ddb3c651152654226201" title="Draws the image representing a non-solid part of the maze.">drawMazeFloor</a>(newImage); +<a name="l00054"></a>00054 <span class="keywordflow">break</span>; +<a name="l00055"></a>00055 <span class="keywordflow">case</span> <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a91fec244d29999552e93ecb7578713fb">SMOKE</a>: +<a name="l00056"></a>00056 <a class="code" href="class_bitmap_store.html#a1a346a06675a7257ca8a7879aeb27e48" title="Draws the image representing a smokescreen.">drawSmoke</a>(newImage); +<a name="l00057"></a>00057 <span class="keywordflow">break</span>; +<a name="l00058"></a>00058 <span class="keywordflow">case</span> <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a8b9eb5b79abe467982784ea2227d67e0">CRASHED_CAR</a>: +<a name="l00059"></a>00059 <a class="code" href="class_bitmap_store.html#abb0a062e5cb3170786a6c202a53c145b" title="Draws the popup that appears when a car crashes.">drawCrashedCar</a>(newImage); +<a name="l00060"></a>00060 <span class="keywordflow">break</span>; +<a name="l00061"></a>00061 <span class="keywordflow">case</span> <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a824f0021358b88c7f1172d7dece95948">CLAIMED_CHECKPOINT</a>: +<a name="l00062"></a>00062 <a class="code" href="class_bitmap_store.html#a07f505192ccf0717d6aed29761934a5c" title="Draws the popup that appears when a checkpoint is collected.">drawClaimedCheckpoint</a>(newImage); +<a name="l00063"></a>00063 <span class="keywordflow">break</span>; +<a name="l00064"></a>00064 } +<a name="l00065"></a>00065 +<a name="l00066"></a>00066 <a class="code" href="class_bitmap_store.html#ae3d18969f61f97fce6622cb6f7004711" title="map containing pairs of Images (the enumerated type) and the actual images.">_bitmaps</a>.insert(make_pair(image, newImage)); +<a name="l00067"></a>00067 <span class="keywordflow">return</span> newImage; +<a name="l00068"></a>00068 } +<a name="l00069"></a>00069 } +<a name="l00070"></a>00070 +<a name="l00071"></a><a class="code" href="class_bitmap_store.html#af645b30d96761f401770336a555b6429">00071</a> <span class="keywordtype">void</span> <a class="code" href="class_bitmap_store.html#af645b30d96761f401770336a555b6429" title="Draws the image representing the player.">BitmapStore::drawPlayerCar</a>(ALLEGRO_BITMAP* canvas) +<a name="l00072"></a>00072 { +<a name="l00073"></a>00073 ALLEGRO_BITMAP* prev_draw = al_get_target_bitmap(); +<a name="l00074"></a>00074 al_set_target_bitmap(canvas); +<a name="l00075"></a>00075 +<a name="l00076"></a>00076 <span class="comment">//car body</span> +<a name="l00077"></a>00077 al_draw_filled_rounded_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.2, 0, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.8, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.96, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.1, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.1, al_map_rgb(0,0,255)); +<a name="l00078"></a>00078 +<a name="l00079"></a>00079 <span class="comment">//racing stripes</span> +<a name="l00080"></a>00080 al_draw_filled_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.35, 0, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.4, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.3, al_map_rgb(255,255,255)); +<a name="l00081"></a>00081 al_draw_filled_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.6, 0, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.65, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.3, al_map_rgb(255,255,255)); +<a name="l00082"></a>00082 +<a name="l00083"></a>00083 <span class="comment">//windscreen</span> +<a name="l00084"></a>00084 al_draw_filled_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.3, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.3, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.7, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.5, al_map_rgb (0,0,0)); +<a name="l00085"></a>00085 +<a name="l00086"></a>00086 <span class="comment">//roof</span> +<a name="l00087"></a>00087 al_draw_rounded_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.3, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.5, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.7, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.9, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.04, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.04, al_map_rgb (25,25, 112), <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.04); +<a name="l00088"></a>00088 +<a name="l00089"></a>00089 <span class="comment">//spoiler</span> +<a name="l00090"></a>00090 al_draw_filled_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.96, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.8, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>, al_map_rgb (0,0, 225)); +<a name="l00091"></a>00091 al_draw_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.96, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.8, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>, al_map_rgb(25,25, 112),<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.04); +<a name="l00092"></a>00092 +<a name="l00093"></a>00093 <span class="comment">//headlights</span> +<a name="l00094"></a>00094 al_draw_filled_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.3,0,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.35,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.06, al_map_rgb(255,225,0)); +<a name="l00095"></a>00095 al_draw_filled_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.65,0,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.7,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.06, al_map_rgb(255,225,0)); +<a name="l00096"></a>00096 +<a name="l00097"></a>00097 <span class="comment">//tyres</span> +<a name="l00098"></a>00098 al_draw_filled_rounded_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.1,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.13,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.2,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.37,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03, al_map_rgb(131,139,131)); +<a name="l00099"></a>00099 al_draw_filled_rounded_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.8,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.13,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.9,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.37,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03, al_map_rgb(131,139,131)); +<a name="l00100"></a>00100 al_draw_filled_rounded_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.1,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.63,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.2,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.87,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03, al_map_rgb(131,139,131)); +<a name="l00101"></a>00101 al_draw_filled_rounded_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.8,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.63,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.9,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.87,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03, al_map_rgb(131,139,131)); +<a name="l00102"></a>00102 +<a name="l00103"></a>00103 al_set_target_bitmap(prev_draw); +<a name="l00104"></a>00104 } +<a name="l00105"></a><a class="code" href="class_bitmap_store.html#aff7a6fc2b35ff6cd38ef74730523f5a9">00105</a> <span class="keywordtype">void</span> <a class="code" href="class_bitmap_store.html#aff7a6fc2b35ff6cd38ef74730523f5a9" title="Draws the image representing an enemy.">BitmapStore::drawEnemyCar</a>(ALLEGRO_BITMAP* canvas) +<a name="l00106"></a>00106 { +<a name="l00107"></a>00107 ALLEGRO_BITMAP* prev_draw = al_get_target_bitmap(); +<a name="l00108"></a>00108 al_set_target_bitmap(canvas); +<a name="l00109"></a>00109 +<a name="l00110"></a>00110 <span class="comment">//car body</span> +<a name="l00111"></a>00111 al_draw_filled_rounded_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.2, 0, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.8, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.96, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.1, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.1, al_map_rgb(255,0,0)); +<a name="l00112"></a>00112 +<a name="l00113"></a>00113 <span class="comment">//racing stripes</span> +<a name="l00114"></a>00114 al_draw_filled_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.35, 0, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.4, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.3, al_map_rgb(255,255,255)); +<a name="l00115"></a>00115 al_draw_filled_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.6, 0, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.65, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.3, al_map_rgb(255,255,255)); +<a name="l00116"></a>00116 +<a name="l00117"></a>00117 <span class="comment">//windscreen</span> +<a name="l00118"></a>00118 al_draw_filled_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.3, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.3, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.7, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.5, al_map_rgb (0,0,0)); +<a name="l00119"></a>00119 +<a name="l00120"></a>00120 <span class="comment">//roof</span> +<a name="l00121"></a>00121 al_draw_rounded_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.3, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.5, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.7, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.9, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.04, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.04, al_map_rgb (25,25, 112), <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.04); +<a name="l00122"></a>00122 +<a name="l00123"></a>00123 <span class="comment">//spoiler</span> +<a name="l00124"></a>00124 al_draw_filled_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.96, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.8, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>, al_map_rgb (0,0, 225)); +<a name="l00125"></a>00125 al_draw_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.96, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.8, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>, al_map_rgb(25,25, 112),<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.04); +<a name="l00126"></a>00126 +<a name="l00127"></a>00127 <span class="comment">//headlights</span> +<a name="l00128"></a>00128 al_draw_filled_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.3,0,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.35,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.06, al_map_rgb(255,225,0)); +<a name="l00129"></a>00129 al_draw_filled_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.65,0,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.7,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.06, al_map_rgb(255,225,0)); +<a name="l00130"></a>00130 +<a name="l00131"></a>00131 <span class="comment">//tyres</span> +<a name="l00132"></a>00132 al_draw_filled_rounded_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.1,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.13,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.2,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.37,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03, al_map_rgb(131,139,131)); +<a name="l00133"></a>00133 al_draw_filled_rounded_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.8,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.13,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.9,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.37,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03, al_map_rgb(131,139,131)); +<a name="l00134"></a>00134 al_draw_filled_rounded_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.1,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.63,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.2,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.87,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03, al_map_rgb(131,139,131)); +<a name="l00135"></a>00135 al_draw_filled_rounded_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.8,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.63,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.9,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.87,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03,<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.03, al_map_rgb(131,139,131)); +<a name="l00136"></a>00136 +<a name="l00137"></a>00137 al_set_target_bitmap(prev_draw); +<a name="l00138"></a>00138 } +<a name="l00139"></a><a class="code" href="class_bitmap_store.html#a2132a5ec8dfb43f06f75accf8bb9a50e">00139</a> <span class="keywordtype">void</span> <a class="code" href="class_bitmap_store.html#a2132a5ec8dfb43f06f75accf8bb9a50e" title="Draws the image representing a rock.">BitmapStore::drawRock</a>(ALLEGRO_BITMAP* canvas) +<a name="l00140"></a>00140 { +<a name="l00141"></a>00141 ALLEGRO_BITMAP* prev_draw = al_get_target_bitmap(); +<a name="l00142"></a>00142 al_set_target_bitmap(canvas); +<a name="l00143"></a>00143 +<a name="l00144"></a>00144 ALLEGRO_COLOR colour = al_map_rgb(131,139,131); +<a name="l00145"></a>00145 al_draw_filled_circle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2-1, colour); +<a name="l00146"></a>00146 +<a name="l00147"></a>00147 al_draw_filled_circle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2-6, colour); +<a name="l00148"></a>00148 al_draw_filled_circle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/4, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/4, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/4-1, al_map_rgb(205,197,191)); +<a name="l00149"></a>00149 al_draw_filled_circle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/3.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/4.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/4-2, al_map_rgb(205,197,191)); +<a name="l00150"></a>00150 al_draw_filled_circle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2-15, al_map_rgb(205,197,191)); +<a name="l00151"></a>00151 al_draw_filled_circle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2-8, al_map_rgb(205,205,193)); +<a name="l00152"></a>00152 +<a name="l00153"></a>00153 al_set_target_bitmap(prev_draw); +<a name="l00154"></a>00154 } +<a name="l00155"></a><a class="code" href="class_bitmap_store.html#ae5d12fa60b03a7ea2119c67938650352">00155</a> <span class="keywordtype">void</span> <a class="code" href="class_bitmap_store.html#ae5d12fa60b03a7ea2119c67938650352" title="Draws the image representing a checkpoint.">BitmapStore::drawCheckpoint</a>(ALLEGRO_BITMAP* canvas) +<a name="l00156"></a>00156 { +<a name="l00157"></a>00157 ALLEGRO_BITMAP* prev_draw = al_get_target_bitmap(); +<a name="l00158"></a>00158 al_set_target_bitmap(canvas); +<a name="l00159"></a>00159 +<a name="l00160"></a>00160 ALLEGRO_COLOR colour = al_map_rgb(255,255,0); +<a name="l00161"></a>00161 +<a name="l00162"></a>00162 al_draw_filled_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.44, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.1, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.5, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.9, colour); +<a name="l00163"></a>00163 al_draw_filled_rounded_rectangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.34, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.9, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.6, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.98, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.01, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.01, colour); +<a name="l00164"></a>00164 al_draw_filled_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.47, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.14, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.1, colour); +<a name="l00165"></a>00165 al_draw_filled_triangle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.44, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.26, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.44, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.58, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.8, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>*0.42, colour); +<a name="l00166"></a>00166 +<a name="l00167"></a>00167 al_set_target_bitmap(prev_draw); +<a name="l00168"></a>00168 } +<a name="l00169"></a><a class="code" href="class_bitmap_store.html#a90680d174c1d77e19ace8c2ba0eef6ac">00169</a> <span class="keywordtype">void</span> <a class="code" href="class_bitmap_store.html#a90680d174c1d77e19ace8c2ba0eef6ac" title="Draws the image representing a solid part of the maze.">BitmapStore::drawMazeWall</a>(ALLEGRO_BITMAP* canvas) +<a name="l00170"></a>00170 { +<a name="l00171"></a>00171 ALLEGRO_BITMAP* prev_draw = al_get_target_bitmap(); +<a name="l00172"></a>00172 al_set_target_bitmap(canvas); +<a name="l00173"></a>00173 +<a name="l00174"></a>00174 ALLEGRO_COLOR colour = al_map_rgb(203,255,151); +<a name="l00175"></a>00175 al_clear_to_color(colour); +<a name="l00176"></a>00176 +<a name="l00177"></a>00177 al_set_target_bitmap(prev_draw); +<a name="l00178"></a>00178 } +<a name="l00179"></a><a class="code" href="class_bitmap_store.html#a8a7d5fe7cc38ddb3c651152654226201">00179</a> <span class="keywordtype">void</span> <a class="code" href="class_bitmap_store.html#a8a7d5fe7cc38ddb3c651152654226201" title="Draws the image representing a non-solid part of the maze.">BitmapStore::drawMazeFloor</a>(ALLEGRO_BITMAP* canvas) +<a name="l00180"></a>00180 { +<a name="l00181"></a>00181 ALLEGRO_BITMAP* prev_draw = al_get_target_bitmap(); +<a name="l00182"></a>00182 al_set_target_bitmap(canvas); +<a name="l00183"></a>00183 +<a name="l00184"></a>00184 ALLEGRO_COLOR colour = al_map_rgb(0,0,0); +<a name="l00185"></a>00185 al_clear_to_color(colour); +<a name="l00186"></a>00186 +<a name="l00187"></a>00187 al_set_target_bitmap(prev_draw); +<a name="l00188"></a>00188 } +<a name="l00189"></a><a class="code" href="class_bitmap_store.html#a1a346a06675a7257ca8a7879aeb27e48">00189</a> <span class="keywordtype">void</span> <a class="code" href="class_bitmap_store.html#a1a346a06675a7257ca8a7879aeb27e48" title="Draws the image representing a smokescreen.">BitmapStore::drawSmoke</a>(ALLEGRO_BITMAP* canvas) +<a name="l00190"></a>00190 { +<a name="l00191"></a>00191 ALLEGRO_BITMAP* prev_draw = al_get_target_bitmap(); +<a name="l00192"></a>00192 al_set_target_bitmap(canvas); +<a name="l00193"></a>00193 +<a name="l00194"></a>00194 ALLEGRO_COLOR colour = al_map_rgb(255,255,255); +<a name="l00195"></a>00195 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2.3, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2.1, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2-1, colour,1); +<a name="l00196"></a>00196 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/4, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/4, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/4, colour,2); +<a name="l00197"></a>00197 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/5, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.5, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/4, colour,4); +<a name="l00198"></a>00198 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2.5, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2.7, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/3, colour,3); +<a name="l00199"></a>00199 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.8, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/3.7, colour,2); +<a name="l00200"></a>00200 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2.8, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/6, colour,3); +<a name="l00201"></a>00201 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.1, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/3, colour,2); +<a name="l00202"></a>00202 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.7, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2, colour,3); +<a name="l00203"></a>00203 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.3, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.3, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/5, colour,2); +<a name="l00204"></a>00204 +<a name="l00205"></a>00205 al_set_target_bitmap(prev_draw); +<a name="l00206"></a>00206 } +<a name="l00207"></a>00207 +<a name="l00208"></a><a class="code" href="class_bitmap_store.html#abb0a062e5cb3170786a6c202a53c145b">00208</a> <span class="keywordtype">void</span> <a class="code" href="class_bitmap_store.html#abb0a062e5cb3170786a6c202a53c145b" title="Draws the popup that appears when a car crashes.">BitmapStore::drawCrashedCar</a>(ALLEGRO_BITMAP* canvas) +<a name="l00209"></a>00209 { +<a name="l00210"></a>00210 ALLEGRO_BITMAP* prev_draw = al_get_target_bitmap(); +<a name="l00211"></a>00211 al_set_target_bitmap(canvas); +<a name="l00212"></a>00212 +<a name="l00213"></a>00213 al_draw_filled_rounded_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/3.33, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/5, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.25, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.04, 5, 5, al_map_rgb (200, 200, 200)); +<a name="l00214"></a>00214 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2.3, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2.1, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2-1, al_map_rgb (255, 0, 0),1); +<a name="l00215"></a>00215 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/4, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/4, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/4, al_map_rgb (100, 100, 100),2); +<a name="l00216"></a>00216 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/5, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.5, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/4, al_map_rgb (255, 0, 0),4); +<a name="l00217"></a>00217 al_draw_filled_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2.5, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.43, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.7, al_map_rgb (0,0, 0)); +<a name="l00218"></a>00218 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2.5, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2.7, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/3, al_map_rgb (100, 100, 100),3); +<a name="l00219"></a>00219 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.8, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/3.7, al_map_rgb (255, 0, 0),2); +<a name="l00220"></a>00220 al_draw_rectangle(<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/3.13, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.04, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.25, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>, al_map_rgb (25,25, 112),1); +<a name="l00221"></a>00221 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2.8, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/6, al_map_rgb (255, 0, 0),3); +<a name="l00222"></a>00222 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.1, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/3, al_map_rgb (100, 100, 100),2); +<a name="l00223"></a>00223 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.7, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2, al_map_rgb (100, 100, 100),3); +<a name="l00224"></a>00224 al_draw_circle (<a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.3, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/1.3, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/5, al_map_rgb (255, 0, 0),2); +<a name="l00225"></a>00225 +<a name="l00226"></a>00226 al_set_target_bitmap(prev_draw); +<a name="l00227"></a>00227 } +<a name="l00228"></a>00228 +<a name="l00229"></a><a class="code" href="class_bitmap_store.html#a07f505192ccf0717d6aed29761934a5c">00229</a> <span class="keywordtype">void</span> <a class="code" href="class_bitmap_store.html#a07f505192ccf0717d6aed29761934a5c" title="Draws the popup that appears when a checkpoint is collected.">BitmapStore::drawClaimedCheckpoint</a>(ALLEGRO_BITMAP* canvas) +<a name="l00230"></a>00230 { +<a name="l00231"></a>00231 ALLEGRO_BITMAP* prev_draw = al_get_target_bitmap(); +<a name="l00232"></a>00232 al_set_target_bitmap(canvas); +<a name="l00233"></a>00233 +<a name="l00234"></a>00234 ALLEGRO_COLOR colour = al_map_rgb(255,255,255); +<a name="l00235"></a>00235 al_draw_text(<a class="code" href="class_bitmap_store.html#a0c73c3c20f8093c83707cde15c4fed5f" title="Font used for writing text on bitmaps.">_bitmapFont</a>, colour, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2, <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>/2, ALLEGRO_ALIGN_CENTRE , <span class="stringliteral">"GOTCHA"</span>); +<a name="l00236"></a>00236 +<a name="l00237"></a>00237 al_set_target_bitmap(prev_draw); +<a name="l00238"></a>00238 } +</pre></div></div> +</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:30 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> diff --git a/docs/html/_bitmap_store_8h.html b/docs/html/_bitmap_store_8h.html new file mode 100644 index 0000000..b28903f --- /dev/null +++ b/docs/html/_bitmap_store_8h.html @@ -0,0 +1,125 @@ +<!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: source/presentation/BitmapStore.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/presentation/BitmapStore.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include <string></code><br/> +<code>#include <map></code><br/> +<code>#include <allegro5/allegro.h></code><br/> +<code>#include <allegro5/allegro_primitives.h></code><br/> +<code>#include <allegro5/allegro_font.h></code><br/> +<code>#include <allegro5/allegro_ttf.h></code><br/> +<code>#include <allegro5/allegro_native_dialog.h></code><br/> +<code>#include "../logic/AllegroWrappers.h"</code><br/> +</div> +<p><a href="_bitmap_store_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_bitmap_store.html">BitmapStore</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Class for accessing images in ALLEGRO_BITMAP format and low level drawing. <a href="class_bitmap_store.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_bitmap_store_8h_source.html b/docs/html/_bitmap_store_8h_source.html new file mode 100644 index 0000000..499cfc9 --- /dev/null +++ b/docs/html/_bitmap_store_8h_source.html @@ -0,0 +1,156 @@ +<!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: source/presentation/BitmapStore.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/BitmapStore.h</div> </div> +</div> +<div class="contents"> +<a href="_bitmap_store_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef BITMAPSTORE_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define BITMAPSTORE_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include <string></span> +<a name="l00005"></a>00005 <span class="preprocessor">#include <map></span> +<a name="l00006"></a>00006 <span class="keyword">using namespace </span>std; +<a name="l00007"></a>00007 +<a name="l00008"></a>00008 <span class="preprocessor">#include <allegro5/allegro.h></span> +<a name="l00009"></a>00009 <span class="preprocessor">#include <allegro5/allegro_primitives.h></span> +<a name="l00010"></a>00010 <span class="preprocessor">#include <allegro5/allegro_font.h></span> +<a name="l00011"></a>00011 <span class="preprocessor">#include <allegro5/allegro_ttf.h></span> +<a name="l00012"></a>00012 <span class="preprocessor">#include <allegro5/allegro_native_dialog.h></span> +<a name="l00013"></a>00013 +<a name="l00014"></a>00014 <span class="preprocessor">#include "../logic/AllegroWrappers.h"</span> +<a name="l00015"></a>00015 +<a name="l00030"></a><a class="code" href="class_bitmap_store.html">00030</a> <span class="keyword">class </span><a class="code" href="class_bitmap_store.html" title="Class for accessing images in ALLEGRO_BITMAP format and low level drawing.">BitmapStore</a> +<a name="l00031"></a>00031 { +<a name="l00032"></a>00032 <span class="keyword">public</span>: +<a name="l00038"></a>00038 <a class="code" href="class_bitmap_store.html" title="Class for accessing images in ALLEGRO_BITMAP format and low level drawing.">BitmapStore</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> blockWidth); +<a name="l00042"></a>00042 ~<a class="code" href="class_bitmap_store.html" title="Class for accessing images in ALLEGRO_BITMAP format and low level drawing.">BitmapStore</a>(); +<a name="l00043"></a>00043 +<a name="l00047"></a><a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a91fec244d29999552e93ecb7578713fb">00047</a> <span class="keyword">enum</span> <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386" title="Type used to define which image should be returned.">Image</a> {PLAYER, ENEMY, ROCK, CHECKPOINT, MAZE_WALL, MAZE_FLOOR, <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a91fec244d29999552e93ecb7578713fb">SMOKE</a>, CRASHED_CAR, CLAIMED_CHECKPOINT}; +<a name="l00048"></a>00048 +<a name="l00055"></a>00055 ALLEGRO_BITMAP* getBitmap(Image image); +<a name="l00056"></a>00056 +<a name="l00057"></a>00057 <span class="keyword">private</span>: +<a name="l00063"></a>00063 <a class="code" href="class_bitmap_store.html" title="Class for accessing images in ALLEGRO_BITMAP format and low level drawing.">BitmapStore</a>(<span class="keyword">const</span> <a class="code" href="class_bitmap_store.html" title="Class for accessing images in ALLEGRO_BITMAP format and low level drawing.">BitmapStore</a>& ref); +<a name="l00069"></a>00069 <a class="code" href="class_bitmap_store.html" title="Class for accessing images in ALLEGRO_BITMAP format and low level drawing.">BitmapStore</a>& operator=(<span class="keyword">const</span> <a class="code" href="class_bitmap_store.html" title="Class for accessing images in ALLEGRO_BITMAP format and low level drawing.">BitmapStore</a>& rhs); +<a name="l00070"></a>00070 +<a name="l00076"></a>00076 <span class="keywordtype">void</span> drawPlayerCar(ALLEGRO_BITMAP* canvas); +<a name="l00082"></a>00082 <span class="keywordtype">void</span> drawEnemyCar(ALLEGRO_BITMAP* canvas); +<a name="l00088"></a>00088 <span class="keywordtype">void</span> drawRock(ALLEGRO_BITMAP* canvas); +<a name="l00094"></a>00094 <span class="keywordtype">void</span> drawCheckpoint(ALLEGRO_BITMAP* canvas); +<a name="l00100"></a>00100 <span class="keywordtype">void</span> drawMazeWall(ALLEGRO_BITMAP* canvas); +<a name="l00106"></a>00106 <span class="keywordtype">void</span> drawMazeFloor(ALLEGRO_BITMAP* canvas); +<a name="l00112"></a>00112 <span class="keywordtype">void</span> drawSmoke(ALLEGRO_BITMAP* canvas); +<a name="l00118"></a>00118 <span class="keywordtype">void</span> drawCrashedCar(ALLEGRO_BITMAP* canvas); +<a name="l00124"></a>00124 <span class="keywordtype">void</span> drawClaimedCheckpoint(ALLEGRO_BITMAP* canvas); +<a name="l00125"></a>00125 +<a name="l00126"></a><a class="code" href="class_bitmap_store.html#a12f738a24033673278a496c1aa5abcc8">00126</a> <a class="code" href="class_allegro_drawing_init.html" title="Class ensures that Allegro's primitive and text drawing is installed and uninstalled when appropriate...">AllegroDrawingInit</a> <a class="code" href="class_bitmap_store.html#a12f738a24033673278a496c1aa5abcc8" title="Ensures that Allegro is initialized while an object of this class exists.">_drawingInstalls</a>; +<a name="l00127"></a>00127 +<a name="l00128"></a><a class="code" href="class_bitmap_store.html#a0c73c3c20f8093c83707cde15c4fed5f">00128</a> ALLEGRO_FONT* <a class="code" href="class_bitmap_store.html#a0c73c3c20f8093c83707cde15c4fed5f" title="Font used for writing text on bitmaps.">_bitmapFont</a>; +<a name="l00129"></a>00129 +<a name="l00135"></a><a class="code" href="class_bitmap_store.html#ae3d18969f61f97fce6622cb6f7004711">00135</a> map<Image, ALLEGRO_BITMAP*> <a class="code" href="class_bitmap_store.html#ae3d18969f61f97fce6622cb6f7004711" title="map containing pairs of Images (the enumerated type) and the actual images.">_bitmaps</a>; +<a name="l00136"></a>00136 +<a name="l00137"></a><a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff">00137</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_bitmap_store.html#a157ce6e07689037e1081ccf87eaa2fff" title="The width of a square image in the store.">_blockWidth</a>; +<a name="l00138"></a>00138 }; +<a name="l00139"></a>00139 +<a name="l00140"></a>00140 <span class="preprocessor">#endif // BITMAPSTORE_H</span> +</pre></div></div> +</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:30 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> diff --git a/docs/html/_car_8cpp.html b/docs/html/_car_8cpp.html new file mode 100644 index 0000000..85b89ff --- /dev/null +++ b/docs/html/_car_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/logic/Car.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/Car.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_car_8h_source.html">Car.h</a>"</code><br/> +</div> +<p><a href="_car_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_car_8cpp_source.html b/docs/html/_car_8cpp_source.html new file mode 100644 index 0000000..86062e9 --- /dev/null +++ b/docs/html/_car_8cpp_source.html @@ -0,0 +1,182 @@ +<!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: source/logic/Car.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/Car.cpp</div> </div> +</div> +<div class="contents"> +<a href="_car_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_car_8h.html">Car.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a><a class="code" href="class_car.html#a3bd1dc6b75af9dc5bbe4354e0b3161d0">00003</a> <a class="code" href="class_car.html#a3bd1dc6b75af9dc5bbe4354e0b3161d0" title="Creates a Car at the given position, with the given image, facing in the given direction.">Car::Car</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386" title="Type used to define which image should be returned.">BitmapStore::Image</a> image, <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f" title="Defines the directions in which movement can happen in the maze.">Maze::Direction</a> facing) +<a name="l00004"></a>00004 :<a class="code" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a>(x,y,image,facing), +<a name="l00005"></a>00005 _speed(_baseSpeed) +<a name="l00006"></a>00006 { +<a name="l00007"></a>00007 } +<a name="l00008"></a>00008 +<a name="l00009"></a><a class="code" href="class_car.html#a68b59187e1520a5d016b0894b4c116b9">00009</a> <span class="keywordtype">double</span> <a class="code" href="class_car.html#a68b59187e1520a5d016b0894b4c116b9" title="Function to access the current speed of the car.">Car::speed</a>()<span class="keyword"> const</span> +<a name="l00010"></a>00010 <span class="keyword"></span>{ +<a name="l00011"></a>00011 <span class="keywordflow">return</span> <a class="code" href="class_car.html#a84b3d05e98d66f358942193ff54dee51" title="The current speed that the Car is moving at.">_speed</a>; +<a name="l00012"></a>00012 } +<a name="l00013"></a>00013 +<a name="l00014"></a><a class="code" href="class_car.html#a85e8699362bb5206e4142dbd5d20dcb9">00014</a> <span class="keywordtype">void</span> <a class="code" href="class_car.html#a85e8699362bb5206e4142dbd5d20dcb9" title="Moves the car by its current speed in the direction of its facing.">Car::move</a>(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze) +<a name="l00015"></a>00015 { +<a name="l00016"></a>00016 <span class="keywordtype">double</span> targetX = 0; +<a name="l00017"></a>00017 <span class="keywordtype">double</span> targetY = 0; +<a name="l00018"></a>00018 +<a name="l00019"></a>00019 <span class="keywordtype">int</span> checkX = 0; +<a name="l00020"></a>00020 <span class="keywordtype">int</span> checkY = 0; +<a name="l00021"></a>00021 +<a name="l00022"></a>00022 <span class="keywordflow">switch</span>(<a class="code" href="class_game_object.html#a24d36b1a64504298700a7ae7111fad5d" title="The direction in which the object is facing, up, down, left, or right.">_facing</a>) +<a name="l00023"></a>00023 { +<a name="l00024"></a>00024 <span class="keywordflow">case</span> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fad2e008a4b04be5e2d3559c70193920e7">Maze::UP</a>: +<a name="l00025"></a>00025 targetX = <a class="code" href="class_maze_math.html#a2314f211065f4dc7cb11469770fd2f1c" title="Rounds a value to the nearest integer.">MazeMath::round</a>(<a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a>); +<a name="l00026"></a>00026 targetY = <a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a> - <a class="code" href="class_car.html#a84b3d05e98d66f358942193ff54dee51" title="The current speed that the Car is moving at.">_speed</a>; +<a name="l00027"></a>00027 checkX = floor(targetX); +<a name="l00028"></a>00028 checkY = floor(targetY); +<a name="l00029"></a>00029 <span class="keywordflow">break</span>; +<a name="l00030"></a>00030 <span class="keywordflow">case</span> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fa89ab143d020541957ab5e0e9cfdd3e23">Maze::DOWN</a>: +<a name="l00031"></a>00031 targetX = <a class="code" href="class_maze_math.html#a2314f211065f4dc7cb11469770fd2f1c" title="Rounds a value to the nearest integer.">MazeMath::round</a>(<a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a>); +<a name="l00032"></a>00032 targetY = <a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a> + <a class="code" href="class_car.html#a84b3d05e98d66f358942193ff54dee51" title="The current speed that the Car is moving at.">_speed</a>; +<a name="l00033"></a>00033 checkX = floor(targetX); +<a name="l00034"></a>00034 checkY = ceil(targetY); +<a name="l00035"></a>00035 <span class="keywordflow">break</span>; +<a name="l00036"></a>00036 <span class="keywordflow">case</span> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28faab1a1fe0274cd139b3c0116d8caf458c">Maze::LEFT</a>: +<a name="l00037"></a>00037 targetX = <a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a> - <a class="code" href="class_car.html#a84b3d05e98d66f358942193ff54dee51" title="The current speed that the Car is moving at.">_speed</a>; +<a name="l00038"></a>00038 targetY = <a class="code" href="class_maze_math.html#a2314f211065f4dc7cb11469770fd2f1c" title="Rounds a value to the nearest integer.">MazeMath::round</a>(<a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a>); +<a name="l00039"></a>00039 checkX = floor(targetX); +<a name="l00040"></a>00040 checkY = floor(targetY); +<a name="l00041"></a>00041 <span class="keywordflow">break</span>; +<a name="l00042"></a>00042 <span class="keywordflow">case</span> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fa699ae3e1d989e9b12bd200aa86e29e9d">Maze::RIGHT</a>: +<a name="l00043"></a>00043 targetX = <a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a> + <a class="code" href="class_car.html#a84b3d05e98d66f358942193ff54dee51" title="The current speed that the Car is moving at.">_speed</a>; +<a name="l00044"></a>00044 targetY = <a class="code" href="class_maze_math.html#a2314f211065f4dc7cb11469770fd2f1c" title="Rounds a value to the nearest integer.">MazeMath::round</a>(<a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a>); +<a name="l00045"></a>00045 checkX = ceil(targetX); +<a name="l00046"></a>00046 checkY = floor(targetY); +<a name="l00047"></a>00047 <span class="keywordflow">break</span>; +<a name="l00048"></a>00048 } +<a name="l00049"></a>00049 +<a name="l00050"></a>00050 <span class="keywordflow">if</span> (!maze.<a class="code" href="class_maze.html#a1bbdfece82c4ba90ffcf2fea52e5fef1" title="Checks if a given position contains a wall or not.">getSolid</a>(checkX, checkY)) +<a name="l00051"></a>00051 { +<a name="l00052"></a>00052 <span class="comment">//can move that way</span> +<a name="l00053"></a>00053 <a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a> = targetX; +<a name="l00054"></a>00054 <a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a> = targetY; +<a name="l00055"></a>00055 } +<a name="l00056"></a>00056 <span class="keywordflow">else</span> +<a name="l00057"></a>00057 { +<a name="l00058"></a>00058 <span class="comment">//can not move to targetX and targetY, but move to the edge of current block</span> +<a name="l00059"></a>00059 <span class="keywordflow">switch</span>(<a class="code" href="class_game_object.html#a24d36b1a64504298700a7ae7111fad5d" title="The direction in which the object is facing, up, down, left, or right.">_facing</a>) +<a name="l00060"></a>00060 { +<a name="l00061"></a>00061 <span class="keywordflow">case</span> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fad2e008a4b04be5e2d3559c70193920e7">Maze::UP</a>: +<a name="l00062"></a>00062 <a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a> = floor(<a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a>); +<a name="l00063"></a>00063 <span class="keywordflow">break</span>; +<a name="l00064"></a>00064 <span class="keywordflow">case</span> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fa89ab143d020541957ab5e0e9cfdd3e23">Maze::DOWN</a>: +<a name="l00065"></a>00065 <a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a> = ceil(<a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a>); +<a name="l00066"></a>00066 <span class="keywordflow">break</span>; +<a name="l00067"></a>00067 <span class="keywordflow">case</span> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28faab1a1fe0274cd139b3c0116d8caf458c">Maze::LEFT</a>: +<a name="l00068"></a>00068 <a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a> = floor(<a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a>); +<a name="l00069"></a>00069 <span class="keywordflow">break</span>; +<a name="l00070"></a>00070 <span class="keywordflow">case</span> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fa699ae3e1d989e9b12bd200aa86e29e9d">Maze::RIGHT</a>: +<a name="l00071"></a>00071 <a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a> = ceil(<a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a>); +<a name="l00072"></a>00072 <span class="keywordflow">break</span>; +<a name="l00073"></a>00073 } +<a name="l00074"></a>00074 } +<a name="l00075"></a>00075 } +</pre></div></div> +</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:30 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> diff --git a/docs/html/_car_8h.html b/docs/html/_car_8h.html new file mode 100644 index 0000000..9e43493 --- /dev/null +++ b/docs/html/_car_8h.html @@ -0,0 +1,121 @@ +<!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: source/logic/Car.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/logic/Car.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include <cmath></code><br/> +<code>#include "../presentation/BitmapStore.h"</code><br/> +<code>#include "../logic/GameObject.h"</code><br/> +<code>#include "../logic/MazeMath.h"</code><br/> +</div> +<p><a href="_car_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_car.html">Car</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a> that moves through the maze and changes direction. <a href="class_car.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_car_8h_source.html b/docs/html/_car_8h_source.html new file mode 100644 index 0000000..ea3d522 --- /dev/null +++ b/docs/html/_car_8h_source.html @@ -0,0 +1,134 @@ +<!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: source/logic/Car.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/Car.h</div> </div> +</div> +<div class="contents"> +<a href="_car_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef CAR_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define CAR_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include <cmath></span> +<a name="l00005"></a>00005 <span class="keyword">using namespace </span>std; +<a name="l00006"></a>00006 +<a name="l00007"></a>00007 <span class="preprocessor">#include "../presentation/BitmapStore.h"</span> +<a name="l00008"></a>00008 <span class="preprocessor">#include "../logic/GameObject.h"</span> +<a name="l00009"></a>00009 <span class="preprocessor">#include "../logic/MazeMath.h"</span> +<a name="l00010"></a>00010 +<a name="l00020"></a><a class="code" href="class_car.html">00020</a> <span class="keyword">class </span><a class="code" href="class_car.html" title="GameObject that moves through the maze and changes direction.">Car</a> : <span class="keyword">public</span> <a class="code" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a> +<a name="l00021"></a>00021 { +<a name="l00022"></a>00022 <span class="keyword">public</span>: +<a name="l00031"></a>00031 <a class="code" href="class_car.html" title="GameObject that moves through the maze and changes direction.">Car</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386" title="Type used to define which image should be returned.">BitmapStore::Image</a> image, <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f" title="Defines the directions in which movement can happen in the maze.">Maze::Direction</a> facing); +<a name="l00032"></a>00032 +<a name="l00033"></a>00033 <span class="comment">//assignment and copy constructors have been left with the compiler generated versions</span> +<a name="l00034"></a>00034 +<a name="l00040"></a>00040 <span class="keywordtype">double</span> speed() <span class="keyword">const</span>; +<a name="l00041"></a>00041 +<a name="l00042"></a>00042 <span class="keyword">protected</span>: +<a name="l00051"></a>00051 <span class="keywordtype">void</span> move(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze); +<a name="l00052"></a>00052 +<a name="l00053"></a><a class="code" href="class_car.html#a84b3d05e98d66f358942193ff54dee51">00053</a> <span class="keywordtype">double</span> <a class="code" href="class_car.html#a84b3d05e98d66f358942193ff54dee51" title="The current speed that the Car is moving at.">_speed</a>; +<a name="l00054"></a><a class="code" href="class_car.html#a7b942584de02f8af6f571a60a1cf32ba">00054</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">double</span> _baseSpeed = 0.1; +<a name="l00055"></a>00055 }; +<a name="l00056"></a>00056 +<a name="l00057"></a>00057 <span class="preprocessor">#endif // CAR_H</span> +</pre></div></div> +</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:30 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> diff --git a/docs/html/_checkpoint_8cpp.html b/docs/html/_checkpoint_8cpp.html new file mode 100644 index 0000000..0d53ea6 --- /dev/null +++ b/docs/html/_checkpoint_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/logic/Checkpoint.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/Checkpoint.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_checkpoint_8h_source.html">Checkpoint.h</a>"</code><br/> +</div> +<p><a href="_checkpoint_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_checkpoint_8cpp_source.html b/docs/html/_checkpoint_8cpp_source.html new file mode 100644 index 0000000..0f2071d --- /dev/null +++ b/docs/html/_checkpoint_8cpp_source.html @@ -0,0 +1,137 @@ +<!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: source/logic/Checkpoint.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/Checkpoint.cpp</div> </div> +</div> +<div class="contents"> +<a href="_checkpoint_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_checkpoint_8h.html">Checkpoint.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a>00003 <span class="keywordtype">int</span> <a class="code" href="class_checkpoint.html#acb3ffc612d2a496b6b95752878818ff6" title="Count of the number of Checkpoints currently in existence.">Checkpoint::_checkpointCount</a> = 0; +<a name="l00004"></a>00004 +<a name="l00005"></a><a class="code" href="class_checkpoint.html#a20c371a9e21ac0092b652a7d63f46f85">00005</a> <a class="code" href="class_checkpoint.html#a20c371a9e21ac0092b652a7d63f46f85" title="Creates a checkpoint at the given coordinates.">Checkpoint::Checkpoint</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y) +<a name="l00006"></a>00006 :<a class="code" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a>(x,y,<a class="code" href="class_bitmap_store.html" title="Class for accessing images in ALLEGRO_BITMAP format and low level drawing.">BitmapStore</a>::CHECKPOINT) +<a name="l00007"></a>00007 { +<a name="l00008"></a>00008 ++<a class="code" href="class_checkpoint.html#acb3ffc612d2a496b6b95752878818ff6" title="Count of the number of Checkpoints currently in existence.">_checkpointCount</a>; +<a name="l00009"></a>00009 } +<a name="l00010"></a>00010 +<a name="l00011"></a><a class="code" href="class_checkpoint.html#ac94e0d92110fc4105bf5bf82ef4a5818">00011</a> <a class="code" href="class_checkpoint.html#a20c371a9e21ac0092b652a7d63f46f85" title="Creates a checkpoint at the given coordinates.">Checkpoint::Checkpoint</a>(<span class="keyword">const</span> <a class="code" href="class_checkpoint.html" title="GameObject that the player needs to pick up by driving over.">Checkpoint</a>& ref) +<a name="l00012"></a>00012 :<a class="code" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a>(ref._x,ref._y,ref._image) +<a name="l00013"></a>00013 { +<a name="l00014"></a>00014 ++<a class="code" href="class_checkpoint.html#acb3ffc612d2a496b6b95752878818ff6" title="Count of the number of Checkpoints currently in existence.">_checkpointCount</a>; +<a name="l00015"></a>00015 } +<a name="l00016"></a>00016 +<a name="l00017"></a><a class="code" href="class_checkpoint.html#a7fff1a4a6a71c2150a969fbe40d01c34">00017</a> <a class="code" href="class_checkpoint.html#a7fff1a4a6a71c2150a969fbe40d01c34" title="Destructor, decreases the number of Checkpoints in existence.">Checkpoint::~Checkpoint</a>() +<a name="l00018"></a>00018 { +<a name="l00019"></a>00019 --<a class="code" href="class_checkpoint.html#acb3ffc612d2a496b6b95752878818ff6" title="Count of the number of Checkpoints currently in existence.">_checkpointCount</a>; +<a name="l00020"></a>00020 } +<a name="l00021"></a>00021 +<a name="l00022"></a><a class="code" href="class_checkpoint.html#a872d8574b6f0a7960854fb1175e05f13">00022</a> <span class="keywordtype">int</span> <a class="code" href="class_checkpoint.html#a872d8574b6f0a7960854fb1175e05f13" title="Function for accessing the number of checkpoints that currently exist.">Checkpoint::checkpointCount</a>() +<a name="l00023"></a>00023 { +<a name="l00024"></a>00024 <span class="keywordflow">return</span> <a class="code" href="class_checkpoint.html#acb3ffc612d2a496b6b95752878818ff6" title="Count of the number of Checkpoints currently in existence.">_checkpointCount</a>; +<a name="l00025"></a>00025 } +<a name="l00026"></a>00026 +<a name="l00027"></a><a class="code" href="class_checkpoint.html#ad8f4b9da968e6b1f07080dc6f61282f7">00027</a> <span class="keywordtype">void</span> <a class="code" href="class_checkpoint.html#ad8f4b9da968e6b1f07080dc6f61282f7" title="Function to be called when a PlayerCar collects the Checkpoint.">Checkpoint::collect</a>() +<a name="l00028"></a>00028 { +<a name="l00029"></a>00029 <a class="code" href="class_game_object.html#adc4a399cc59d5706f75748fb3846faec" title="True if the object has been marked for destruction.">_destroyed</a> = <span class="keyword">true</span>; +<a name="l00030"></a>00030 } +</pre></div></div> +</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:30 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> diff --git a/docs/html/_checkpoint_8h.html b/docs/html/_checkpoint_8h.html new file mode 100644 index 0000000..7fb441b --- /dev/null +++ b/docs/html/_checkpoint_8h.html @@ -0,0 +1,119 @@ +<!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: source/logic/Checkpoint.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/logic/Checkpoint.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "../logic/GameObject.h"</code><br/> +<code>#include "../presentation/BitmapStore.h"</code><br/> +</div> +<p><a href="_checkpoint_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_checkpoint.html">Checkpoint</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a> that the player needs to pick up by driving over. <a href="class_checkpoint.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_checkpoint_8h_source.html b/docs/html/_checkpoint_8h_source.html new file mode 100644 index 0000000..27a7f35 --- /dev/null +++ b/docs/html/_checkpoint_8h_source.html @@ -0,0 +1,132 @@ +<!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: source/logic/Checkpoint.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/Checkpoint.h</div> </div> +</div> +<div class="contents"> +<a href="_checkpoint_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef CHECKPOINT_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define CHECKPOINT_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include "../logic/GameObject.h"</span> +<a name="l00005"></a>00005 <span class="preprocessor">#include "../presentation/BitmapStore.h"</span> +<a name="l00006"></a>00006 +<a name="l00015"></a><a class="code" href="class_checkpoint.html">00015</a> <span class="keyword">class </span><a class="code" href="class_checkpoint.html" title="GameObject that the player needs to pick up by driving over.">Checkpoint</a>: <span class="keyword">public</span> <a class="code" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a> +<a name="l00016"></a>00016 { +<a name="l00017"></a>00017 <span class="keyword">public</span>: +<a name="l00023"></a>00023 <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="class_checkpoint.html#a872d8574b6f0a7960854fb1175e05f13" title="Function for accessing the number of checkpoints that currently exist.">checkpointCount</a>(); +<a name="l00024"></a>00024 +<a name="l00031"></a>00031 <a class="code" href="class_checkpoint.html#a20c371a9e21ac0092b652a7d63f46f85" title="Creates a checkpoint at the given coordinates.">Checkpoint</a>(<span class="keywordtype">double</span> <a class="code" href="class_game_object.html#a676dd981c2891493782de36fb4618cd8" title="Provides access to the x coordinate of the object.">x</a>, <span class="keywordtype">double</span> <a class="code" href="class_game_object.html#a293548656551d6aed5f714f8c4a3235b" title="Provides access to the y coordinate of the object.">y</a>); +<a name="l00035"></a>00035 <a class="code" href="class_checkpoint.html#a20c371a9e21ac0092b652a7d63f46f85" title="Creates a checkpoint at the given coordinates.">Checkpoint</a>(<span class="keyword">const</span> <a class="code" href="class_checkpoint.html" title="GameObject that the player needs to pick up by driving over.">Checkpoint</a>& ref); +<a name="l00036"></a>00036 +<a name="l00037"></a>00037 <span class="comment">//assignment operator has been left with the compiler generated version.</span> +<a name="l00038"></a>00038 +<a name="l00042"></a>00042 <a class="code" href="class_checkpoint.html#a7fff1a4a6a71c2150a969fbe40d01c34" title="Destructor, decreases the number of Checkpoints in existence.">~Checkpoint</a>(); +<a name="l00043"></a>00043 +<a name="l00047"></a>00047 <span class="keywordtype">void</span> <a class="code" href="class_checkpoint.html#ad8f4b9da968e6b1f07080dc6f61282f7" title="Function to be called when a PlayerCar collects the Checkpoint.">collect</a>(); +<a name="l00048"></a>00048 +<a name="l00049"></a>00049 <span class="keyword">private</span>: +<a name="l00050"></a><a class="code" href="class_checkpoint.html#acb3ffc612d2a496b6b95752878818ff6">00050</a> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="class_checkpoint.html#acb3ffc612d2a496b6b95752878818ff6" title="Count of the number of Checkpoints currently in existence.">_checkpointCount</a>; +<a name="l00051"></a>00051 }; +<a name="l00052"></a>00052 +<a name="l00053"></a>00053 <span class="preprocessor">#endif // CHECKPOINT_H</span> +</pre></div></div> +</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:30 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> diff --git a/docs/html/_collision_detector_8cpp.html b/docs/html/_collision_detector_8cpp.html new file mode 100644 index 0000000..3d34fe5 --- /dev/null +++ b/docs/html/_collision_detector_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/logic/CollisionDetector.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/CollisionDetector.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_collision_detector_8h_source.html">CollisionDetector.h</a>"</code><br/> +</div> +<p><a href="_collision_detector_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_collision_detector_8cpp_source.html b/docs/html/_collision_detector_8cpp_source.html new file mode 100644 index 0000000..4c6b1e4 --- /dev/null +++ b/docs/html/_collision_detector_8cpp_source.html @@ -0,0 +1,171 @@ +<!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: source/logic/CollisionDetector.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/CollisionDetector.cpp</div> </div> +</div> +<div class="contents"> +<a href="_collision_detector_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_collision_detector_8h.html">CollisionDetector.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a><a class="code" href="class_collision_detector.html#a6ee96032c26ceeab038d2702d7064c7b">00003</a> <span class="keywordtype">void</span> <a class="code" href="class_collision_detector.html#a6ee96032c26ceeab038d2702d7064c7b" title="Checks for collisions between all relevant pairs of objects, and calls the relevant collision functio...">CollisionDetector::checkCollisions</a>(list<PlayerCar>& players, list<EnemyCar>& enemies, list<Checkpoint>& checkpoints, list<Rock>& rocks, list<Smokescreen>& smokescreens) +<a name="l00004"></a>00004 { +<a name="l00005"></a>00005 <span class="keywordflow">for</span> (list<PlayerCar>::iterator playIter = players.begin(); playIter!=players.end(); ++playIter) +<a name="l00006"></a>00006 { +<a name="l00007"></a>00007 <span class="keywordflow">for</span> (list<EnemyCar>::iterator enemyIter = enemies.begin(); enemyIter!=enemies.end(); ++enemyIter) +<a name="l00008"></a>00008 { +<a name="l00009"></a>00009 <span class="keywordflow">if</span> ((abs(playIter->x() - enemyIter->x())<1)&&(abs(playIter->y() - enemyIter->y())<1)) +<a name="l00010"></a>00010 { +<a name="l00011"></a>00011 <a class="code" href="class_collision_detector.html#a9d013c0f8e15cbfd4741a0789ba507fe" title="Collision between a PlayerCar and a Checkpoint.">collision</a>(*playIter, *enemyIter); +<a name="l00012"></a>00012 } +<a name="l00013"></a>00013 } +<a name="l00014"></a>00014 +<a name="l00015"></a>00015 <span class="keywordflow">for</span> (list<Checkpoint>::iterator checkIter = checkpoints.begin(); checkIter!=checkpoints.end(); ++checkIter) +<a name="l00016"></a>00016 { +<a name="l00017"></a>00017 <span class="keywordflow">if</span> ((abs(playIter->x() - checkIter->x())<1)&&(abs(playIter->y() - checkIter->y())<1)) +<a name="l00018"></a>00018 { +<a name="l00019"></a>00019 <a class="code" href="class_collision_detector.html#a9d013c0f8e15cbfd4741a0789ba507fe" title="Collision between a PlayerCar and a Checkpoint.">collision</a>(*playIter, *checkIter); +<a name="l00020"></a>00020 } +<a name="l00021"></a>00021 } +<a name="l00022"></a>00022 +<a name="l00023"></a>00023 <span class="keywordflow">for</span> (list<Rock>::iterator rockIter = rocks.begin(); rockIter!=rocks.end(); ++rockIter) +<a name="l00024"></a>00024 { +<a name="l00025"></a>00025 <span class="keywordflow">if</span> ((abs(playIter->x() - rockIter->x())<1)&&(abs(playIter->y() - rockIter->y())<1)) +<a name="l00026"></a>00026 { +<a name="l00027"></a>00027 <a class="code" href="class_collision_detector.html#a9d013c0f8e15cbfd4741a0789ba507fe" title="Collision between a PlayerCar and a Checkpoint.">collision</a>(*playIter, *rockIter); +<a name="l00028"></a>00028 } +<a name="l00029"></a>00029 } +<a name="l00030"></a>00030 } +<a name="l00031"></a>00031 +<a name="l00032"></a>00032 <span class="keywordflow">for</span> (list<EnemyCar>::iterator enemyIter = enemies.begin(); enemyIter!=enemies.end(); ++enemyIter) +<a name="l00033"></a>00033 { +<a name="l00034"></a>00034 <span class="keywordflow">for</span> (list<Smokescreen>::iterator smokeIter = smokescreens.begin(); smokeIter!=smokescreens.end(); ++smokeIter) +<a name="l00035"></a>00035 { +<a name="l00036"></a>00036 <span class="keywordflow">if</span> ((abs(enemyIter->x() - smokeIter->x())<1)&&(abs(enemyIter->y() - smokeIter->y())<1)) +<a name="l00037"></a>00037 { +<a name="l00038"></a>00038 <a class="code" href="class_collision_detector.html#a9d013c0f8e15cbfd4741a0789ba507fe" title="Collision between a PlayerCar and a Checkpoint.">collision</a>(*enemyIter, *smokeIter); +<a name="l00039"></a>00039 } +<a name="l00040"></a>00040 } +<a name="l00041"></a>00041 } +<a name="l00042"></a>00042 } +<a name="l00043"></a>00043 +<a name="l00044"></a><a class="code" href="class_collision_detector.html#a9d013c0f8e15cbfd4741a0789ba507fe">00044</a> <span class="keywordtype">void</span> <a class="code" href="class_collision_detector.html#a9d013c0f8e15cbfd4741a0789ba507fe" title="Collision between a PlayerCar and a Checkpoint.">CollisionDetector::collision</a>(<a class="code" href="class_player_car.html" title="A GameObject that is controlled by the player.">PlayerCar</a>& player, <a class="code" href="class_checkpoint.html" title="GameObject that the player needs to pick up by driving over.">Checkpoint</a>& checkpoint) +<a name="l00045"></a>00045 { +<a name="l00046"></a>00046 player.<a class="code" href="class_player_car.html#aaa8b9d66c0c4e4eab5a303dd0a4e5f39" title="Function that is called when the PlayerCar collides with a Checkpoint.">gotCheckpoint</a>(); +<a name="l00047"></a>00047 checkpoint.<a class="code" href="class_checkpoint.html#ad8f4b9da968e6b1f07080dc6f61282f7" title="Function to be called when a PlayerCar collects the Checkpoint.">collect</a>(); +<a name="l00048"></a>00048 } +<a name="l00049"></a>00049 +<a name="l00050"></a><a class="code" href="class_collision_detector.html#ad9502a42ff9f43804284d0128794edaa">00050</a> <span class="keywordtype">void</span> <a class="code" href="class_collision_detector.html#a9d013c0f8e15cbfd4741a0789ba507fe" title="Collision between a PlayerCar and a Checkpoint.">CollisionDetector::collision</a>(<a class="code" href="class_player_car.html" title="A GameObject that is controlled by the player.">PlayerCar</a>& player, <a class="code" href="class_rock.html" title="A game object that acts as an obstacle to the player.">Rock</a>& rock) +<a name="l00051"></a>00051 { +<a name="l00052"></a>00052 player.<a class="code" href="class_player_car.html#a1bdd1dbdf1158b740cd1bcb757f8c578" title="Function that is called when the PlayerCar collides with an EnemyCar.">crash</a>(); +<a name="l00053"></a>00053 } +<a name="l00054"></a>00054 +<a name="l00055"></a><a class="code" href="class_collision_detector.html#a36e9c23d49ee7be68277c7d4e4f27d2a">00055</a> <span class="keywordtype">void</span> <a class="code" href="class_collision_detector.html#a9d013c0f8e15cbfd4741a0789ba507fe" title="Collision between a PlayerCar and a Checkpoint.">CollisionDetector::collision</a>(<a class="code" href="class_player_car.html" title="A GameObject that is controlled by the player.">PlayerCar</a>& player, <a class="code" href="class_enemy_car.html" title="GameObject that chases the player around the maze.">EnemyCar</a>& enemy) +<a name="l00056"></a>00056 { +<a name="l00057"></a>00057 player.<a class="code" href="class_player_car.html#a1bdd1dbdf1158b740cd1bcb757f8c578" title="Function that is called when the PlayerCar collides with an EnemyCar.">crash</a>(); +<a name="l00058"></a>00058 enemy.<a class="code" href="class_enemy_car.html#ac5836046e802a749abb2308886b34060" title="Function that is called when an EnemyCar crashes into a PlayerCar.">crash</a>(); +<a name="l00059"></a>00059 } +<a name="l00060"></a>00060 +<a name="l00061"></a><a class="code" href="class_collision_detector.html#a68572f5ec6cf32f28f07bda7a7b96452">00061</a> <span class="keywordtype">void</span> <a class="code" href="class_collision_detector.html#a9d013c0f8e15cbfd4741a0789ba507fe" title="Collision between a PlayerCar and a Checkpoint.">CollisionDetector::collision</a>(<a class="code" href="class_enemy_car.html" title="GameObject that chases the player around the maze.">EnemyCar</a>& enemy, <a class="code" href="class_smokescreen.html" title="GameObject that causes the EnemyCar to be delayed if they crash into it.">Smokescreen</a>& smokescreen) +<a name="l00062"></a>00062 { +<a name="l00063"></a>00063 enemy.<a class="code" href="class_enemy_car.html#aeb8bf92c965ab33f793b0274a02f142c" title="Function that is called when an EnemyCar drives into a Smokescreen.">blind</a>(); +<a name="l00064"></a>00064 } +</pre></div></div> +</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:30 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> diff --git a/docs/html/_collision_detector_8h.html b/docs/html/_collision_detector_8h.html new file mode 100644 index 0000000..6c4eea3 --- /dev/null +++ b/docs/html/_collision_detector_8h.html @@ -0,0 +1,123 @@ +<!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: source/logic/CollisionDetector.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/logic/CollisionDetector.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include <list></code><br/> +<code>#include "../logic/PlayerCar.h"</code><br/> +<code>#include "../logic/EnemyCar.h"</code><br/> +<code>#include "../logic/Checkpoint.h"</code><br/> +<code>#include "../logic/Rock.h"</code><br/> +<code>#include "../logic/Smokescreen.h"</code><br/> +</div> +<p><a href="_collision_detector_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_collision_detector.html">CollisionDetector</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Object for handling collisions between GameObjects. <a href="class_collision_detector.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_collision_detector_8h_source.html b/docs/html/_collision_detector_8h_source.html new file mode 100644 index 0000000..675431f --- /dev/null +++ b/docs/html/_collision_detector_8h_source.html @@ -0,0 +1,137 @@ +<!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: source/logic/CollisionDetector.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/CollisionDetector.h</div> </div> +</div> +<div class="contents"> +<a href="_collision_detector_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef COLLISIONDETECTOR_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define COLLISIONDETECTOR_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include <list></span> +<a name="l00005"></a>00005 <span class="keyword">using namespace </span>std; +<a name="l00006"></a>00006 +<a name="l00007"></a>00007 <span class="preprocessor">#include "../logic/PlayerCar.h"</span> +<a name="l00008"></a>00008 <span class="preprocessor">#include "../logic/EnemyCar.h"</span> +<a name="l00009"></a>00009 <span class="preprocessor">#include "../logic/Checkpoint.h"</span> +<a name="l00010"></a>00010 <span class="preprocessor">#include "../logic/Rock.h"</span> +<a name="l00011"></a>00011 <span class="preprocessor">#include "../logic/Smokescreen.h"</span> +<a name="l00012"></a>00012 +<a name="l00022"></a><a class="code" href="class_collision_detector.html">00022</a> <span class="keyword">class </span><a class="code" href="class_collision_detector.html" title="Object for handling collisions between GameObjects.">CollisionDetector</a> +<a name="l00023"></a>00023 { +<a name="l00024"></a>00024 <span class="keyword">public</span>: +<a name="l00037"></a>00037 <span class="keywordtype">void</span> checkCollisions(list<PlayerCar>& players, list<EnemyCar>& enemies, list<Checkpoint>& checkpoints, list<Rock>& rocks, list<Smokescreen>& smokescreens); +<a name="l00038"></a>00038 +<a name="l00039"></a>00039 <span class="comment">//assignment and copy constructors have been left with the compiler generated versions</span> +<a name="l00040"></a>00040 +<a name="l00041"></a>00041 <span class="keyword">private</span>: +<a name="l00048"></a>00048 <span class="keywordtype">void</span> collision(<a class="code" href="class_player_car.html" title="A GameObject that is controlled by the player.">PlayerCar</a>& player, <a class="code" href="class_checkpoint.html" title="GameObject that the player needs to pick up by driving over.">Checkpoint</a>& checkpoint); +<a name="l00049"></a>00049 +<a name="l00056"></a>00056 <span class="keywordtype">void</span> collision(<a class="code" href="class_player_car.html" title="A GameObject that is controlled by the player.">PlayerCar</a>& player, <a class="code" href="class_enemy_car.html" title="GameObject that chases the player around the maze.">EnemyCar</a>& enemy); +<a name="l00057"></a>00057 +<a name="l00064"></a>00064 <span class="keywordtype">void</span> collision(<a class="code" href="class_player_car.html" title="A GameObject that is controlled by the player.">PlayerCar</a>& player, <a class="code" href="class_rock.html" title="A game object that acts as an obstacle to the player.">Rock</a>& rock); +<a name="l00065"></a>00065 +<a name="l00072"></a>00072 <span class="keywordtype">void</span> collision(<a class="code" href="class_enemy_car.html" title="GameObject that chases the player around the maze.">EnemyCar</a>& enemy, <a class="code" href="class_smokescreen.html" title="GameObject that causes the EnemyCar to be delayed if they crash into it.">Smokescreen</a>& smokescreen); +<a name="l00073"></a>00073 }; +<a name="l00074"></a>00074 +<a name="l00075"></a>00075 <span class="preprocessor">#endif // COLLISIONDETECTOR_H</span> +</pre></div></div> +</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:30 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> diff --git a/docs/html/_colour_store_8cpp.html b/docs/html/_colour_store_8cpp.html new file mode 100644 index 0000000..ead690a --- /dev/null +++ b/docs/html/_colour_store_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/presentation/ColourStore.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/ColourStore.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_colour_store_8h_source.html">ColourStore.h</a>"</code><br/> +</div> +<p><a href="_colour_store_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_colour_store_8cpp_source.html b/docs/html/_colour_store_8cpp_source.html new file mode 100644 index 0000000..8b28e13 --- /dev/null +++ b/docs/html/_colour_store_8cpp_source.html @@ -0,0 +1,132 @@ +<!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: source/presentation/ColourStore.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/ColourStore.cpp</div> </div> +</div> +<div class="contents"> +<a href="_colour_store_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_colour_store_8h.html">ColourStore.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a><a class="code" href="class_colour_store.html#a667f2e3c6d5b6eb553f58724e58bbed0">00003</a> <a class="code" href="class_colour_store.html#a667f2e3c6d5b6eb553f58724e58bbed0" title="Creates the ColourStore object and initialises all of the colours.">ColourStore::ColourStore</a>() +<a name="l00004"></a>00004 { +<a name="l00005"></a>00005 <a class="code" href="class_colour_store.html#ad3f729c8e9f6a94bacd85e6db47e2e82" title="Initialises all of the relevant colours.">populateColours</a>(); +<a name="l00006"></a>00006 } +<a name="l00007"></a>00007 +<a name="l00008"></a><a class="code" href="class_colour_store.html#ad3f729c8e9f6a94bacd85e6db47e2e82">00008</a> <span class="keywordtype">void</span> <a class="code" href="class_colour_store.html#ad3f729c8e9f6a94bacd85e6db47e2e82" title="Initialises all of the relevant colours.">ColourStore::populateColours</a>() +<a name="l00009"></a>00009 { +<a name="l00010"></a>00010 <a class="code" href="class_colour_store.html#acb64b1ffc465fa752a2f282da4c9afba">_colours</a>[<a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386acdaf29947fecd91b452e554a75fb9e92">BitmapStore::PLAYER</a>] = al_map_rgb(0,255,255); +<a name="l00011"></a>00011 <a class="code" href="class_colour_store.html#acb64b1ffc465fa752a2f282da4c9afba">_colours</a>[<a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a8a7d9a89e243914ca702660237d4f81d">BitmapStore::ENEMY</a>] = al_map_rgb(255,0,0); +<a name="l00012"></a>00012 <a class="code" href="class_colour_store.html#acb64b1ffc465fa752a2f282da4c9afba">_colours</a>[<a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a780d6b9e20ec37fbaf5a40ca846795d9">BitmapStore::CHECKPOINT</a>] = al_map_rgb(0,255,0); +<a name="l00013"></a>00013 <a class="code" href="class_colour_store.html#acb64b1ffc465fa752a2f282da4c9afba">_colours</a>[<a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386ae662e77b349a8e22c5826ef35b1b5d9a">BitmapStore::MAZE_WALL</a>] = al_map_rgb(255,255,255); +<a name="l00014"></a>00014 <a class="code" href="class_colour_store.html#acb64b1ffc465fa752a2f282da4c9afba">_colours</a>[<a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a4e2a075dff2c02bf40b134c9090d1f02">BitmapStore::MAZE_FLOOR</a>] = al_map_rgb(0,0,0); +<a name="l00015"></a>00015 <a class="code" href="class_colour_store.html#acadd8e6ed32fe6535252c94124df04ca" title="Initialised to have an alpha of 0, and returned when the colour of an unlisted image is requested...">_transparent</a> = al_map_rgba(0,0,0,0); +<a name="l00016"></a>00016 } +<a name="l00017"></a>00017 +<a name="l00018"></a><a class="code" href="class_colour_store.html#ac8474c4e9b335215f03ec2c749847ad2">00018</a> ALLEGRO_COLOR <a class="code" href="class_colour_store.html#ac8474c4e9b335215f03ec2c749847ad2" title="Returns the colour associated with a given image.">ColourStore::getColour</a>(<a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386" title="Type used to define which image should be returned.">BitmapStore::Image</a> image) +<a name="l00019"></a>00019 { +<a name="l00020"></a>00020 <span class="keywordflow">if</span> (<a class="code" href="class_colour_store.html#acb64b1ffc465fa752a2f282da4c9afba">_colours</a>.find(image) != <a class="code" href="class_colour_store.html#acb64b1ffc465fa752a2f282da4c9afba">_colours</a>.end()) +<a name="l00021"></a>00021 { +<a name="l00022"></a>00022 <span class="keywordflow">return</span> <a class="code" href="class_colour_store.html#acb64b1ffc465fa752a2f282da4c9afba">_colours</a>[image]; +<a name="l00023"></a>00023 } +<a name="l00024"></a>00024 <span class="keywordflow">else</span> <span class="keywordflow">return</span> <a class="code" href="class_colour_store.html#acadd8e6ed32fe6535252c94124df04ca" title="Initialised to have an alpha of 0, and returned when the colour of an unlisted image is requested...">_transparent</a>; +<a name="l00025"></a>00025 } +</pre></div></div> +</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:30 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> diff --git a/docs/html/_colour_store_8h.html b/docs/html/_colour_store_8h.html new file mode 100644 index 0000000..2a66a98 --- /dev/null +++ b/docs/html/_colour_store_8h.html @@ -0,0 +1,119 @@ +<!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: source/presentation/ColourStore.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/presentation/ColourStore.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include <allegro5/allegro.h></code><br/> +<code>#include "../presentation/BitmapStore.h"</code><br/> +</div> +<p><a href="_colour_store_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_colour_store.html">ColourStore</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Class for mapping <a class="el" href="class_bitmap_store.html" title="Class for accessing images in ALLEGRO_BITMAP format and low level drawing.">BitmapStore</a> images to colours for use in the minimap. <a href="class_colour_store.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_colour_store_8h_source.html b/docs/html/_colour_store_8h_source.html new file mode 100644 index 0000000..9f47a79 --- /dev/null +++ b/docs/html/_colour_store_8h_source.html @@ -0,0 +1,132 @@ +<!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: source/presentation/ColourStore.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/ColourStore.h</div> </div> +</div> +<div class="contents"> +<a href="_colour_store_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef COLOURSTORE_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define COLOURSTORE_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include <allegro5/allegro.h></span> +<a name="l00005"></a>00005 +<a name="l00006"></a>00006 <span class="preprocessor">#include "../presentation/BitmapStore.h"</span> +<a name="l00007"></a>00007 +<a name="l00014"></a><a class="code" href="class_colour_store.html">00014</a> <span class="keyword">class </span><a class="code" href="class_colour_store.html" title="Class for mapping BitmapStore images to colours for use in the minimap.">ColourStore</a> +<a name="l00015"></a>00015 { +<a name="l00016"></a>00016 <span class="keyword">public</span>: +<a name="l00020"></a>00020 <a class="code" href="class_colour_store.html#a667f2e3c6d5b6eb553f58724e58bbed0" title="Creates the ColourStore object and initialises all of the colours.">ColourStore</a>(); +<a name="l00021"></a>00021 +<a name="l00032"></a>00032 ALLEGRO_COLOR <a class="code" href="class_colour_store.html#ac8474c4e9b335215f03ec2c749847ad2" title="Returns the colour associated with a given image.">getColour</a>(<a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386" title="Type used to define which image should be returned.">BitmapStore::Image</a> image); +<a name="l00033"></a>00033 <span class="keyword">private</span>: +<a name="l00039"></a>00039 <a class="code" href="class_colour_store.html#a667f2e3c6d5b6eb553f58724e58bbed0" title="Creates the ColourStore object and initialises all of the colours.">ColourStore</a>(<span class="keyword">const</span> <a class="code" href="class_colour_store.html" title="Class for mapping BitmapStore images to colours for use in the minimap.">ColourStore</a>& ref); +<a name="l00045"></a>00045 <a class="code" href="class_colour_store.html" title="Class for mapping BitmapStore images to colours for use in the minimap.">ColourStore</a>& <a class="code" href="class_colour_store.html#a2d3688dbcdf5f9f9b82ef50709c2f286" title="Unimplemented assignment operator.">operator=</a>(<span class="keyword">const</span> <a class="code" href="class_colour_store.html" title="Class for mapping BitmapStore images to colours for use in the minimap.">ColourStore</a>& rhs); +<a name="l00046"></a>00046 +<a name="l00047"></a><a class="code" href="class_colour_store.html#acb64b1ffc465fa752a2f282da4c9afba">00047</a> map<BitmapStore::Image, ALLEGRO_COLOR> <a class="code" href="class_colour_store.html#acb64b1ffc465fa752a2f282da4c9afba">_colours</a>; +<a name="l00048"></a>00048 +<a name="l00052"></a><a class="code" href="class_colour_store.html#acadd8e6ed32fe6535252c94124df04ca">00052</a> ALLEGRO_COLOR <a class="code" href="class_colour_store.html#acadd8e6ed32fe6535252c94124df04ca" title="Initialised to have an alpha of 0, and returned when the colour of an unlisted image is requested...">_transparent</a>; +<a name="l00053"></a>00053 +<a name="l00057"></a>00057 <span class="keywordtype">void</span> <a class="code" href="class_colour_store.html#ad3f729c8e9f6a94bacd85e6db47e2e82" title="Initialises all of the relevant colours.">populateColours</a>(); +<a name="l00058"></a>00058 }; +<a name="l00059"></a>00059 +<a name="l00060"></a>00060 <span class="preprocessor">#endif // COLOURSTORE_H</span> +</pre></div></div> +</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:30 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> diff --git a/docs/html/_config_8cpp.html b/docs/html/_config_8cpp.html new file mode 100644 index 0000000..cb9e56a --- /dev/null +++ b/docs/html/_config_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/data/Config.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/data/Config.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_config_8h_source.html">Config.h</a>"</code><br/> +</div> +<p><a href="_config_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_config_8cpp_source.html b/docs/html/_config_8cpp_source.html new file mode 100644 index 0000000..47e38eb --- /dev/null +++ b/docs/html/_config_8cpp_source.html @@ -0,0 +1,212 @@ +<!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: source/data/Config.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/data/Config.cpp</div> </div> +</div> +<div class="contents"> +<a href="_config_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_config_8h.html">Config.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a>00003 <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="class_config.html#abebfdbe6033183421dcdb4cdb6fc9549" title="The key for the screen width setting, initialized to "screen_width".">Config::SCREEN_WIDTH_KEY</a>(<span class="stringliteral">"screen_width"</span>); +<a name="l00004"></a>00004 <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="class_config.html#a5dd914d11bd6f43c06ad4682be0efaba" title="The key for the screen height setting, initialized to "screen_height".">Config::SCREEN_HEIGHT_KEY</a>(<span class="stringliteral">"screen_height"</span>); +<a name="l00005"></a>00005 <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="class_config.html#ae2dd20bca46b767d2a30c32de7ab78cb" title="The key for the fullscreen setting, initialized to "fullscreen".">Config::FULLSCREEN_KEY</a>(<span class="stringliteral">"fullscreen"</span>); +<a name="l00006"></a>00006 +<a name="l00007"></a>00007 <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="class_config.html#ad6f88b173db3508eaeb7b569655b5cf2" title="The default value for the screen width setting, initialized to 800.">Config::SCREEN_WIDTH_DEFAULT</a>(<span class="stringliteral">"800"</span>); +<a name="l00008"></a>00008 <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="class_config.html#a2382c43dd0d51b3d52bf88d18438c579" title="The default value for the screen height setting, initialized to 600.">Config::SCREEN_HEIGHT_DEFAULT</a>(<span class="stringliteral">"600"</span>); +<a name="l00009"></a>00009 <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="class_config.html#a3195b4273ebe9ac691167bff71394720" title="The default value for the fullscreen setting, initialized to false.">Config::FULLSCREEN_DEFAULT</a>(<span class="stringliteral">"false"</span>); +<a name="l00010"></a>00010 +<a name="l00011"></a>00011 +<a name="l00012"></a><a class="code" href="class_config.html#aab967ce080511b4ae5bf578cba5237d3">00012</a> <a class="code" href="class_config.html#aab967ce080511b4ae5bf578cba5237d3" title="Constructs a Config object from a file with the given path.">Config::Config</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>& filename) +<a name="l00013"></a>00013 :_screenWidth(0), +<a name="l00014"></a>00014 _screenHeight(0) +<a name="l00015"></a>00015 { +<a name="l00016"></a>00016 ifstream inStream(filename.c_str(), fstream::in); +<a name="l00017"></a>00017 +<a name="l00018"></a>00018 map<string, string> readValues; +<a name="l00019"></a>00019 map<string, string> unfoundValues; +<a name="l00020"></a>00020 <a class="code" href="class_config.html#aa9656bf85fa15fd4e90a99558f880602" title="Reads all of the settings defined in a file into a map.">readFile</a>(inStream, readValues); +<a name="l00021"></a>00021 <a class="code" href="class_config.html#ac31c5164b58f86c2a9ecaf21ac1f2202" title="Initialises the Config option's parameters to those in the readValues map.">fillValues</a>(readValues, unfoundValues); +<a name="l00022"></a>00022 +<a name="l00023"></a>00023 inStream.close(); +<a name="l00024"></a>00024 +<a name="l00025"></a>00025 ofstream outStream(filename.c_str(), fstream::app); +<a name="l00026"></a>00026 +<a name="l00027"></a>00027 <a class="code" href="class_config.html#a54612c3ce193bea917d3088175e16d43" title="Writes settings that were not found in the file to the file with default values.">writeUnfoundValues</a>(outStream, unfoundValues); +<a name="l00028"></a>00028 +<a name="l00029"></a>00029 outStream.close(); +<a name="l00030"></a>00030 } +<a name="l00031"></a>00031 +<a name="l00032"></a><a class="code" href="class_config.html#a3bb73797396d2d5ba8c9956730dfc4db">00032</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_config.html#a3bb73797396d2d5ba8c9956730dfc4db" title="Function for accessing the screen width setting in pixels.">Config::screenWidth</a>()<span class="keyword"> const</span> +<a name="l00033"></a>00033 <span class="keyword"></span>{ +<a name="l00034"></a>00034 <span class="keywordflow">return</span> <a class="code" href="class_config.html#a46dce43903bb24bac8c2ffc92f2ee4da" title="The desired width of the screen in pixels.">_screenWidth</a>; +<a name="l00035"></a>00035 } +<a name="l00036"></a><a class="code" href="class_config.html#a53d63c52aa51b5231b9ea8e412086773">00036</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_config.html#a53d63c52aa51b5231b9ea8e412086773" title="Function for accessing the screen height setting in pixels.">Config::screenHeight</a>()<span class="keyword"> const</span> +<a name="l00037"></a>00037 <span class="keyword"></span>{ +<a name="l00038"></a>00038 <span class="keywordflow">return</span> <a class="code" href="class_config.html#ac27364c75bc8d5e82119988df85c1599" title="The desired height of the screen in pixels.">_screenHeight</a>; +<a name="l00039"></a>00039 } +<a name="l00040"></a><a class="code" href="class_config.html#a8a401add779f2b74732ade9e515bf0cd">00040</a> <span class="keywordtype">bool</span> <a class="code" href="class_config.html#a8a401add779f2b74732ade9e515bf0cd" title="Function for accessing whether the game should be displayed in fullscreen or windowed mode...">Config::fullscreen</a>()<span class="keyword"> const</span> +<a name="l00041"></a>00041 <span class="keyword"></span>{ +<a name="l00042"></a>00042 <span class="keywordflow">return</span> <a class="code" href="class_config.html#ad6fddaaf52742adcba95155b3635e807" title="The desired fullscreen or windowed setting.">_fullscreen</a>; +<a name="l00043"></a>00043 } +<a name="l00044"></a>00044 +<a name="l00045"></a><a class="code" href="class_config.html#aa9656bf85fa15fd4e90a99558f880602">00045</a> <span class="keywordtype">void</span> <a class="code" href="class_config.html#aa9656bf85fa15fd4e90a99558f880602" title="Reads all of the settings defined in a file into a map.">Config::readFile</a>(ifstream& file, map<string,string>& map) +<a name="l00046"></a>00046 { +<a name="l00047"></a>00047 <span class="keywordflow">if</span> (!file.is_open()) <span class="keywordflow">return</span>; +<a name="l00048"></a>00048 +<a name="l00049"></a>00049 <span class="keywordtype">string</span> nextEntry; +<a name="l00050"></a>00050 <span class="keywordflow">while</span>(!file.eof()) +<a name="l00051"></a>00051 { +<a name="l00052"></a>00052 file >> nextEntry; +<a name="l00053"></a>00053 +<a name="l00054"></a>00054 string::size_type equalsIndex = nextEntry.find(<span class="stringliteral">"="</span>,0); +<a name="l00055"></a>00055 <span class="keywordflow">if</span> (equalsIndex!=string::npos) +<a name="l00056"></a>00056 { +<a name="l00057"></a>00057 <span class="keywordtype">string</span> key = nextEntry.substr(0,equalsIndex); +<a name="l00058"></a>00058 <span class="keywordtype">string</span> value = nextEntry.substr(equalsIndex+1); +<a name="l00059"></a>00059 +<a name="l00060"></a>00060 map[key] = value; +<a name="l00061"></a>00061 } +<a name="l00062"></a>00062 } +<a name="l00063"></a>00063 } +<a name="l00064"></a>00064 +<a name="l00065"></a><a class="code" href="class_config.html#ac31c5164b58f86c2a9ecaf21ac1f2202">00065</a> <span class="keywordtype">void</span> <a class="code" href="class_config.html#ac31c5164b58f86c2a9ecaf21ac1f2202" title="Initialises the Config option's parameters to those in the readValues map.">Config::fillValues</a>(<span class="keyword">const</span> map<string, string>& readValues, map<string, string>& unfoundValues) +<a name="l00066"></a>00066 { +<a name="l00067"></a>00067 <a class="code" href="class_config.html#ac0fd2f7c14b9f26339862da74215bf01" title="Initializes the screen width in pixels from a given string.">setScreenWidth</a>(<a class="code" href="class_config.html#a38dee1d0fe4e962aedcee79faad2691c" title="Helper function for fillValues. Finds the value for a single key.">extractValue</a>(readValues, unfoundValues, <a class="code" href="class_config.html#abebfdbe6033183421dcdb4cdb6fc9549" title="The key for the screen width setting, initialized to "screen_width".">SCREEN_WIDTH_KEY</a>, <a class="code" href="class_config.html#ad6f88b173db3508eaeb7b569655b5cf2" title="The default value for the screen width setting, initialized to 800.">SCREEN_WIDTH_DEFAULT</a>)); +<a name="l00068"></a>00068 <a class="code" href="class_config.html#a8e960645b79f31c39ee0cecc89ed6060" title="Initializes the screen height in pixels from a given string.">setScreenHeight</a>(<a class="code" href="class_config.html#a38dee1d0fe4e962aedcee79faad2691c" title="Helper function for fillValues. Finds the value for a single key.">extractValue</a>(readValues, unfoundValues, <a class="code" href="class_config.html#a5dd914d11bd6f43c06ad4682be0efaba" title="The key for the screen height setting, initialized to "screen_height".">SCREEN_HEIGHT_KEY</a>, <a class="code" href="class_config.html#a2382c43dd0d51b3d52bf88d18438c579" title="The default value for the screen height setting, initialized to 600.">SCREEN_HEIGHT_DEFAULT</a>)); +<a name="l00069"></a>00069 <a class="code" href="class_config.html#a5ce32c242ca037105a2430a122249a0a" title="Initializes the fullscreen setting from a given string.">setFullscreen</a>(<a class="code" href="class_config.html#a38dee1d0fe4e962aedcee79faad2691c" title="Helper function for fillValues. Finds the value for a single key.">extractValue</a>(readValues, unfoundValues, <a class="code" href="class_config.html#ae2dd20bca46b767d2a30c32de7ab78cb" title="The key for the fullscreen setting, initialized to "fullscreen".">FULLSCREEN_KEY</a>, <a class="code" href="class_config.html#a3195b4273ebe9ac691167bff71394720" title="The default value for the fullscreen setting, initialized to false.">FULLSCREEN_DEFAULT</a>)); +<a name="l00070"></a>00070 } +<a name="l00071"></a>00071 +<a name="l00072"></a><a class="code" href="class_config.html#a38dee1d0fe4e962aedcee79faad2691c">00072</a> <span class="keywordtype">string</span> <a class="code" href="class_config.html#a38dee1d0fe4e962aedcee79faad2691c" title="Helper function for fillValues. Finds the value for a single key.">Config::extractValue</a>(<span class="keyword">const</span> map<string, string>& readValues, map<string, string>& unfoundValues, <span class="keyword">const</span> <span class="keywordtype">string</span>& key, <span class="keyword">const</span> <span class="keywordtype">string</span>& defaultValue) +<a name="l00073"></a>00073 { +<a name="l00074"></a>00074 map<string, string>::const_iterator findIter = readValues.find(key); +<a name="l00075"></a>00075 <span class="keywordflow">if</span> (findIter != readValues.end()) +<a name="l00076"></a>00076 { +<a name="l00077"></a>00077 <span class="keywordflow">return</span> findIter->second; +<a name="l00078"></a>00078 } +<a name="l00079"></a>00079 <span class="keywordflow">else</span> +<a name="l00080"></a>00080 { +<a name="l00081"></a>00081 unfoundValues[key] = defaultValue; +<a name="l00082"></a>00082 <span class="keywordflow">return</span> defaultValue; +<a name="l00083"></a>00083 } +<a name="l00084"></a>00084 } +<a name="l00085"></a>00085 +<a name="l00086"></a><a class="code" href="class_config.html#a54612c3ce193bea917d3088175e16d43">00086</a> <span class="keywordtype">void</span> <a class="code" href="class_config.html#a54612c3ce193bea917d3088175e16d43" title="Writes settings that were not found in the file to the file with default values.">Config::writeUnfoundValues</a>(ofstream& file, <span class="keyword">const</span> map<string, string>& unfoundValues) +<a name="l00087"></a>00087 { +<a name="l00088"></a>00088 <span class="keywordflow">for</span> (map<string, string>::const_iterator iter = unfoundValues.begin(); iter!=unfoundValues.end(); ++iter) +<a name="l00089"></a>00089 { +<a name="l00090"></a>00090 file << iter->first << <span class="stringliteral">"="</span> << iter->second << endl; +<a name="l00091"></a>00091 } +<a name="l00092"></a>00092 } +<a name="l00093"></a>00093 +<a name="l00094"></a><a class="code" href="class_config.html#ac0fd2f7c14b9f26339862da74215bf01">00094</a> <span class="keywordtype">void</span> <a class="code" href="class_config.html#ac0fd2f7c14b9f26339862da74215bf01" title="Initializes the screen width in pixels from a given string.">Config::setScreenWidth</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>& screenWidthStr) +<a name="l00095"></a>00095 { +<a name="l00096"></a>00096 <a class="code" href="class_config.html#a46dce43903bb24bac8c2ffc92f2ee4da" title="The desired width of the screen in pixels.">_screenWidth</a> = atoi(screenWidthStr.c_str()); +<a name="l00097"></a>00097 } +<a name="l00098"></a><a class="code" href="class_config.html#a8e960645b79f31c39ee0cecc89ed6060">00098</a> <span class="keywordtype">void</span> <a class="code" href="class_config.html#a8e960645b79f31c39ee0cecc89ed6060" title="Initializes the screen height in pixels from a given string.">Config::setScreenHeight</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>& screenHeightStr) +<a name="l00099"></a>00099 { +<a name="l00100"></a>00100 <a class="code" href="class_config.html#ac27364c75bc8d5e82119988df85c1599" title="The desired height of the screen in pixels.">_screenHeight</a> = atoi(screenHeightStr.c_str()); +<a name="l00101"></a>00101 } +<a name="l00102"></a><a class="code" href="class_config.html#a5ce32c242ca037105a2430a122249a0a">00102</a> <span class="keywordtype">void</span> <a class="code" href="class_config.html#a5ce32c242ca037105a2430a122249a0a" title="Initializes the fullscreen setting from a given string.">Config::setFullscreen</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>& fullscreenStr) +<a name="l00103"></a>00103 { +<a name="l00104"></a>00104 <a class="code" href="class_config.html#ad6fddaaf52742adcba95155b3635e807" title="The desired fullscreen or windowed setting.">_fullscreen</a> = fullscreenStr==<span class="stringliteral">"true"</span>; +<a name="l00105"></a>00105 } +</pre></div></div> +</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:30 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> diff --git a/docs/html/_config_8h.html b/docs/html/_config_8h.html new file mode 100644 index 0000000..9d7180b --- /dev/null +++ b/docs/html/_config_8h.html @@ -0,0 +1,121 @@ +<!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: source/data/Config.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/data/Config.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include <cstdlib></code><br/> +<code>#include <string></code><br/> +<code>#include <fstream></code><br/> +<code>#include <map></code><br/> +</div> +<p><a href="_config_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html">Config</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Object for handling user settings loaded from a file. <a href="class_config.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_config_8h_source.html b/docs/html/_config_8h_source.html new file mode 100644 index 0000000..f62730d --- /dev/null +++ b/docs/html/_config_8h_source.html @@ -0,0 +1,158 @@ +<!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: source/data/Config.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/data/Config.h</div> </div> +</div> +<div class="contents"> +<a href="_config_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef CONFIG_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define CONFIG_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include <cstdlib></span> +<a name="l00005"></a>00005 <span class="preprocessor">#include <string></span> +<a name="l00006"></a>00006 <span class="preprocessor">#include <fstream></span> +<a name="l00007"></a>00007 <span class="preprocessor">#include <map></span> +<a name="l00008"></a>00008 <span class="keyword">using namespace </span>std; +<a name="l00009"></a>00009 +<a name="l00020"></a><a class="code" href="class_config.html">00020</a> <span class="keyword">class </span><a class="code" href="class_config.html" title="Object for handling user settings loaded from a file.">Config</a> +<a name="l00021"></a>00021 { +<a name="l00022"></a>00022 <span class="keyword">public</span>: +<a name="l00032"></a>00032 <a class="code" href="class_config.html" title="Object for handling user settings loaded from a file.">Config</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>& filename); +<a name="l00033"></a>00033 +<a name="l00034"></a>00034 <span class="comment">//Assignment and copy operations are handled by the compiler generated versions</span> +<a name="l00035"></a>00035 +<a name="l00041"></a>00041 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> screenWidth() <span class="keyword">const</span>; +<a name="l00042"></a>00042 +<a name="l00048"></a>00048 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> screenHeight() <span class="keyword">const</span>; +<a name="l00049"></a>00049 +<a name="l00055"></a>00055 <span class="keywordtype">bool</span> fullscreen() <span class="keyword">const</span>; +<a name="l00056"></a>00056 +<a name="l00057"></a>00057 <span class="keyword">private</span>: +<a name="l00067"></a>00067 <span class="keywordtype">void</span> readFile(ifstream& file, map<string,string>& map); +<a name="l00068"></a>00068 +<a name="l00078"></a>00078 <span class="keywordtype">void</span> fillValues(<span class="keyword">const</span> map<string, string>& readValues, map<string, string>& unfoundValues); +<a name="l00079"></a>00079 +<a name="l00092"></a>00092 <span class="keywordtype">string</span> extractValue(<span class="keyword">const</span> map<string, string>& readValues, map<string, string>& unfoundValues, <span class="keyword">const</span> <span class="keywordtype">string</span>& key, <span class="keyword">const</span> <span class="keywordtype">string</span>& defaultValue); +<a name="l00093"></a>00093 +<a name="l00100"></a>00100 <span class="keywordtype">void</span> writeUnfoundValues(ofstream& file, <span class="keyword">const</span> map<string, string>& unfoundValues); +<a name="l00101"></a>00101 +<a name="l00107"></a>00107 <span class="keywordtype">void</span> setScreenWidth(<span class="keyword">const</span> <span class="keywordtype">string</span>& screenWidthStr); +<a name="l00108"></a>00108 +<a name="l00114"></a>00114 <span class="keywordtype">void</span> setScreenHeight(<span class="keyword">const</span> <span class="keywordtype">string</span>& screenHeightStr); +<a name="l00115"></a>00115 +<a name="l00121"></a>00121 <span class="keywordtype">void</span> setFullscreen(<span class="keyword">const</span> <span class="keywordtype">string</span>& fullscreenStr); +<a name="l00122"></a>00122 +<a name="l00123"></a><a class="code" href="class_config.html#a46dce43903bb24bac8c2ffc92f2ee4da">00123</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_config.html#a46dce43903bb24bac8c2ffc92f2ee4da" title="The desired width of the screen in pixels.">_screenWidth</a>; +<a name="l00124"></a><a class="code" href="class_config.html#ac27364c75bc8d5e82119988df85c1599">00124</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_config.html#ac27364c75bc8d5e82119988df85c1599" title="The desired height of the screen in pixels.">_screenHeight</a>; +<a name="l00125"></a><a class="code" href="class_config.html#ad6fddaaf52742adcba95155b3635e807">00125</a> <span class="keywordtype">bool</span> <a class="code" href="class_config.html#ad6fddaaf52742adcba95155b3635e807" title="The desired fullscreen or windowed setting.">_fullscreen</a>; +<a name="l00126"></a>00126 +<a name="l00127"></a><a class="code" href="class_config.html#abebfdbe6033183421dcdb4cdb6fc9549">00127</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="class_config.html#abebfdbe6033183421dcdb4cdb6fc9549" title="The key for the screen width setting, initialized to "screen_width".">SCREEN_WIDTH_KEY</a>; +<a name="l00128"></a><a class="code" href="class_config.html#a5dd914d11bd6f43c06ad4682be0efaba">00128</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="class_config.html#a5dd914d11bd6f43c06ad4682be0efaba" title="The key for the screen height setting, initialized to "screen_height".">SCREEN_HEIGHT_KEY</a>; +<a name="l00129"></a><a class="code" href="class_config.html#ae2dd20bca46b767d2a30c32de7ab78cb">00129</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="class_config.html#ae2dd20bca46b767d2a30c32de7ab78cb" title="The key for the fullscreen setting, initialized to "fullscreen".">FULLSCREEN_KEY</a>; +<a name="l00130"></a>00130 +<a name="l00131"></a><a class="code" href="class_config.html#ad6f88b173db3508eaeb7b569655b5cf2">00131</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="class_config.html#ad6f88b173db3508eaeb7b569655b5cf2" title="The default value for the screen width setting, initialized to 800.">SCREEN_WIDTH_DEFAULT</a>; +<a name="l00132"></a><a class="code" href="class_config.html#a2382c43dd0d51b3d52bf88d18438c579">00132</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="class_config.html#a2382c43dd0d51b3d52bf88d18438c579" title="The default value for the screen height setting, initialized to 600.">SCREEN_HEIGHT_DEFAULT</a>; +<a name="l00133"></a><a class="code" href="class_config.html#a3195b4273ebe9ac691167bff71394720">00133</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="class_config.html#a3195b4273ebe9ac691167bff71394720" title="The default value for the fullscreen setting, initialized to false.">FULLSCREEN_DEFAULT</a>; +<a name="l00134"></a>00134 }; +<a name="l00135"></a>00135 +<a name="l00136"></a>00136 <span class="preprocessor">#endif // CONFIG_H</span> +</pre></div></div> +</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:30 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> diff --git a/docs/html/_destroyed_object_popup_8cpp.html b/docs/html/_destroyed_object_popup_8cpp.html new file mode 100644 index 0000000..5946fd0 --- /dev/null +++ b/docs/html/_destroyed_object_popup_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/logic/DestroyedObjectPopup.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/DestroyedObjectPopup.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_destroyed_object_popup_8h_source.html">DestroyedObjectPopup.h</a>"</code><br/> +</div> +<p><a href="_destroyed_object_popup_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_destroyed_object_popup_8cpp_source.html b/docs/html/_destroyed_object_popup_8cpp_source.html new file mode 100644 index 0000000..1eb43e2 --- /dev/null +++ b/docs/html/_destroyed_object_popup_8cpp_source.html @@ -0,0 +1,113 @@ +<!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: source/logic/DestroyedObjectPopup.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/DestroyedObjectPopup.cpp</div> </div> +</div> +<div class="contents"> +<a href="_destroyed_object_popup_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_destroyed_object_popup_8h.html">DestroyedObjectPopup.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a><a class="code" href="class_destroyed_object_popup.html#af34a9f7421a49953f6bd86233a6a44bc">00003</a> <a class="code" href="class_destroyed_object_popup.html#af34a9f7421a49953f6bd86233a6a44bc" title="Creates the popup at the given location, with the given image.">DestroyedObjectPopup::DestroyedObjectPopup</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386" title="Type used to define which image should be returned.">BitmapStore::Image</a> image) +<a name="l00004"></a>00004 :<a class="code" href="class_limited_time_object.html" title="Parent class for GameObjects that are created, exist for a given time, and are then destroyed...">LimitedTimeObject</a>(x, y, image, POPUP_TIME) +<a name="l00005"></a>00005 { +<a name="l00006"></a>00006 } +</pre></div></div> +</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:30 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> diff --git a/docs/html/_destroyed_object_popup_8h.html b/docs/html/_destroyed_object_popup_8h.html new file mode 100644 index 0000000..5248b7d --- /dev/null +++ b/docs/html/_destroyed_object_popup_8h.html @@ -0,0 +1,119 @@ +<!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: source/logic/DestroyedObjectPopup.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/logic/DestroyedObjectPopup.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "../logic/LimitedTimeObject.h"</code><br/> +<code>#include "../presentation/BitmapStore.h"</code><br/> +</div> +<p><a href="_destroyed_object_popup_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_destroyed_object_popup.html">DestroyedObjectPopup</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Object that appears on the screen for a short time when another object has been destroyed. <a href="class_destroyed_object_popup.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_destroyed_object_popup_8h_source.html b/docs/html/_destroyed_object_popup_8h_source.html new file mode 100644 index 0000000..f5653ba --- /dev/null +++ b/docs/html/_destroyed_object_popup_8h_source.html @@ -0,0 +1,125 @@ +<!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: source/logic/DestroyedObjectPopup.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/DestroyedObjectPopup.h</div> </div> +</div> +<div class="contents"> +<a href="_destroyed_object_popup_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef DESTROYEDOBJECTPOPUP_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define DESTROYEDOBJECTPOPUP_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include "../logic/LimitedTimeObject.h"</span> +<a name="l00005"></a>00005 <span class="preprocessor">#include "../presentation/BitmapStore.h"</span> +<a name="l00006"></a>00006 +<a name="l00015"></a><a class="code" href="class_destroyed_object_popup.html">00015</a> <span class="keyword">class </span><a class="code" href="class_destroyed_object_popup.html" title="Object that appears on the screen for a short time when another object has been destroyed.">DestroyedObjectPopup</a> : <span class="keyword">public</span> <a class="code" href="class_limited_time_object.html" title="Parent class for GameObjects that are created, exist for a given time, and are then destroyed...">LimitedTimeObject</a> +<a name="l00016"></a>00016 { +<a name="l00017"></a>00017 <span class="keyword">public</span>: +<a name="l00025"></a>00025 <a class="code" href="class_destroyed_object_popup.html#af34a9f7421a49953f6bd86233a6a44bc" title="Creates the popup at the given location, with the given image.">DestroyedObjectPopup</a>(<span class="keywordtype">double</span> <a class="code" href="class_game_object.html#a676dd981c2891493782de36fb4618cd8" title="Provides access to the x coordinate of the object.">x</a>, <span class="keywordtype">double</span> <a class="code" href="class_game_object.html#a293548656551d6aed5f714f8c4a3235b" title="Provides access to the y coordinate of the object.">y</a>, <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386" title="Type used to define which image should be returned.">BitmapStore::Image</a> <a class="code" href="class_game_object.html#a05e352e3e01e774892beee0503fdb349" title="Provides access to the image that should be drawn to represent the object.">image</a>); +<a name="l00026"></a>00026 +<a name="l00027"></a>00027 <span class="comment">//assignment and copy constructors have been left with the compiler generated versions</span> +<a name="l00028"></a>00028 +<a name="l00029"></a>00029 <span class="keyword">private</span>: +<a name="l00030"></a><a class="code" href="class_destroyed_object_popup.html#a883845e614aba9d292eb85afa9423f31">00030</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="class_destroyed_object_popup.html#a883845e614aba9d292eb85afa9423f31" title="The number of frames that the DestroyedObjectPopup exists before it is destroyed. 1 second at FPS=30...">POPUP_TIME</a> = 30; +<a name="l00031"></a>00031 }; +<a name="l00032"></a>00032 +<a name="l00033"></a>00033 <span class="preprocessor">#endif // DESTROYEDOBJECTPOPUP_H</span> +</pre></div></div> +</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:30 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> diff --git a/docs/html/_enemy_car_8cpp.html b/docs/html/_enemy_car_8cpp.html new file mode 100644 index 0000000..e0445e1 --- /dev/null +++ b/docs/html/_enemy_car_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/logic/EnemyCar.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/EnemyCar.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_enemy_car_8h_source.html">EnemyCar.h</a>"</code><br/> +</div> +<p><a href="_enemy_car_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_enemy_car_8cpp_source.html b/docs/html/_enemy_car_8cpp_source.html new file mode 100644 index 0000000..446e3f1 --- /dev/null +++ b/docs/html/_enemy_car_8cpp_source.html @@ -0,0 +1,211 @@ +<!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: source/logic/EnemyCar.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/EnemyCar.cpp</div> </div> +</div> +<div class="contents"> +<a href="_enemy_car_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_enemy_car_8h.html">EnemyCar.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a><a class="code" href="class_enemy_car.html#a8af7d3c56fa9dad09992ce6fbd7389d2">00003</a> <a class="code" href="class_enemy_car.html#a8af7d3c56fa9dad09992ce6fbd7389d2" title="Creates an EnemyCar at the given coordinates.">EnemyCar::EnemyCar</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y) +<a name="l00004"></a>00004 :<a class="code" href="class_car.html" title="GameObject that moves through the maze and changes direction.">Car</a>(x,y,<a class="code" href="class_bitmap_store.html" title="Class for accessing images in ALLEGRO_BITMAP format and low level drawing.">BitmapStore</a>::ENEMY,<a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>::UP), +<a name="l00005"></a>00005 _state(CHASING), +<a name="l00006"></a>00006 _targetX(x), +<a name="l00007"></a>00007 _targetY(y) +<a name="l00008"></a>00008 { +<a name="l00009"></a>00009 } +<a name="l00010"></a>00010 +<a name="l00011"></a><a class="code" href="class_enemy_car.html#a9f08f73a076e48a0bc0092e72e15e7e4">00011</a> <span class="keywordtype">void</span> <a class="code" href="class_enemy_car.html#a9f08f73a076e48a0bc0092e72e15e7e4" title="Processes one frame's worth of activity for the object, called every frame.">EnemyCar::update</a>(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze, <span class="keyword">const</span> list<PlayerCar>& players, <span class="keyword">const</span> list<Rock>& rocks) +<a name="l00012"></a>00012 { +<a name="l00013"></a>00013 <span class="keywordflow">if</span> (!players.empty()) <a class="code" href="class_enemy_car.html#afa61cecf7df51e26edd632303c18945c" title="Updates the direction that the EnemyCar is facing, if neccesary.">checkFacing</a>(maze, players.front().x(), players.front().y(), rocks); +<a name="l00014"></a>00014 +<a name="l00015"></a>00015 <span class="keywordflow">if</span> (<a class="code" href="class_enemy_car.html#a65a1c7b520f043aae27800ced9e8d543" title="The state that the object is currently in.">_state</a>!=<a class="code" href="class_enemy_car.html#afdd204c097eda1ff9232743bf216ce87af45d8b201d7334e42651b262a03d631c" title="The EnemyCar can not see, and so does not move.">BLINDED</a>) +<a name="l00016"></a>00016 { +<a name="l00017"></a>00017 <a class="code" href="class_car.html#a85e8699362bb5206e4142dbd5d20dcb9" title="Moves the car by its current speed in the direction of its facing.">move</a>(maze); +<a name="l00018"></a>00018 } +<a name="l00019"></a>00019 <span class="keywordflow">else</span> +<a name="l00020"></a>00020 { +<a name="l00021"></a>00021 <a class="code" href="class_enemy_car.html#a65a1c7b520f043aae27800ced9e8d543" title="The state that the object is currently in.">_state</a> = <a class="code" href="class_enemy_car.html#afdd204c097eda1ff9232743bf216ce87a28df0785e03156c97ddeb81da5e0770c" title="The EnemyCar tries to drive to the block that the player is currently on.">CHASING</a>; +<a name="l00022"></a>00022 <a class="code" href="class_car.html#a84b3d05e98d66f358942193ff54dee51" title="The current speed that the Car is moving at.">_speed</a> = <a class="code" href="class_car.html#a7b942584de02f8af6f571a60a1cf32ba" title="The speed that a Car moves at in normal conditions.">_baseSpeed</a>; +<a name="l00023"></a>00023 } +<a name="l00024"></a>00024 } +<a name="l00025"></a>00025 +<a name="l00026"></a><a class="code" href="class_enemy_car.html#afa61cecf7df51e26edd632303c18945c">00026</a> <span class="keywordtype">void</span> <a class="code" href="class_enemy_car.html#afa61cecf7df51e26edd632303c18945c" title="Updates the direction that the EnemyCar is facing, if neccesary.">EnemyCar::checkFacing</a>(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze, <span class="keywordtype">double</span> chasingX, <span class="keywordtype">double</span> chasingY, <span class="keyword">const</span> list<Rock>& rocks) +<a name="l00027"></a>00027 { +<a name="l00028"></a>00028 <span class="keywordflow">if</span> (abs(<a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a> - <a class="code" href="class_enemy_car.html#aa84ac6485311c535526ea14d02d98cc9" title="The x coordinate that the EnemyCar is driving towards.">_targetX</a>)><a class="code" href="class_car.html#a84b3d05e98d66f358942193ff54dee51" title="The current speed that the Car is moving at.">_speed</a> || abs(<a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a> - <a class="code" href="class_enemy_car.html#a61ff3751123febe8bc9ab24d0763245c" title="The y coordinate that the EnemyCar is driving towards.">_targetY</a>)><a class="code" href="class_car.html#a84b3d05e98d66f358942193ff54dee51" title="The current speed that the Car is moving at.">_speed</a>) <span class="keywordflow">return</span>; +<a name="l00029"></a>00029 +<a name="l00030"></a>00030 map<Maze::Direction, pair<double, double> > adjacentBlocks; +<a name="l00031"></a>00031 pair<double, double> evaluatingTarget; +<a name="l00032"></a>00032 +<a name="l00033"></a>00033 adjacentBlocks[<a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28faab1a1fe0274cd139b3c0116d8caf458c">Maze::LEFT</a>] = make_pair(<a class="code" href="class_maze_math.html#a2314f211065f4dc7cb11469770fd2f1c" title="Rounds a value to the nearest integer.">MazeMath::round</a>(<a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a>-1), <a class="code" href="class_maze_math.html#a2314f211065f4dc7cb11469770fd2f1c" title="Rounds a value to the nearest integer.">MazeMath::round</a>(<a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a>)); +<a name="l00034"></a>00034 adjacentBlocks[<a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fa699ae3e1d989e9b12bd200aa86e29e9d">Maze::RIGHT</a>] = make_pair(<a class="code" href="class_maze_math.html#a2314f211065f4dc7cb11469770fd2f1c" title="Rounds a value to the nearest integer.">MazeMath::round</a>(<a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a>+1), <a class="code" href="class_maze_math.html#a2314f211065f4dc7cb11469770fd2f1c" title="Rounds a value to the nearest integer.">MazeMath::round</a>(<a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a>)); +<a name="l00035"></a>00035 adjacentBlocks[<a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fad2e008a4b04be5e2d3559c70193920e7">Maze::UP</a>] = make_pair(<a class="code" href="class_maze_math.html#a2314f211065f4dc7cb11469770fd2f1c" title="Rounds a value to the nearest integer.">MazeMath::round</a>(<a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a>), <a class="code" href="class_maze_math.html#a2314f211065f4dc7cb11469770fd2f1c" title="Rounds a value to the nearest integer.">MazeMath::round</a>(<a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a>-1)); +<a name="l00036"></a>00036 adjacentBlocks[<a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fa89ab143d020541957ab5e0e9cfdd3e23">Maze::DOWN</a>] = make_pair(<a class="code" href="class_maze_math.html#a2314f211065f4dc7cb11469770fd2f1c" title="Rounds a value to the nearest integer.">MazeMath::round</a>(<a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a>), <a class="code" href="class_maze_math.html#a2314f211065f4dc7cb11469770fd2f1c" title="Rounds a value to the nearest integer.">MazeMath::round</a>(<a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a>+1)); +<a name="l00037"></a>00037 +<a name="l00038"></a>00038 <span class="comment">//remove adjacent blocks that would result in crashing into a rock or a wall</span> +<a name="l00039"></a>00039 <span class="keywordflow">for</span> (map<<a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f" title="Defines the directions in which movement can happen in the maze.">Maze::Direction</a>, pair<double, double> >::iterator iter=adjacentBlocks.begin(); iter!=adjacentBlocks.end(); ) +<a name="l00040"></a>00040 { +<a name="l00041"></a>00041 <span class="keywordflow">if</span> (<a class="code" href="class_enemy_car.html#af0dca9b89448557020ef02a18cffb682" title="Iterates through a list of Rocks and determines if moving to a given position would result in a colli...">rockAtLocation</a>(iter->second.first, iter->second.second, rocks) || maze.<a class="code" href="class_maze.html#a1bbdfece82c4ba90ffcf2fea52e5fef1" title="Checks if a given position contains a wall or not.">getSolid</a>(static_cast<int>(iter->second.first),static_cast<int>(iter->second.second))) +<a name="l00042"></a>00042 { +<a name="l00043"></a>00043 adjacentBlocks.erase(iter); +<a name="l00044"></a>00044 iter = adjacentBlocks.begin(); +<a name="l00045"></a>00045 } +<a name="l00046"></a>00046 <span class="keywordflow">else</span> +<a name="l00047"></a>00047 { +<a name="l00048"></a>00048 ++iter; +<a name="l00049"></a>00049 } +<a name="l00050"></a>00050 } +<a name="l00051"></a>00051 +<a name="l00052"></a>00052 <span class="keywordflow">if</span> (adjacentBlocks.empty()) +<a name="l00053"></a>00053 { +<a name="l00054"></a>00054 <a class="code" href="class_car.html#a84b3d05e98d66f358942193ff54dee51" title="The current speed that the Car is moving at.">_speed</a> = 0; +<a name="l00055"></a>00055 <span class="keywordflow">return</span>; +<a name="l00056"></a>00056 } +<a name="l00057"></a>00057 <span class="keywordflow">else</span> +<a name="l00058"></a>00058 { +<a name="l00059"></a>00059 <a class="code" href="class_car.html#a84b3d05e98d66f358942193ff54dee51" title="The current speed that the Car is moving at.">_speed</a> = <a class="code" href="class_car.html#a7b942584de02f8af6f571a60a1cf32ba" title="The speed that a Car moves at in normal conditions.">_baseSpeed</a>; +<a name="l00060"></a>00060 } +<a name="l00061"></a>00061 +<a name="l00062"></a>00062 map<Maze::Direction, pair<double, double> >::iterator reverseFacing = adjacentBlocks.find(<a class="code" href="class_maze.html#a79cf362b55c21634a93ef6b7d192b77c" title="Inverts a given direction, to give the value to face in the opposite direction.">Maze::backwards</a>(<a class="code" href="class_game_object.html#a24d36b1a64504298700a7ae7111fad5d" title="The direction in which the object is facing, up, down, left, or right.">_facing</a>)); +<a name="l00063"></a>00063 <span class="keywordflow">if</span> ((reverseFacing != adjacentBlocks.end()) && (adjacentBlocks.size()>1)) +<a name="l00064"></a>00064 { +<a name="l00065"></a>00065 adjacentBlocks.erase(reverseFacing); +<a name="l00066"></a>00066 } +<a name="l00067"></a>00067 +<a name="l00068"></a>00068 map<Maze::Direction, pair<double, double> >::const_iterator closestAdjacent = adjacentBlocks.begin(); +<a name="l00069"></a>00069 <span class="keywordtype">double</span> closestDistance = <a class="code" href="class_maze_math.html#a5735276fb4c76f25944f2c02d622c3f6" title="Finds the straight line distance between two points on a 2D plane.">MazeMath::distance</a>(closestAdjacent->second.first, closestAdjacent->second.second, chasingX, chasingY); +<a name="l00070"></a>00070 +<a name="l00071"></a>00071 <span class="keywordflow">for</span> (map<<a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f" title="Defines the directions in which movement can happen in the maze.">Maze::Direction</a>, pair<double, double> >::const_iterator iter = ++adjacentBlocks.begin(); iter!=adjacentBlocks.end(); ++iter) +<a name="l00072"></a>00072 { +<a name="l00073"></a>00073 <span class="keywordtype">double</span> newDistance = <a class="code" href="class_maze_math.html#a5735276fb4c76f25944f2c02d622c3f6" title="Finds the straight line distance between two points on a 2D plane.">MazeMath::distance</a>(iter->second.first, iter->second.second, chasingX, chasingY); +<a name="l00074"></a>00074 <span class="keywordflow">if</span> (newDistance < closestDistance) +<a name="l00075"></a>00075 { +<a name="l00076"></a>00076 closestDistance = newDistance; +<a name="l00077"></a>00077 closestAdjacent = iter; +<a name="l00078"></a>00078 } +<a name="l00079"></a>00079 } +<a name="l00080"></a>00080 +<a name="l00081"></a>00081 <a class="code" href="class_enemy_car.html#aa84ac6485311c535526ea14d02d98cc9" title="The x coordinate that the EnemyCar is driving towards.">_targetX</a> = closestAdjacent->second.first; +<a name="l00082"></a>00082 <a class="code" href="class_enemy_car.html#a61ff3751123febe8bc9ab24d0763245c" title="The y coordinate that the EnemyCar is driving towards.">_targetY</a> = closestAdjacent->second.second; +<a name="l00083"></a>00083 <a class="code" href="class_game_object.html#a24d36b1a64504298700a7ae7111fad5d" title="The direction in which the object is facing, up, down, left, or right.">_facing</a> = closestAdjacent->first; +<a name="l00084"></a>00084 } +<a name="l00085"></a>00085 +<a name="l00086"></a><a class="code" href="class_enemy_car.html#af0dca9b89448557020ef02a18cffb682">00086</a> <span class="keywordtype">bool</span> <a class="code" href="class_enemy_car.html#af0dca9b89448557020ef02a18cffb682" title="Iterates through a list of Rocks and determines if moving to a given position would result in a colli...">EnemyCar::rockAtLocation</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keyword">const</span> list<Rock>& rocks) +<a name="l00087"></a>00087 { +<a name="l00088"></a>00088 <span class="keywordflow">for</span> (list<Rock>::const_iterator iter = rocks.begin(); iter!=rocks.end(); ++iter) +<a name="l00089"></a>00089 { +<a name="l00090"></a>00090 <span class="keywordflow">if</span> (abs(x - iter->x())<1 && abs(y - iter->y())<1) <span class="keywordflow">return</span> <span class="keyword">true</span>; +<a name="l00091"></a>00091 } +<a name="l00092"></a>00092 <span class="keywordflow">return</span> <span class="keyword">false</span>; +<a name="l00093"></a>00093 } +<a name="l00094"></a>00094 +<a name="l00095"></a><a class="code" href="class_enemy_car.html#ac5836046e802a749abb2308886b34060">00095</a> <span class="keywordtype">void</span> <a class="code" href="class_enemy_car.html#ac5836046e802a749abb2308886b34060" title="Function that is called when an EnemyCar crashes into a PlayerCar.">EnemyCar::crash</a>() +<a name="l00096"></a>00096 { +<a name="l00097"></a>00097 <a class="code" href="class_game_object.html#adc4a399cc59d5706f75748fb3846faec" title="True if the object has been marked for destruction.">_destroyed</a> = <span class="keyword">true</span>; +<a name="l00098"></a>00098 } +<a name="l00099"></a>00099 +<a name="l00100"></a><a class="code" href="class_enemy_car.html#aeb8bf92c965ab33f793b0274a02f142c">00100</a> <span class="keywordtype">void</span> <a class="code" href="class_enemy_car.html#aeb8bf92c965ab33f793b0274a02f142c" title="Function that is called when an EnemyCar drives into a Smokescreen.">EnemyCar::blind</a>() +<a name="l00101"></a>00101 { +<a name="l00102"></a>00102 <a class="code" href="class_enemy_car.html#a65a1c7b520f043aae27800ced9e8d543" title="The state that the object is currently in.">_state</a> = <a class="code" href="class_enemy_car.html#afdd204c097eda1ff9232743bf216ce87af45d8b201d7334e42651b262a03d631c" title="The EnemyCar can not see, and so does not move.">BLINDED</a>; +<a name="l00103"></a>00103 <a class="code" href="class_car.html#a84b3d05e98d66f358942193ff54dee51" title="The current speed that the Car is moving at.">_speed</a> = 0; +<a name="l00104"></a>00104 } +</pre></div></div> +</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:30 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> diff --git a/docs/html/_enemy_car_8h.html b/docs/html/_enemy_car_8h.html new file mode 100644 index 0000000..c1ae24a --- /dev/null +++ b/docs/html/_enemy_car_8h.html @@ -0,0 +1,123 @@ +<!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: source/logic/EnemyCar.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/logic/EnemyCar.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include <cmath></code><br/> +<code>#include "../presentation/BitmapStore.h"</code><br/> +<code>#include "../logic/Car.h"</code><br/> +<code>#include "../logic/PlayerCar.h"</code><br/> +<code>#include "../logic/Rock.h"</code><br/> +<code>#include "../logic/MazeMath.h"</code><br/> +</div> +<p><a href="_enemy_car_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_enemy_car.html">EnemyCar</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a> that chases the player around the maze. <a href="class_enemy_car.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_enemy_car_8h_source.html b/docs/html/_enemy_car_8h_source.html new file mode 100644 index 0000000..a436efe --- /dev/null +++ b/docs/html/_enemy_car_8h_source.html @@ -0,0 +1,148 @@ +<!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: source/logic/EnemyCar.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/EnemyCar.h</div> </div> +</div> +<div class="contents"> +<a href="_enemy_car_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef ENEMYCAR_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define ENEMYCAR_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include <cmath></span> +<a name="l00005"></a>00005 +<a name="l00006"></a>00006 <span class="preprocessor">#include "../presentation/BitmapStore.h"</span> +<a name="l00007"></a>00007 +<a name="l00008"></a>00008 <span class="preprocessor">#include "../logic/Car.h"</span> +<a name="l00009"></a>00009 <span class="preprocessor">#include "../logic/PlayerCar.h"</span> +<a name="l00010"></a>00010 <span class="preprocessor">#include "../logic/Rock.h"</span> +<a name="l00011"></a>00011 <span class="preprocessor">#include "../logic/MazeMath.h"</span> +<a name="l00012"></a>00012 +<a name="l00021"></a><a class="code" href="class_enemy_car.html">00021</a> <span class="keyword">class </span><a class="code" href="class_enemy_car.html" title="GameObject that chases the player around the maze.">EnemyCar</a>: <span class="keyword">public</span> <a class="code" href="class_car.html" title="GameObject that moves through the maze and changes direction.">Car</a> +<a name="l00022"></a>00022 { +<a name="l00023"></a>00023 <span class="keyword">public</span>: +<a name="l00030"></a>00030 <a class="code" href="class_enemy_car.html#a8af7d3c56fa9dad09992ce6fbd7389d2" title="Creates an EnemyCar at the given coordinates.">EnemyCar</a>(<span class="keywordtype">double</span> <a class="code" href="class_game_object.html#a676dd981c2891493782de36fb4618cd8" title="Provides access to the x coordinate of the object.">x</a>, <span class="keywordtype">double</span> <a class="code" href="class_game_object.html#a293548656551d6aed5f714f8c4a3235b" title="Provides access to the y coordinate of the object.">y</a>); +<a name="l00031"></a>00031 +<a name="l00032"></a>00032 <span class="comment">//assignment and copy constructors have been left with the compiler generated versions</span> +<a name="l00033"></a>00033 +<a name="l00043"></a>00043 <span class="keywordtype">void</span> <a class="code" href="class_enemy_car.html#a9f08f73a076e48a0bc0092e72e15e7e4" title="Processes one frame's worth of activity for the object, called every frame.">update</a>(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze, <span class="keyword">const</span> list<PlayerCar>& players, <span class="keyword">const</span> list<Rock>& rocks); +<a name="l00044"></a>00044 +<a name="l00048"></a>00048 <span class="keywordtype">void</span> <a class="code" href="class_enemy_car.html#ac5836046e802a749abb2308886b34060" title="Function that is called when an EnemyCar crashes into a PlayerCar.">crash</a>(); +<a name="l00049"></a>00049 +<a name="l00053"></a>00053 <span class="keywordtype">void</span> <a class="code" href="class_enemy_car.html#aeb8bf92c965ab33f793b0274a02f142c" title="Function that is called when an EnemyCar drives into a Smokescreen.">blind</a>(); +<a name="l00054"></a>00054 +<a name="l00055"></a>00055 <span class="keyword">private</span>: +<a name="l00061"></a><a class="code" href="class_enemy_car.html#afdd204c097eda1ff9232743bf216ce87">00061</a> <span class="keyword">enum</span> <a class="code" href="class_enemy_car.html#afdd204c097eda1ff9232743bf216ce87" title="States that define how the EnemyCar's AI should behave.">States</a> { +<a name="l00062"></a><a class="code" href="class_enemy_car.html#afdd204c097eda1ff9232743bf216ce87af45d8b201d7334e42651b262a03d631c">00062</a> <a class="code" href="class_enemy_car.html#afdd204c097eda1ff9232743bf216ce87af45d8b201d7334e42651b262a03d631c" title="The EnemyCar can not see, and so does not move.">BLINDED</a>, +<a name="l00063"></a><a class="code" href="class_enemy_car.html#afdd204c097eda1ff9232743bf216ce87a28df0785e03156c97ddeb81da5e0770c">00063</a> <a class="code" href="class_enemy_car.html#afdd204c097eda1ff9232743bf216ce87a28df0785e03156c97ddeb81da5e0770c" title="The EnemyCar tries to drive to the block that the player is currently on.">CHASING</a> +<a name="l00064"></a>00064 }; +<a name="l00065"></a>00065 +<a name="l00066"></a><a class="code" href="class_enemy_car.html#a65a1c7b520f043aae27800ced9e8d543">00066</a> <a class="code" href="class_enemy_car.html#afdd204c097eda1ff9232743bf216ce87" title="States that define how the EnemyCar's AI should behave.">States</a> <a class="code" href="class_enemy_car.html#a65a1c7b520f043aae27800ced9e8d543" title="The state that the object is currently in.">_state</a>; +<a name="l00067"></a><a class="code" href="class_enemy_car.html#aa84ac6485311c535526ea14d02d98cc9">00067</a> <span class="keywordtype">double</span> <a class="code" href="class_enemy_car.html#aa84ac6485311c535526ea14d02d98cc9" title="The x coordinate that the EnemyCar is driving towards.">_targetX</a>; +<a name="l00068"></a><a class="code" href="class_enemy_car.html#a61ff3751123febe8bc9ab24d0763245c">00068</a> <span class="keywordtype">double</span> <a class="code" href="class_enemy_car.html#a61ff3751123febe8bc9ab24d0763245c" title="The y coordinate that the EnemyCar is driving towards.">_targetY</a>; +<a name="l00069"></a>00069 +<a name="l00085"></a>00085 <span class="keywordtype">void</span> <a class="code" href="class_enemy_car.html#afa61cecf7df51e26edd632303c18945c" title="Updates the direction that the EnemyCar is facing, if neccesary.">checkFacing</a>(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze, <span class="keywordtype">double</span> chasingX, <span class="keywordtype">double</span> chasingY, <span class="keyword">const</span> list<Rock>& rocks); +<a name="l00086"></a>00086 +<a name="l00094"></a>00094 <span class="keywordtype">bool</span> <a class="code" href="class_enemy_car.html#af0dca9b89448557020ef02a18cffb682" title="Iterates through a list of Rocks and determines if moving to a given position would result in a colli...">rockAtLocation</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keyword">const</span> list<Rock>& rocks); +<a name="l00095"></a>00095 }; +<a name="l00096"></a>00096 +<a name="l00097"></a>00097 <span class="preprocessor">#endif // ENEMYCAR_H</span> +</pre></div></div> +</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:30 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> diff --git a/docs/html/_game_8cpp.html b/docs/html/_game_8cpp.html new file mode 100644 index 0000000..38dd1bc --- /dev/null +++ b/docs/html/_game_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/logic/Game.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/Game.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_game_8h_source.html">Game.h</a>"</code><br/> +</div> +<p><a href="_game_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_game_8cpp_source.html b/docs/html/_game_8cpp_source.html new file mode 100644 index 0000000..677b9f0 --- /dev/null +++ b/docs/html/_game_8cpp_source.html @@ -0,0 +1,292 @@ +<!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: source/logic/Game.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/Game.cpp</div> </div> +</div> +<div class="contents"> +<a href="_game_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_game_8h.html">Game.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a><a class="code" href="class_game.html#ad59df6562a58a614fda24622d3715b65">00003</a> <a class="code" href="class_game.html#ad59df6562a58a614fda24622d3715b65" title="Constructor, that creates the relevant Allegro entities.">Game::Game</a>() +<a name="l00004"></a>00004 :_config(<span class="stringliteral">"config.txt"</span>), +<a name="l00005"></a>00005 _screen(_config.screenWidth(), _config.screenHeight(), _config.fullscreen()) +<a name="l00006"></a>00006 { +<a name="l00007"></a>00007 <a class="code" href="class_game.html#af153fc1d94c473114cfbd63728d21f91" title="Creates FPS events per second, that are put into _timerEvents.">_timer</a> = al_create_timer(1.0/<a class="code" href="class_game.html#a636d6897103fd12d230489d512bf2be1" title="Frames per second, the number of times the gameloop is run every second.">FPS</a>); +<a name="l00008"></a>00008 <a class="code" href="class_game.html#a2b7303df1b6d0163b78c2c306164859f" title="Catches events from _timer, used to regulate speed of runloop.">_timerEvents</a> = al_create_event_queue(); +<a name="l00009"></a>00009 al_register_event_source(<a class="code" href="class_game.html#a2b7303df1b6d0163b78c2c306164859f" title="Catches events from _timer, used to regulate speed of runloop.">_timerEvents</a>, al_get_timer_event_source(<a class="code" href="class_game.html#af153fc1d94c473114cfbd63728d21f91" title="Creates FPS events per second, that are put into _timerEvents.">_timer</a>)); +<a name="l00010"></a>00010 } +<a name="l00011"></a>00011 +<a name="l00012"></a><a class="code" href="class_game.html#ae3d112ca6e0e55150d2fdbc704474530">00012</a> <a class="code" href="class_game.html#ae3d112ca6e0e55150d2fdbc704474530" title="Constructor, that destroys the relevant Allegro entities.">Game::~Game</a>() +<a name="l00013"></a>00013 { +<a name="l00014"></a>00014 al_destroy_event_queue(<a class="code" href="class_game.html#a2b7303df1b6d0163b78c2c306164859f" title="Catches events from _timer, used to regulate speed of runloop.">_timerEvents</a>); +<a name="l00015"></a>00015 al_destroy_timer(<a class="code" href="class_game.html#af153fc1d94c473114cfbd63728d21f91" title="Creates FPS events per second, that are put into _timerEvents.">_timer</a>); +<a name="l00016"></a>00016 +<a name="l00017"></a>00017 } +<a name="l00018"></a>00018 +<a name="l00019"></a><a class="code" href="class_game.html#a3d9b98f7c4a96ecf578f75b96c9f0e90">00019</a> <span class="keywordtype">void</span> <a class="code" href="class_game.html#a3d9b98f7c4a96ecf578f75b96c9f0e90" title="Entry point for the program. This should be called from main.">Game::start</a>() +<a name="l00020"></a>00020 { +<a name="l00021"></a>00021 <span class="keywordflow">while</span> (!<a class="code" href="class_game.html#a9bc904a37fe9b3e85a597b6b5c6a66d5" title="Handles all drawing operations.">_screen</a>.<a class="code" href="class_screen.html#acca34443ba0ad97922069658d688ea9a" title="Function to find if the player has chosen to exit the game.">exitClicked</a>()) +<a name="l00022"></a>00022 { +<a name="l00023"></a>00023 <span class="keywordtype">string</span> filename = <a class="code" href="class_game.html#a9bc904a37fe9b3e85a597b6b5c6a66d5" title="Handles all drawing operations.">_screen</a>.<a class="code" href="class_screen.html#a45d06e513491e40f76013fb670c6c6cc" title="Presents the player with a file dialog, requesting a level file to be selected.">getLevel</a>(); +<a name="l00024"></a>00024 <span class="keywordflow">if</span> (!filename.empty()) +<a name="l00025"></a>00025 { +<a name="l00026"></a>00026 <a class="code" href="class_game.html#a2bd8589c18470f644445d97c1c35d169" title="Initialises all of the GameObject lists using a file.">initLevel</a>(filename); +<a name="l00027"></a>00027 <a class="code" href="class_game.html#a069837f5f3f3b91b581e41dd74667211" title="Main part of the game, performs the actions in each frame FPS times per second until the game is over...">runloop</a>(); +<a name="l00028"></a>00028 } +<a name="l00029"></a>00029 } +<a name="l00030"></a>00030 } +<a name="l00031"></a>00031 +<a name="l00032"></a><a class="code" href="class_game.html#a2bd8589c18470f644445d97c1c35d169">00032</a> <span class="keywordtype">void</span> <a class="code" href="class_game.html#a2bd8589c18470f644445d97c1c35d169" title="Initialises all of the GameObject lists using a file.">Game::initLevel</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>& levelFile) +<a name="l00033"></a>00033 { +<a name="l00034"></a>00034 <a class="code" href="class_game.html#a03cf795e9aaa4c5950b4b5e918ab9ab6" title="Destroys all GameObjects in the game, resetting the lists for a new level to be loaded.">clearLists</a>(); +<a name="l00035"></a>00035 <a class="code" href="class_level_reader.html" title="Reads the game objects from a text file and calls relevant constructors.">LevelReader</a> reader(levelFile); +<a name="l00036"></a>00036 reader.<a class="code" href="class_level_reader.html#a27277149f3270e040c8ffeadbca79758" title="Function to read the chosen file into the data structures used in the game.">readLevel</a>(<a class="code" href="class_game.html#a33457b2c7fa4f43b89e54ce9c5ac6f83" title="The environment that confines the movements of GameObjects, specifically Cars.">_maze</a>, <a class="code" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac" title="Typically a single PlayerCar, controlled by the person playing the game.">_players</a>, <a class="code" href="class_game.html#afbd3e358076a6cf2e72faefe1c202df9" title="List of all EnemyCars chasing the player.">_enemies</a>, <a class="code" href="class_game.html#a856252e94c580f59b926affc7d45b4bf" title="List of checkpoints that the player needs to collect.">_checkpoints</a>, <a class="code" href="class_game.html#a9f14643bfc4d595dc7dfa3160a59d71b" title="List of rocks that the player and EnemyCars need to avoid.">_rocks</a>); +<a name="l00037"></a>00037 } +<a name="l00038"></a>00038 +<a name="l00039"></a><a class="code" href="class_game.html#a069837f5f3f3b91b581e41dd74667211">00039</a> <span class="keywordtype">void</span> <a class="code" href="class_game.html#a069837f5f3f3b91b581e41dd74667211" title="Main part of the game, performs the actions in each frame FPS times per second until the game is over...">Game::runloop</a>() +<a name="l00040"></a>00040 { +<a name="l00041"></a>00041 <span class="keywordtype">bool</span> gameWon = <span class="keyword">false</span>; +<a name="l00042"></a>00042 <span class="keywordtype">bool</span> gameLost = <span class="keyword">false</span>; +<a name="l00043"></a>00043 al_start_timer(<a class="code" href="class_game.html#af153fc1d94c473114cfbd63728d21f91" title="Creates FPS events per second, that are put into _timerEvents.">_timer</a>); +<a name="l00044"></a>00044 +<a name="l00045"></a>00045 <span class="keywordflow">while</span> (!<a class="code" href="class_game.html#a9bc904a37fe9b3e85a597b6b5c6a66d5" title="Handles all drawing operations.">_screen</a>.<a class="code" href="class_screen.html#acca34443ba0ad97922069658d688ea9a" title="Function to find if the player has chosen to exit the game.">exitClicked</a>()) +<a name="l00046"></a>00046 { +<a name="l00047"></a>00047 al_wait_for_event(<a class="code" href="class_game.html#a2b7303df1b6d0163b78c2c306164859f" title="Catches events from _timer, used to regulate speed of runloop.">_timerEvents</a>, NULL); +<a name="l00048"></a>00048 al_flush_event_queue(<a class="code" href="class_game.html#a2b7303df1b6d0163b78c2c306164859f" title="Catches events from _timer, used to regulate speed of runloop.">_timerEvents</a>); +<a name="l00049"></a>00049 +<a name="l00050"></a>00050 <a class="code" href="class_game.html#a79df6376b332d63c9eca0dcee30305c3" title="Calls the update method on each of the GameObjects in the game.">update</a>(); +<a name="l00051"></a>00051 <a class="code" href="class_game.html#ab88620fda0d1fa729dcab6013e8f1efc" title="Object that checks for collisions each frame.">_collisionDetector</a>.<a class="code" href="class_collision_detector.html#a6ee96032c26ceeab038d2702d7064c7b" title="Checks for collisions between all relevant pairs of objects, and calls the relevant collision functio...">checkCollisions</a>(<a class="code" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac" title="Typically a single PlayerCar, controlled by the person playing the game.">_players</a>, <a class="code" href="class_game.html#afbd3e358076a6cf2e72faefe1c202df9" title="List of all EnemyCars chasing the player.">_enemies</a>, <a class="code" href="class_game.html#a856252e94c580f59b926affc7d45b4bf" title="List of checkpoints that the player needs to collect.">_checkpoints</a>, <a class="code" href="class_game.html#a9f14643bfc4d595dc7dfa3160a59d71b" title="List of rocks that the player and EnemyCars need to avoid.">_rocks</a>, <a class="code" href="class_game.html#a88916ad9e8095b99a9c870a053180c1c" title="List of Smokescreen objects that are currently able to delay EnemyCars.">_smokescreens</a>); +<a name="l00052"></a>00052 <a class="code" href="class_game.html#a961f632fbe7f4ba08d23fe9edc7711be" title="Removes any GameObjects that have been destroyed from their lists.">cleanup</a>(); +<a name="l00053"></a>00053 <a class="code" href="class_game.html#a9bc904a37fe9b3e85a597b6b5c6a66d5" title="Handles all drawing operations.">_screen</a>.<a class="code" href="class_screen.html#aec3c5c20e14d6ef033c8a6a559a84872" title="Draws the given objects on the screen.">draw</a>(<a class="code" href="class_game.html#a33457b2c7fa4f43b89e54ce9c5ac6f83" title="The environment that confines the movements of GameObjects, specifically Cars.">_maze</a>, <a class="code" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac" title="Typically a single PlayerCar, controlled by the person playing the game.">_players</a>, <a class="code" href="class_game.html#afbd3e358076a6cf2e72faefe1c202df9" title="List of all EnemyCars chasing the player.">_enemies</a>, <a class="code" href="class_game.html#a856252e94c580f59b926affc7d45b4bf" title="List of checkpoints that the player needs to collect.">_checkpoints</a>, <a class="code" href="class_game.html#a9f14643bfc4d595dc7dfa3160a59d71b" title="List of rocks that the player and EnemyCars need to avoid.">_rocks</a>, <a class="code" href="class_game.html#a88916ad9e8095b99a9c870a053180c1c" title="List of Smokescreen objects that are currently able to delay EnemyCars.">_smokescreens</a>, <a class="code" href="class_game.html#a9bea5a0ee430443effa418d42a903f83" title="List of purely visual DestroyedObjectPopups that need to be drawn.">_popups</a>); +<a name="l00054"></a>00054 +<a name="l00055"></a>00055 gameLost = <a class="code" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac" title="Typically a single PlayerCar, controlled by the person playing the game.">_players</a>.empty(); +<a name="l00056"></a>00056 gameWon = <a class="code" href="class_checkpoint.html#a872d8574b6f0a7960854fb1175e05f13" title="Function for accessing the number of checkpoints that currently exist.">Checkpoint::checkpointCount</a>()==0; +<a name="l00057"></a>00057 +<a name="l00058"></a>00058 <span class="keywordflow">if</span> (gameLost) +<a name="l00059"></a>00059 { +<a name="l00060"></a>00060 <a class="code" href="class_game.html#a9bc904a37fe9b3e85a597b6b5c6a66d5" title="Handles all drawing operations.">_screen</a>.<a class="code" href="class_screen.html#aab9ab8447df2b526985970d2ac80c919" title="Draws a splash screen when the level has been lost.">drawLoss</a>(); +<a name="l00061"></a>00061 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<90; i++) +<a name="l00062"></a>00062 { +<a name="l00063"></a>00063 al_wait_for_event(<a class="code" href="class_game.html#a2b7303df1b6d0163b78c2c306164859f" title="Catches events from _timer, used to regulate speed of runloop.">_timerEvents</a>, NULL); +<a name="l00064"></a>00064 al_drop_next_event(<a class="code" href="class_game.html#a2b7303df1b6d0163b78c2c306164859f" title="Catches events from _timer, used to regulate speed of runloop.">_timerEvents</a>); +<a name="l00065"></a>00065 } +<a name="l00066"></a>00066 <span class="keywordflow">break</span>; +<a name="l00067"></a>00067 } +<a name="l00068"></a>00068 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (gameWon) +<a name="l00069"></a>00069 { +<a name="l00070"></a>00070 <a class="code" href="class_game.html#a9bc904a37fe9b3e85a597b6b5c6a66d5" title="Handles all drawing operations.">_screen</a>.<a class="code" href="class_screen.html#ad4c1281e4d59eb89377dd87bba8a310e" title="Draws a splash screen when the level has been won.">drawWin</a>(); +<a name="l00071"></a>00071 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<90; i++) +<a name="l00072"></a>00072 { +<a name="l00073"></a>00073 al_wait_for_event(<a class="code" href="class_game.html#a2b7303df1b6d0163b78c2c306164859f" title="Catches events from _timer, used to regulate speed of runloop.">_timerEvents</a>, NULL); +<a name="l00074"></a>00074 al_drop_next_event(<a class="code" href="class_game.html#a2b7303df1b6d0163b78c2c306164859f" title="Catches events from _timer, used to regulate speed of runloop.">_timerEvents</a>); +<a name="l00075"></a>00075 } +<a name="l00076"></a>00076 <span class="keywordflow">break</span>; +<a name="l00077"></a>00077 } +<a name="l00078"></a>00078 } +<a name="l00079"></a>00079 al_stop_timer(<a class="code" href="class_game.html#af153fc1d94c473114cfbd63728d21f91" title="Creates FPS events per second, that are put into _timerEvents.">_timer</a>); +<a name="l00080"></a>00080 } +<a name="l00081"></a>00081 +<a name="l00082"></a><a class="code" href="class_game.html#a79df6376b332d63c9eca0dcee30305c3">00082</a> <span class="keywordtype">void</span> <a class="code" href="class_game.html#a79df6376b332d63c9eca0dcee30305c3" title="Calls the update method on each of the GameObjects in the game.">Game::update</a>() +<a name="l00083"></a>00083 { +<a name="l00084"></a>00084 <span class="keywordflow">for</span> (list<PlayerCar>::iterator iter = <a class="code" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac" title="Typically a single PlayerCar, controlled by the person playing the game.">_players</a>.begin(); iter!=<a class="code" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac" title="Typically a single PlayerCar, controlled by the person playing the game.">_players</a>.end(); ++iter) +<a name="l00085"></a>00085 { +<a name="l00086"></a>00086 iter->update(<a class="code" href="class_game.html#a33457b2c7fa4f43b89e54ce9c5ac6f83" title="The environment that confines the movements of GameObjects, specifically Cars.">_maze</a>, <a class="code" href="class_game.html#a88916ad9e8095b99a9c870a053180c1c" title="List of Smokescreen objects that are currently able to delay EnemyCars.">_smokescreens</a>); +<a name="l00087"></a>00087 } +<a name="l00088"></a>00088 +<a name="l00089"></a>00089 <span class="keywordflow">for</span> (list<EnemyCar>::iterator iter = <a class="code" href="class_game.html#afbd3e358076a6cf2e72faefe1c202df9" title="List of all EnemyCars chasing the player.">_enemies</a>.begin(); iter!=<a class="code" href="class_game.html#afbd3e358076a6cf2e72faefe1c202df9" title="List of all EnemyCars chasing the player.">_enemies</a>.end(); ++iter) +<a name="l00090"></a>00090 { +<a name="l00091"></a>00091 iter->update(<a class="code" href="class_game.html#a33457b2c7fa4f43b89e54ce9c5ac6f83" title="The environment that confines the movements of GameObjects, specifically Cars.">_maze</a>, <a class="code" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac" title="Typically a single PlayerCar, controlled by the person playing the game.">_players</a>, <a class="code" href="class_game.html#a9f14643bfc4d595dc7dfa3160a59d71b" title="List of rocks that the player and EnemyCars need to avoid.">_rocks</a>); +<a name="l00092"></a>00092 } +<a name="l00093"></a>00093 +<a name="l00094"></a>00094 <span class="keywordflow">for</span> (list<Smokescreen>::iterator iter = <a class="code" href="class_game.html#a88916ad9e8095b99a9c870a053180c1c" title="List of Smokescreen objects that are currently able to delay EnemyCars.">_smokescreens</a>.begin(); iter!=<a class="code" href="class_game.html#a88916ad9e8095b99a9c870a053180c1c" title="List of Smokescreen objects that are currently able to delay EnemyCars.">_smokescreens</a>.end(); ++iter) +<a name="l00095"></a>00095 { +<a name="l00096"></a>00096 iter->update(); +<a name="l00097"></a>00097 } +<a name="l00098"></a>00098 <span class="keywordflow">for</span> (list<DestroyedObjectPopup>::iterator iter = <a class="code" href="class_game.html#a9bea5a0ee430443effa418d42a903f83" title="List of purely visual DestroyedObjectPopups that need to be drawn.">_popups</a>.begin(); iter!=<a class="code" href="class_game.html#a9bea5a0ee430443effa418d42a903f83" title="List of purely visual DestroyedObjectPopups that need to be drawn.">_popups</a>.end(); ++iter) +<a name="l00099"></a>00099 { +<a name="l00100"></a>00100 iter->update(); +<a name="l00101"></a>00101 } +<a name="l00102"></a>00102 } +<a name="l00103"></a>00103 +<a name="l00104"></a><a class="code" href="class_game.html#a961f632fbe7f4ba08d23fe9edc7711be">00104</a> <span class="keywordtype">void</span> <a class="code" href="class_game.html#a961f632fbe7f4ba08d23fe9edc7711be" title="Removes any GameObjects that have been destroyed from their lists.">Game::cleanup</a>() +<a name="l00105"></a>00105 { +<a name="l00106"></a>00106 <span class="keywordflow">for</span> (list<PlayerCar>::iterator iter = <a class="code" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac" title="Typically a single PlayerCar, controlled by the person playing the game.">_players</a>.begin(); iter!=<a class="code" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac" title="Typically a single PlayerCar, controlled by the person playing the game.">_players</a>.end();) +<a name="l00107"></a>00107 { +<a name="l00108"></a>00108 <span class="keywordflow">if</span> (iter->destroyed()) +<a name="l00109"></a>00109 { +<a name="l00110"></a>00110 <a class="code" href="class_game.html#a9bea5a0ee430443effa418d42a903f83" title="List of purely visual DestroyedObjectPopups that need to be drawn.">_popups</a>.push_back(<a class="code" href="class_destroyed_object_popup.html" title="Object that appears on the screen for a short time when another object has been destroyed.">DestroyedObjectPopup</a>(iter->x(), iter->y(), <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a8b9eb5b79abe467982784ea2227d67e0">BitmapStore::CRASHED_CAR</a>)); +<a name="l00111"></a>00111 iter = <a class="code" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac" title="Typically a single PlayerCar, controlled by the person playing the game.">_players</a>.erase(iter); +<a name="l00112"></a>00112 } +<a name="l00113"></a>00113 <span class="keywordflow">else</span> +<a name="l00114"></a>00114 { +<a name="l00115"></a>00115 ++iter; +<a name="l00116"></a>00116 } +<a name="l00117"></a>00117 } +<a name="l00118"></a>00118 <span class="keywordflow">for</span> (list<EnemyCar>::iterator iter = <a class="code" href="class_game.html#afbd3e358076a6cf2e72faefe1c202df9" title="List of all EnemyCars chasing the player.">_enemies</a>.begin(); iter!=<a class="code" href="class_game.html#afbd3e358076a6cf2e72faefe1c202df9" title="List of all EnemyCars chasing the player.">_enemies</a>.end();) +<a name="l00119"></a>00119 { +<a name="l00120"></a>00120 <span class="keywordflow">if</span> (iter->destroyed()) +<a name="l00121"></a>00121 { +<a name="l00122"></a>00122 <a class="code" href="class_game.html#a9bea5a0ee430443effa418d42a903f83" title="List of purely visual DestroyedObjectPopups that need to be drawn.">_popups</a>.push_back(<a class="code" href="class_destroyed_object_popup.html" title="Object that appears on the screen for a short time when another object has been destroyed.">DestroyedObjectPopup</a>(iter->x(), iter->y(), <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a8b9eb5b79abe467982784ea2227d67e0">BitmapStore::CRASHED_CAR</a>)); +<a name="l00123"></a>00123 iter = <a class="code" href="class_game.html#afbd3e358076a6cf2e72faefe1c202df9" title="List of all EnemyCars chasing the player.">_enemies</a>.erase(iter); +<a name="l00124"></a>00124 } +<a name="l00125"></a>00125 <span class="keywordflow">else</span> +<a name="l00126"></a>00126 { +<a name="l00127"></a>00127 ++iter; +<a name="l00128"></a>00128 } +<a name="l00129"></a>00129 } +<a name="l00130"></a>00130 <span class="keywordflow">for</span> (list<Checkpoint>::iterator iter = <a class="code" href="class_game.html#a856252e94c580f59b926affc7d45b4bf" title="List of checkpoints that the player needs to collect.">_checkpoints</a>.begin(); iter!=<a class="code" href="class_game.html#a856252e94c580f59b926affc7d45b4bf" title="List of checkpoints that the player needs to collect.">_checkpoints</a>.end();) +<a name="l00131"></a>00131 { +<a name="l00132"></a>00132 <span class="keywordflow">if</span> (iter->destroyed()) +<a name="l00133"></a>00133 { +<a name="l00134"></a>00134 <a class="code" href="class_game.html#a9bea5a0ee430443effa418d42a903f83" title="List of purely visual DestroyedObjectPopups that need to be drawn.">_popups</a>.push_back(<a class="code" href="class_destroyed_object_popup.html" title="Object that appears on the screen for a short time when another object has been destroyed.">DestroyedObjectPopup</a>(iter->x(), iter->y(), <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a824f0021358b88c7f1172d7dece95948">BitmapStore::CLAIMED_CHECKPOINT</a>)); +<a name="l00135"></a>00135 iter = <a class="code" href="class_game.html#a856252e94c580f59b926affc7d45b4bf" title="List of checkpoints that the player needs to collect.">_checkpoints</a>.erase(iter); +<a name="l00136"></a>00136 } +<a name="l00137"></a>00137 <span class="keywordflow">else</span> +<a name="l00138"></a>00138 { +<a name="l00139"></a>00139 ++iter; +<a name="l00140"></a>00140 } +<a name="l00141"></a>00141 } +<a name="l00142"></a>00142 <span class="keywordflow">for</span> (list<Rock>::iterator iter = <a class="code" href="class_game.html#a9f14643bfc4d595dc7dfa3160a59d71b" title="List of rocks that the player and EnemyCars need to avoid.">_rocks</a>.begin(); iter!=<a class="code" href="class_game.html#a9f14643bfc4d595dc7dfa3160a59d71b" title="List of rocks that the player and EnemyCars need to avoid.">_rocks</a>.end();) +<a name="l00143"></a>00143 { +<a name="l00144"></a>00144 <span class="keywordflow">if</span> (iter->destroyed()) +<a name="l00145"></a>00145 { +<a name="l00146"></a>00146 iter = <a class="code" href="class_game.html#a9f14643bfc4d595dc7dfa3160a59d71b" title="List of rocks that the player and EnemyCars need to avoid.">_rocks</a>.erase(iter); +<a name="l00147"></a>00147 } +<a name="l00148"></a>00148 <span class="keywordflow">else</span> +<a name="l00149"></a>00149 { +<a name="l00150"></a>00150 ++iter; +<a name="l00151"></a>00151 } +<a name="l00152"></a>00152 } +<a name="l00153"></a>00153 <span class="keywordflow">for</span> (list<Smokescreen>::iterator iter = <a class="code" href="class_game.html#a88916ad9e8095b99a9c870a053180c1c" title="List of Smokescreen objects that are currently able to delay EnemyCars.">_smokescreens</a>.begin(); iter!=<a class="code" href="class_game.html#a88916ad9e8095b99a9c870a053180c1c" title="List of Smokescreen objects that are currently able to delay EnemyCars.">_smokescreens</a>.end();) +<a name="l00154"></a>00154 { +<a name="l00155"></a>00155 <span class="keywordflow">if</span> (iter->destroyed()) +<a name="l00156"></a>00156 { +<a name="l00157"></a>00157 iter = <a class="code" href="class_game.html#a88916ad9e8095b99a9c870a053180c1c" title="List of Smokescreen objects that are currently able to delay EnemyCars.">_smokescreens</a>.erase(iter); +<a name="l00158"></a>00158 } +<a name="l00159"></a>00159 <span class="keywordflow">else</span> +<a name="l00160"></a>00160 { +<a name="l00161"></a>00161 ++iter; +<a name="l00162"></a>00162 } +<a name="l00163"></a>00163 } +<a name="l00164"></a>00164 <span class="keywordflow">for</span> (list<DestroyedObjectPopup>::iterator iter = <a class="code" href="class_game.html#a9bea5a0ee430443effa418d42a903f83" title="List of purely visual DestroyedObjectPopups that need to be drawn.">_popups</a>.begin(); iter!=<a class="code" href="class_game.html#a9bea5a0ee430443effa418d42a903f83" title="List of purely visual DestroyedObjectPopups that need to be drawn.">_popups</a>.end();) +<a name="l00165"></a>00165 { +<a name="l00166"></a>00166 <span class="keywordflow">if</span> (iter->destroyed()) +<a name="l00167"></a>00167 { +<a name="l00168"></a>00168 iter = <a class="code" href="class_game.html#a9bea5a0ee430443effa418d42a903f83" title="List of purely visual DestroyedObjectPopups that need to be drawn.">_popups</a>.erase(iter); +<a name="l00169"></a>00169 } +<a name="l00170"></a>00170 <span class="keywordflow">else</span> +<a name="l00171"></a>00171 { +<a name="l00172"></a>00172 ++iter; +<a name="l00173"></a>00173 } +<a name="l00174"></a>00174 } +<a name="l00175"></a>00175 } +<a name="l00176"></a>00176 +<a name="l00177"></a><a class="code" href="class_game.html#a03cf795e9aaa4c5950b4b5e918ab9ab6">00177</a> <span class="keywordtype">void</span> <a class="code" href="class_game.html#a03cf795e9aaa4c5950b4b5e918ab9ab6" title="Destroys all GameObjects in the game, resetting the lists for a new level to be loaded.">Game::clearLists</a>() +<a name="l00178"></a>00178 { +<a name="l00179"></a>00179 <a class="code" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac" title="Typically a single PlayerCar, controlled by the person playing the game.">_players</a>.clear(); +<a name="l00180"></a>00180 <a class="code" href="class_game.html#afbd3e358076a6cf2e72faefe1c202df9" title="List of all EnemyCars chasing the player.">_enemies</a>.clear(); +<a name="l00181"></a>00181 <a class="code" href="class_game.html#a856252e94c580f59b926affc7d45b4bf" title="List of checkpoints that the player needs to collect.">_checkpoints</a>.clear(); +<a name="l00182"></a>00182 <a class="code" href="class_game.html#a9f14643bfc4d595dc7dfa3160a59d71b" title="List of rocks that the player and EnemyCars need to avoid.">_rocks</a>.clear(); +<a name="l00183"></a>00183 <a class="code" href="class_game.html#a88916ad9e8095b99a9c870a053180c1c" title="List of Smokescreen objects that are currently able to delay EnemyCars.">_smokescreens</a>.clear(); +<a name="l00184"></a>00184 <a class="code" href="class_game.html#a9bea5a0ee430443effa418d42a903f83" title="List of purely visual DestroyedObjectPopups that need to be drawn.">_popups</a>.clear(); +<a name="l00185"></a>00185 } +</pre></div></div> +</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:30 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> diff --git a/docs/html/_game_8h.html b/docs/html/_game_8h.html new file mode 100644 index 0000000..cfe326d --- /dev/null +++ b/docs/html/_game_8h.html @@ -0,0 +1,133 @@ +<!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: source/logic/Game.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/logic/Game.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include <list></code><br/> +<code>#include <algorithm></code><br/> +<code>#include <allegro5/allegro.h></code><br/> +<code>#include "../presentation/Screen.h"</code><br/> +<code>#include "../presentation/BitmapStore.h"</code><br/> +<code>#include "../logic/Maze.h"</code><br/> +<code>#include "../logic/PlayerCar.h"</code><br/> +<code>#include "../logic/EnemyCar.h"</code><br/> +<code>#include "../logic/Checkpoint.h"</code><br/> +<code>#include "../logic/Rock.h"</code><br/> +<code>#include "../logic/Smokescreen.h"</code><br/> +<code>#include "../logic/DestroyedObjectPopup.h"</code><br/> +<code>#include "../logic/AllegroWrappers.h"</code><br/> +<code>#include "../logic/CollisionDetector.h"</code><br/> +<code>#include "../data/LevelReader.h"</code><br/> +<code>#include "../data/Config.h"</code><br/> +</div> +<p><a href="_game_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html">Game</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">The object that controls the flow of the game, and the launch point of the game. <a href="class_game.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_game_8h_source.html b/docs/html/_game_8h_source.html new file mode 100644 index 0000000..e487b02 --- /dev/null +++ b/docs/html/_game_8h_source.html @@ -0,0 +1,177 @@ +<!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: source/logic/Game.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/Game.h</div> </div> +</div> +<div class="contents"> +<a href="_game_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef GAME_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define GAME_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include <list></span> +<a name="l00005"></a>00005 <span class="preprocessor">#include <algorithm></span> +<a name="l00006"></a>00006 <span class="keyword">using namespace </span>std; +<a name="l00007"></a>00007 +<a name="l00008"></a>00008 <span class="preprocessor">#include <allegro5/allegro.h></span> +<a name="l00009"></a>00009 +<a name="l00010"></a>00010 <span class="preprocessor">#include "../presentation/Screen.h"</span> +<a name="l00011"></a>00011 <span class="preprocessor">#include "../presentation/BitmapStore.h"</span> +<a name="l00012"></a>00012 +<a name="l00013"></a>00013 <span class="preprocessor">#include "../logic/Maze.h"</span> +<a name="l00014"></a>00014 <span class="preprocessor">#include "../logic/PlayerCar.h"</span> +<a name="l00015"></a>00015 <span class="preprocessor">#include "../logic/EnemyCar.h"</span> +<a name="l00016"></a>00016 <span class="preprocessor">#include "../logic/Checkpoint.h"</span> +<a name="l00017"></a>00017 <span class="preprocessor">#include "../logic/Rock.h"</span> +<a name="l00018"></a>00018 <span class="preprocessor">#include "../logic/Smokescreen.h"</span> +<a name="l00019"></a>00019 <span class="preprocessor">#include "../logic/DestroyedObjectPopup.h"</span> +<a name="l00020"></a>00020 <span class="preprocessor">#include "../logic/AllegroWrappers.h"</span> +<a name="l00021"></a>00021 <span class="preprocessor">#include "../logic/CollisionDetector.h"</span> +<a name="l00022"></a>00022 +<a name="l00023"></a>00023 <span class="preprocessor">#include "../data/LevelReader.h"</span> +<a name="l00024"></a>00024 <span class="preprocessor">#include "../data/Config.h"</span> +<a name="l00025"></a>00025 +<a name="l00036"></a><a class="code" href="class_game.html">00036</a> <span class="keyword">class </span><a class="code" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a> +<a name="l00037"></a>00037 { +<a name="l00038"></a>00038 <span class="keyword">public</span>: +<a name="l00039"></a><a class="code" href="class_game.html#a636d6897103fd12d230489d512bf2be1">00039</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> FPS = 30; +<a name="l00040"></a>00040 +<a name="l00044"></a>00044 <a class="code" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a>(); +<a name="l00045"></a>00045 +<a name="l00049"></a>00049 ~<a class="code" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a>(); +<a name="l00050"></a>00050 +<a name="l00054"></a>00054 <span class="keywordtype">void</span> start(); +<a name="l00055"></a>00055 +<a name="l00056"></a>00056 <span class="keyword">private</span>: +<a name="l00062"></a>00062 <a class="code" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a>(<span class="keyword">const</span> <a class="code" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a>& ref); +<a name="l00068"></a>00068 <a class="code" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a>& operator=(<span class="keyword">const</span> <a class="code" href="class_game.html" title="The object that controls the flow of the game, and the launch point of the game.">Game</a>& rhs); +<a name="l00069"></a>00069 +<a name="l00075"></a>00075 <span class="keywordtype">void</span> initLevel(<span class="keyword">const</span> <span class="keywordtype">string</span>& levelFile); +<a name="l00076"></a>00076 +<a name="l00088"></a>00088 <span class="keywordtype">void</span> runloop(); +<a name="l00089"></a>00089 +<a name="l00093"></a>00093 <span class="keywordtype">void</span> update(); +<a name="l00097"></a>00097 <span class="keywordtype">void</span> cleanup(); +<a name="l00098"></a>00098 +<a name="l00104"></a>00104 <span class="keywordtype">void</span> clearLists(); +<a name="l00105"></a>00105 +<a name="l00106"></a><a class="code" href="class_game.html#a3bbe8c0dadbdf9e9e1d499f10509ef4e">00106</a> <a class="code" href="class_allegro_init.html" title="Class ensures that Allegro is initialized and uninstalled when appropriate.">AllegroInit</a> <a class="code" href="class_game.html#a3bbe8c0dadbdf9e9e1d499f10509ef4e" title="Handles dependencies on Allegro being installed.">_allegro</a>; +<a name="l00107"></a>00107 +<a name="l00108"></a><a class="code" href="class_game.html#aa60fe2dc0d1d53ebf49c2d87af6ee2d5">00108</a> <a class="code" href="class_config.html" title="Object for handling user settings loaded from a file.">Config</a> <a class="code" href="class_game.html#aa60fe2dc0d1d53ebf49c2d87af6ee2d5" title="Loads configuration from file on construction, used to set resolution of screen.">_config</a>; +<a name="l00109"></a><a class="code" href="class_game.html#a9bc904a37fe9b3e85a597b6b5c6a66d5">00109</a> <a class="code" href="class_screen.html" title="Class for creating a window on the screen.">Screen</a> <a class="code" href="class_game.html#a9bc904a37fe9b3e85a597b6b5c6a66d5" title="Handles all drawing operations.">_screen</a>; +<a name="l00110"></a><a class="code" href="class_game.html#af153fc1d94c473114cfbd63728d21f91">00110</a> ALLEGRO_TIMER* <a class="code" href="class_game.html#af153fc1d94c473114cfbd63728d21f91" title="Creates FPS events per second, that are put into _timerEvents.">_timer</a>; +<a name="l00111"></a><a class="code" href="class_game.html#a2b7303df1b6d0163b78c2c306164859f">00111</a> ALLEGRO_EVENT_QUEUE* <a class="code" href="class_game.html#a2b7303df1b6d0163b78c2c306164859f" title="Catches events from _timer, used to regulate speed of runloop.">_timerEvents</a>; +<a name="l00112"></a>00112 +<a name="l00113"></a><a class="code" href="class_game.html#a33457b2c7fa4f43b89e54ce9c5ac6f83">00113</a> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a> <a class="code" href="class_game.html#a33457b2c7fa4f43b89e54ce9c5ac6f83" title="The environment that confines the movements of GameObjects, specifically Cars.">_maze</a>; +<a name="l00114"></a>00114 +<a name="l00124"></a><a class="code" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac">00124</a> list<PlayerCar> <a class="code" href="class_game.html#a75bf3282da1519766a6b75e2d83293ac" title="Typically a single PlayerCar, controlled by the person playing the game.">_players</a>; +<a name="l00125"></a>00125 +<a name="l00126"></a><a class="code" href="class_game.html#afbd3e358076a6cf2e72faefe1c202df9">00126</a> list<EnemyCar> <a class="code" href="class_game.html#afbd3e358076a6cf2e72faefe1c202df9" title="List of all EnemyCars chasing the player.">_enemies</a>; +<a name="l00127"></a><a class="code" href="class_game.html#a856252e94c580f59b926affc7d45b4bf">00127</a> list<Checkpoint> <a class="code" href="class_game.html#a856252e94c580f59b926affc7d45b4bf" title="List of checkpoints that the player needs to collect.">_checkpoints</a>; +<a name="l00128"></a><a class="code" href="class_game.html#a9f14643bfc4d595dc7dfa3160a59d71b">00128</a> list<Rock> <a class="code" href="class_game.html#a9f14643bfc4d595dc7dfa3160a59d71b" title="List of rocks that the player and EnemyCars need to avoid.">_rocks</a>; +<a name="l00129"></a><a class="code" href="class_game.html#a88916ad9e8095b99a9c870a053180c1c">00129</a> list<Smokescreen> <a class="code" href="class_game.html#a88916ad9e8095b99a9c870a053180c1c" title="List of Smokescreen objects that are currently able to delay EnemyCars.">_smokescreens</a>; +<a name="l00130"></a><a class="code" href="class_game.html#a9bea5a0ee430443effa418d42a903f83">00130</a> list<DestroyedObjectPopup> <a class="code" href="class_game.html#a9bea5a0ee430443effa418d42a903f83" title="List of purely visual DestroyedObjectPopups that need to be drawn.">_popups</a>; +<a name="l00131"></a>00131 +<a name="l00132"></a><a class="code" href="class_game.html#ab88620fda0d1fa729dcab6013e8f1efc">00132</a> <a class="code" href="class_collision_detector.html" title="Object for handling collisions between GameObjects.">CollisionDetector</a> <a class="code" href="class_game.html#ab88620fda0d1fa729dcab6013e8f1efc" title="Object that checks for collisions each frame.">_collisionDetector</a>; +<a name="l00133"></a>00133 }; +<a name="l00134"></a>00134 +<a name="l00135"></a>00135 <span class="preprocessor">#endif // GAME_H</span> +</pre></div></div> +</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:30 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> diff --git a/docs/html/_game_object_8cpp.html b/docs/html/_game_object_8cpp.html new file mode 100644 index 0000000..59491a7 --- /dev/null +++ b/docs/html/_game_object_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/logic/GameObject.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/GameObject.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_game_object_8h_source.html">GameObject.h</a>"</code><br/> +</div> +<p><a href="_game_object_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_game_object_8cpp_source.html b/docs/html/_game_object_8cpp_source.html new file mode 100644 index 0000000..ad01cb1 --- /dev/null +++ b/docs/html/_game_object_8cpp_source.html @@ -0,0 +1,134 @@ +<!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: source/logic/GameObject.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/GameObject.cpp</div> </div> +</div> +<div class="contents"> +<a href="_game_object_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_game_object_8h.html">GameObject.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a><a class="code" href="class_game_object.html#a26cba01b9c2d301d4ee89a98b9396d67">00003</a> <a class="code" href="class_game_object.html#a26cba01b9c2d301d4ee89a98b9396d67" title="Creates a GameObject with the given parameters.">GameObject::GameObject</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386" title="Type used to define which image should be returned.">BitmapStore::Image</a> image, <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f" title="Defines the directions in which movement can happen in the maze.">Maze::Direction</a> facing) +<a name="l00004"></a>00004 :_x(x), _y(y), _destroyed(false), _image(image), _facing(facing) +<a name="l00005"></a>00005 { +<a name="l00006"></a>00006 } +<a name="l00007"></a>00007 +<a name="l00008"></a><a class="code" href="class_game_object.html#a676dd981c2891493782de36fb4618cd8">00008</a> <span class="keywordtype">double</span> <a class="code" href="class_game_object.html#a676dd981c2891493782de36fb4618cd8" title="Provides access to the x coordinate of the object.">GameObject::x</a>()<span class="keyword"> const</span> +<a name="l00009"></a>00009 <span class="keyword"></span>{ +<a name="l00010"></a>00010 <span class="keywordflow">return</span> <a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a>; +<a name="l00011"></a>00011 } +<a name="l00012"></a><a class="code" href="class_game_object.html#a293548656551d6aed5f714f8c4a3235b">00012</a> <span class="keywordtype">double</span> <a class="code" href="class_game_object.html#a293548656551d6aed5f714f8c4a3235b" title="Provides access to the y coordinate of the object.">GameObject::y</a>()<span class="keyword"> const</span> +<a name="l00013"></a>00013 <span class="keyword"></span>{ +<a name="l00014"></a>00014 <span class="keywordflow">return</span> <a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a>; +<a name="l00015"></a>00015 } +<a name="l00016"></a><a class="code" href="class_game_object.html#a266871f6c0220f6b3c902075ebff8eea">00016</a> <span class="keywordtype">bool</span> <a class="code" href="class_game_object.html#a266871f6c0220f6b3c902075ebff8eea" title="Checks if an object has been marked for destruction, for example through a collision.">GameObject::destroyed</a>()<span class="keyword"> const</span> +<a name="l00017"></a>00017 <span class="keyword"></span>{ +<a name="l00018"></a>00018 <span class="keywordflow">return</span> <a class="code" href="class_game_object.html#adc4a399cc59d5706f75748fb3846faec" title="True if the object has been marked for destruction.">_destroyed</a>; +<a name="l00019"></a>00019 } +<a name="l00020"></a><a class="code" href="class_game_object.html#a05e352e3e01e774892beee0503fdb349">00020</a> <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386" title="Type used to define which image should be returned.">BitmapStore::Image</a> <a class="code" href="class_game_object.html#a05e352e3e01e774892beee0503fdb349" title="Provides access to the image that should be drawn to represent the object.">GameObject::image</a>()<span class="keyword"> const</span> +<a name="l00021"></a>00021 <span class="keyword"></span>{ +<a name="l00022"></a>00022 <span class="keywordflow">return</span> <a class="code" href="class_game_object.html#a8b0aa105507a8a9559bbc2a66198ccd6" title="The bitmap that should be drawn on the screen to represent the object.">_image</a>; +<a name="l00023"></a>00023 } +<a name="l00024"></a><a class="code" href="class_game_object.html#a2549066ec4dc8f4ca2d3a8c5d5729324">00024</a> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f" title="Defines the directions in which movement can happen in the maze.">Maze::Direction</a> <a class="code" href="class_game_object.html#a2549066ec4dc8f4ca2d3a8c5d5729324" title="Provides access to the direction that the object is facing.">GameObject::facing</a>()<span class="keyword"> const</span> +<a name="l00025"></a>00025 <span class="keyword"></span>{ +<a name="l00026"></a>00026 <span class="keywordflow">return</span> <a class="code" href="class_game_object.html#a24d36b1a64504298700a7ae7111fad5d" title="The direction in which the object is facing, up, down, left, or right.">_facing</a>; +<a name="l00027"></a>00027 } +</pre></div></div> +</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:30 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> diff --git a/docs/html/_game_object_8h.html b/docs/html/_game_object_8h.html new file mode 100644 index 0000000..ff9c230 --- /dev/null +++ b/docs/html/_game_object_8h.html @@ -0,0 +1,119 @@ +<!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: source/logic/GameObject.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/logic/GameObject.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "../presentation/BitmapStore.h"</code><br/> +<code>#include "../logic/Maze.h"</code><br/> +</div> +<p><a href="_game_object_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game_object.html">GameObject</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Parent class for objects that are placed in the maze. <a href="class_game_object.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_game_object_8h_source.html b/docs/html/_game_object_8h_source.html new file mode 100644 index 0000000..2816fa8 --- /dev/null +++ b/docs/html/_game_object_8h_source.html @@ -0,0 +1,139 @@ +<!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: source/logic/GameObject.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/logic/GameObject.h</div> </div> +</div> +<div class="contents"> +<a href="_game_object_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef GAMEOBJECT_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define GAMEOBJECT_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include "../presentation/BitmapStore.h"</span> +<a name="l00005"></a>00005 <span class="preprocessor">#include "../logic/Maze.h"</span> +<a name="l00006"></a>00006 +<a name="l00023"></a><a class="code" href="class_game_object.html">00023</a> <span class="keyword">class </span><a class="code" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a> +<a name="l00024"></a>00024 { +<a name="l00025"></a>00025 <span class="keyword">public</span>: +<a name="l00035"></a>00035 <a class="code" href="class_game_object.html#a26cba01b9c2d301d4ee89a98b9396d67" title="Creates a GameObject with the given parameters.">GameObject</a>(<span class="keywordtype">double</span> <a class="code" href="class_game_object.html#a676dd981c2891493782de36fb4618cd8" title="Provides access to the x coordinate of the object.">x</a>, <span class="keywordtype">double</span> <a class="code" href="class_game_object.html#a293548656551d6aed5f714f8c4a3235b" title="Provides access to the y coordinate of the object.">y</a>, <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386" title="Type used to define which image should be returned.">BitmapStore::Image</a> <a class="code" href="class_game_object.html#a05e352e3e01e774892beee0503fdb349" title="Provides access to the image that should be drawn to represent the object.">image</a>, <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f" title="Defines the directions in which movement can happen in the maze.">Maze::Direction</a> <a class="code" href="class_game_object.html#a2549066ec4dc8f4ca2d3a8c5d5729324" title="Provides access to the direction that the object is facing.">facing</a>=<a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fad2e008a4b04be5e2d3559c70193920e7">Maze::UP</a>); +<a name="l00036"></a>00036 +<a name="l00037"></a>00037 <span class="comment">//assignment and copy constructors have been left with the compiler generated versions</span> +<a name="l00038"></a>00038 +<a name="l00044"></a>00044 <span class="keywordtype">double</span> <a class="code" href="class_game_object.html#a676dd981c2891493782de36fb4618cd8" title="Provides access to the x coordinate of the object.">x</a>() <span class="keyword">const</span>; +<a name="l00045"></a>00045 +<a name="l00051"></a>00051 <span class="keywordtype">double</span> <a class="code" href="class_game_object.html#a293548656551d6aed5f714f8c4a3235b" title="Provides access to the y coordinate of the object.">y</a>() <span class="keyword">const</span>; +<a name="l00052"></a>00052 +<a name="l00058"></a>00058 <span class="keywordtype">bool</span> <a class="code" href="class_game_object.html#a266871f6c0220f6b3c902075ebff8eea" title="Checks if an object has been marked for destruction, for example through a collision.">destroyed</a>() <span class="keyword">const</span>; +<a name="l00059"></a>00059 +<a name="l00065"></a>00065 <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386" title="Type used to define which image should be returned.">BitmapStore::Image</a> <a class="code" href="class_game_object.html#a05e352e3e01e774892beee0503fdb349" title="Provides access to the image that should be drawn to represent the object.">image</a>() <span class="keyword">const</span>; +<a name="l00066"></a>00066 +<a name="l00072"></a>00072 <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f" title="Defines the directions in which movement can happen in the maze.">Maze::Direction</a> <a class="code" href="class_game_object.html#a2549066ec4dc8f4ca2d3a8c5d5729324" title="Provides access to the direction that the object is facing.">facing</a>() <span class="keyword">const</span>; +<a name="l00073"></a>00073 +<a name="l00074"></a>00074 <span class="keyword">protected</span>: +<a name="l00075"></a><a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614">00075</a> <span class="keywordtype">double</span> <a class="code" href="class_game_object.html#acc5b8970ff0036786fdd9af621bd1614" title="The x coordinate of the object's position.">_x</a>; +<a name="l00076"></a><a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e">00076</a> <span class="keywordtype">double</span> <a class="code" href="class_game_object.html#ade9a5568d88963b86547ddcaec465b4e" title="The y coordinate of the object's position.">_y</a>; +<a name="l00077"></a><a class="code" href="class_game_object.html#adc4a399cc59d5706f75748fb3846faec">00077</a> <span class="keywordtype">bool</span> <a class="code" href="class_game_object.html#adc4a399cc59d5706f75748fb3846faec" title="True if the object has been marked for destruction.">_destroyed</a>; +<a name="l00078"></a><a class="code" href="class_game_object.html#a8b0aa105507a8a9559bbc2a66198ccd6">00078</a> <a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386" title="Type used to define which image should be returned.">BitmapStore::Image</a> <a class="code" href="class_game_object.html#a8b0aa105507a8a9559bbc2a66198ccd6" title="The bitmap that should be drawn on the screen to represent the object.">_image</a>; +<a name="l00079"></a><a class="code" href="class_game_object.html#a24d36b1a64504298700a7ae7111fad5d">00079</a> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f" title="Defines the directions in which movement can happen in the maze.">Maze::Direction</a> <a class="code" href="class_game_object.html#a24d36b1a64504298700a7ae7111fad5d" title="The direction in which the object is facing, up, down, left, or right.">_facing</a>; +<a name="l00080"></a>00080 }; +<a name="l00081"></a>00081 +<a name="l00082"></a>00082 <span class="preprocessor">#endif // GAMEOBJECT_H</span> +</pre></div></div> +</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:30 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> diff --git a/docs/html/_game_panel_8cpp.html b/docs/html/_game_panel_8cpp.html new file mode 100644 index 0000000..79143c2 --- /dev/null +++ b/docs/html/_game_panel_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/presentation/GamePanel.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/GamePanel.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_game_panel_8h_source.html">GamePanel.h</a>"</code><br/> +</div> +<p><a href="_game_panel_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_game_panel_8cpp_source.html b/docs/html/_game_panel_8cpp_source.html new file mode 100644 index 0000000..3511c39 --- /dev/null +++ b/docs/html/_game_panel_8cpp_source.html @@ -0,0 +1,240 @@ +<!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: source/presentation/GamePanel.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/GamePanel.cpp</div> </div> +</div> +<div class="contents"> +<a href="_game_panel_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_game_panel_8h.html">GamePanel.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a><a class="code" href="class_game_panel.html#a3475820b2255da92e247d07248870044">00003</a> <a class="code" href="class_game_panel.html#a3475820b2255da92e247d07248870044" title="Creates a GamePanel from the given back and front buffers.">GamePanel::GamePanel</a>(ALLEGRO_BITMAP* back, ALLEGRO_BITMAP* front, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height) +<a name="l00004"></a>00004 :<a class="code" href="class_screen_panel.html" title="Parent class for panels that are drawn on the screen.">ScreenPanel</a>(back, front, x, y, width, height), +<a name="l00005"></a>00005 _mazeblockWidth(_width/BLOCKS_PER_ROW), +<a name="l00006"></a>00006 _offsetX(0), +<a name="l00007"></a>00007 _offsetY(0), +<a name="l00008"></a>00008 _bitmapStore(_mazeblockWidth) +<a name="l00009"></a>00009 { +<a name="l00010"></a>00010 } +<a name="l00011"></a>00011 +<a name="l00012"></a><a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd">00012</a> <span class="keywordtype">void</span> <a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd" title="Draws the given objects on the screen.">GamePanel::draw</a>(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze, <span class="keyword">const</span> list<PlayerCar>& players, <span class="keyword">const</span> list<EnemyCar>& enemies, <span class="keyword">const</span> list<Checkpoint>& checkpoints, <span class="keyword">const</span> list<Rock>& rocks, <span class="keyword">const</span> list<Smokescreen>& smokescreens, <span class="keyword">const</span> list<DestroyedObjectPopup>& popups) +<a name="l00013"></a>00013 { +<a name="l00014"></a>00014 ALLEGRO_BITMAP* prev_draw = al_get_target_bitmap(); +<a name="l00015"></a>00015 al_set_target_bitmap(<a class="code" href="class_screen_panel.html#a1a3ec8e60be5d5cede210171bda33468" title="The back buffer. Only the back buffer can be drawn to.">_back</a>); +<a name="l00016"></a>00016 +<a name="l00017"></a>00017 al_clear_to_color(<a class="code" href="class_screen_panel.html#a1cc6ea44035f47d77d24b4cee9dc9d85" title="Colour used to clear the screen at the beginning of drawing operations.">BLANK</a>); +<a name="l00018"></a>00018 +<a name="l00019"></a>00019 <span class="keywordtype">float</span> _maxOffsetX = <a class="code" href="class_game_panel.html#a53a4386ab0f60db88b3c638b3880cd91" title="Converts an x game coordinate value to its equivalent in pixels.">getPanelX</a>(maze.<a class="code" href="class_maze.html#a6963ffbb8e10f5ca72ddc749b3f29419" title="Provides access to the width of the Maze object.">width</a>()) - <a class="code" href="class_screen_panel.html#afbbcad2a101b95869dcdef9bf0898f65" title="The width of the sub-bitmaps being drawn to in pixels.">_width</a>; +<a name="l00020"></a>00020 <span class="keywordtype">float</span> _maxOffsetY = <a class="code" href="class_game_panel.html#a0e722b67c8ee7fe5f557821adf9b8cc2" title="Converts a y game coordinate value to its equivalent in pixels.">getPanelY</a>(maze.<a class="code" href="class_maze.html#a53de30abea69713225ab77703e753d81" title="Provides access to the height of the Maze object.">height</a>()) - <a class="code" href="class_screen_panel.html#a4f6dd5c7ca10d51bface7b1ddedc236c" title="The height of the sub-bitmaps being drawn to in pixels.">_height</a>; +<a name="l00021"></a>00021 +<a name="l00022"></a>00022 <span class="keywordflow">if</span> (!players.empty()) +<a name="l00023"></a>00023 { +<a name="l00024"></a>00024 <a class="code" href="class_game_panel.html#afe99f100b68ec2475cb0a509887b63a9" title="The amount that drawing should be offset to the right, recalculated every frame.">_offsetX</a> = <a class="code" href="class_game_panel.html#a53a4386ab0f60db88b3c638b3880cd91" title="Converts an x game coordinate value to its equivalent in pixels.">getPanelX</a>(players.front().x()) - <a class="code" href="class_screen_panel.html#afbbcad2a101b95869dcdef9bf0898f65" title="The width of the sub-bitmaps being drawn to in pixels.">_width</a>/2; +<a name="l00025"></a>00025 <span class="keywordflow">if</span> (<a class="code" href="class_game_panel.html#afe99f100b68ec2475cb0a509887b63a9" title="The amount that drawing should be offset to the right, recalculated every frame.">_offsetX</a> < 0) <a class="code" href="class_game_panel.html#afe99f100b68ec2475cb0a509887b63a9" title="The amount that drawing should be offset to the right, recalculated every frame.">_offsetX</a> = 0; +<a name="l00026"></a>00026 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_game_panel.html#afe99f100b68ec2475cb0a509887b63a9" title="The amount that drawing should be offset to the right, recalculated every frame.">_offsetX</a> > _maxOffsetX) <a class="code" href="class_game_panel.html#afe99f100b68ec2475cb0a509887b63a9" title="The amount that drawing should be offset to the right, recalculated every frame.">_offsetX</a> = _maxOffsetX; +<a name="l00027"></a>00027 +<a name="l00028"></a>00028 <a class="code" href="class_game_panel.html#af3354addd707cb42b078dbe2ef29e189" title="The amount that drawing should be offset downwards, recalculated every frame.">_offsetY</a> = <a class="code" href="class_game_panel.html#a0e722b67c8ee7fe5f557821adf9b8cc2" title="Converts a y game coordinate value to its equivalent in pixels.">getPanelY</a>(players.front().y()) - <a class="code" href="class_screen_panel.html#a4f6dd5c7ca10d51bface7b1ddedc236c" title="The height of the sub-bitmaps being drawn to in pixels.">_height</a>/2; +<a name="l00029"></a>00029 <span class="keywordflow">if</span> (<a class="code" href="class_game_panel.html#af3354addd707cb42b078dbe2ef29e189" title="The amount that drawing should be offset downwards, recalculated every frame.">_offsetY</a> < 0) <a class="code" href="class_game_panel.html#af3354addd707cb42b078dbe2ef29e189" title="The amount that drawing should be offset downwards, recalculated every frame.">_offsetY</a> = 0; +<a name="l00030"></a>00030 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_game_panel.html#af3354addd707cb42b078dbe2ef29e189" title="The amount that drawing should be offset downwards, recalculated every frame.">_offsetY</a> > _maxOffsetY) <a class="code" href="class_game_panel.html#af3354addd707cb42b078dbe2ef29e189" title="The amount that drawing should be offset downwards, recalculated every frame.">_offsetY</a> = _maxOffsetY; +<a name="l00031"></a>00031 } +<a name="l00032"></a>00032 +<a name="l00033"></a>00033 <a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd" title="Draws the given objects on the screen.">draw</a>(maze); +<a name="l00034"></a>00034 +<a name="l00035"></a>00035 <span class="keywordflow">for</span> (list<PlayerCar>::const_iterator iter = players.begin(); iter != players.end(); ++iter) +<a name="l00036"></a>00036 { +<a name="l00037"></a>00037 <a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd" title="Draws the given objects on the screen.">draw</a>(*iter); +<a name="l00038"></a>00038 } +<a name="l00039"></a>00039 <span class="keywordflow">for</span> (list<EnemyCar>::const_iterator iter = enemies.begin(); iter != enemies.end(); ++iter) +<a name="l00040"></a>00040 { +<a name="l00041"></a>00041 <a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd" title="Draws the given objects on the screen.">draw</a>(*iter); +<a name="l00042"></a>00042 } +<a name="l00043"></a>00043 <span class="keywordflow">for</span> (list<Checkpoint>::const_iterator iter = checkpoints.begin(); iter != checkpoints.end(); ++iter) +<a name="l00044"></a>00044 { +<a name="l00045"></a>00045 <a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd" title="Draws the given objects on the screen.">draw</a>(*iter); +<a name="l00046"></a>00046 } +<a name="l00047"></a>00047 <span class="keywordflow">for</span> (list<Rock>::const_iterator iter = rocks.begin(); iter != rocks.end(); ++iter) +<a name="l00048"></a>00048 { +<a name="l00049"></a>00049 <a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd" title="Draws the given objects on the screen.">draw</a>(*iter); +<a name="l00050"></a>00050 } +<a name="l00051"></a>00051 <span class="keywordflow">for</span> (list<Smokescreen>::const_iterator iter = smokescreens.begin(); iter != smokescreens.end(); ++iter) +<a name="l00052"></a>00052 { +<a name="l00053"></a>00053 <a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd" title="Draws the given objects on the screen.">draw</a>(*iter); +<a name="l00054"></a>00054 } +<a name="l00055"></a>00055 <span class="keywordflow">for</span> (list<DestroyedObjectPopup>::const_iterator iter = popups.begin(); iter != popups.end(); ++iter) +<a name="l00056"></a>00056 { +<a name="l00057"></a>00057 <a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd" title="Draws the given objects on the screen.">draw</a>(*iter); +<a name="l00058"></a>00058 } +<a name="l00059"></a>00059 +<a name="l00060"></a>00060 al_set_target_bitmap(prev_draw); +<a name="l00061"></a>00061 } +<a name="l00062"></a>00062 +<a name="l00063"></a><a class="code" href="class_game_panel.html#a93395482993b341b1b72fbb256ce9be9">00063</a> <span class="keywordtype">void</span> <a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd" title="Draws the given objects on the screen.">GamePanel::draw</a>(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze) +<a name="l00064"></a>00064 { +<a name="l00065"></a>00065 <span class="comment">//only draws a parts of the maze that would appear on the screen</span> +<a name="l00066"></a>00066 <span class="keywordtype">int</span> minX = floor((<a class="code" href="class_game_panel.html#afe99f100b68ec2475cb0a509887b63a9" title="The amount that drawing should be offset to the right, recalculated every frame.">_offsetX</a>-<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>)/<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>); +<a name="l00067"></a>00067 <span class="keywordtype">int</span> maxX = ceil((<a class="code" href="class_game_panel.html#afe99f100b68ec2475cb0a509887b63a9" title="The amount that drawing should be offset to the right, recalculated every frame.">_offsetX</a>+<a class="code" href="class_screen_panel.html#afbbcad2a101b95869dcdef9bf0898f65" title="The width of the sub-bitmaps being drawn to in pixels.">_width</a>)/<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>); +<a name="l00068"></a>00068 <span class="keywordtype">int</span> minY = floor((<a class="code" href="class_game_panel.html#af3354addd707cb42b078dbe2ef29e189" title="The amount that drawing should be offset downwards, recalculated every frame.">_offsetY</a>-<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>)/<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>); +<a name="l00069"></a>00069 <span class="keywordtype">int</span> maxY = ceil((<a class="code" href="class_game_panel.html#af3354addd707cb42b078dbe2ef29e189" title="The amount that drawing should be offset downwards, recalculated every frame.">_offsetY</a>+<a class="code" href="class_screen_panel.html#a4f6dd5c7ca10d51bface7b1ddedc236c" title="The height of the sub-bitmaps being drawn to in pixels.">_height</a>)/<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>); +<a name="l00070"></a>00070 +<a name="l00071"></a>00071 ALLEGRO_BITMAP* wallBitmap = <a class="code" href="class_game_panel.html#a0125ff874ffebadc15c7678210914a8c" title="Used to cache ALLEGRO_BITMAPs, so that they only need to be drawn once.">_bitmapStore</a>.<a class="code" href="class_bitmap_store.html#aadd437c869c5856c36d920dfafbc6ee4" title="Function to get image for drawing to the screen.">getBitmap</a>(<a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386ae662e77b349a8e22c5826ef35b1b5d9a">BitmapStore::MAZE_WALL</a>); +<a name="l00072"></a>00072 ALLEGRO_BITMAP* floorBitmap = <a class="code" href="class_game_panel.html#a0125ff874ffebadc15c7678210914a8c" title="Used to cache ALLEGRO_BITMAPs, so that they only need to be drawn once.">_bitmapStore</a>.<a class="code" href="class_bitmap_store.html#aadd437c869c5856c36d920dfafbc6ee4" title="Function to get image for drawing to the screen.">getBitmap</a>(<a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a4e2a075dff2c02bf40b134c9090d1f02">BitmapStore::MAZE_FLOOR</a>); +<a name="l00073"></a>00073 <span class="comment">//used to only have one al_draw_bitmap command</span> +<a name="l00074"></a>00074 ALLEGRO_BITMAP* currentBitmap = floorBitmap; +<a name="l00075"></a>00075 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x=minX; x<maxX&&x<maze.<a class="code" href="class_maze.html#a6963ffbb8e10f5ca72ddc749b3f29419" title="Provides access to the width of the Maze object.">width</a>(); ++x) +<a name="l00076"></a>00076 { +<a name="l00077"></a>00077 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> y=minY; y<maxY&&y<maze.<a class="code" href="class_maze.html#a53de30abea69713225ab77703e753d81" title="Provides access to the height of the Maze object.">height</a>(); ++y) +<a name="l00078"></a>00078 { +<a name="l00079"></a>00079 <span class="keywordflow">if</span> (maze.<a class="code" href="class_maze.html#a1bbdfece82c4ba90ffcf2fea52e5fef1" title="Checks if a given position contains a wall or not.">getSolid</a>(x,y)) +<a name="l00080"></a>00080 { +<a name="l00081"></a>00081 currentBitmap = wallBitmap; +<a name="l00082"></a>00082 } +<a name="l00083"></a>00083 <span class="keywordflow">else</span> +<a name="l00084"></a>00084 { +<a name="l00085"></a>00085 currentBitmap = floorBitmap; +<a name="l00086"></a>00086 } +<a name="l00087"></a>00087 al_draw_bitmap(currentBitmap, <a class="code" href="class_game_panel.html#a53a4386ab0f60db88b3c638b3880cd91" title="Converts an x game coordinate value to its equivalent in pixels.">getPanelX</a>(x)-<a class="code" href="class_game_panel.html#afe99f100b68ec2475cb0a509887b63a9" title="The amount that drawing should be offset to the right, recalculated every frame.">_offsetX</a>, <a class="code" href="class_game_panel.html#a0e722b67c8ee7fe5f557821adf9b8cc2" title="Converts a y game coordinate value to its equivalent in pixels.">getPanelY</a>(y)-<a class="code" href="class_game_panel.html#af3354addd707cb42b078dbe2ef29e189" title="The amount that drawing should be offset downwards, recalculated every frame.">_offsetY</a>, 0); +<a name="l00088"></a>00088 } +<a name="l00089"></a>00089 } +<a name="l00090"></a>00090 } +<a name="l00091"></a>00091 +<a name="l00092"></a><a class="code" href="class_game_panel.html#acff2b430ecad1310a0a36cfe7c994d2f">00092</a> <span class="keywordtype">void</span> <a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd" title="Draws the given objects on the screen.">GamePanel::draw</a>(<span class="keyword">const</span> <a class="code" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a>& <span class="keywordtype">object</span>) +<a name="l00093"></a>00093 { +<a name="l00094"></a>00094 <span class="comment">//only draws a gameobject if it would appear on the screen</span> +<a name="l00095"></a>00095 <span class="keywordflow">if</span> (<span class="keywordtype">object</span>.x() < (<a class="code" href="class_game_panel.html#afe99f100b68ec2475cb0a509887b63a9" title="The amount that drawing should be offset to the right, recalculated every frame.">_offsetX</a>-<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>)/<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>) <span class="keywordflow">return</span>; +<a name="l00096"></a>00096 <span class="keywordflow">if</span> (<span class="keywordtype">object</span>.x() > (<a class="code" href="class_game_panel.html#afe99f100b68ec2475cb0a509887b63a9" title="The amount that drawing should be offset to the right, recalculated every frame.">_offsetX</a>+<a class="code" href="class_screen_panel.html#afbbcad2a101b95869dcdef9bf0898f65" title="The width of the sub-bitmaps being drawn to in pixels.">_width</a>)/<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>) <span class="keywordflow">return</span>; +<a name="l00097"></a>00097 <span class="keywordflow">if</span> (<span class="keywordtype">object</span>.y() < (<a class="code" href="class_game_panel.html#af3354addd707cb42b078dbe2ef29e189" title="The amount that drawing should be offset downwards, recalculated every frame.">_offsetY</a>-<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>)/<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>) <span class="keywordflow">return</span>; +<a name="l00098"></a>00098 <span class="keywordflow">if</span> (<span class="keywordtype">object</span>.y() > (<a class="code" href="class_game_panel.html#af3354addd707cb42b078dbe2ef29e189" title="The amount that drawing should be offset downwards, recalculated every frame.">_offsetY</a>+<a class="code" href="class_screen_panel.html#a4f6dd5c7ca10d51bface7b1ddedc236c" title="The height of the sub-bitmaps being drawn to in pixels.">_height</a>)/<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>) <span class="keywordflow">return</span>; +<a name="l00099"></a>00099 +<a name="l00100"></a>00100 ALLEGRO_BITMAP* bitmap = <a class="code" href="class_game_panel.html#a0125ff874ffebadc15c7678210914a8c" title="Used to cache ALLEGRO_BITMAPs, so that they only need to be drawn once.">_bitmapStore</a>.<a class="code" href="class_bitmap_store.html#aadd437c869c5856c36d920dfafbc6ee4" title="Function to get image for drawing to the screen.">getBitmap</a>(<span class="keywordtype">object</span>.image()); +<a name="l00101"></a>00101 +<a name="l00102"></a>00102 <span class="keywordtype">float</span> angle = 0; +<a name="l00103"></a>00103 <span class="keywordflow">switch</span>(<span class="keywordtype">object</span>.facing()) +<a name="l00104"></a>00104 { +<a name="l00105"></a>00105 <span class="keywordflow">case</span> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fad2e008a4b04be5e2d3559c70193920e7">Maze::UP</a>: +<a name="l00106"></a>00106 angle = 0; +<a name="l00107"></a>00107 <span class="keywordflow">break</span>; +<a name="l00108"></a>00108 <span class="keywordflow">case</span> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fa699ae3e1d989e9b12bd200aa86e29e9d">Maze::RIGHT</a>: +<a name="l00109"></a>00109 angle = ALLEGRO_PI/2; +<a name="l00110"></a>00110 <span class="keywordflow">break</span>; +<a name="l00111"></a>00111 <span class="keywordflow">case</span> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fa89ab143d020541957ab5e0e9cfdd3e23">Maze::DOWN</a>: +<a name="l00112"></a>00112 angle = ALLEGRO_PI; +<a name="l00113"></a>00113 <span class="keywordflow">break</span>; +<a name="l00114"></a>00114 <span class="keywordflow">case</span> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28faab1a1fe0274cd139b3c0116d8caf458c">Maze::LEFT</a>: +<a name="l00115"></a>00115 angle = 3*ALLEGRO_PI/2; +<a name="l00116"></a>00116 <span class="keywordflow">break</span>; +<a name="l00117"></a>00117 } +<a name="l00118"></a>00118 +<a name="l00119"></a>00119 <span class="keywordtype">float</span> objectX = <a class="code" href="class_game_panel.html#a53a4386ab0f60db88b3c638b3880cd91" title="Converts an x game coordinate value to its equivalent in pixels.">getPanelX</a>(<span class="keywordtype">object</span>.x()); +<a name="l00120"></a>00120 <span class="keywordtype">float</span> objectY = <a class="code" href="class_game_panel.html#a0e722b67c8ee7fe5f557821adf9b8cc2" title="Converts a y game coordinate value to its equivalent in pixels.">getPanelY</a>(<span class="keywordtype">object</span>.y()); +<a name="l00121"></a>00121 <span class="keywordtype">float</span> center = <a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>/2; +<a name="l00122"></a>00122 +<a name="l00123"></a>00123 al_draw_rotated_bitmap(bitmap, center , center , objectX+center-<a class="code" href="class_game_panel.html#afe99f100b68ec2475cb0a509887b63a9" title="The amount that drawing should be offset to the right, recalculated every frame.">_offsetX</a>, objectY+center-<a class="code" href="class_game_panel.html#af3354addd707cb42b078dbe2ef29e189" title="The amount that drawing should be offset downwards, recalculated every frame.">_offsetY</a>, angle, 0); +<a name="l00124"></a>00124 } +<a name="l00125"></a>00125 +<a name="l00126"></a><a class="code" href="class_game_panel.html#a53a4386ab0f60db88b3c638b3880cd91">00126</a> <span class="keywordtype">float</span> <a class="code" href="class_game_panel.html#a53a4386ab0f60db88b3c638b3880cd91" title="Converts an x game coordinate value to its equivalent in pixels.">GamePanel::getPanelX</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>& x)<span class="keyword"> const</span> +<a name="l00127"></a>00127 <span class="keyword"></span>{ +<a name="l00128"></a>00128 <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(x*<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>); +<a name="l00129"></a>00129 } +<a name="l00130"></a><a class="code" href="class_game_panel.html#a0e722b67c8ee7fe5f557821adf9b8cc2">00130</a> <span class="keywordtype">float</span> <a class="code" href="class_game_panel.html#a0e722b67c8ee7fe5f557821adf9b8cc2" title="Converts a y game coordinate value to its equivalent in pixels.">GamePanel::getPanelY</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>& y)<span class="keyword"> const</span> +<a name="l00131"></a>00131 <span class="keyword"></span>{ +<a name="l00132"></a>00132 <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(y*<a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>); +<a name="l00133"></a>00133 } +</pre></div></div> +</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:30 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> diff --git a/docs/html/_game_panel_8h.html b/docs/html/_game_panel_8h.html new file mode 100644 index 0000000..b496b00 --- /dev/null +++ b/docs/html/_game_panel_8h.html @@ -0,0 +1,127 @@ +<!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: source/presentation/GamePanel.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/presentation/GamePanel.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "../presentation/ScreenPanel.h"</code><br/> +<code>#include "../logic/Maze.h"</code><br/> +<code>#include "../logic/GameObject.h"</code><br/> +<code>#include "../logic/PlayerCar.h"</code><br/> +<code>#include "../logic/EnemyCar.h"</code><br/> +<code>#include "../logic/Checkpoint.h"</code><br/> +<code>#include "../logic/Rock.h"</code><br/> +<code>#include "../logic/Smokescreen.h"</code><br/> +<code>#include "../logic/DestroyedObjectPopup.h"</code><br/> +<code>#include "../logic/AllegroWrappers.h"</code><br/> +</div> +<p><a href="_game_panel_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_game_panel.html">GamePanel</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_screen_panel.html" title="Parent class for panels that are drawn on the screen.">ScreenPanel</a> to be drawn on the screen to draw the area where the game takes place. <a href="class_game_panel.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_game_panel_8h_source.html b/docs/html/_game_panel_8h_source.html new file mode 100644 index 0000000..235ea59 --- /dev/null +++ b/docs/html/_game_panel_8h_source.html @@ -0,0 +1,151 @@ +<!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: source/presentation/GamePanel.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/GamePanel.h</div> </div> +</div> +<div class="contents"> +<a href="_game_panel_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef GAMEPANEL_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define GAMEPANEL_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include "../presentation/ScreenPanel.h"</span> +<a name="l00005"></a>00005 <span class="preprocessor">#include "../logic/Maze.h"</span> +<a name="l00006"></a>00006 <span class="preprocessor">#include "../logic/GameObject.h"</span> +<a name="l00007"></a>00007 <span class="preprocessor">#include "../logic/PlayerCar.h"</span> +<a name="l00008"></a>00008 <span class="preprocessor">#include "../logic/EnemyCar.h"</span> +<a name="l00009"></a>00009 <span class="preprocessor">#include "../logic/Checkpoint.h"</span> +<a name="l00010"></a>00010 <span class="preprocessor">#include "../logic/Rock.h"</span> +<a name="l00011"></a>00011 <span class="preprocessor">#include "../logic/Smokescreen.h"</span> +<a name="l00012"></a>00012 <span class="preprocessor">#include "../logic/DestroyedObjectPopup.h"</span> +<a name="l00013"></a>00013 <span class="preprocessor">#include "../logic/AllegroWrappers.h"</span> +<a name="l00014"></a>00014 +<a name="l00023"></a><a class="code" href="class_game_panel.html">00023</a> <span class="keyword">class </span><a class="code" href="class_game_panel.html" title="ScreenPanel to be drawn on the screen to draw the area where the game takes place.">GamePanel</a> : <span class="keyword">public</span> <a class="code" href="class_screen_panel.html" title="Parent class for panels that are drawn on the screen.">ScreenPanel</a> +<a name="l00024"></a>00024 { +<a name="l00025"></a>00025 <span class="keyword">public</span>: +<a name="l00040"></a>00040 <a class="code" href="class_game_panel.html#a3475820b2255da92e247d07248870044" title="Creates a GamePanel from the given back and front buffers.">GamePanel</a>(ALLEGRO_BITMAP* back, ALLEGRO_BITMAP* front, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height); +<a name="l00041"></a>00041 +<a name="l00042"></a>00042 +<a name="l00057"></a>00057 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd" title="Draws the given objects on the screen.">draw</a>(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze, <span class="keyword">const</span> list<PlayerCar>& players, <span class="keyword">const</span> list<EnemyCar>& enemies, <span class="keyword">const</span> list<Checkpoint>& checkpoints, <span class="keyword">const</span> list<Rock>& rocks, <span class="keyword">const</span> list<Smokescreen>& smokescreens, <span class="keyword">const</span> list<DestroyedObjectPopup>& popups); +<a name="l00058"></a>00058 <span class="keyword">private</span>: +<a name="l00062"></a>00062 <a class="code" href="class_game_panel.html#a3475820b2255da92e247d07248870044" title="Creates a GamePanel from the given back and front buffers.">GamePanel</a>(<span class="keyword">const</span> <a class="code" href="class_game_panel.html" title="ScreenPanel to be drawn on the screen to draw the area where the game takes place.">GamePanel</a>& ref); +<a name="l00066"></a>00066 <a class="code" 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 class="code" href="class_game_panel.html#afa4391feb9b273eb938531a73b1ec7f2" title="Assignment operator not implemented, ScreenPanels should not be copied.">operator=</a>(<span class="keyword">const</span> <a class="code" href="class_game_panel.html" title="ScreenPanel to be drawn on the screen to draw the area where the game takes place.">GamePanel</a>& rhs); +<a name="l00075"></a>00075 <span class="keywordtype">float</span> <a class="code" href="class_game_panel.html#a53a4386ab0f60db88b3c638b3880cd91" title="Converts an x game coordinate value to its equivalent in pixels.">getPanelX</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>& x) <span class="keyword">const</span>; +<a name="l00084"></a>00084 <span class="keywordtype">float</span> <a class="code" href="class_game_panel.html#a0e722b67c8ee7fe5f557821adf9b8cc2" title="Converts a y game coordinate value to its equivalent in pixels.">getPanelY</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>& y) <span class="keyword">const</span>; +<a name="l00085"></a>00085 +<a name="l00094"></a>00094 <span class="keywordtype">void</span> <a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd" title="Draws the given objects on the screen.">draw</a>(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze); +<a name="l00095"></a>00095 +<a name="l00103"></a>00103 <span class="keywordtype">void</span> <a class="code" href="class_game_panel.html#ab093fb770fa8b46ee863947259c72abd" title="Draws the given objects on the screen.">draw</a>(<span class="keyword">const</span> <a class="code" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a>& <span class="keywordtype">object</span>); +<a name="l00104"></a>00104 +<a name="l00105"></a><a class="code" href="class_game_panel.html#ae60d3f1c29382ad3c6e6b5c5a56d2160">00105</a> <span class="keyword">const</span> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="class_game_panel.html#ae60d3f1c29382ad3c6e6b5c5a56d2160" title="The number of Maze blocks in one row shown on the panel at a time. Used to determine the scale...">BLOCKS_PER_ROW</a> = 15; +<a name="l00106"></a>00106 +<a name="l00107"></a><a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96">00107</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_game_panel.html#a4889f5f6e1ad713be455d4f69a2cda96" title="The width of one (square) Maze block on the screen, in pixels.">_mazeblockWidth</a>; +<a name="l00108"></a>00108 +<a name="l00109"></a><a class="code" href="class_game_panel.html#afe99f100b68ec2475cb0a509887b63a9">00109</a> <span class="keywordtype">float</span> <a class="code" href="class_game_panel.html#afe99f100b68ec2475cb0a509887b63a9" title="The amount that drawing should be offset to the right, recalculated every frame.">_offsetX</a>; +<a name="l00110"></a><a class="code" href="class_game_panel.html#af3354addd707cb42b078dbe2ef29e189">00110</a> <span class="keywordtype">float</span> <a class="code" href="class_game_panel.html#af3354addd707cb42b078dbe2ef29e189" title="The amount that drawing should be offset downwards, recalculated every frame.">_offsetY</a>; +<a name="l00111"></a>00111 +<a name="l00112"></a><a class="code" href="class_game_panel.html#a0125ff874ffebadc15c7678210914a8c">00112</a> <a class="code" href="class_bitmap_store.html" title="Class for accessing images in ALLEGRO_BITMAP format and low level drawing.">BitmapStore</a> <a class="code" href="class_game_panel.html#a0125ff874ffebadc15c7678210914a8c" title="Used to cache ALLEGRO_BITMAPs, so that they only need to be drawn once.">_bitmapStore</a>; +<a name="l00113"></a>00113 +<a name="l00114"></a><a class="code" href="class_game_panel.html#a18c100c8d9ae2601a97083485d937418">00114</a> <a class="code" href="class_allegro_init.html" title="Class ensures that Allegro is initialized and uninstalled when appropriate.">AllegroInit</a> <a class="code" href="class_game_panel.html#a18c100c8d9ae2601a97083485d937418" title="Handles dependencies on Allegro.">_allegro</a>; +<a name="l00115"></a>00115 }; +<a name="l00116"></a>00116 +<a name="l00117"></a>00117 <span class="preprocessor">#endif // GAMEPANEL_H</span> +</pre></div></div> +</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:30 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> diff --git a/docs/html/_info_panel_8cpp.html b/docs/html/_info_panel_8cpp.html new file mode 100644 index 0000000..d0e0acb --- /dev/null +++ b/docs/html/_info_panel_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/presentation/InfoPanel.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/InfoPanel.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_info_panel_8h_source.html">InfoPanel.h</a>"</code><br/> +</div> +<p><a href="_info_panel_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_info_panel_8cpp_source.html b/docs/html/_info_panel_8cpp_source.html new file mode 100644 index 0000000..59e5a49 --- /dev/null +++ b/docs/html/_info_panel_8cpp_source.html @@ -0,0 +1,218 @@ +<!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: source/presentation/InfoPanel.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/InfoPanel.cpp</div> </div> +</div> +<div class="contents"> +<a href="_info_panel_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_info_panel_8h.html">InfoPanel.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a><a class="code" href="class_info_panel.html#a5a3d0afb5ebd764de04484b1817912b6">00003</a> <a class="code" href="class_info_panel.html#a5a3d0afb5ebd764de04484b1817912b6" title="Creates an InfoPanel from the given back and front buffers.">InfoPanel::InfoPanel</a>(ALLEGRO_BITMAP* back, ALLEGRO_BITMAP* front, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height) +<a name="l00004"></a>00004 :<a class="code" href="class_screen_panel.html" title="Parent class for panels that are drawn on the screen.">ScreenPanel</a>(back, front, x, y, width, height), +<a name="l00005"></a>00005 _petrolHeadingY(_width/10), +<a name="l00006"></a>00006 _petrolGuageY(_petrolHeadingY + _width/10), +<a name="l00007"></a>00007 _petrolGuageHeight(_width/10), +<a name="l00008"></a>00008 _checkpointHeadingY(_petrolGuageY + _petrolGuageHeight + _width/10), +<a name="l00009"></a>00009 _checkpointValueY(_checkpointHeadingY + _width/10), +<a name="l00010"></a>00010 _miniMazeY(_checkpointValueY + _width/5), +<a name="l00011"></a>00011 _miniMazeHeight(_height - _miniMazeY), +<a name="l00012"></a>00012 _miniMazeblockWidth(0) +<a name="l00013"></a>00013 { +<a name="l00014"></a>00014 <a class="code" href="class_info_panel.html#a38d023a2b00eafa303de37550cb96817" title="The font being used to write the headings and number of checkpoints remaining.">_panelFont</a> = al_load_font(<span class="stringliteral">"junction 02.ttf"</span>, <a class="code" href="class_screen_panel.html#afbbcad2a101b95869dcdef9bf0898f65" title="The width of the sub-bitmaps being drawn to in pixels.">_width</a>/10, 0); +<a name="l00015"></a>00015 <span class="keywordflow">if</span> (<a class="code" href="class_info_panel.html#a38d023a2b00eafa303de37550cb96817" title="The font being used to write the headings and number of checkpoints remaining.">_panelFont</a> == NULL) +<a name="l00016"></a>00016 { +<a name="l00017"></a>00017 al_show_native_message_box(NULL, <span class="stringliteral">"Fatal error"</span>, <span class="stringliteral">"Fatal error"</span>, <span class="stringliteral">"The file 'junction 02.ttf' was not found. Ensure that it is located in the working directory."</span>, NULL, ALLEGRO_MESSAGEBOX_ERROR); +<a name="l00018"></a>00018 <span class="keywordflow">throw</span> <a class="code" href="class_install_failure.html" title="Exception to be thrown if any component of Allegro fails to install at runtime.">InstallFailure</a>(); +<a name="l00019"></a>00019 } +<a name="l00020"></a>00020 } +<a name="l00021"></a>00021 +<a name="l00022"></a><a class="code" href="class_info_panel.html#a052da279d4bf0405ae3735f24cc2e2a2">00022</a> <a class="code" href="class_info_panel.html#a052da279d4bf0405ae3735f24cc2e2a2" title="Destructor that ensured that the font created is destroyed.">InfoPanel::~InfoPanel</a>() +<a name="l00023"></a>00023 { +<a name="l00024"></a>00024 al_destroy_font(<a class="code" href="class_info_panel.html#a38d023a2b00eafa303de37550cb96817" title="The font being used to write the headings and number of checkpoints remaining.">_panelFont</a>); +<a name="l00025"></a>00025 } +<a name="l00026"></a>00026 +<a name="l00027"></a><a class="code" href="class_info_panel.html#aa9628c14e08ac6573e0191d9d4afa227">00027</a> <span class="keywordtype">void</span> <a class="code" href="class_info_panel.html#aa9628c14e08ac6573e0191d9d4afa227" title="Draws the InfoPanel using the given objects.">InfoPanel::draw</a>(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze, <span class="keyword">const</span> list<PlayerCar>& players, <span class="keyword">const</span> list<EnemyCar>& enemies, <span class="keyword">const</span> list<Checkpoint>& checkpoints, <span class="keyword">const</span> list<Rock>& rocks, <span class="keyword">const</span> list<Smokescreen>& smokescreens, <span class="keyword">const</span> list<DestroyedObjectPopup>& popups) +<a name="l00028"></a>00028 { +<a name="l00029"></a>00029 ALLEGRO_BITMAP* prev_draw = al_get_target_bitmap(); +<a name="l00030"></a>00030 al_set_target_bitmap(<a class="code" href="class_screen_panel.html#a1a3ec8e60be5d5cede210171bda33468" title="The back buffer. Only the back buffer can be drawn to.">_back</a>); +<a name="l00031"></a>00031 +<a name="l00032"></a>00032 <span class="keywordtype">double</span> petrol = 0; +<a name="l00033"></a>00033 <span class="keywordflow">if</span> (!players.empty()) +<a name="l00034"></a>00034 { +<a name="l00035"></a>00035 petrol = players.front().petrol(); +<a name="l00036"></a>00036 } +<a name="l00037"></a>00037 +<a name="l00038"></a>00038 al_clear_to_color(<a class="code" href="class_info_panel.html#a27ac079ed1a39ae672b6ceb9e0974855" title="Caches colours for drawing.">_colourStore</a>.<a class="code" href="class_colour_store.html#ac8474c4e9b335215f03ec2c749847ad2" title="Returns the colour associated with a given image.">getColour</a>(<a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a4e2a075dff2c02bf40b134c9090d1f02">BitmapStore::MAZE_FLOOR</a>)); +<a name="l00039"></a>00039 +<a name="l00040"></a>00040 <span class="comment">//gets a mazeblock width the fits the current maze</span> +<a name="l00041"></a>00041 <a class="code" href="class_info_panel.html#abb211fac23293e41f23b86fd70df98f0" title="The width of each Maze block being drawn.">_miniMazeblockWidth</a> = min(static_cast<float>(<a class="code" href="class_screen_panel.html#afbbcad2a101b95869dcdef9bf0898f65" title="The width of the sub-bitmaps being drawn to in pixels.">_width</a>)/maze.<a class="code" href="class_maze.html#a6963ffbb8e10f5ca72ddc749b3f29419" title="Provides access to the width of the Maze object.">width</a>(), <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(<a class="code" href="class_info_panel.html#ad38206daa42c82b45878e6d0c55f2860" title="The height of the Maze.">_miniMazeHeight</a>)/maze.<a class="code" href="class_maze.html#a53de30abea69713225ab77703e753d81" title="Provides access to the height of the Maze object.">height</a>()); +<a name="l00042"></a>00042 +<a name="l00043"></a>00043 <span class="comment">//draws petrol heading and bar</span> +<a name="l00044"></a>00044 al_draw_text(<a class="code" href="class_info_panel.html#a38d023a2b00eafa303de37550cb96817" title="The font being used to write the headings and number of checkpoints remaining.">_panelFont</a>, al_map_rgb(255,255,255), 1, <a class="code" href="class_info_panel.html#a5ab76703538ad6e396a21ea8fb47d23d" title="The y coordinate of the heading for the petrol guage.">_petrolHeadingY</a>, ALLEGRO_ALIGN_LEFT , <span class="stringliteral">"Petrol"</span>); +<a name="l00045"></a>00045 al_draw_filled_rectangle(0,<a class="code" href="class_info_panel.html#a29976100c8fc5c130be713dfb5c2807e" title="The y coordinate of top of the petrol guage.">_petrolGuageY</a>,<a class="code" href="class_screen_panel.html#afbbcad2a101b95869dcdef9bf0898f65" title="The width of the sub-bitmaps being drawn to in pixels.">_width</a>*petrol, <a class="code" href="class_info_panel.html#a29976100c8fc5c130be713dfb5c2807e" title="The y coordinate of top of the petrol guage.">_petrolGuageY</a>+<a class="code" href="class_info_panel.html#a0c85348f8471d86da73772f86a62f84c" title="The height of the rectangle that is the petrol guage.">_petrolGuageHeight</a>, al_map_rgb(255,128,0)); +<a name="l00046"></a>00046 +<a name="l00047"></a>00047 <span class="comment">//draws checkpoints remaining heading and value</span> +<a name="l00048"></a>00048 al_draw_text(<a class="code" href="class_info_panel.html#a38d023a2b00eafa303de37550cb96817" title="The font being used to write the headings and number of checkpoints remaining.">_panelFont</a>, al_map_rgb(255,255,255), 1, <a class="code" href="class_info_panel.html#a7ec514286dbf2fb43f64acd620397e21" title="The y coordinate of the heading for the number of remaining checkpoints.">_checkpointHeadingY</a>, ALLEGRO_ALIGN_LEFT , <span class="stringliteral">"Checkpoints"</span>); +<a name="l00049"></a>00049 stringstream checkpointCountString; +<a name="l00050"></a>00050 checkpointCountString << <a class="code" href="class_checkpoint.html#a872d8574b6f0a7960854fb1175e05f13" title="Function for accessing the number of checkpoints that currently exist.">Checkpoint::checkpointCount</a>(); +<a name="l00051"></a>00051 al_draw_text(<a class="code" href="class_info_panel.html#a38d023a2b00eafa303de37550cb96817" title="The font being used to write the headings and number of checkpoints remaining.">_panelFont</a>, al_map_rgb(255,255,255), 1, <a class="code" href="class_info_panel.html#ad118b5f123e590a95b3f390fd9597f02" title="The y coordinate of the text stating the number of remaining checkpoints.">_checkpointValueY</a>, ALLEGRO_ALIGN_LEFT , checkpointCountString.str().c_str()); +<a name="l00052"></a>00052 +<a name="l00053"></a>00053 <a class="code" href="class_info_panel.html#aa9628c14e08ac6573e0191d9d4afa227" title="Draws the InfoPanel using the given objects.">draw</a>(maze); +<a name="l00054"></a>00054 <span class="keywordflow">for</span> (list<PlayerCar>::const_iterator iter = players.begin(); iter != players.end(); ++iter) +<a name="l00055"></a>00055 { +<a name="l00056"></a>00056 <a class="code" href="class_info_panel.html#aa9628c14e08ac6573e0191d9d4afa227" title="Draws the InfoPanel using the given objects.">draw</a>(*iter); +<a name="l00057"></a>00057 } +<a name="l00058"></a>00058 <span class="keywordflow">for</span> (list<EnemyCar>::const_iterator iter = enemies.begin(); iter != enemies.end(); ++iter) +<a name="l00059"></a>00059 { +<a name="l00060"></a>00060 <a class="code" href="class_info_panel.html#aa9628c14e08ac6573e0191d9d4afa227" title="Draws the InfoPanel using the given objects.">draw</a>(*iter); +<a name="l00061"></a>00061 } +<a name="l00062"></a>00062 <span class="keywordflow">for</span> (list<Checkpoint>::const_iterator iter = checkpoints.begin(); iter != checkpoints.end(); ++iter) +<a name="l00063"></a>00063 { +<a name="l00064"></a>00064 <a class="code" href="class_info_panel.html#aa9628c14e08ac6573e0191d9d4afa227" title="Draws the InfoPanel using the given objects.">draw</a>(*iter); +<a name="l00065"></a>00065 } +<a name="l00066"></a>00066 +<a name="l00067"></a>00067 <span class="comment">//restore draw target</span> +<a name="l00068"></a>00068 al_set_target_bitmap(prev_draw); +<a name="l00069"></a>00069 } +<a name="l00070"></a>00070 +<a name="l00071"></a><a class="code" href="class_info_panel.html#a23a025859397c3e28bbe9dce26563d7c">00071</a> <span class="keywordtype">void</span> <a class="code" href="class_info_panel.html#aa9628c14e08ac6573e0191d9d4afa227" title="Draws the InfoPanel using the given objects.">InfoPanel::draw</a>(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze) +<a name="l00072"></a>00072 { +<a name="l00073"></a>00073 ALLEGRO_COLOR wallColour = <a class="code" href="class_info_panel.html#a27ac079ed1a39ae672b6ceb9e0974855" title="Caches colours for drawing.">_colourStore</a>.<a class="code" href="class_colour_store.html#ac8474c4e9b335215f03ec2c749847ad2" title="Returns the colour associated with a given image.">getColour</a>(<a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386ae662e77b349a8e22c5826ef35b1b5d9a">BitmapStore::MAZE_WALL</a>); +<a name="l00074"></a>00074 ALLEGRO_COLOR floorColour = <a class="code" href="class_info_panel.html#a27ac079ed1a39ae672b6ceb9e0974855" title="Caches colours for drawing.">_colourStore</a>.<a class="code" href="class_colour_store.html#ac8474c4e9b335215f03ec2c749847ad2" title="Returns the colour associated with a given image.">getColour</a>(<a class="code" href="class_bitmap_store.html#af3bc66181673def9d0a590cd13c7e386a4e2a075dff2c02bf40b134c9090d1f02">BitmapStore::MAZE_FLOOR</a>); +<a name="l00075"></a>00075 +<a name="l00076"></a>00076 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x=0; x<maze.<a class="code" href="class_maze.html#a6963ffbb8e10f5ca72ddc749b3f29419" title="Provides access to the width of the Maze object.">width</a>(); ++x) +<a name="l00077"></a>00077 { +<a name="l00078"></a>00078 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> y=0; y<maze.<a class="code" href="class_maze.html#a53de30abea69713225ab77703e753d81" title="Provides access to the height of the Maze object.">height</a>(); ++y) +<a name="l00079"></a>00079 { +<a name="l00080"></a>00080 <span class="keywordtype">float</span> x1 = <a class="code" href="class_info_panel.html#a0accb88b099f412cc3baa7d2bf4690aa" title="Converts an x game coordinate value to its equivalent in pixels.">getPanelX</a>(x); +<a name="l00081"></a>00081 <span class="keywordtype">float</span> x2 = x1 + <a class="code" href="class_info_panel.html#abb211fac23293e41f23b86fd70df98f0" title="The width of each Maze block being drawn.">_miniMazeblockWidth</a>; +<a name="l00082"></a>00082 <span class="keywordtype">float</span> y1 = <a class="code" href="class_info_panel.html#ad962eab814441375a8634b67d743d7e6" title="Converts a y game coordinate value to its equivalent in pixels.">getPanelY</a>(y) + <a class="code" href="class_info_panel.html#a7b4bb6cca8549d6a1d1deccc99994b9b" title="The y coordinate of the top of the Maze.">_miniMazeY</a>; +<a name="l00083"></a>00083 <span class="keywordtype">float</span> y2 = y1 + <a class="code" href="class_info_panel.html#abb211fac23293e41f23b86fd70df98f0" title="The width of each Maze block being drawn.">_miniMazeblockWidth</a>; +<a name="l00084"></a>00084 <span class="keywordflow">if</span> (maze.<a class="code" href="class_maze.html#a1bbdfece82c4ba90ffcf2fea52e5fef1" title="Checks if a given position contains a wall or not.">getSolid</a>(x,y)) +<a name="l00085"></a>00085 { +<a name="l00086"></a>00086 al_draw_filled_rectangle(x1, y1, x2, y2, wallColour); +<a name="l00087"></a>00087 } +<a name="l00088"></a>00088 <span class="keywordflow">else</span> +<a name="l00089"></a>00089 { +<a name="l00090"></a>00090 al_draw_filled_rectangle(x1, y1, x2, y2, floorColour); +<a name="l00091"></a>00091 } +<a name="l00092"></a>00092 } +<a name="l00093"></a>00093 } +<a name="l00094"></a>00094 } +<a name="l00095"></a>00095 +<a name="l00096"></a><a class="code" href="class_info_panel.html#abc82d5365a89b3e374dbbdda86b77703">00096</a> <span class="keywordtype">void</span> <a class="code" href="class_info_panel.html#aa9628c14e08ac6573e0191d9d4afa227" title="Draws the InfoPanel using the given objects.">InfoPanel::draw</a>(<span class="keyword">const</span> <a class="code" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a>& <span class="keywordtype">object</span>) +<a name="l00097"></a>00097 { +<a name="l00098"></a>00098 <span class="keywordtype">float</span> r = <a class="code" href="class_info_panel.html#abb211fac23293e41f23b86fd70df98f0" title="The width of each Maze block being drawn.">_miniMazeblockWidth</a>/2; +<a name="l00099"></a>00099 <span class="keywordtype">float</span> cx = <a class="code" href="class_info_panel.html#a0accb88b099f412cc3baa7d2bf4690aa" title="Converts an x game coordinate value to its equivalent in pixels.">getPanelX</a>(<span class="keywordtype">object</span>.x()) + r; +<a name="l00100"></a>00100 <span class="keywordtype">float</span> cy = <a class="code" href="class_info_panel.html#ad962eab814441375a8634b67d743d7e6" title="Converts a y game coordinate value to its equivalent in pixels.">getPanelY</a>(<span class="keywordtype">object</span>.y()) + <a class="code" href="class_info_panel.html#a7b4bb6cca8549d6a1d1deccc99994b9b" title="The y coordinate of the top of the Maze.">_miniMazeY</a> + r; +<a name="l00101"></a>00101 al_draw_filled_circle(cx, cy, r, <a class="code" href="class_info_panel.html#a27ac079ed1a39ae672b6ceb9e0974855" title="Caches colours for drawing.">_colourStore</a>.<a class="code" href="class_colour_store.html#ac8474c4e9b335215f03ec2c749847ad2" title="Returns the colour associated with a given image.">getColour</a>(<span class="keywordtype">object</span>.image())); +<a name="l00102"></a>00102 } +<a name="l00103"></a>00103 +<a name="l00104"></a><a class="code" href="class_info_panel.html#a0accb88b099f412cc3baa7d2bf4690aa">00104</a> <span class="keywordtype">float</span> <a class="code" href="class_info_panel.html#a0accb88b099f412cc3baa7d2bf4690aa" title="Converts an x game coordinate value to its equivalent in pixels.">InfoPanel::getPanelX</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>& x)<span class="keyword"> const</span> +<a name="l00105"></a>00105 <span class="keyword"></span>{ +<a name="l00106"></a>00106 <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(x*<a class="code" href="class_info_panel.html#abb211fac23293e41f23b86fd70df98f0" title="The width of each Maze block being drawn.">_miniMazeblockWidth</a>); +<a name="l00107"></a>00107 } +<a name="l00108"></a><a class="code" href="class_info_panel.html#ad962eab814441375a8634b67d743d7e6">00108</a> <span class="keywordtype">float</span> <a class="code" href="class_info_panel.html#ad962eab814441375a8634b67d743d7e6" title="Converts a y game coordinate value to its equivalent in pixels.">InfoPanel::getPanelY</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>& y)<span class="keyword"> const</span> +<a name="l00109"></a>00109 <span class="keyword"></span>{ +<a name="l00110"></a>00110 <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(y*<a class="code" href="class_info_panel.html#abb211fac23293e41f23b86fd70df98f0" title="The width of each Maze block being drawn.">_miniMazeblockWidth</a>); +<a name="l00111"></a>00111 } +</pre></div></div> +</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> diff --git a/docs/html/_info_panel_8h.html b/docs/html/_info_panel_8h.html new file mode 100644 index 0000000..14b4fb7 --- /dev/null +++ b/docs/html/_info_panel_8h.html @@ -0,0 +1,128 @@ +<!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: source/presentation/InfoPanel.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/presentation/InfoPanel.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include <allegro5/allegro.h></code><br/> +<code>#include <allegro5/allegro_primitives.h></code><br/> +<code>#include <sstream></code><br/> +<code>#include "../presentation/ScreenPanel.h"</code><br/> +<code>#include "../presentation/ColourStore.h"</code><br/> +<code>#include "../logic/Maze.h"</code><br/> +<code>#include "../logic/GameObject.h"</code><br/> +<code>#include "../logic/PlayerCar.h"</code><br/> +<code>#include "../logic/EnemyCar.h"</code><br/> +<code>#include "../logic/Checkpoint.h"</code><br/> +<code>#include "../logic/AllegroWrappers.h"</code><br/> +</div> +<p><a href="_info_panel_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_info_panel.html">InfoPanel</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_screen_panel.html" title="Parent class for panels that are drawn on the screen.">ScreenPanel</a> to be drawn on the screen to give the player information. <a href="class_info_panel.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_info_panel_8h_source.html b/docs/html/_info_panel_8h_source.html new file mode 100644 index 0000000..d28f366 --- /dev/null +++ b/docs/html/_info_panel_8h_source.html @@ -0,0 +1,159 @@ +<!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: source/presentation/InfoPanel.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/InfoPanel.h</div> </div> +</div> +<div class="contents"> +<a href="_info_panel_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef INFOPANEL_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define INFOPANEL_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include <allegro5/allegro.h></span> +<a name="l00005"></a>00005 <span class="preprocessor">#include <allegro5/allegro_primitives.h></span> +<a name="l00006"></a>00006 +<a name="l00007"></a>00007 <span class="preprocessor">#include <sstream></span> +<a name="l00008"></a>00008 <span class="keyword">using namespace </span>std; +<a name="l00009"></a>00009 +<a name="l00010"></a>00010 <span class="preprocessor">#include "../presentation/ScreenPanel.h"</span> +<a name="l00011"></a>00011 <span class="preprocessor">#include "../presentation/ColourStore.h"</span> +<a name="l00012"></a>00012 <span class="preprocessor">#include "../logic/Maze.h"</span> +<a name="l00013"></a>00013 <span class="preprocessor">#include "../logic/GameObject.h"</span> +<a name="l00014"></a>00014 <span class="preprocessor">#include "../logic/PlayerCar.h"</span> +<a name="l00015"></a>00015 <span class="preprocessor">#include "../logic/EnemyCar.h"</span> +<a name="l00016"></a>00016 <span class="preprocessor">#include "../logic/Checkpoint.h"</span> +<a name="l00017"></a>00017 <span class="preprocessor">#include "../logic/AllegroWrappers.h"</span> +<a name="l00018"></a>00018 +<a name="l00030"></a><a class="code" href="class_info_panel.html">00030</a> <span class="keyword">class </span><a class="code" href="class_info_panel.html" title="ScreenPanel to be drawn on the screen to give the player information.">InfoPanel</a> : <span class="keyword">public</span> <a class="code" href="class_screen_panel.html" title="Parent class for panels that are drawn on the screen.">ScreenPanel</a> +<a name="l00031"></a>00031 { +<a name="l00032"></a>00032 <span class="keyword">public</span>: +<a name="l00047"></a>00047 <a class="code" href="class_info_panel.html" title="ScreenPanel to be drawn on the screen to give the player information.">InfoPanel</a>(ALLEGRO_BITMAP* back, ALLEGRO_BITMAP* front, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height); +<a name="l00048"></a>00048 +<a name="l00054"></a>00054 ~<a class="code" href="class_info_panel.html" title="ScreenPanel to be drawn on the screen to give the player information.">InfoPanel</a>(); +<a name="l00055"></a>00055 +<a name="l00074"></a>00074 <span class="keyword">virtual</span> <span class="keywordtype">void</span> draw(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze, <span class="keyword">const</span> list<PlayerCar>& players, <span class="keyword">const</span> list<EnemyCar>& enemies, <span class="keyword">const</span> list<Checkpoint>& checkpoints, <span class="keyword">const</span> list<Rock>& rocks, <span class="keyword">const</span> list<Smokescreen>& smokescreens, <span class="keyword">const</span> list<DestroyedObjectPopup>& popups); +<a name="l00075"></a>00075 <span class="keyword">private</span>: +<a name="l00079"></a>00079 <a class="code" href="class_info_panel.html" title="ScreenPanel to be drawn on the screen to give the player information.">InfoPanel</a>(<span class="keyword">const</span> <a class="code" href="class_info_panel.html" title="ScreenPanel to be drawn on the screen to give the player information.">InfoPanel</a>& ref); +<a name="l00083"></a>00083 <a class="code" href="class_info_panel.html" title="ScreenPanel to be drawn on the screen to give the player information.">InfoPanel</a>& operator=(<span class="keyword">const</span> <a class="code" href="class_info_panel.html" title="ScreenPanel to be drawn on the screen to give the player information.">InfoPanel</a>& rhs); +<a name="l00092"></a>00092 <span class="keywordtype">float</span> getPanelX(<span class="keyword">const</span> <span class="keywordtype">double</span>& x) <span class="keyword">const</span>; +<a name="l00101"></a>00101 <span class="keywordtype">float</span> getPanelY(<span class="keyword">const</span> <span class="keywordtype">double</span>& y) <span class="keyword">const</span>; +<a name="l00102"></a>00102 +<a name="l00113"></a>00113 <span class="keywordtype">void</span> draw(<span class="keyword">const</span> <a class="code" href="class_maze.html" title="A rectangular 2D boolean array, representing where cars can drive and where they cannot.">Maze</a>& maze); +<a name="l00114"></a>00114 +<a name="l00123"></a>00123 <span class="keywordtype">void</span> draw(<span class="keyword">const</span> <a class="code" href="class_game_object.html" title="Parent class for objects that are placed in the maze.">GameObject</a>& <span class="keywordtype">object</span>); +<a name="l00124"></a>00124 +<a name="l00125"></a><a class="code" href="class_info_panel.html#a589359c67b30af50338791f8af0e05e0">00125</a> <a class="code" href="class_allegro_drawing_init.html" title="Class ensures that Allegro's primitive and text drawing is installed and uninstalled when appropriate...">AllegroDrawingInit</a> <a class="code" href="class_info_panel.html#a589359c67b30af50338791f8af0e05e0" title="Handles dependencies on Allegro's primitive drawing functions.">_drawing</a>; +<a name="l00126"></a><a class="code" href="class_info_panel.html#a27ac079ed1a39ae672b6ceb9e0974855">00126</a> <a class="code" href="class_colour_store.html" title="Class for mapping BitmapStore images to colours for use in the minimap.">ColourStore</a> <a class="code" href="class_info_panel.html#a27ac079ed1a39ae672b6ceb9e0974855" title="Caches colours for drawing.">_colourStore</a>; +<a name="l00127"></a>00127 +<a name="l00128"></a><a class="code" href="class_info_panel.html#a5ab76703538ad6e396a21ea8fb47d23d">00128</a> <span class="keywordtype">float</span> <a class="code" href="class_info_panel.html#a5ab76703538ad6e396a21ea8fb47d23d" title="The y coordinate of the heading for the petrol guage.">_petrolHeadingY</a>; +<a name="l00129"></a><a class="code" href="class_info_panel.html#a29976100c8fc5c130be713dfb5c2807e">00129</a> <span class="keywordtype">float</span> <a class="code" href="class_info_panel.html#a29976100c8fc5c130be713dfb5c2807e" title="The y coordinate of top of the petrol guage.">_petrolGuageY</a>; +<a name="l00130"></a><a class="code" href="class_info_panel.html#a0c85348f8471d86da73772f86a62f84c">00130</a> <span class="keywordtype">float</span> <a class="code" href="class_info_panel.html#a0c85348f8471d86da73772f86a62f84c" title="The height of the rectangle that is the petrol guage.">_petrolGuageHeight</a>; +<a name="l00131"></a><a class="code" href="class_info_panel.html#a7ec514286dbf2fb43f64acd620397e21">00131</a> <span class="keywordtype">float</span> <a class="code" href="class_info_panel.html#a7ec514286dbf2fb43f64acd620397e21" title="The y coordinate of the heading for the number of remaining checkpoints.">_checkpointHeadingY</a>; +<a name="l00132"></a><a class="code" href="class_info_panel.html#ad118b5f123e590a95b3f390fd9597f02">00132</a> <span class="keywordtype">float</span> <a class="code" href="class_info_panel.html#ad118b5f123e590a95b3f390fd9597f02" title="The y coordinate of the text stating the number of remaining checkpoints.">_checkpointValueY</a>; +<a name="l00133"></a><a class="code" href="class_info_panel.html#a7b4bb6cca8549d6a1d1deccc99994b9b">00133</a> <span class="keywordtype">float</span> <a class="code" href="class_info_panel.html#a7b4bb6cca8549d6a1d1deccc99994b9b" title="The y coordinate of the top of the Maze.">_miniMazeY</a>; +<a name="l00134"></a><a class="code" href="class_info_panel.html#ad38206daa42c82b45878e6d0c55f2860">00134</a> <span class="keywordtype">float</span> <a class="code" href="class_info_panel.html#ad38206daa42c82b45878e6d0c55f2860" title="The height of the Maze.">_miniMazeHeight</a>; +<a name="l00135"></a><a class="code" href="class_info_panel.html#abb211fac23293e41f23b86fd70df98f0">00135</a> <span class="keywordtype">float</span> <a class="code" href="class_info_panel.html#abb211fac23293e41f23b86fd70df98f0" title="The width of each Maze block being drawn.">_miniMazeblockWidth</a>; +<a name="l00136"></a>00136 +<a name="l00137"></a><a class="code" href="class_info_panel.html#a38d023a2b00eafa303de37550cb96817">00137</a> ALLEGRO_FONT* <a class="code" href="class_info_panel.html#a38d023a2b00eafa303de37550cb96817" title="The font being used to write the headings and number of checkpoints remaining.">_panelFont</a>; +<a name="l00138"></a>00138 }; +<a name="l00139"></a>00139 +<a name="l00140"></a>00140 <span class="preprocessor">#endif // INFOPANEL_H</span> +</pre></div></div> +</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> diff --git a/docs/html/_keyboard_handler_8cpp.html b/docs/html/_keyboard_handler_8cpp.html new file mode 100644 index 0000000..767cfc6 --- /dev/null +++ b/docs/html/_keyboard_handler_8cpp.html @@ -0,0 +1,110 @@ +<!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: source/presentation/KeyboardHandler.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/KeyboardHandler.cpp File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_keyboard_handler_8h_source.html">KeyboardHandler.h</a>"</code><br/> +</div> +<p><a href="_keyboard_handler_8cpp_source.html">Go to the source code of this file.</a></p> +</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> diff --git a/docs/html/_keyboard_handler_8cpp_source.html b/docs/html/_keyboard_handler_8cpp_source.html new file mode 100644 index 0000000..67174e5 --- /dev/null +++ b/docs/html/_keyboard_handler_8cpp_source.html @@ -0,0 +1,221 @@ +<!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: source/presentation/KeyboardHandler.cpp Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/KeyboardHandler.cpp</div> </div> +</div> +<div class="contents"> +<a href="_keyboard_handler_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "<a class="code" href="_keyboard_handler_8h.html">KeyboardHandler.h</a>"</span> +<a name="l00002"></a>00002 +<a name="l00003"></a><a class="code" href="class_keyboard_handler.html#acd0d5781016f792207464bb720d2f994">00003</a> <a class="code" href="class_keyboard_handler.html#acd0d5781016f792207464bb720d2f994" title="Creates a KeyboardHandler with a given initial state.">KeyboardHandler::KeyboardHandler</a>(<a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f" title="Defines the directions in which movement can happen in the maze.">Maze::Direction</a> currentFacing) +<a name="l00004"></a>00004 :_up(false), +<a name="l00005"></a>00005 _down(false), +<a name="l00006"></a>00006 _left(false), +<a name="l00007"></a>00007 _right(false), +<a name="l00008"></a>00008 _smokescreen(false), +<a name="l00009"></a>00009 _previousFacing(currentFacing) +<a name="l00010"></a>00010 { +<a name="l00011"></a>00011 <a class="code" href="class_keyboard_handler.html#a44116ed8745f3a3360e1d7c29ea86d56" title="Queue for all keyboard events.">_keyboardEvents</a> = al_create_event_queue(); +<a name="l00012"></a>00012 al_register_event_source(<a class="code" href="class_keyboard_handler.html#a44116ed8745f3a3360e1d7c29ea86d56" title="Queue for all keyboard events.">_keyboardEvents</a>, al_get_keyboard_event_source()); +<a name="l00013"></a>00013 } +<a name="l00014"></a>00014 +<a name="l00015"></a><a class="code" href="class_keyboard_handler.html#a8942a24f122f96b2b5d7c91f1c6ff332">00015</a> <a class="code" href="class_keyboard_handler.html#acd0d5781016f792207464bb720d2f994" title="Creates a KeyboardHandler with a given initial state.">KeyboardHandler::KeyboardHandler</a>(<span class="keyword">const</span> <a class="code" href="class_keyboard_handler.html" title="Class for handling keyboard related game inputs from the player.">KeyboardHandler</a>& ref) +<a name="l00016"></a>00016 :_up(ref._up), +<a name="l00017"></a>00017 _down(ref._down), +<a name="l00018"></a>00018 _left(ref._left), +<a name="l00019"></a>00019 _right(ref._right), +<a name="l00020"></a>00020 _smokescreen(ref._smokescreen), +<a name="l00021"></a>00021 _previousFacing(ref._previousFacing) +<a name="l00022"></a>00022 { +<a name="l00023"></a>00023 <a class="code" href="class_keyboard_handler.html#a44116ed8745f3a3360e1d7c29ea86d56" title="Queue for all keyboard events.">_keyboardEvents</a> = al_create_event_queue(); +<a name="l00024"></a>00024 al_register_event_source(<a class="code" href="class_keyboard_handler.html#a44116ed8745f3a3360e1d7c29ea86d56" title="Queue for all keyboard events.">_keyboardEvents</a>, al_get_keyboard_event_source()); +<a name="l00025"></a>00025 } +<a name="l00026"></a>00026 +<a name="l00027"></a><a class="code" href="class_keyboard_handler.html#a5135c450b82394496457a0a51d5240f5">00027</a> <a class="code" href="class_keyboard_handler.html" title="Class for handling keyboard related game inputs from the player.">KeyboardHandler</a>& <a class="code" href="class_keyboard_handler.html#a5135c450b82394496457a0a51d5240f5" title="Assignment operator that ensures that an assigned KeyboardHandler will have its own event queue...">KeyboardHandler::operator=</a>(<span class="keyword">const</span> <a class="code" href="class_keyboard_handler.html" title="Class for handling keyboard related game inputs from the player.">KeyboardHandler</a>& rhs) +<a name="l00028"></a>00028 { +<a name="l00029"></a>00029 <a class="code" href="class_keyboard_handler.html#ad323844aad47f1bc263ec2fd4a19ac3a" title="True if the up arrow key is depressed.">_up</a> = rhs.<a class="code" href="class_keyboard_handler.html#ad323844aad47f1bc263ec2fd4a19ac3a" title="True if the up arrow key is depressed.">_up</a>; +<a name="l00030"></a>00030 <a class="code" href="class_keyboard_handler.html#aa6d1c75e1a98d4aae96d8ac1c8aaa539" title="True if the down arrow key is depressed.">_down</a> = rhs.<a class="code" href="class_keyboard_handler.html#aa6d1c75e1a98d4aae96d8ac1c8aaa539" title="True if the down arrow key is depressed.">_down</a>; +<a name="l00031"></a>00031 <a class="code" href="class_keyboard_handler.html#a3bc780470d7cbaf9f4ea239e0613ce3c" title="True if the left arrow key is depressed.">_left</a> = rhs.<a class="code" href="class_keyboard_handler.html#a3bc780470d7cbaf9f4ea239e0613ce3c" title="True if the left arrow key is depressed.">_left</a>; +<a name="l00032"></a>00032 <a class="code" href="class_keyboard_handler.html#a81d37831d958ff21c2ce08cfa97ca420" title="True if the right arrow key is depressed.">_right</a> = rhs.<a class="code" href="class_keyboard_handler.html#a81d37831d958ff21c2ce08cfa97ca420" title="True if the right arrow key is depressed.">_right</a>; +<a name="l00033"></a>00033 <a class="code" href="class_keyboard_handler.html#a7769dc815c493fb5962d52c3d5bc7b16" title="True if the smokescreen key is depressed.">_smokescreen</a> = rhs.<a class="code" href="class_keyboard_handler.html#a7769dc815c493fb5962d52c3d5bc7b16" title="True if the smokescreen key is depressed.">_smokescreen</a>; +<a name="l00034"></a>00034 <a class="code" href="class_keyboard_handler.html#a90120a85c62481b3a2c0330511cffbac" title="The direction that was returned on the last call of getFacing.">_previousFacing</a> = rhs.<a class="code" href="class_keyboard_handler.html#a90120a85c62481b3a2c0330511cffbac" title="The direction that was returned on the last call of getFacing.">_previousFacing</a>; +<a name="l00035"></a>00035 +<a name="l00036"></a>00036 <span class="keywordflow">if</span> (<a class="code" href="class_keyboard_handler.html#a44116ed8745f3a3360e1d7c29ea86d56" title="Queue for all keyboard events.">_keyboardEvents</a>!=rhs.<a class="code" href="class_keyboard_handler.html#a44116ed8745f3a3360e1d7c29ea86d56" title="Queue for all keyboard events.">_keyboardEvents</a>) al_destroy_event_queue(<a class="code" href="class_keyboard_handler.html#a44116ed8745f3a3360e1d7c29ea86d56" title="Queue for all keyboard events.">_keyboardEvents</a>); +<a name="l00037"></a>00037 +<a name="l00038"></a>00038 <a class="code" href="class_keyboard_handler.html#a44116ed8745f3a3360e1d7c29ea86d56" title="Queue for all keyboard events.">_keyboardEvents</a> = al_create_event_queue(); +<a name="l00039"></a>00039 al_register_event_source(<a class="code" href="class_keyboard_handler.html#a44116ed8745f3a3360e1d7c29ea86d56" title="Queue for all keyboard events.">_keyboardEvents</a>, al_get_keyboard_event_source()); +<a name="l00040"></a>00040 +<a name="l00041"></a>00041 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +<a name="l00042"></a>00042 } +<a name="l00043"></a>00043 +<a name="l00044"></a><a class="code" href="class_keyboard_handler.html#ab090fe5afdee856604b0aa0d9eb918a4">00044</a> <a class="code" href="class_keyboard_handler.html#ab090fe5afdee856604b0aa0d9eb918a4" title="Cleans up the keyboard event queue.">KeyboardHandler::~KeyboardHandler</a>() +<a name="l00045"></a>00045 { +<a name="l00046"></a>00046 al_destroy_event_queue(<a class="code" href="class_keyboard_handler.html#a44116ed8745f3a3360e1d7c29ea86d56" title="Queue for all keyboard events.">_keyboardEvents</a>); +<a name="l00047"></a>00047 } +<a name="l00048"></a>00048 +<a name="l00049"></a><a class="code" href="class_keyboard_handler.html#a9f53a546420f3d02363c9e1e4e346420">00049</a> <span class="keywordtype">void</span> <a class="code" href="class_keyboard_handler.html#a9f53a546420f3d02363c9e1e4e346420" title="Processes all pending keyboard inputs, and updates flags as appropriate.">KeyboardHandler::updateFlags</a>() +<a name="l00050"></a>00050 { +<a name="l00051"></a>00051 ALLEGRO_EVENT event; +<a name="l00052"></a>00052 <span class="keywordflow">while</span> (al_get_next_event(<a class="code" href="class_keyboard_handler.html#a44116ed8745f3a3360e1d7c29ea86d56" title="Queue for all keyboard events.">_keyboardEvents</a>, &event)) +<a name="l00053"></a>00053 { +<a name="l00054"></a>00054 <span class="keywordflow">if</span> (event.type==ALLEGRO_EVENT_KEY_DOWN) +<a name="l00055"></a>00055 { +<a name="l00056"></a>00056 <span class="keywordflow">switch</span> (event.keyboard.keycode) +<a name="l00057"></a>00057 { +<a name="l00058"></a>00058 <span class="keywordflow">case</span> <a class="code" href="class_keyboard_handler.html#a3ed342ff89f15b752a9957fd435e9094" title="Key that must be pressed to turn up.">UP_KEY</a>: +<a name="l00059"></a>00059 <a class="code" href="class_keyboard_handler.html#ad323844aad47f1bc263ec2fd4a19ac3a" title="True if the up arrow key is depressed.">_up</a> = <span class="keyword">true</span>; +<a name="l00060"></a>00060 <span class="keywordflow">break</span>; +<a name="l00061"></a>00061 <span class="keywordflow">case</span> <a class="code" href="class_keyboard_handler.html#a3d8d985fdc3c3ac543e84647967f78e4" title="Key that must be pressed to turn down.">DOWN_KEY</a>: +<a name="l00062"></a>00062 <a class="code" href="class_keyboard_handler.html#aa6d1c75e1a98d4aae96d8ac1c8aaa539" title="True if the down arrow key is depressed.">_down</a> = <span class="keyword">true</span>; +<a name="l00063"></a>00063 <span class="keywordflow">break</span>; +<a name="l00064"></a>00064 <span class="keywordflow">case</span> <a class="code" href="class_keyboard_handler.html#ab285a229f4f5c7c1be5504fdb629e10a" title="Key that must be pressed to turn left.">LEFT_KEY</a>: +<a name="l00065"></a>00065 <a class="code" href="class_keyboard_handler.html#a3bc780470d7cbaf9f4ea239e0613ce3c" title="True if the left arrow key is depressed.">_left</a> = <span class="keyword">true</span>; +<a name="l00066"></a>00066 <span class="keywordflow">break</span>; +<a name="l00067"></a>00067 <span class="keywordflow">case</span> <a class="code" href="class_keyboard_handler.html#a0822e8b6338b01cb09d08589d778af86" title="Key that must be pressed to turn right.">RIGHT_KEY</a>: +<a name="l00068"></a>00068 <a class="code" href="class_keyboard_handler.html#a81d37831d958ff21c2ce08cfa97ca420" title="True if the right arrow key is depressed.">_right</a> = <span class="keyword">true</span>; +<a name="l00069"></a>00069 <span class="keywordflow">break</span>; +<a name="l00070"></a>00070 <span class="keywordflow">case</span> <a class="code" href="class_keyboard_handler.html#a2de5780311975180c0b78e7b0457eae1" title="Key that must be pressed to create a smokescreen.">SMOKESCREEN_KEY</a>: +<a name="l00071"></a>00071 <a class="code" href="class_keyboard_handler.html#a7769dc815c493fb5962d52c3d5bc7b16" title="True if the smokescreen key is depressed.">_smokescreen</a> = <span class="keyword">true</span>; +<a name="l00072"></a>00072 <span class="keywordflow">break</span>; +<a name="l00073"></a>00073 } +<a name="l00074"></a>00074 } +<a name="l00075"></a>00075 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (event.type==ALLEGRO_EVENT_KEY_UP) +<a name="l00076"></a>00076 { +<a name="l00077"></a>00077 <span class="keywordflow">switch</span> (event.keyboard.keycode) +<a name="l00078"></a>00078 { +<a name="l00079"></a>00079 <span class="keywordflow">case</span> <a class="code" href="class_keyboard_handler.html#a3ed342ff89f15b752a9957fd435e9094" title="Key that must be pressed to turn up.">UP_KEY</a>: +<a name="l00080"></a>00080 <a class="code" href="class_keyboard_handler.html#ad323844aad47f1bc263ec2fd4a19ac3a" title="True if the up arrow key is depressed.">_up</a> = <span class="keyword">false</span>; +<a name="l00081"></a>00081 <span class="keywordflow">break</span>; +<a name="l00082"></a>00082 <span class="keywordflow">case</span> <a class="code" href="class_keyboard_handler.html#a3d8d985fdc3c3ac543e84647967f78e4" title="Key that must be pressed to turn down.">DOWN_KEY</a>: +<a name="l00083"></a>00083 <a class="code" href="class_keyboard_handler.html#aa6d1c75e1a98d4aae96d8ac1c8aaa539" title="True if the down arrow key is depressed.">_down</a> = <span class="keyword">false</span>; +<a name="l00084"></a>00084 <span class="keywordflow">break</span>; +<a name="l00085"></a>00085 <span class="keywordflow">case</span> <a class="code" href="class_keyboard_handler.html#ab285a229f4f5c7c1be5504fdb629e10a" title="Key that must be pressed to turn left.">LEFT_KEY</a>: +<a name="l00086"></a>00086 <a class="code" href="class_keyboard_handler.html#a3bc780470d7cbaf9f4ea239e0613ce3c" title="True if the left arrow key is depressed.">_left</a> = <span class="keyword">false</span>; +<a name="l00087"></a>00087 <span class="keywordflow">break</span>; +<a name="l00088"></a>00088 <span class="keywordflow">case</span> <a class="code" href="class_keyboard_handler.html#a0822e8b6338b01cb09d08589d778af86" title="Key that must be pressed to turn right.">RIGHT_KEY</a>: +<a name="l00089"></a>00089 <a class="code" href="class_keyboard_handler.html#a81d37831d958ff21c2ce08cfa97ca420" title="True if the right arrow key is depressed.">_right</a> = <span class="keyword">false</span>; +<a name="l00090"></a>00090 <span class="keywordflow">break</span>; +<a name="l00091"></a>00091 <span class="keywordflow">case</span> <a class="code" href="class_keyboard_handler.html#a2de5780311975180c0b78e7b0457eae1" title="Key that must be pressed to create a smokescreen.">SMOKESCREEN_KEY</a>: +<a name="l00092"></a>00092 <a class="code" href="class_keyboard_handler.html#a7769dc815c493fb5962d52c3d5bc7b16" title="True if the smokescreen key is depressed.">_smokescreen</a> = <span class="keyword">false</span>; +<a name="l00093"></a>00093 <span class="keywordflow">break</span>; +<a name="l00094"></a>00094 } +<a name="l00095"></a>00095 } +<a name="l00096"></a>00096 } +<a name="l00097"></a>00097 } +<a name="l00098"></a>00098 +<a name="l00099"></a><a class="code" href="class_keyboard_handler.html#ae17ed4bf0abae7d95f9b772a6d704a70">00099</a> <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28f" title="Defines the directions in which movement can happen in the maze.">Maze::Direction</a> <a class="code" href="class_keyboard_handler.html#ae17ed4bf0abae7d95f9b772a6d704a70" title="Gives the last direction that the player entered on the keyboard.">KeyboardHandler::getFacing</a>() +<a name="l00100"></a>00100 { +<a name="l00101"></a>00101 <a class="code" href="class_keyboard_handler.html#a9f53a546420f3d02363c9e1e4e346420" title="Processes all pending keyboard inputs, and updates flags as appropriate.">updateFlags</a>(); +<a name="l00102"></a>00102 +<a name="l00103"></a>00103 <span class="keywordflow">if</span> (<a class="code" href="class_keyboard_handler.html#ad323844aad47f1bc263ec2fd4a19ac3a" title="True if the up arrow key is depressed.">_up</a>) <a class="code" href="class_keyboard_handler.html#a90120a85c62481b3a2c0330511cffbac" title="The direction that was returned on the last call of getFacing.">_previousFacing</a> = <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fad2e008a4b04be5e2d3559c70193920e7">Maze::UP</a>; +<a name="l00104"></a>00104 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_keyboard_handler.html#aa6d1c75e1a98d4aae96d8ac1c8aaa539" title="True if the down arrow key is depressed.">_down</a>) <a class="code" href="class_keyboard_handler.html#a90120a85c62481b3a2c0330511cffbac" title="The direction that was returned on the last call of getFacing.">_previousFacing</a> = <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fa89ab143d020541957ab5e0e9cfdd3e23">Maze::DOWN</a>; +<a name="l00105"></a>00105 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_keyboard_handler.html#a3bc780470d7cbaf9f4ea239e0613ce3c" title="True if the left arrow key is depressed.">_left</a>) <a class="code" href="class_keyboard_handler.html#a90120a85c62481b3a2c0330511cffbac" title="The direction that was returned on the last call of getFacing.">_previousFacing</a> = <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28faab1a1fe0274cd139b3c0116d8caf458c">Maze::LEFT</a>; +<a name="l00106"></a>00106 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_keyboard_handler.html#a81d37831d958ff21c2ce08cfa97ca420" title="True if the right arrow key is depressed.">_right</a>) <a class="code" href="class_keyboard_handler.html#a90120a85c62481b3a2c0330511cffbac" title="The direction that was returned on the last call of getFacing.">_previousFacing</a> = <a class="code" href="class_maze.html#ad12c28d50f4d7457160a70a94acfe28fa699ae3e1d989e9b12bd200aa86e29e9d">Maze::RIGHT</a>; +<a name="l00107"></a>00107 +<a name="l00108"></a>00108 <span class="keywordflow">return</span> <a class="code" href="class_keyboard_handler.html#a90120a85c62481b3a2c0330511cffbac" title="The direction that was returned on the last call of getFacing.">_previousFacing</a>; +<a name="l00109"></a>00109 } +<a name="l00110"></a>00110 +<a name="l00111"></a><a class="code" href="class_keyboard_handler.html#ab66797a37a1c54a630187519870d9a5b">00111</a> <span class="keywordtype">bool</span> <a class="code" href="class_keyboard_handler.html#ab66797a37a1c54a630187519870d9a5b" title="Gives whether or not the key for creating a Smokescreen is currently pressed.">KeyboardHandler::getSmokescreen</a>() +<a name="l00112"></a>00112 { +<a name="l00113"></a>00113 <span class="keywordflow">return</span> <a class="code" href="class_keyboard_handler.html#a7769dc815c493fb5962d52c3d5bc7b16" title="True if the smokescreen key is depressed.">_smokescreen</a>; +<a name="l00114"></a>00114 } +</pre></div></div> +</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> diff --git a/docs/html/_keyboard_handler_8h.html b/docs/html/_keyboard_handler_8h.html new file mode 100644 index 0000000..e4d6017 --- /dev/null +++ b/docs/html/_keyboard_handler_8h.html @@ -0,0 +1,120 @@ +<!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: source/presentation/KeyboardHandler.h File 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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> </div> + <div class="headertitle"> +<div class="title">source/presentation/KeyboardHandler.h File Reference</div> </div> +</div> +<div class="contents"> +<div class="textblock"><code>#include <allegro5/allegro.h></code><br/> +<code>#include "../logic/Maze.h"</code><br/> +<code>#include "../logic/AllegroWrappers.h"</code><br/> +</div> +<p><a href="_keyboard_handler_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr><td colspan="2"><h2><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_keyboard_handler.html">KeyboardHandler</a></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Class for handling keyboard related game inputs from the player. <a href="class_keyboard_handler.html#details">More...</a><br/></td></tr> +</table> +</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> diff --git a/docs/html/_keyboard_handler_8h_source.html b/docs/html/_keyboard_handler_8h_source.html new file mode 100644 index 0000000..1764633 --- /dev/null +++ b/docs/html/_keyboard_handler_8h_source.html @@ -0,0 +1,148 @@ +<!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: source/presentation/KeyboardHandler.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><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="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div class="header"> + <div class="headertitle"> +<div class="title">source/presentation/KeyboardHandler.h</div> </div> +</div> +<div class="contents"> +<a href="_keyboard_handler_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef KEYBOARDHANDLER_H</span> +<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define KEYBOARDHANDLER_H</span> +<a name="l00003"></a>00003 <span class="preprocessor"></span> +<a name="l00004"></a>00004 <span class="preprocessor">#include <allegro5/allegro.h></span> +<a name="l00005"></a>00005 +<a name="l00006"></a>00006 <span class="preprocessor">#include "../logic/Maze.h"</span> +<a name="l00007"></a>00007 <sp |