2020-10-17 03:08:44 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2020-07-05 03:37:29 +00:00
< 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" / >
2020-10-17 03:08:44 +00:00
< meta name = "generator" content = "Doxygen 1.8.17" / >
2020-07-05 03:37:29 +00:00
< 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
2021-03-06 03:56:59 +00:00
  < span id = "projectnumber" > 4.4.1< / span >
2020-07-05 03:37:29 +00:00
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
2020-10-17 03:08:44 +00:00
<!-- Generated by Doxygen 1.8.17 -->
2020-07-05 03:37:29 +00:00
< script type = "text/javascript" >
2020-10-17 03:08:44 +00:00
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
2020-07-05 03:37:29 +00:00
var searchBox = new SearchBox("searchBox", "search",false,'Search');
2020-10-17 03:08:44 +00:00
/* @license-end */
2020-07-05 03:37:29 +00:00
< / script >
< script type = "text/javascript" src = "menudata.js" > < / script >
< script type = "text/javascript" src = "menu.js" > < / script >
< script type = "text/javascript" >
2020-10-17 03:08:44 +00:00
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
2020-07-05 03:37:29 +00:00
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
2020-10-17 03:08:44 +00:00
/* @license-end */< / script >
2020-07-05 03:37:29 +00:00
< 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 >
2020-10-17 03:08:44 +00:00
< 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 -->
< div class = "ttc" id = "agrrlib_8h_html" > < div class = "ttname" > < a href = "grrlib_8h.html" > grrlib.h< / a > < / div > < / div >
2021-03-21 18:20:01 +00:00
< 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:219< / div > < / div >
2020-10-17 03:08:44 +00:00
< 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:408< / div > < / div >
2021-03-21 18:20:01 +00:00
< 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 >
2020-07-05 03:37:29 +00:00
<!-- 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" / >
2020-10-17 03:08:44 +00:00
< / a > 1.8.17
2020-07-05 03:37:29 +00:00
< / small > < / address >
< / body >
< / html >