SuperSpaceInvaderTurboApoca.../doc/SAE102-SpaceInvaders/html/d2/ddb/class_my_sprite.html
2022-01-11 15:45:50 +01:00

203 lines
11 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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=11"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SUPER Space invader : Turbo edition DX - VS GOD: MySprite Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></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 id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../LOGO.png"/></td>
<td id="projectalign">
<div id="projectname">SUPER Space invader : Turbo edition DX - VS GOD<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">A simple space invader ripoff</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d2/ddb/class_my_sprite.html','../../'); initResizable(); });
/* @license-end */
</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)">
</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="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="../../dc/d22/class_my_sprite-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">MySprite Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="../../dc/d77/my_sprite_8h_source.html">mySprite.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:adbc71a279bb938c9397f4c353fc0e831"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d5/d60/utils_8h.html#a7a271d55f100974f7703690edbaca2e2">Task</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/ddb/class_my_sprite.html#adbc71a279bb938c9397f4c353fc0e831">asyncLoad</a> (const string &amp;fname)</td></tr>
<tr class="memdesc:adbc71a279bb938c9397f4c353fc0e831"><td class="mdescLeft">&#160;</td><td class="mdescRight">load a sprite asynchronously <a href="../../d2/ddb/class_my_sprite.html#adbc71a279bb938c9397f4c353fc0e831">More...</a><br /></td></tr>
<tr class="separator:adbc71a279bb938c9397f4c353fc0e831"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac80878b9bd025226a903705d3b8df9ae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/ddb/class_my_sprite.html#ac80878b9bd025226a903705d3b8df9ae">mirror</a> (<a class="el" href="../../d2/ddb/class_my_sprite.html">MySprite</a> &amp;msp)</td></tr>
<tr class="memdesc:ac80878b9bd025226a903705d3b8df9ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mirror a sprite pixel data into this one. <a href="../../d2/ddb/class_my_sprite.html#ac80878b9bd025226a903705d3b8df9ae">More...</a><br /></td></tr>
<tr class="separator:ac80878b9bd025226a903705d3b8df9ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ab5c268ae1f1082535dc15dc163910794"><td class="memItemLeft" align="right" valign="top">optional&lt; nsGui::Sprite &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/ddb/class_my_sprite.html#ab5c268ae1f1082535dc15dc163910794">sp</a></td></tr>
<tr class="memdesc:ab5c268ae1f1082535dc15dc163910794"><td class="mdescLeft">&#160;</td><td class="mdescRight">optional actual Sprite We need to use an optional to init the object through a function, that can be used with std::async mutable because for some reason MinGL stores a Vec2D with the pixel data, so we modify it each time we need to draw it Else, we could copy the Sprite each time, but copying a bunch of images each frame doesn't seems like a good idea <a href="../../d2/ddb/class_my_sprite.html#ab5c268ae1f1082535dc15dc163910794">More...</a><br /></td></tr>
<tr class="separator:ab5c268ae1f1082535dc15dc163910794"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock">
<p class="definition">Definition at line <a class="el" href="../../dc/d77/my_sprite_8h_source.html#l00011">11</a> of file <a class="el" href="../../dc/d77/my_sprite_8h_source.html">mySprite.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="adbc71a279bb938c9397f4c353fc0e831" name="adbc71a279bb938c9397f4c353fc0e831"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adbc71a279bb938c9397f4c353fc0e831">&#9670;&nbsp;</a></span>asyncLoad()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d5/d60/utils_8h.html#a7a271d55f100974f7703690edbaca2e2">Task</a> MySprite::asyncLoad </td>
<td>(</td>
<td class="paramtype">const string &amp;&#160;</td>
<td class="paramname"><em>fname</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>load a sprite asynchronously </p>
<dl class="section return"><dt>Returns</dt><dd>An async task of the loading action </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d0/dc7/my_sprite_8cpp_source.html#l00004">4</a> of file <a class="el" href="../../d0/dc7/my_sprite_8cpp_source.html">mySprite.cpp</a>.</p>
</div>
</div>
<a id="ac80878b9bd025226a903705d3b8df9ae" name="ac80878b9bd025226a903705d3b8df9ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac80878b9bd025226a903705d3b8df9ae">&#9670;&nbsp;</a></span>mirror()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void MySprite::mirror </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d2/ddb/class_my_sprite.html">MySprite</a> &amp;&#160;</td>
<td class="paramname"><em>msp</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Mirror a sprite pixel data into this one. </p>
<p class="definition">Definition at line <a class="el" href="../../d0/dc7/my_sprite_8cpp_source.html#l00011">11</a> of file <a class="el" href="../../d0/dc7/my_sprite_8cpp_source.html">mySprite.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="ab5c268ae1f1082535dc15dc163910794" name="ab5c268ae1f1082535dc15dc163910794"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab5c268ae1f1082535dc15dc163910794">&#9670;&nbsp;</a></span>sp</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">optional&lt;nsGui::Sprite&gt; MySprite::sp</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">mutable</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>optional actual Sprite We need to use an optional to init the object through a function, that can be used with std::async mutable because for some reason MinGL stores a Vec2D with the pixel data, so we modify it each time we need to draw it Else, we could copy the Sprite each time, but copying a bunch of images each frame doesn't seems like a good idea </p>
<p class="definition">Definition at line <a class="el" href="../../dc/d77/my_sprite_8h_source.html#l00020">20</a> of file <a class="el" href="../../dc/d77/my_sprite_8h_source.html">mySprite.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>headers/<a class="el" href="../../dc/d77/my_sprite_8h_source.html">mySprite.h</a></li>
<li>src/<a class="el" href="../../d0/dc7/my_sprite_8cpp_source.html">mySprite.cpp</a></li>
</ul>
</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="../../d2/ddb/class_my_sprite.html">MySprite</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>
</html>