diff options
Diffstat (limited to 'Doc/doxygen/html/_drive_8cpp_source.html')
-rw-r--r-- | Doc/doxygen/html/_drive_8cpp_source.html | 614 |
1 files changed, 614 insertions, 0 deletions
diff --git a/Doc/doxygen/html/_drive_8cpp_source.html b/Doc/doxygen/html/_drive_8cpp_source.html new file mode 100644 index 0000000..8b752b6 --- /dev/null +++ b/Doc/doxygen/html/_drive_8cpp_source.html @@ -0,0 +1,614 @@ +<!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"/> +<title>Starshatter_Open: D:/SRC/StarshatterSVN/Stars45/Drive.cpp Source File</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="navtree.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="resize.js"></script> +<script type="text/javascript" src="navtree.js"></script> +<script type="text/javascript"> + $(document).ready(initResizable); +</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">Starshatter_Open + </div> + <div id="projectbrief">Open source Starshatter engine</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.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><!-- top --> +<div id="side-nav" class="ui-resizable side-nav-resizable"> + <div id="nav-tree"> + <div id="nav-tree-contents"> + </div> + </div> + <div id="splitbar" style="-moz-user-select:none;" + class="ui-resizable-handle"> + </div> +</div> +<script type="text/javascript"> +$(document).ready(function(){initNavTree('_drive_8cpp.html','');}); +</script> +<div id="doc-content"> +<!-- 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><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Macros</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 class="header"> + <div class="headertitle"> +<div class="title">Drive.cpp</div> </div> +</div><!--header--> +<div class="contents"> +<a href="_drive_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/* Project Starshatter 4.5</span></div> +<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> Destroyer Studios LLC</span></div> +<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> Copyright © 1997-2004. All Rights Reserved.</span></div> +<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"></span></div> +<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> SUBSYSTEM: Stars.exe</span></div> +<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> FILE: Drive.cpp</span></div> +<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> AUTHOR: John DiCamillo</span></div> +<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"></span></div> +<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"></span></div> +<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> OVERVIEW</span></div> +<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> ========</span></div> +<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> Weapon class</span></div> +<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">*/</span></div> +<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> </div> +<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include "<a class="code" href="_mem_debug_8h.html">MemDebug.h</a>"</span></div> +<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include "<a class="code" href="_drive_8h.html">Drive.h</a>"</span></div> +<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include "<a class="code" href="_power_8h.html">Power.h</a>"</span></div> +<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "<a class="code" href="_ship_8h.html">Ship.h</a>"</span></div> +<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "<a class="code" href="_sim_8h.html">Sim.h</a>"</span></div> +<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "<a class="code" href="_drive_sprite_8h.html">DriveSprite.h</a>"</span></div> +<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "<a class="code" href="_camera_director_8h.html">CameraDirector.h</a>"</span></div> +<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include "<a class="code" href="_audio_config_8h.html">AudioConfig.h</a>"</span></div> +<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div> +<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include "<a class="code" href="_light_8h.html">Light.h</a>"</span></div> +<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include "<a class="code" href="_bitmap_8h.html">Bitmap.h</a>"</span></div> +<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include "<a class="code" href="_sound_8h.html">Sound.h</a>"</span></div> +<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include "<a class="code" href="_data_loader_8h.html">DataLoader.h</a>"</span></div> +<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include "<a class="code" href="_bolt_8h.html">Bolt.h</a>"</span></div> +<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="_solid_8h.html">Solid.h</a>"</span></div> +<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="_game_8h.html">Game.h</a>"</span></div> +<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div> +<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div> +<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">static</span> <span class="keywordtype">int</span> drive_value[] = {</div> +<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  1, 1, 1, 1, 1, 1, 1, 1</div> +<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> };</div> +<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div> +<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">static</span> <span class="keywordtype">float</span> drive_light[] = {</div> +<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  10.0f, 100.0f, 5.0f, 1.0e3f, 100.0f, 10.0f, 0.0f, 0.0f</div> +<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> };</div> +<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div> +<div class="line"><a name="l00042"></a><span class="lineno"><a class="code" href="_thruster_8cpp.html#a0aeb7e463d2467e9710a060d8b91b567"> 42</a></span> <a class="code" href="class_bitmap.html">Bitmap</a>* <a class="code" href="_drive_8cpp.html#a0aeb7e463d2467e9710a060d8b91b567">drive_flare_bitmap</a>[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };</div> +<div class="line"><a name="l00043"></a><span class="lineno"><a class="code" href="_thruster_8cpp.html#a06ce74dbe10cad1375d332697c5a13aa"> 43</a></span> <a class="code" href="class_bitmap.html">Bitmap</a>* <a class="code" href="_drive_8cpp.html#a06ce74dbe10cad1375d332697c5a13aa">drive_trail_bitmap</a>[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };</div> +<div class="line"><a name="l00044"></a><span class="lineno"><a class="code" href="_drive_8cpp.html#a3949e985b3caaf55060b83b43afbcd50"> 44</a></span> <a class="code" href="class_bitmap.html">Bitmap</a>* <a class="code" href="_drive_8cpp.html#a3949e985b3caaf55060b83b43afbcd50">drive_glow_bitmap</a>[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };</div> +<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div> +<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">static</span> <a class="code" href="class_sound.html">Sound</a>* sound_resource[3] = { 0, 0, 0 };</div> +<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> </div> +<div class="line"><a name="l00048"></a><span class="lineno"><a class="code" href="_drive_8cpp.html#a14ae939828dc08f7d526cda68c1800c4"> 48</a></span> <span class="preprocessor">#define CLAMP(x, a, b) if (x < (a)) x = (a); else if (x > (b)) x = (b);</span></div> +<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="preprocessor"></span></div> +<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment">// +----------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div> +<div class="line"><a name="l00052"></a><span class="lineno"><a class="code" href="struct_drive_port.html#aee47d47613d9a3ef609fd6abb556375a"> 52</a></span> <a class="code" href="struct_drive_port.html#aee47d47613d9a3ef609fd6abb556375a">DrivePort::DrivePort</a>(<span class="keyword">const</span> <a class="code" href="struct_point.html">Point</a>& l, <span class="keywordtype">float</span> s)</div> +<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> : loc(l), flare(0), trail(0), scale(s)</div> +<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> { }</div> +<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div> +<div class="line"><a name="l00056"></a><span class="lineno"><a class="code" href="struct_drive_port.html#ac7272627d35f97b4cb0ac190d1a5857c"> 56</a></span> <a class="code" href="struct_drive_port.html#ac7272627d35f97b4cb0ac190d1a5857c">DrivePort::~DrivePort</a>()</div> +<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> {</div> +<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <a class="code" href="_graphic_8h.html#a6cf60e4cf1961361db679c04b7a896ed">GRAPHIC_DESTROY</a>(<a class="code" href="struct_drive_port.html#aa7de1559102ee263eb970ec4f2cd311e">flare</a>);</div> +<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <a class="code" href="_graphic_8h.html#a6cf60e4cf1961361db679c04b7a896ed">GRAPHIC_DESTROY</a>(<a class="code" href="struct_drive_port.html#afe893f9ca4e38ae950b15d5d5628513f">trail</a>);</div> +<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> }</div> +<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div> +<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="comment">// +----------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div> +<div class="line"><a name="l00064"></a><span class="lineno"><a class="code" href="class_drive.html#a68e8ea5b1fb08eaeffd0ffbe63ebf55a"> 64</a></span> <a class="code" href="class_drive.html#a68e8ea5b1fb08eaeffd0ffbe63ebf55a">Drive::Drive</a>(<a class="code" href="class_drive.html#ad78b81f5400c9179e7dec4e7c226cc33">SUBTYPE</a> drive_type, <span class="keywordtype">float</span> max_thrust, <span class="keywordtype">float</span> max_aug, <span class="keywordtype">bool</span> show)</div> +<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> : <a class="code" href="class_system.html">System</a>(DRIVE, drive_type, <span class="stringliteral">"Drive"</span>, drive_value[drive_type],</div> +<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> max_thrust*2, max_thrust*2, max_thrust*2),</div> +<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> thrust(max_thrust), augmenter(max_aug), scale(0.0f), </div> +<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> throttle(0.0f), augmenter_throttle(0.0f), intensity(0.0f),</div> +<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> sound(0), burner_sound(0), show_trail(show)</div> +<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> {</div> +<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <a class="code" href="class_system.html#a39160be8ed69449b35764e577886d0f0">power_flags</a> = <a class="code" href="class_system.html#ad5186b65887892137a93b44d381ea21daaac7136c0debed7f05a8ca6d90849e52">POWER_WATTS</a>;</div> +<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div> +<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keywordflow">switch</span> (drive_type) {</div> +<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordflow">default</span>:</div> +<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">case</span> <a class="code" href="class_drive.html#ad78b81f5400c9179e7dec4e7c226cc33a039d19adfd743acabe78bca24158f2c9">PLASMA</a>: <a class="code" href="class_system.html#a39bb5f3c7c4a34b2861d489db9b15ce3">name</a> = <a class="code" href="class_game.html#a80f0de6fe1883b6b0e4c67b3e16afb2f">Game::GetText</a>(<span class="stringliteral">"sys.drive.plasma"</span>); <span class="keywordflow">break</span>;</div> +<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">case</span> <a class="code" href="class_drive.html#ad78b81f5400c9179e7dec4e7c226cc33a4f38b02fccb9bd35505cbe6b1d792d75">FUSION</a>: <a class="code" href="class_system.html#a39bb5f3c7c4a34b2861d489db9b15ce3">name</a> = <a class="code" href="class_game.html#a80f0de6fe1883b6b0e4c67b3e16afb2f">Game::GetText</a>(<span class="stringliteral">"sys.drive.fusion"</span>); <span class="keywordflow">break</span>;</div> +<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">case</span> <a class="code" href="class_drive.html#ad78b81f5400c9179e7dec4e7c226cc33a1f85e4a155cedc32e5b42fafc0446c8f">GREEN</a>: <a class="code" href="class_system.html#a39bb5f3c7c4a34b2861d489db9b15ce3">name</a> = <a class="code" href="class_game.html#a80f0de6fe1883b6b0e4c67b3e16afb2f">Game::GetText</a>(<span class="stringliteral">"sys.drive.green"</span>); <span class="keywordflow">break</span>;</div> +<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">case</span> <a class="code" href="class_drive.html#ad78b81f5400c9179e7dec4e7c226cc33a86e5609ef2937028abc2c737c9486175">RED</a>: <a class="code" href="class_system.html#a39bb5f3c7c4a34b2861d489db9b15ce3">name</a> = <a class="code" href="class_game.html#a80f0de6fe1883b6b0e4c67b3e16afb2f">Game::GetText</a>(<span class="stringliteral">"sys.drive.red"</span>); <span class="keywordflow">break</span>;</div> +<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keywordflow">case</span> <a class="code" href="class_drive.html#ad78b81f5400c9179e7dec4e7c226cc33a8d969725aa2f2292737cb71dd0c44410">BLUE</a>: <a class="code" href="class_system.html#a39bb5f3c7c4a34b2861d489db9b15ce3">name</a> = <a class="code" href="class_game.html#a80f0de6fe1883b6b0e4c67b3e16afb2f">Game::GetText</a>(<span class="stringliteral">"sys.drive.blue"</span>); <span class="keywordflow">break</span>;</div> +<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">case</span> <a class="code" href="class_drive.html#ad78b81f5400c9179e7dec4e7c226cc33a0bc91fa3f77a91074ccf4727d03f351b">YELLOW</a>: <a class="code" href="class_system.html#a39bb5f3c7c4a34b2861d489db9b15ce3">name</a> = <a class="code" href="class_game.html#a80f0de6fe1883b6b0e4c67b3e16afb2f">Game::GetText</a>(<span class="stringliteral">"sys.drive.yellow"</span>); <span class="keywordflow">break</span>;</div> +<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keywordflow">case</span> <a class="code" href="class_drive.html#ad78b81f5400c9179e7dec4e7c226cc33ac35bd671bc63f8e51f9542d0ae79e242">STEALTH</a>: <a class="code" href="class_system.html#a39bb5f3c7c4a34b2861d489db9b15ce3">name</a> = <a class="code" href="class_game.html#a80f0de6fe1883b6b0e4c67b3e16afb2f">Game::GetText</a>(<span class="stringliteral">"sys.drive.stealth"</span>); <span class="keywordflow">break</span>;</div> +<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  }</div> +<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div> +<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <a class="code" href="class_system.html#ab2af74e7175276e03fa7a2d433a9423e">abrv</a> = <a class="code" href="class_game.html#a80f0de6fe1883b6b0e4c67b3e16afb2f">Game::GetText</a>(<span class="stringliteral">"sys.drive.abrv"</span>);</div> +<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> </div> +<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <a class="code" href="class_system.html#a0c3dfd5616a693b6ce0f0b9b39f2d4df">emcon_power</a>[0] = 0;</div> +<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <a class="code" href="class_system.html#a0c3dfd5616a693b6ce0f0b9b39f2d4df">emcon_power</a>[1] = 50;</div> +<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <a class="code" href="class_system.html#a0c3dfd5616a693b6ce0f0b9b39f2d4df">emcon_power</a>[2] = 100;</div> +<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> }</div> +<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div> +<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment">// +----------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> </div> +<div class="line"><a name="l00093"></a><span class="lineno"><a class="code" href="class_drive.html#a7cd68ed54057d8896414bbab2b611b38"> 93</a></span> <a class="code" href="class_drive.html#a68e8ea5b1fb08eaeffd0ffbe63ebf55a">Drive::Drive</a>(<span class="keyword">const</span> <a class="code" href="class_drive.html">Drive</a>& d)</div> +<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> : <a class="code" href="class_system.html">System</a>(d), thrust(d.thrust), augmenter(d.augmenter), scale(d.scale), </div> +<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> throttle(0.0f), augmenter_throttle(0.0f), intensity(0.0f),</div> +<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> sound(0), burner_sound(0), show_trail(d.show_trail)</div> +<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> {</div> +<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <a class="code" href="class_system.html#a39160be8ed69449b35764e577886d0f0">power_flags</a> = <a class="code" href="class_system.html#ad5186b65887892137a93b44d381ea21daaac7136c0debed7f05a8ca6d90849e52">POWER_WATTS</a>;</div> +<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div> +<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="class_system.html#a015be582199d240639925ab23524d58e">Mount</a>(d);</div> +<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div> +<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keywordflow">if</span> (<a class="code" href="class_system.html#a7aa4b04b803a7e2f771a8ec8b4b364e1">subtype</a> != <a class="code" href="class_drive.html#ad78b81f5400c9179e7dec4e7c226cc33ac35bd671bc63f8e51f9542d0ae79e242">Drive::STEALTH</a>) {</div> +<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < d.<a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>.<a class="code" href="class_list.html#a802e2aa9aaef248591140fa032d20d61">size</a>(); i++) {</div> +<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <a class="code" href="struct_drive_port.html">DrivePort</a>* p = d.<a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>[i];</div> +<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <a class="code" href="class_drive.html#a3753a664d5005aeedc52cf23325b3370">CreatePort</a>(p-><a class="code" href="struct_drive_port.html#ab55e6da6ff749bd21026f591e6bbf4e4">loc</a>, p-><a class="code" href="struct_drive_port.html#a17f6582a6e03b39f47303e4c7b853d2d">scale</a>);</div> +<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  }</div> +<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  }</div> +<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> }</div> +<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> </div> +<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div> +<div class="line"><a name="l00112"></a><span class="lineno"><a class="code" href="class_drive.html#a9a9f96b1b0b4e841567ccf9fc2d60aaa"> 112</a></span> <a class="code" href="class_drive.html#a9a9f96b1b0b4e841567ccf9fc2d60aaa">Drive::~Drive</a>()</div> +<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> {</div> +<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a>) {</div> +<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a>-><a class="code" href="class_sound.html#a552465dbf8072a7afaa70ac3eeafba91">Stop</a>();</div> +<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a>-><a class="code" href="class_sound.html#a3894275768425881b9d7d7af33651702">Release</a>();</div> +<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a> = 0;</div> +<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  }</div> +<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> </div> +<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a>) {</div> +<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a>-><a class="code" href="class_sound.html#a552465dbf8072a7afaa70ac3eeafba91">Stop</a>();</div> +<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a>-><a class="code" href="class_sound.html#a3894275768425881b9d7d7af33651702">Release</a>();</div> +<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a> = 0;</div> +<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  }</div> +<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> </div> +<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>.<a class="code" href="class_list.html#a2c39145db843e6fc3fe5e835cd52b68d">destroy</a>();</div> +<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> }</div> +<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> </div> +<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> </div> +<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00132"></a><span class="lineno"><a class="code" href="class_drive.html#adeffafd1db243ebd597fb46c83abe486"> 132</a></span> <a class="code" href="class_drive.html#adeffafd1db243ebd597fb46c83abe486">Drive::Initialize</a>()</div> +<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> {</div> +<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keyword">static</span> <span class="keywordtype">int</span> initialized = 0;</div> +<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordflow">if</span> (initialized) <span class="keywordflow">return</span>;</div> +<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> </div> +<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <a class="code" href="class_data_loader.html">DataLoader</a>* loader = <a class="code" href="class_data_loader.html#a6870b699410ca41cbc38ae5e55dc63aa">DataLoader::GetLoader</a>();</div> +<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  loader-><a class="code" href="class_data_loader.html#a83aa0cbac32de6967091538fbec63d9c">SetDataPath</a>(<span class="stringliteral">"Drive/"</span>);</div> +<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Drive0.pcx"</span>, drive_flare_bitmap[0], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Drive1.pcx"</span>, drive_flare_bitmap[1], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Drive2.pcx"</span>, drive_flare_bitmap[2], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Drive3.pcx"</span>, drive_flare_bitmap[3], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Drive4.pcx"</span>, drive_flare_bitmap[4], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Drive5.pcx"</span>, drive_flare_bitmap[5], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> </div> +<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Trail0.pcx"</span>, drive_trail_bitmap[0], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Trail1.pcx"</span>, drive_trail_bitmap[1], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Trail2.pcx"</span>, drive_trail_bitmap[2], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Trail3.pcx"</span>, drive_trail_bitmap[3], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Trail4.pcx"</span>, drive_trail_bitmap[4], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Trail5.pcx"</span>, drive_trail_bitmap[5], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> </div> +<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Glow0.pcx"</span>, drive_glow_bitmap[0], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Glow1.pcx"</span>, drive_glow_bitmap[1], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Glow2.pcx"</span>, drive_glow_bitmap[2], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Glow3.pcx"</span>, drive_glow_bitmap[3], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Glow4.pcx"</span>, drive_glow_bitmap[4], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  loader-><a class="code" href="class_data_loader.html#a43a83c4d22b32e2035fd1c8af7dea3e1">LoadTexture</a>(<span class="stringliteral">"Glow5.pcx"</span>, drive_glow_bitmap[5], <a class="code" href="class_bitmap.html#a4dbb72be7b89e14d176ce2f2c46553d3a1dc3dfd11746b297870849f79bc4bf75">Bitmap::BMP_TRANSLUCENT</a>);</div> +<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> </div> +<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> SOUND_FLAGS = <a class="code" href="class_sound.html#a21341d999dda81a7e8e121d16759e827a3b2736342fd21a6fce744a414b9be691">Sound::LOCALIZED</a> |</div> +<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <a class="code" href="class_sound.html#a21341d999dda81a7e8e121d16759e827ab2e734b41be1344ca9d8060f8348c645">Sound::LOC_3D</a> |</div> +<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <a class="code" href="class_sound.html#a21341d999dda81a7e8e121d16759e827ad6c280f77ae9f0d4ac810e90d58fda96">Sound::LOOP</a> |</div> +<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <a class="code" href="class_sound.html#a21341d999dda81a7e8e121d16759e827acd711d8f3b29618af50e0c1fda30d52e">Sound::LOCKED</a>;</div> +<div class="line"><a name="l00164"></a><span class="lineno"> 164</span> </div> +<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  loader-><a class="code" href="class_data_loader.html#a83aa0cbac32de6967091538fbec63d9c">SetDataPath</a>(<span class="stringliteral">"Sounds/"</span>);</div> +<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  loader-><a class="code" href="class_data_loader.html#adead1ba58dea0ab9630be371458cfe2a">LoadSound</a>(<span class="stringliteral">"engine.wav"</span>, sound_resource[0], SOUND_FLAGS);</div> +<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  loader-><a class="code" href="class_data_loader.html#adead1ba58dea0ab9630be371458cfe2a">LoadSound</a>(<span class="stringliteral">"burner2.wav"</span>, sound_resource[1], SOUND_FLAGS);</div> +<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  loader-><a class="code" href="class_data_loader.html#adead1ba58dea0ab9630be371458cfe2a">LoadSound</a>(<span class="stringliteral">"rumble.wav"</span>, sound_resource[2], SOUND_FLAGS);</div> +<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  loader-><a class="code" href="class_data_loader.html#a83aa0cbac32de6967091538fbec63d9c">SetDataPath</a>(0);</div> +<div class="line"><a name="l00170"></a><span class="lineno"> 170</span> </div> +<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keywordflow">if</span> (sound_resource[0])</div> +<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  sound_resource[0]-><a class="code" href="class_sound.html#a9101224d7dd7f9fc4c3c5fca53d62b60">SetMaxDistance</a>(30.0e3f);</div> +<div class="line"><a name="l00173"></a><span class="lineno"> 173</span> </div> +<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keywordflow">if</span> (sound_resource[1])</div> +<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  sound_resource[1]-><a class="code" href="class_sound.html#a9101224d7dd7f9fc4c3c5fca53d62b60">SetMaxDistance</a>(30.0e3f);</div> +<div class="line"><a name="l00176"></a><span class="lineno"> 176</span> </div> +<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordflow">if</span> (sound_resource[2])</div> +<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  sound_resource[2]-><a class="code" href="class_sound.html#a9101224d7dd7f9fc4c3c5fca53d62b60">SetMaxDistance</a>(50.0e3f);</div> +<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> </div> +<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  initialized = 1;</div> +<div class="line"><a name="l00181"></a><span class="lineno"> 181</span> }</div> +<div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div> +<div class="line"><a name="l00183"></a><span class="lineno"> 183</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00184"></a><span class="lineno"> 184</span> </div> +<div class="line"><a name="l00185"></a><span class="lineno"> 185</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00186"></a><span class="lineno"><a class="code" href="class_drive.html#a7c494cd63e0126744dba29833d5e7103"> 186</a></span> <a class="code" href="class_drive.html#a7c494cd63e0126744dba29833d5e7103">Drive::Close</a>()</div> +<div class="line"><a name="l00187"></a><span class="lineno"> 187</span> {</div> +<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < 3; i++) {</div> +<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keyword">delete</span> sound_resource[i];</div> +<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  sound_resource[i] = 0;</div> +<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  }</div> +<div class="line"><a name="l00192"></a><span class="lineno"> 192</span> }</div> +<div class="line"><a name="l00193"></a><span class="lineno"> 193</span> </div> +<div class="line"><a name="l00194"></a><span class="lineno"> 194</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00195"></a><span class="lineno"> 195</span> </div> +<div class="line"><a name="l00196"></a><span class="lineno"> 196</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00197"></a><span class="lineno"><a class="code" href="class_drive.html#ad673fa63fd79f017b389e85951b0f92f"> 197</a></span> <a class="code" href="class_drive.html#ad673fa63fd79f017b389e85951b0f92f">Drive::StartFrame</a>()</div> +<div class="line"><a name="l00198"></a><span class="lineno"> 198</span> {</div> +<div class="line"><a name="l00199"></a><span class="lineno"> 199</span> }</div> +<div class="line"><a name="l00200"></a><span class="lineno"> 200</span> </div> +<div class="line"><a name="l00201"></a><span class="lineno"> 201</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00202"></a><span class="lineno"> 202</span> </div> +<div class="line"><a name="l00203"></a><span class="lineno"> 203</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00204"></a><span class="lineno"><a class="code" href="class_drive.html#a1be615d061706784e0c80a7b2e79439e"> 204</a></span> <a class="code" href="class_drive.html#a1be615d061706784e0c80a7b2e79439e">Drive::AddPort</a>(<span class="keyword">const</span> <a class="code" href="struct_point.html">Point</a>& loc, <span class="keywordtype">float</span> flare_scale)</div> +<div class="line"><a name="l00205"></a><span class="lineno"> 205</span> {</div> +<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">if</span> (flare_scale == 0) flare_scale = <a class="code" href="class_drive.html#a52d26f89866f448b68342905ba466532">scale</a>;</div> +<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <a class="code" href="struct_drive_port.html">DrivePort</a>* port = <span class="keyword">new</span>(__FILE__,__LINE__) <a class="code" href="struct_drive_port.html">DrivePort</a>(loc, flare_scale);</div> +<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>.<a class="code" href="class_list.html#ab3180edb4da02be2a4b62320071755b8">append</a>(port);</div> +<div class="line"><a name="l00209"></a><span class="lineno"> 209</span> }</div> +<div class="line"><a name="l00210"></a><span class="lineno"> 210</span> </div> +<div class="line"><a name="l00211"></a><span class="lineno"> 211</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00212"></a><span class="lineno"> 212</span> </div> +<div class="line"><a name="l00213"></a><span class="lineno"> 213</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00214"></a><span class="lineno"><a class="code" href="class_drive.html#a3753a664d5005aeedc52cf23325b3370"> 214</a></span> <a class="code" href="class_drive.html#a3753a664d5005aeedc52cf23325b3370">Drive::CreatePort</a>(<span class="keyword">const</span> <a class="code" href="struct_point.html">Point</a>& loc, <span class="keywordtype">float</span> flare_scale)</div> +<div class="line"><a name="l00215"></a><span class="lineno"> 215</span> {</div> +<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <a class="code" href="class_bitmap.html">Bitmap</a>* flare_bmp = drive_flare_bitmap[<a class="code" href="class_system.html#a7aa4b04b803a7e2f771a8ec8b4b364e1">subtype</a>];</div> +<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <a class="code" href="class_bitmap.html">Bitmap</a>* trail_bmp = drive_trail_bitmap[<a class="code" href="class_system.html#a7aa4b04b803a7e2f771a8ec8b4b364e1">subtype</a>];</div> +<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <a class="code" href="class_bitmap.html">Bitmap</a>* glow_bmp = 0;</div> +<div class="line"><a name="l00219"></a><span class="lineno"> 219</span> </div> +<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="keywordflow">if</span> (flare_scale <= 0)</div> +<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  flare_scale = <a class="code" href="class_drive.html#a52d26f89866f448b68342905ba466532">scale</a>;</div> +<div class="line"><a name="l00222"></a><span class="lineno"> 222</span> </div> +<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#a3cc4a0e284b7b3d8f08ab4c198cbc21f">augmenter</a> <= 0)</div> +<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  glow_bmp = drive_glow_bitmap[<a class="code" href="class_system.html#a7aa4b04b803a7e2f771a8ec8b4b364e1">subtype</a>];</div> +<div class="line"><a name="l00225"></a><span class="lineno"> 225</span> </div> +<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="keywordflow">if</span> (<a class="code" href="class_system.html#a7aa4b04b803a7e2f771a8ec8b4b364e1">subtype</a> != <a class="code" href="class_drive.html#ad78b81f5400c9179e7dec4e7c226cc33ac35bd671bc63f8e51f9542d0ae79e242">Drive::STEALTH</a> && flare_scale > 0) {</div> +<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <a class="code" href="struct_drive_port.html">DrivePort</a>* port = <span class="keyword">new</span>(__FILE__,__LINE__) <a class="code" href="struct_drive_port.html">DrivePort</a>(loc, flare_scale);</div> +<div class="line"><a name="l00228"></a><span class="lineno"> 228</span> </div> +<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="keywordflow">if</span> (flare_bmp) {</div> +<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <a class="code" href="class_drive_sprite.html">DriveSprite</a>* flare_rep = <span class="keyword">new</span>(__FILE__,__LINE__) <a class="code" href="class_drive_sprite.html">DriveSprite</a>(flare_bmp, glow_bmp);</div> +<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  flare_rep-><a class="code" href="class_sprite.html#afe02d5d27a4788993801a6a94ccde875">Scale</a>(flare_scale * 1.5);</div> +<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  flare_rep-><a class="code" href="class_sprite.html#a15a534530cd8c3d8096ac4d1ea9d25cd">SetShade</a>(0);</div> +<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  port-><a class="code" href="struct_drive_port.html#aa7de1559102ee263eb970ec4f2cd311e">flare</a> = flare_rep;</div> +<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  }</div> +<div class="line"><a name="l00235"></a><span class="lineno"> 235</span> </div> +<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="keywordflow">if</span> (trail_bmp && <a class="code" href="class_drive.html#a00192b011744ad7c5a8f3c8843764ccc">show_trail</a>) {</div> +<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <a class="code" href="class_bolt.html">Bolt</a>* trail_rep = <span class="keyword">new</span>(__FILE__,__LINE__) <a class="code" href="class_bolt.html">Bolt</a>(flare_scale * 30, flare_scale * 8, trail_bmp, <span class="keyword">true</span>);</div> +<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  port-><a class="code" href="struct_drive_port.html#afe893f9ca4e38ae950b15d5d5628513f">trail</a> = trail_rep;</div> +<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  }</div> +<div class="line"><a name="l00240"></a><span class="lineno"> 240</span> </div> +<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>.<a class="code" href="class_list.html#ab3180edb4da02be2a4b62320071755b8">append</a>(port);</div> +<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  }</div> +<div class="line"><a name="l00243"></a><span class="lineno"> 243</span> }</div> +<div class="line"><a name="l00244"></a><span class="lineno"> 244</span> </div> +<div class="line"><a name="l00245"></a><span class="lineno"> 245</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00246"></a><span class="lineno"> 246</span> </div> +<div class="line"><a name="l00247"></a><span class="lineno"> 247</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00248"></a><span class="lineno"><a class="code" href="class_drive.html#a780e1171d541b08ef9cf44fc1801fecb"> 248</a></span> <a class="code" href="class_drive.html#a780e1171d541b08ef9cf44fc1801fecb">Drive::Orient</a>(<span class="keyword">const</span> <a class="code" href="class_physical.html">Physical</a>* rep)</div> +<div class="line"><a name="l00249"></a><span class="lineno"> 249</span> {</div> +<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  <a class="code" href="class_drive.html#a780e1171d541b08ef9cf44fc1801fecb">System::Orient</a>(rep);</div> +<div class="line"><a name="l00251"></a><span class="lineno"> 251</span> </div> +<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="keyword">const</span> <a class="code" href="struct_matrix.html">Matrix</a>& orientation = rep-><a class="code" href="class_physical.html#ac6be8bd79bd6622fd67d2d71f8e125af">Cam</a>().<a class="code" href="class_camera.html#a6d34215f3a9eb4a163d0dfbac4a76dab">Orientation</a>();</div> +<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <a class="code" href="struct_point.html">Point</a> ship_loc = rep-><a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>();</div> +<div class="line"><a name="l00254"></a><span class="lineno"> 254</span> </div> +<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < <a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>.<a class="code" href="class_list.html#a802e2aa9aaef248591140fa032d20d61">size</a>(); i++) {</div> +<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <a class="code" href="struct_drive_port.html">DrivePort</a>* p = <a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>[i];</div> +<div class="line"><a name="l00257"></a><span class="lineno"> 257</span> </div> +<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <a class="code" href="struct_point.html">Point</a> projector = (p-><a class="code" href="struct_drive_port.html#ab55e6da6ff749bd21026f591e6bbf4e4">loc</a> * orientation) + ship_loc;</div> +<div class="line"><a name="l00259"></a><span class="lineno"> 259</span> </div> +<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="keywordflow">if</span> (p-><a class="code" href="struct_drive_port.html#aa7de1559102ee263eb970ec4f2cd311e">flare</a>) {</div> +<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  p-><a class="code" href="struct_drive_port.html#aa7de1559102ee263eb970ec4f2cd311e">flare</a>-><a class="code" href="class_graphic.html#af8bec5b637e4925c65fb77d8234fb266">MoveTo</a>(projector);</div> +<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  p-><a class="code" href="struct_drive_port.html#aa7de1559102ee263eb970ec4f2cd311e">flare</a>-><a class="code" href="class_drive_sprite.html#ae29fd3f0303f8bf90970739b8074d5c8">SetFront</a>(rep-><a class="code" href="class_physical.html#ac6be8bd79bd6622fd67d2d71f8e125af">Cam</a>().<a class="code" href="class_camera.html#a6767fa21da7413fe049cf64eed98f02f">vpn</a>() * -10 * p-><a class="code" href="struct_drive_port.html#a17f6582a6e03b39f47303e4c7b853d2d">scale</a>);</div> +<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  }</div> +<div class="line"><a name="l00264"></a><span class="lineno"> 264</span> </div> +<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <span class="keywordflow">if</span> (p-><a class="code" href="struct_drive_port.html#afe893f9ca4e38ae950b15d5d5628513f">trail</a>) {</div> +<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#af6c327bb8e573531aba751736ec54db0">intensity</a> > 0.5) {</div> +<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <span class="keywordtype">double</span> len = -60 * p-><a class="code" href="struct_drive_port.html#a17f6582a6e03b39f47303e4c7b853d2d">scale</a> * <a class="code" href="class_drive.html#af6c327bb8e573531aba751736ec54db0">intensity</a>;</div> +<div class="line"><a name="l00268"></a><span class="lineno"> 268</span> </div> +<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#a3cc4a0e284b7b3d8f08ab4c198cbc21f">augmenter</a> > 0 && <a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a> > 0)</div> +<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  len += len * <a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a>;</div> +<div class="line"><a name="l00271"></a><span class="lineno"> 271</span> </div> +<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  p-><a class="code" href="struct_drive_port.html#afe893f9ca4e38ae950b15d5d5628513f">trail</a>-><a class="code" href="class_graphic.html#aab22ee91e157304613b8d54c125fe6ef">Show</a>();</div> +<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  p-><a class="code" href="struct_drive_port.html#afe893f9ca4e38ae950b15d5d5628513f">trail</a>-><a class="code" href="class_bolt.html#a5f18b6e18ba881687396ea4f49504672">SetEndPoints</a>(projector, projector + rep-><a class="code" href="class_physical.html#ac6be8bd79bd6622fd67d2d71f8e125af">Cam</a>().<a class="code" href="class_camera.html#a6767fa21da7413fe049cf64eed98f02f">vpn</a>() * len);</div> +<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  }</div> +<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  p-><a class="code" href="struct_drive_port.html#afe893f9ca4e38ae950b15d5d5628513f">trail</a>-><a class="code" href="class_graphic.html#a06c7d7600a91914082c6cba1eb87dedf">Hide</a>();</div> +<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  }</div> +<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  }</div> +<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  }</div> +<div class="line"><a name="l00280"></a><span class="lineno"> 280</span> }</div> +<div class="line"><a name="l00281"></a><span class="lineno"> 281</span> </div> +<div class="line"><a name="l00282"></a><span class="lineno"> 282</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00283"></a><span class="lineno"> 283</span> </div> +<div class="line"><a name="l00284"></a><span class="lineno"> 284</span> <span class="keyword">static</span> <span class="keywordtype">double</span> drive_seconds=0;</div> +<div class="line"><a name="l00285"></a><span class="lineno"> 285</span> </div> +<div class="line"><a name="l00286"></a><span class="lineno"> 286</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00287"></a><span class="lineno"><a class="code" href="class_drive.html#a7048d0ab88750a6d3be5a4ed24496137"> 287</a></span> <a class="code" href="class_drive.html#a7048d0ab88750a6d3be5a4ed24496137">Drive::SetThrottle</a>(<span class="keywordtype">double</span> t, <span class="keywordtype">bool</span> aug)</div> +<div class="line"><a name="l00288"></a><span class="lineno"> 288</span> {</div> +<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <span class="keywordtype">double</span> spool = 1.2 * drive_seconds;</div> +<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="keywordtype">double</span> throttle_request = t / 100;</div> +<div class="line"><a name="l00291"></a><span class="lineno"> 291</span> </div> +<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#a313889503039164b921759d01fede15d">throttle</a> < throttle_request) {</div> +<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keywordflow">if</span> (throttle_request-<a class="code" href="class_drive.html#a313889503039164b921759d01fede15d">throttle</a> < spool) {</div> +<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  <a class="code" href="class_drive.html#a313889503039164b921759d01fede15d">throttle</a> = (float) throttle_request;</div> +<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  }</div> +<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  <a class="code" href="class_drive.html#a313889503039164b921759d01fede15d">throttle</a> += (float) spool;</div> +<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  }</div> +<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  }</div> +<div class="line"><a name="l00300"></a><span class="lineno"> 300</span> </div> +<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#a313889503039164b921759d01fede15d">throttle</a> > throttle_request) {</div> +<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#a313889503039164b921759d01fede15d">throttle</a> - throttle_request < spool) {</div> +<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  <a class="code" href="class_drive.html#a313889503039164b921759d01fede15d">throttle</a> = (float) throttle_request;</div> +<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  }</div> +<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  <a class="code" href="class_drive.html#a313889503039164b921759d01fede15d">throttle</a> -= (float) spool;</div> +<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  }</div> +<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  }</div> +<div class="line"><a name="l00309"></a><span class="lineno"> 309</span> </div> +<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#a313889503039164b921759d01fede15d">throttle</a> < 0.5)</div> +<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  aug = <span class="keyword">false</span>;</div> +<div class="line"><a name="l00312"></a><span class="lineno"> 312</span> </div> +<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  <span class="keywordflow">if</span> (aug && <a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a> < 1) {</div> +<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a> += (float) spool;</div> +<div class="line"><a name="l00315"></a><span class="lineno"> 315</span> </div> +<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a> > 1)</div> +<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a> = 1.0f;</div> +<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  }</div> +<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!aug && <a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a> > 0) {</div> +<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  <a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a> -= (float) spool;</div> +<div class="line"><a name="l00321"></a><span class="lineno"> 321</span> </div> +<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a> < 0)</div> +<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  <a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a> = 0.0f;</div> +<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  }</div> +<div class="line"><a name="l00325"></a><span class="lineno"> 325</span> }</div> +<div class="line"><a name="l00326"></a><span class="lineno"> 326</span> </div> +<div class="line"><a name="l00327"></a><span class="lineno"> 327</span> <span class="comment">// +----------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00328"></a><span class="lineno"> 328</span> </div> +<div class="line"><a name="l00329"></a><span class="lineno"> 329</span> <span class="keywordtype">double</span></div> +<div class="line"><a name="l00330"></a><span class="lineno"><a class="code" href="class_drive.html#a2279fc0017f6808fc7b2259048a2e13f"> 330</a></span> <a class="code" href="class_drive.html#a2279fc0017f6808fc7b2259048a2e13f">Drive::GetRequest</a>(<span class="keywordtype">double</span> seconds)<span class="keyword"> const</span></div> +<div class="line"><a name="l00331"></a><span class="lineno"> 331</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  <span class="keywordflow">if</span> (!<a class="code" href="class_system.html#aade420db3e5556649a8693fea92f0675">power_on</a>) <span class="keywordflow">return</span> 0;</div> +<div class="line"><a name="l00333"></a><span class="lineno"> 333</span> </div> +<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  <span class="keywordtype">double</span> t_factor = max(<a class="code" href="class_drive.html#a313889503039164b921759d01fede15d">throttle</a> + 0.5 * <a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a>, 0.3);</div> +<div class="line"><a name="l00335"></a><span class="lineno"> 335</span> </div> +<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  <span class="keywordflow">return</span> t_factor * <a class="code" href="class_system.html#af09932ea04b378ca7af3907e1b6d682a">power_level</a> * <a class="code" href="class_system.html#a07659890fa4be558868444a4f9dfa636">sink_rate</a> * seconds;</div> +<div class="line"><a name="l00337"></a><span class="lineno"> 337</span> }</div> +<div class="line"><a name="l00338"></a><span class="lineno"> 338</span> </div> +<div class="line"><a name="l00339"></a><span class="lineno"> 339</span> <span class="keywordtype">bool</span></div> +<div class="line"><a name="l00340"></a><span class="lineno"><a class="code" href="class_drive.html#afeccacd5446055f33ac7b58f55a49613"> 340</a></span> <a class="code" href="class_drive.html#afeccacd5446055f33ac7b58f55a49613">Drive::IsAugmenterOn</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00341"></a><span class="lineno"> 341</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <span class="keywordflow">return</span> <a class="code" href="class_drive.html#a3cc4a0e284b7b3d8f08ab4c198cbc21f">augmenter</a> > 0 && </div> +<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a> > 0.05 &&</div> +<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  <a class="code" href="class_system.html#afb081d97d5976241aa9a231aa193cb6c">IsPowerOn</a>() &&</div> +<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  <a class="code" href="class_system.html#ac0647106aa67861161d0ef9a96955fbb">status</a> > <a class="code" href="class_system.html#a01ad7eea57f4a2799a0159f4c3c75b07a95b73c8f4fbd7a1e4cd019bffb90d1e7">CRITICAL</a>;</div> +<div class="line"><a name="l00346"></a><span class="lineno"> 346</span> }</div> +<div class="line"><a name="l00347"></a><span class="lineno"> 347</span> </div> +<div class="line"><a name="l00348"></a><span class="lineno"> 348</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00349"></a><span class="lineno"> 349</span> </div> +<div class="line"><a name="l00350"></a><span class="lineno"> 350</span> <span class="keywordtype">int</span></div> +<div class="line"><a name="l00351"></a><span class="lineno"><a class="code" href="class_drive.html#a3733309f13c012e74fff7cd3f9aa3d1a"> 351</a></span> <a class="code" href="class_drive.html#a3733309f13c012e74fff7cd3f9aa3d1a">Drive::NumEngines</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00352"></a><span class="lineno"> 352</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <span class="keywordflow">return</span> <a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>.<a class="code" href="class_list.html#a802e2aa9aaef248591140fa032d20d61">size</a>();</div> +<div class="line"><a name="l00354"></a><span class="lineno"> 354</span> }</div> +<div class="line"><a name="l00355"></a><span class="lineno"> 355</span> </div> +<div class="line"><a name="l00356"></a><span class="lineno"> 356</span> <a class="code" href="class_drive_sprite.html">DriveSprite</a>*</div> +<div class="line"><a name="l00357"></a><span class="lineno"><a class="code" href="class_drive.html#a118dfeb197a13c8b254ca9842c6094c8"> 357</a></span> <a class="code" href="class_drive.html#a118dfeb197a13c8b254ca9842c6094c8">Drive::GetFlare</a>(<span class="keywordtype">int</span> port)<span class="keyword"> const</span></div> +<div class="line"><a name="l00358"></a><span class="lineno"> 358</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <span class="keywordflow">if</span> (port >= 0 && port < <a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>.<a class="code" href="class_list.html#a802e2aa9aaef248591140fa032d20d61">size</a>()) {</div> +<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  <span class="keywordflow">return</span> <a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>[port]->flare;</div> +<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  }</div> +<div class="line"><a name="l00362"></a><span class="lineno"> 362</span> </div> +<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  <span class="keywordflow">return</span> 0;</div> +<div class="line"><a name="l00364"></a><span class="lineno"> 364</span> }</div> +<div class="line"><a name="l00365"></a><span class="lineno"> 365</span> </div> +<div class="line"><a name="l00366"></a><span class="lineno"> 366</span> <a class="code" href="class_bolt.html">Bolt</a>*</div> +<div class="line"><a name="l00367"></a><span class="lineno"><a class="code" href="class_drive.html#a5feecba3d024276410a27cd9dff219e4"> 367</a></span> <a class="code" href="class_drive.html#a5feecba3d024276410a27cd9dff219e4">Drive::GetTrail</a>(<span class="keywordtype">int</span> port)<span class="keyword"> const</span></div> +<div class="line"><a name="l00368"></a><span class="lineno"> 368</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <span class="keywordflow">if</span> (port >= 0 && port < <a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>.<a class="code" href="class_list.html#a802e2aa9aaef248591140fa032d20d61">size</a>()) {</div> +<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <span class="keywordflow">return</span> <a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>[port]->trail;</div> +<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  }</div> +<div class="line"><a name="l00372"></a><span class="lineno"> 372</span> </div> +<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  <span class="keywordflow">return</span> 0;</div> +<div class="line"><a name="l00374"></a><span class="lineno"> 374</span> }</div> +<div class="line"><a name="l00375"></a><span class="lineno"> 375</span> </div> +<div class="line"><a name="l00376"></a><span class="lineno"> 376</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00377"></a><span class="lineno"> 377</span> </div> +<div class="line"><a name="l00378"></a><span class="lineno"> 378</span> <span class="keywordtype">float</span></div> +<div class="line"><a name="l00379"></a><span class="lineno"><a class="code" href="class_drive.html#ab41c598f0856e44d4b789a940db3dac3"> 379</a></span> <a class="code" href="class_drive.html#ab41c598f0856e44d4b789a940db3dac3">Drive::Thrust</a>(<span class="keywordtype">double</span> seconds)</div> +<div class="line"><a name="l00380"></a><span class="lineno"> 380</span> {</div> +<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  drive_seconds = seconds;</div> +<div class="line"><a name="l00382"></a><span class="lineno"> 382</span> </div> +<div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  <span class="keywordtype">float</span> eff = (<a class="code" href="class_system.html#adbe3bc449593934c0783dda70a112567">energy</a>/<a class="code" href="class_system.html#a9becb94ba9eddf0db66296897fac8e7c">capacity</a>) * <a class="code" href="class_system.html#ab49e7dfcc5076c271c40410c32062e42">availability</a> * 100.0f;</div> +<div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  <span class="keywordtype">float</span> output = <a class="code" href="class_drive.html#a313889503039164b921759d01fede15d">throttle</a> * <a class="code" href="class_drive.html#aea5f11fb1fe6aea7ab1af13c874533e5">thrust</a> * eff;</div> +<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  <span class="keywordtype">bool</span> aug_on = <a class="code" href="class_drive.html#afeccacd5446055f33ac7b58f55a49613">IsAugmenterOn</a>();</div> +<div class="line"><a name="l00386"></a><span class="lineno"> 386</span> </div> +<div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  <span class="keywordflow">if</span> (aug_on) {</div> +<div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  output += <a class="code" href="class_drive.html#a3cc4a0e284b7b3d8f08ab4c198cbc21f">augmenter</a> * <a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a> * eff;</div> +<div class="line"><a name="l00389"></a><span class="lineno"> 389</span> </div> +<div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  <span class="comment">// augmenter burns extra fuel:</span></div> +<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  <a class="code" href="class_power_source.html">PowerSource</a>* reac = <a class="code" href="class_system.html#ac0b96709476d02805d37c40963224e52">ship</a>-><a class="code" href="class_ship.html#a78d16bfeb9770ce9d1e8bcd8cb6459bc">Reactors</a>()[<a class="code" href="class_system.html#aed78bf0183cea50fe2dda6c463b41824">source_index</a>];</div> +<div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  reac-><a class="code" href="class_system.html#abdb673586fabb22f4835b4aca6723df4">SetCapacity</a>(reac-><a class="code" href="class_system.html#af76aa58bd5034383d3bec5ca0a0360ee">GetCapacity</a>() - (0.1 * drive_seconds));</div> +<div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  }</div> +<div class="line"><a name="l00394"></a><span class="lineno"> 394</span> </div> +<div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <a class="code" href="class_system.html#adbe3bc449593934c0783dda70a112567">energy</a> = 0.0f;</div> +<div class="line"><a name="l00396"></a><span class="lineno"> 396</span> </div> +<div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  <span class="keywordflow">if</span> (output < 0 || <a class="code" href="class_system.html#a15f8c78d743f2f1d8ff8edd311c9a0d1">GetPowerLevel</a>() < 0.01)</div> +<div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  output = 0.0f;</div> +<div class="line"><a name="l00399"></a><span class="lineno"> 399</span> </div> +<div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  <span class="keywordtype">int</span> vol = -10000;</div> +<div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  <span class="keywordtype">int</span> vol_aug = -10000;</div> +<div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  <span class="keywordtype">double</span> fraction = output / <a class="code" href="class_drive.html#aea5f11fb1fe6aea7ab1af13c874533e5">thrust</a>;</div> +<div class="line"><a name="l00403"></a><span class="lineno"> 403</span> </div> +<div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < <a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>.<a class="code" href="class_list.html#a802e2aa9aaef248591140fa032d20d61">size</a>(); i++) {</div> +<div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  <a class="code" href="struct_drive_port.html">DrivePort</a>* p = <a class="code" href="class_drive.html#a4e44e7318940f68e2c26854a7b8d878f">ports</a>[i];</div> +<div class="line"><a name="l00406"></a><span class="lineno"> 406</span> </div> +<div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <span class="keywordflow">if</span> (p-><a class="code" href="struct_drive_port.html#aa7de1559102ee263eb970ec4f2cd311e">flare</a>) {</div> +<div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <span class="keywordflow">if</span> (i == 0) {</div> +<div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <span class="keywordflow">if</span> (fraction > 0)</div> +<div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  <a class="code" href="class_drive.html#af6c327bb8e573531aba751736ec54db0">intensity</a> += (float) seconds;</div> +<div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  <span class="keywordflow">else</span></div> +<div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <a class="code" href="class_drive.html#af6c327bb8e573531aba751736ec54db0">intensity</a> -= (float) seconds;</div> +<div class="line"><a name="l00413"></a><span class="lineno"> 413</span> </div> +<div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="comment">// capture volume based on actual output:</span></div> +<div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <a class="code" href="_drive_8cpp.html#a14ae939828dc08f7d526cda68c1800c4">CLAMP</a>(<a class="code" href="class_drive.html#af6c327bb8e573531aba751736ec54db0">intensity</a>, 0.0f, 1.0f);</div> +<div class="line"><a name="l00416"></a><span class="lineno"> 416</span> </div> +<div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#af6c327bb8e573531aba751736ec54db0">intensity</a> > 0.25) {</div> +<div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  vol = (int) ((<a class="code" href="class_drive.html#af6c327bb8e573531aba751736ec54db0">intensity</a> - 1.0) * 10000.0);</div> +<div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  <a class="code" href="_drive_8cpp.html#a14ae939828dc08f7d526cda68c1800c4">CLAMP</a>(vol, -10000, -1500);</div> +<div class="line"><a name="l00420"></a><span class="lineno"> 420</span> </div> +<div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  <span class="keywordflow">if</span> (aug_on && <a class="code" href="class_drive.html#af6c327bb8e573531aba751736ec54db0">intensity</a> > 0.5) {</div> +<div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  vol_aug = (int) ((5 * <a class="code" href="class_drive.html#a23fff540ae1f797191865f0f1cba058b">augmenter_throttle</a> - 1.0) * 10000.0);</div> +<div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  <a class="code" href="_drive_8cpp.html#a14ae939828dc08f7d526cda68c1800c4">CLAMP</a>(vol_aug, -10000, -1000);</div> +<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  }</div> +<div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  }</div> +<div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  }</div> +<div class="line"><a name="l00427"></a><span class="lineno"> 427</span> </div> +<div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  p-><a class="code" href="struct_drive_port.html#aa7de1559102ee263eb970ec4f2cd311e">flare</a>-><a class="code" href="class_sprite.html#a15a534530cd8c3d8096ac4d1ea9d25cd">SetShade</a>(<a class="code" href="class_drive.html#af6c327bb8e573531aba751736ec54db0">intensity</a>);</div> +<div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  }</div> +<div class="line"><a name="l00430"></a><span class="lineno"> 430</span> </div> +<div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  <span class="keywordflow">if</span> (p-><a class="code" href="struct_drive_port.html#afe893f9ca4e38ae950b15d5d5628513f">trail</a>) {</div> +<div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  p-><a class="code" href="struct_drive_port.html#afe893f9ca4e38ae950b15d5d5628513f">trail</a>-><a class="code" href="class_bolt.html#afd236c3d6b28861d5bda094d465a773b">SetShade</a>(<a class="code" href="class_drive.html#af6c327bb8e573531aba751736ec54db0">intensity</a>);</div> +<div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  }</div> +<div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  }</div> +<div class="line"><a name="l00435"></a><span class="lineno"> 435</span> </div> +<div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <a class="code" href="class_camera_director.html">CameraDirector</a>* cam_dir = <a class="code" href="class_camera_director.html#a014c7cad9afe6aa93cbaf9dfd1e5cb60">CameraDirector::GetInstance</a>();</div> +<div class="line"><a name="l00437"></a><span class="lineno"> 437</span> </div> +<div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  <span class="comment">// no sound when paused!</span></div> +<div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <span class="keywordflow">if</span> (!<a class="code" href="class_game.html#a7565bb8df0532d4f1ddc82229d13a016">Game::Paused</a>() && <a class="code" href="class_system.html#a7aa4b04b803a7e2f771a8ec8b4b364e1">subtype</a> != <a class="code" href="class_drive.html#ad78b81f5400c9179e7dec4e7c226cc33ac35bd671bc63f8e51f9542d0ae79e242">STEALTH</a> && cam_dir && cam_dir-><a class="code" href="class_camera_director.html#a061cdee502334ec6b5b252b9033d68ab">GetCamera</a>()) {</div> +<div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  <span class="keywordflow">if</span> (<a class="code" href="class_system.html#ac0b96709476d02805d37c40963224e52">ship</a> && <a class="code" href="class_system.html#ac0b96709476d02805d37c40963224e52">ship</a>-><a class="code" href="class_sim_object.html#aa15b8215840833436f14f22919cf01f5">GetRegion</a>() == <a class="code" href="class_sim.html#a14b48a472bca6d04230c789fc4beab4c">Sim::GetSim</a>()-><a class="code" href="class_sim.html#ad159ce0e0018f3b8d92f8cd96507f2ea">GetActiveRegion</a>()) {</div> +<div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  <span class="keywordflow">if</span> (!<a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a>) {</div> +<div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <span class="keywordtype">int</span> sound_index = 0;</div> +<div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#aea5f11fb1fe6aea7ab1af13c874533e5">thrust</a> > 100)</div> +<div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  sound_index = 2;</div> +<div class="line"><a name="l00445"></a><span class="lineno"> 445</span> </div> +<div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  <span class="keywordflow">if</span> (sound_resource[sound_index])</div> +<div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  <a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a> = sound_resource[sound_index]-><a class="code" href="class_sound.html#a0c637966828cf1c533e2e81777e3db28">Duplicate</a>();</div> +<div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  }</div> +<div class="line"><a name="l00449"></a><span class="lineno"> 449</span> </div> +<div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  <span class="keywordflow">if</span> (aug_on && !<a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a>) {</div> +<div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  <span class="keywordflow">if</span> (sound_resource[1])</div> +<div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  <a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a> = sound_resource[1]-><a class="code" href="class_sound.html#a0c637966828cf1c533e2e81777e3db28">Duplicate</a>();</div> +<div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  }</div> +<div class="line"><a name="l00454"></a><span class="lineno"> 454</span> </div> +<div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  <a class="code" href="struct_point.html">Point</a> cam_loc = cam_dir-><a class="code" href="class_camera_director.html#a061cdee502334ec6b5b252b9033d68ab">GetCamera</a>()-><a class="code" href="class_camera.html#a2a54ce5f1212212653acafa59809ce49">Pos</a>();</div> +<div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <span class="keywordtype">double</span> dist = (<a class="code" href="class_system.html#ac0b96709476d02805d37c40963224e52">ship</a>-><a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>() - cam_loc).length();</div> +<div class="line"><a name="l00457"></a><span class="lineno"> 457</span> </div> +<div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a> && dist < sound->GetMaxDistance()) {</div> +<div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  <span class="keywordtype">long</span> max_vol = <a class="code" href="class_audio_config.html#a97ed1baee55fd31f1fac4a784b67d9b7">AudioConfig::EfxVolume</a>();</div> +<div class="line"><a name="l00460"></a><span class="lineno"> 460</span> </div> +<div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  <span class="keywordflow">if</span> (vol > max_vol)</div> +<div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  vol = max_vol;</div> +<div class="line"><a name="l00463"></a><span class="lineno"> 463</span> </div> +<div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a>) {</div> +<div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  <a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a>-><a class="code" href="class_sound.html#af785bc3312cea95e18a526189afadb3e">SetLocation</a>(<a class="code" href="class_system.html#ac0b96709476d02805d37c40963224e52">ship</a>-><a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>());</div> +<div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  <a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a>-><a class="code" href="class_sound.html#a2efe8c781dd8e065d5cd1cd70e361b7e">SetVolume</a>(vol);</div> +<div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  <a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a>-><a class="code" href="class_sound.html#ae24d17b1583f2080589eb91d350106fc">Play</a>();</div> +<div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  }</div> +<div class="line"><a name="l00469"></a><span class="lineno"> 469</span> </div> +<div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a>) {</div> +<div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  <span class="keywordflow">if</span> (vol_aug > max_vol)</div> +<div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  vol_aug = max_vol;</div> +<div class="line"><a name="l00473"></a><span class="lineno"> 473</span> </div> +<div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  <a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a>-><a class="code" href="class_sound.html#af785bc3312cea95e18a526189afadb3e">SetLocation</a>(<a class="code" href="class_system.html#ac0b96709476d02805d37c40963224e52">ship</a>-><a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>());</div> +<div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  <a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a>-><a class="code" href="class_sound.html#a2efe8c781dd8e065d5cd1cd70e361b7e">SetVolume</a>(vol_aug);</div> +<div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  <a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a>-><a class="code" href="class_sound.html#ae24d17b1583f2080589eb91d350106fc">Play</a>();</div> +<div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  }</div> +<div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  }</div> +<div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00480"></a><span class="lineno"> 480</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a> && <a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a>-><a class="code" href="class_sound.html#a6ff92464b345595dcaa3c50ce5c3e067">IsPlaying</a>())</div> +<div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  <a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a>-><a class="code" href="class_sound.html#a552465dbf8072a7afaa70ac3eeafba91">Stop</a>();</div> +<div class="line"><a name="l00482"></a><span class="lineno"> 482</span> </div> +<div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a> && <a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a>-><a class="code" href="class_sound.html#a6ff92464b345595dcaa3c50ce5c3e067">IsPlaying</a>())</div> +<div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  <a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a>-><a class="code" href="class_sound.html#a552465dbf8072a7afaa70ac3eeafba91">Stop</a>();</div> +<div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  }</div> +<div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  }</div> +<div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a> && <a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a>-><a class="code" href="class_sound.html#a6ff92464b345595dcaa3c50ce5c3e067">IsPlaying</a>())</div> +<div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  <a class="code" href="class_drive.html#ab82d63c1f7b474ded450c349ede8d315">sound</a>-><a class="code" href="class_sound.html#a552465dbf8072a7afaa70ac3eeafba91">Stop</a>();</div> +<div class="line"><a name="l00490"></a><span class="lineno"> 490</span> </div> +<div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  <span class="keywordflow">if</span> (<a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a> && <a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a>-><a class="code" href="class_sound.html#a6ff92464b345595dcaa3c50ce5c3e067">IsPlaying</a>())</div> +<div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  <a class="code" href="class_drive.html#a2fff96055ab308becb1d893edb085615">burner_sound</a>-><a class="code" href="class_sound.html#a552465dbf8072a7afaa70ac3eeafba91">Stop</a>();</div> +<div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  }</div> +<div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  }</div> +<div class="line"><a name="l00495"></a><span class="lineno"> 495</span> </div> +<div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  <span class="keywordflow">return</span> output;</div> +<div class="line"><a name="l00497"></a><span class="lineno"> 497</span> }</div> +</div><!-- fragment --></div><!-- contents --> +</div><!-- doc-content --> +<!-- start footer part --> +<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> + <ul> + <li class="navelem"><a class="el" href="dir_ea1b58c809a5070716d7c602998a95b0.html">Stars45</a></li><li class="navelem"><a class="el" href="_drive_8cpp.html">Drive.cpp</a></li> + <li class="footer">Generated on Tue Jun 5 2012 20:46:52 for Starshatter_Open by + <a href="http://www.doxygen.org/index.html"> + <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1 </li> + </ul> +</div> +</body> +</html> |