mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-11-22 06:52:20 +00:00
75 lines
5.8 KiB
HTML
75 lines
5.8 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.13"/>
|
|
<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 style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">GRRLIB
|
|
 <span id="projectnumber">4.4.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.13 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
</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">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</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.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 name="a0"></a><a class="code" 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 name="a1"></a><a class="code" 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 name="a2"></a><a class="code" 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><!-- fragment --> </div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.13
|
|
</small></address>
|
|
</body>
|
|
</html>
|