This repository has been archived on 2022-08-01. You can view files and clone it, but cannot push or open issues or pull requests.
Moonlander/doc/html/moonlander_8h.html
2020-06-23 22:37:52 +01:00

524 lines
32 KiB
HTML
Executable file

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>SCC.150 Assembler Emulator: /home/rumperuu/Documents/University/University Work/SCC.110 Software Development/Coursework/C/unr-Moon Lander/source/moonlander.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">SCC.150 Assembler Emulator
</div>
<div id="projectbrief">A compiler for a simple assembler language</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</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&#160;List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a></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>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html">source</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<div class="title">moonlander.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdbool.h&gt;</code><br/>
<code>#include &lt;ncurses.h&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;time.h&gt;</code><br/>
<code>#include &lt;math.h&gt;</code><br/>
</div>
<p><a href="moonlander_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__win__landscape__struct.html">_win_landscape_struct</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__WIN__landscape__struct.html">_WIN_landscape_struct</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__win__ship__struct.html">_win_ship_struct</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__WIN__ship__struct.html">_WIN_ship_struct</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtimespec__t.html">timespec_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a655c84af1b0034986ff56e12e84f983d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a655c84af1b0034986ff56e12e84f983d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NONE</b>&#160;&#160;&#160;0</td></tr>
<tr class="separator:a655c84af1b0034986ff56e12e84f983d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1965eaca47dbf3f87acdafc2208f04eb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1965eaca47dbf3f87acdafc2208f04eb"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>UP</b>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a1965eaca47dbf3f87acdafc2208f04eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80fb826a684cf3f0d306b22aa100ddac"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a80fb826a684cf3f0d306b22aa100ddac"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RIGHT</b>&#160;&#160;&#160;2</td></tr>
<tr class="separator:a80fb826a684cf3f0d306b22aa100ddac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4193cd1c8c2e6ebd0e056fa2364a663f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4193cd1c8c2e6ebd0e056fa2364a663f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>DOWN</b>&#160;&#160;&#160;3</td></tr>
<tr class="separator:a4193cd1c8c2e6ebd0e056fa2364a663f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a437ef08681e7210d6678427030446a54"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a437ef08681e7210d6678427030446a54"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>LEFT</b>&#160;&#160;&#160;4</td></tr>
<tr class="separator:a437ef08681e7210d6678427030446a54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9815b8411c5174a1b9c4fdd41867a7f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad9815b8411c5174a1b9c4fdd41867a7f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>LEFT_INCLINE</b>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ad9815b8411c5174a1b9c4fdd41867a7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41d9ad16be37ee68580da3de0f0f98a0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a41d9ad16be37ee68580da3de0f0f98a0"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>STRAIGHT_UP</b>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a41d9ad16be37ee68580da3de0f0f98a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ec93a5084467645832e2eff4f09f30c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ec93a5084467645832e2eff4f09f30c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>STRAIGHT_DOWN</b>&#160;&#160;&#160;2</td></tr>
<tr class="separator:a5ec93a5084467645832e2eff4f09f30c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf4a498a981a70e042c5317f175c0576"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abf4a498a981a70e042c5317f175c0576"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RIGHT_DECLINE</b>&#160;&#160;&#160;3</td></tr>
<tr class="separator:abf4a498a981a70e042c5317f175c0576"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25dcb98b89858273498cff95bffe5a06"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a25dcb98b89858273498cff95bffe5a06"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PLATEAU</b>&#160;&#160;&#160;4</td></tr>
<tr class="separator:a25dcb98b89858273498cff95bffe5a06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a655c84af1b0034986ff56e12e84f983d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a655c84af1b0034986ff56e12e84f983d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NONE</b>&#160;&#160;&#160;0</td></tr>
<tr class="separator:a655c84af1b0034986ff56e12e84f983d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a24df9755c49775ec259b3c7021df0e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5a24df9755c49775ec259b3c7021df0e"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CRASH</b>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a5a24df9755c49775ec259b3c7021df0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e46a68b2e887e05d235781f5c40d68e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e46a68b2e887e05d235781f5c40d68e"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>LAND</b>&#160;&#160;&#160;2</td></tr>
<tr class="separator:a8e46a68b2e887e05d235781f5c40d68e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad24e2b54375e12474e65ebf7175988fb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad24e2b54375e12474e65ebf7175988fb"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>QUIT</b>&#160;&#160;&#160;3</td></tr>
<tr class="separator:ad24e2b54375e12474e65ebf7175988fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab70a3304f4cc184121587d7884fbcaff"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab70a3304f4cc184121587d7884fbcaff"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>STARTING_FUEL</b>&#160;&#160;&#160;900</td></tr>
<tr class="separator:ab70a3304f4cc184121587d7884fbcaff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4879857b847ecdee94bde553f0720c38"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4879857b847ecdee94bde553f0720c38"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CHANCE_OF_LANDING_PAD</b>&#160;&#160;&#160;3</td></tr>
<tr class="separator:a4879857b847ecdee94bde553f0720c38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a616668bcdd0dd14291ce0b10f46ae5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0a616668bcdd0dd14291ce0b10f46ae5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>TERMINAL_VELOCITY</b>&#160;&#160;&#160;0.9f</td></tr>
<tr class="separator:a0a616668bcdd0dd14291ce0b10f46ae5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a551c7583e165a1f1f32caa547aedbdbe"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a551c7583e165a1f1f32caa547aedbdbe"></a>
typedef struct <br class="typebreak"/>
<a class="el" href="struct__win__landscape__struct.html">_win_landscape_struct</a>&#160;</td><td class="memItemRight" valign="bottom"><b>WIN_LANDSCAPE</b></td></tr>
<tr class="separator:a551c7583e165a1f1f32caa547aedbdbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a656ff69f7ac7628ce840ca31eb3c81e9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a656ff69f7ac7628ce840ca31eb3c81e9"></a>
typedef struct <br class="typebreak"/>
<a class="el" href="struct__WIN__landscape__struct.html">_WIN_landscape_struct</a>&#160;</td><td class="memItemRight" valign="bottom"><b>LANDSCAPE</b></td></tr>
<tr class="separator:a656ff69f7ac7628ce840ca31eb3c81e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0411a851d6e3fd19462afd2cdbad9596"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0411a851d6e3fd19462afd2cdbad9596"></a>
typedef struct <a class="el" href="struct__win__ship__struct.html">_win_ship_struct</a>&#160;</td><td class="memItemRight" valign="bottom"><b>WIN_SHIP</b></td></tr>
<tr class="separator:a0411a851d6e3fd19462afd2cdbad9596"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42c658ed8f799da440af227d9c78b26c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a42c658ed8f799da440af227d9c78b26c"></a>
typedef struct <a class="el" href="struct__WIN__ship__struct.html">_WIN_ship_struct</a>&#160;</td><td class="memItemRight" valign="bottom"><b>SHIP</b></td></tr>
<tr class="separator:a42c658ed8f799da440af227d9c78b26c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a62c7d9da80c36528a8de3186d31d7ed8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#a62c7d9da80c36528a8de3186d31d7ed8">initialisencurses</a> ()</td></tr>
<tr class="separator:a62c7d9da80c36528a8de3186d31d7ed8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0dc18298c3a72665f84d0904bc9d287"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#ae0dc18298c3a72665f84d0904bc9d287">initialiseShip</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship)</td></tr>
<tr class="separator:ae0dc18298c3a72665f84d0904bc9d287"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ec45fe851ecdae5b09ff1f5235e2bf4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#a0ec45fe851ecdae5b09ff1f5235e2bf4">initialiseLandscape</a> (<a class="el" href="struct__WIN__landscape__struct.html">LANDSCAPE</a> *landscape)</td></tr>
<tr class="separator:a0ec45fe851ecdae5b09ff1f5235e2bf4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7d9f8adcb580459033133fd49433a15"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#ab7d9f8adcb580459033133fd49433a15">createShip</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship)</td></tr>
<tr class="separator:ab7d9f8adcb580459033133fd49433a15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ccdf9063374d9a12fed447e00cc2764"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1ccdf9063374d9a12fed447e00cc2764"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>createLandscape</b> ()</td></tr>
<tr class="separator:a1ccdf9063374d9a12fed447e00cc2764"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e5dee243eed13bb193a327212d1460b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#a8e5dee243eed13bb193a327212d1460b">applyJet</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship, unsigned int dir)</td></tr>
<tr class="separator:a8e5dee243eed13bb193a327212d1460b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80d87b5874771eee0d24be7daa6cd187"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#a80d87b5874771eee0d24be7daa6cd187">applyGravity</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship)</td></tr>
<tr class="separator:a80d87b5874771eee0d24be7daa6cd187"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6ac9217888e84291c290db745b67ce1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#ac6ac9217888e84291c290db745b67ce1">applyFriction</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship)</td></tr>
<tr class="separator:ac6ac9217888e84291c290db745b67ce1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58ccd08e3de9a09607a7e15852f114b7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#a58ccd08e3de9a09607a7e15852f114b7">moveShip</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship, size_t lASize, unsigned int landscapeArray[], size_t sASize, unsigned int safeArray[])</td></tr>
<tr class="separator:a58ccd08e3de9a09607a7e15852f114b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdd6a4d14501287a577ea668c521ef6b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#abdd6a4d14501287a577ea668c521ef6b">displayIntro</a> ()</td></tr>
<tr class="separator:abdd6a4d14501287a577ea668c521ef6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17d060768350e07c2f3d98b7d01cd0b6"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#a17d060768350e07c2f3d98b7d01cd0b6">getScore</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship, unsigned int time)</td></tr>
<tr class="separator:a17d060768350e07c2f3d98b7d01cd0b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a54352d3853674ab02c3eb342715348b1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a54352d3853674ab02c3eb342715348b1"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>end</b> = false</td></tr>
<tr class="separator:a54352d3853674ab02c3eb342715348b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b92199e91e6c320b67f7280b2d53e2f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4b92199e91e6c320b67f7280b2d53e2f"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>endType</b> = NONE</td></tr>
<tr class="separator:a4b92199e91e6c320b67f7280b2d53e2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bec39c3cf6ba6711895de15040528d7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5bec39c3cf6ba6711895de15040528d7"></a>
struct <a class="el" href="structtimespec__t.html">timespec_t</a>&#160;</td><td class="memItemRight" valign="bottom"><b>s</b></td></tr>
<tr class="separator:a5bec39c3cf6ba6711895de15040528d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1155bdad5f8c8c958474c3144bae6573"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1155bdad5f8c8c958474c3144bae6573"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>invincible</b> = false</td></tr>
<tr class="separator:a1155bdad5f8c8c958474c3144bae6573"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><dl class="section author"><dt>Author</dt><dd>Ben Goldsworthy (rumps) <a href="#" onclick="location.href='mai'+'lto:'+'bgo'+'ld'+'swo'+'rt'+'hy9'+'6@'+'gma'+'il'+'.co'+'m'; return false;">bgold<span style="display: none;">.nosp@m.</span>swor<span style="display: none;">.nosp@m.</span>thy96<span style="display: none;">.nosp@m.</span>@gma<span style="display: none;">.nosp@m.</span>il.co<span style="display: none;">.nosp@m.</span>m</a> </dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
<h1><a class="anchor" id="LICENSE"></a>
LICENSE</h1>
<p>This file is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
<p>This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
<h1><a class="anchor" id="DESCRIPTION"></a>
DESCRIPTION</h1>
<p>Header file for <code><a class="el" href="moonlander_8c.html">moonlander.c</a></code>. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ac6ac9217888e84291c290db745b67ce1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void applyFriction </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *&#160;</td>
<td class="paramname"><em>ship</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Applies the equally relentless force of friction to the ship.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a80d87b5874771eee0d24be7daa6cd187"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void applyGravity </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *&#160;</td>
<td class="paramname"><em>ship</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Applies the relentless march of gravity to the ship.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a8e5dee243eed13bb193a327212d1460b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void applyJet </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *&#160;</td>
<td class="paramname"><em>ship</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>dir</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Applies the thrust of the jet to the ship.</p>
<p>If the ship is out of fuel, the jets won't fire.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
<tr><td class="paramname">dir</td><td>the thrust direction </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ab7d9f8adcb580459033133fd49433a15"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void createShip </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *&#160;</td>
<td class="paramname"><em>ship</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates the ship in the game world.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="abdd6a4d14501287a577ea668c521ef6b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void displayIntro </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Displays the lovely ASCII lunar lander I nicked. </p>
</div>
</div>
<a class="anchor" id="a17d060768350e07c2f3d98b7d01cd0b6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double getScore </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *&#160;</td>
<td class="paramname"><em>ship</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>time</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Works out the player's score upon successful landing.</p>
<p>The specification states "score is calculated using some heuristic based on
time used and fuel remaining." Heuristic sounds fancy, and so is the method of working out the score.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the score </dd></dl>
</div>
</div>
<a class="anchor" id="a0ec45fe851ecdae5b09ff1f5235e2bf4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void initialiseLandscape </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct__WIN__landscape__struct.html">LANDSCAPE</a> *&#160;</td>
<td class="paramname"><em>landscape</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialises the landscape's parameters.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">landscape</td><td>the landscape in question </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a62c7d9da80c36528a8de3186d31d7ed8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void initialisencurses </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialises ncurses.</p>
<p>I couldn't decide whether it should be <code><a class="el" href="moonlander_8c.html#a62c7d9da80c36528a8de3186d31d7ed8">initialisencurses()</a></code>, <code>initialiseNCURSES()</code> or <code>initialiseNcurses()</code>. In the end I plumped for <code><a class="el" href="moonlander_8c.html#a62c7d9da80c36528a8de3186d31d7ed8">initialisencurses()</a></code> because, whilst it does break the camelCase rule I've used throughout for variables and functions, ncurses is one of those trendy uncapitalised names. </p>
</div>
</div>
<a class="anchor" id="ae0dc18298c3a72665f84d0904bc9d287"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void initialiseShip </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *&#160;</td>
<td class="paramname"><em>ship</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialises the ship's parameters.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a58ccd08e3de9a09607a7e15852f114b7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void moveShip </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *&#160;</td>
<td class="paramname"><em>ship</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>lASize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>landscapeArray</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>sASize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>safeArray</em>[]&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Moves the ship within the game world.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
<tr><td class="paramname">lASize</td><td>the length of useful data in <code>landscapeArray</code> </td></tr>
<tr><td class="paramname">landscapeArray</td><td>the array of coordinates for the components of the landscape </td></tr>
<tr><td class="paramname">sASize</td><td>the length of useful data in <code>safeArray</code> </td></tr>
<tr><td class="paramname">safeArray</td><td>the array of coordinates for the components of the landing pad(s) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>