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">
2023-02-05 19:26:26 +00:00
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en-US" >
2020-07-05 03:37:29 +00:00
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
2023-02-05 19:26:26 +00:00
< meta http-equiv = "X-UA-Compatible" content = "IE=11" / >
2024-10-19 21:12:30 +00:00
< meta name = "generator" content = "Doxygen 1.12.0" / >
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 >
2024-01-09 04:33:10 +00:00
< script type = "text/javascript" src = "clipboard.js" > < / script >
2024-10-19 21:12:30 +00:00
< link href = "navtree.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "resize.js" > < / script >
2024-01-09 04:33:10 +00:00
< script type = "text/javascript" src = "cookie.js" > < / script >
2020-07-05 03:37:29 +00:00
< 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 >
2023-02-05 19:26:26 +00:00
< tr id = "projectrow" >
< td id = "projectalign" >
2024-03-02 05:40:02 +00:00
< div id = "projectname" > GRRLIB< span id = "projectnumber" >   4.5.1< / span >
2020-07-05 03:37:29 +00:00
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
2024-10-19 21:12:30 +00:00
<!-- Generated by Doxygen 1.12.0 -->
2020-07-05 03:37:29 +00:00
< script type = "text/javascript" >
2023-02-05 19:26:26 +00:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
2020-10-17 03:08:44 +00:00
/* @license-end */
2020-07-05 03:37:29 +00:00
< / script >
2024-10-19 21:12:30 +00:00
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
< / script >
2020-07-05 03:37:29 +00:00
< script type = "text/javascript" src = "menudata.js" > < / script >
< script type = "text/javascript" src = "menu.js" > < / script >
< script type = "text/javascript" >
2023-02-05 19:26:26 +00:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
2020-07-05 03:37:29 +00:00
$(function() {
2024-10-19 21:12:30 +00:00
initMenu('',true,false,'search.php','Search',false);
2024-01-09 04:33:10 +00:00
$(function() { init_search(); });
2020-07-05 03:37:29 +00:00
});
2023-02-05 19:26:26 +00:00
/* @license-end */
< / script >
2020-07-05 03:37:29 +00:00
< div id = "main-nav" > < / div >
< / div > <!-- top -->
2024-10-19 21:12:30 +00:00
< div id = "doc-content" >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
< / script >
2020-07-05 03:37:29 +00:00
<!-- 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" >
2023-02-05 19:26:26 +00:00
< 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 >
2020-07-05 03:37:29 +00:00
< / div >
< div class = "header" >
2023-02-05 19:26:26 +00:00
< div class = "headertitle" > < div class = "title" > template/source/main.c< / div > < / div >
2020-07-05 03:37:29 +00:00
< / div > <!-- header -->
< div class = "contents" >
2023-02-05 19:26:26 +00:00
< p > This example shows the minimum code required to use GRRLIB.< / p >
2020-07-05 03:37:29 +00:00
< 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 >
2023-02-05 19:26:26 +00:00
< div class = "line" > < a id = "a0" name = "a0" > < / a > < a class = "code hl_function" href = "group___all_func.html#gad3186c7e10e4e6c46a743e062971e89a" > GRRLIB_Init< / a > ();< / div >
2020-10-17 03:08:44 +00:00
< 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 >
2023-02-05 19:26:26 +00:00
< 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 >
2020-10-17 03:08:44 +00:00
< div class = "line" > }< / div >
< div class = "line" > < / div >
2023-02-05 19:26:26 +00:00
< 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 >
2020-10-17 03:08:44 +00:00
< 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 >
2023-08-28 15:37:26 +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: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 >
2022-05-27 07:05:59 +00:00
< 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 -->
2020-07-05 03:37:29 +00:00
<!-- start footer part -->
< hr class = "footer" / > < address class = "footer" > < small >
2024-10-19 21:12:30 +00:00
Generated by  < a href = "https://www.doxygen.org/index.html" > < img class = "footer" src = "doxygen.svg" width = "104" height = "31" alt = "doxygen" / > < / a > 1.12.0
2020-07-05 03:37:29 +00:00
< / small > < / address >
2024-10-19 21:12:30 +00:00
< / div > <!-- doc - content -->
2020-07-05 03:37:29 +00:00
< / body >
< / html >