mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-11-10 10:22:20 +00:00
124 lines
7.6 KiB
HTML
124 lines
7.6 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" lang="en-US">
|
|
<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.6"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>GRRLIB: template/source/main.c</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/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="projectalign">
|
|
<div id="projectname">GRRLIB<span id="projectnumber"> 4.4.1</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.6 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "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&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 -->
|
|
<!-- 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">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="headertitle"><div class="title">template/source/main.c</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<p>This example shows the minimum code required to use GRRLIB.</p>
|
|
<p>This example shows the minimum code required to use GRRLIB.It could be used as a template to start a new project. More elaborate examples can be found inside the <em>examples</em> folder.</p>
|
|
<div class="fragment"><div class="line"><span class="comment">/*===========================================</span></div>
|
|
<div class="line"><span class="comment"> GRRLIB (GX Version)</span></div>
|
|
<div class="line"><span class="comment"> - Template Code -</span></div>
|
|
<div class="line"><span class="comment"></span> </div>
|
|
<div class="line"><span class="comment"> Minimum Code To Use GRRLIB</span></div>
|
|
<div class="line"><span class="comment">============================================*/</span></div>
|
|
<div class="line"><span class="preprocessor">#include <<a class="code" href="grrlib_8h.html">grrlib.h</a>></span></div>
|
|
<div class="line"> </div>
|
|
<div class="line"><span class="preprocessor">#include <stdlib.h></span></div>
|
|
<div class="line"><span class="preprocessor">#include <wiiuse/wpad.h></span></div>
|
|
<div class="line"> </div>
|
|
<div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv) {</div>
|
|
<div class="line"> <span class="comment">// Initialise the Graphics & Video subsystem</span></div>
|
|
<div class="line"> <a id="a0" name="a0"></a><a class="code hl_function" href="group___all_func.html#gad3186c7e10e4e6c46a743e062971e89a">GRRLIB_Init</a>();</div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <span class="comment">// Initialise the Wiimotes</span></div>
|
|
<div class="line"> WPAD_Init();</div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <span class="comment">// Loop forever</span></div>
|
|
<div class="line"> <span class="keywordflow">while</span>(1) {</div>
|
|
<div class="line"> </div>
|
|
<div class="line"> WPAD_ScanPads(); <span class="comment">// Scan the Wiimotes</span></div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <span class="comment">// If [HOME] was pressed on the first Wiimote, break out of the loop</span></div>
|
|
<div class="line"> <span class="keywordflow">if</span> (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) <span class="keywordflow">break</span>;</div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <span class="comment">// ---------------------------------------------------------------------</span></div>
|
|
<div class="line"> <span class="comment">// Place your drawing code here</span></div>
|
|
<div class="line"> <span class="comment">// ---------------------------------------------------------------------</span></div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <a id="a1" name="a1"></a><a class="code hl_function" href="group___all_func.html#ga9840a19154f1e0cf9de14ad81ba23aef">GRRLIB_Render</a>(); <span class="comment">// Render the frame buffer to the TV</span></div>
|
|
<div class="line"> }</div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <a id="a2" name="a2"></a><a class="code hl_function" href="group___all_func.html#ga15b1f7d9224e25e77d2806847344f651">GRRLIB_Exit</a>(); <span class="comment">// Be a good boy, clear the memory allocated by GRRLIB</span></div>
|
|
<div class="line"> </div>
|
|
<div class="line"> exit(0); <span class="comment">// Use exit() to exit a program, do not use 'return' from main()</span></div>
|
|
<div class="line">}</div>
|
|
<div class="ttc" id="agroup___all_func_html_ga15b1f7d9224e25e77d2806847344f651"><div class="ttname"><a href="group___all_func.html#ga15b1f7d9224e25e77d2806847344f651">GRRLIB_Exit</a></div><div class="ttdeci">void GRRLIB_Exit(void)</div><div class="ttdoc">Call this before exiting your application.</div><div class="ttdef"><b>Definition:</b> GRRLIB_core.c:221</div></div>
|
|
<div class="ttc" id="agroup___all_func_html_ga9840a19154f1e0cf9de14ad81ba23aef"><div class="ttname"><a href="group___all_func.html#ga9840a19154f1e0cf9de14ad81ba23aef">GRRLIB_Render</a></div><div class="ttdeci">void GRRLIB_Render(void)</div><div class="ttdoc">Call this function after drawing.</div><div class="ttdef"><b>Definition:</b> GRRLIB_render.c:407</div></div>
|
|
<div class="ttc" id="agroup___all_func_html_gad3186c7e10e4e6c46a743e062971e89a"><div class="ttname"><a href="group___all_func.html#gad3186c7e10e4e6c46a743e062971e89a">GRRLIB_Init</a></div><div class="ttdeci">int GRRLIB_Init(void)</div><div class="ttdoc">Initialize GRRLIB.</div><div class="ttdef"><b>Definition:</b> GRRLIB_core.c:53</div></div>
|
|
<div class="ttc" id="agrrlib_8h_html"><div class="ttname"><a href="grrlib_8h.html">grrlib.h</a></div><div class="ttdoc">GRRLIB user include file.</div></div>
|
|
</div><!-- fragment --> </div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
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.6
|
|
</small></address>
|
|
</body>
|
|
</html>
|