mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-12-22 18:39:18 +00:00
Added extra documentation to template code
This commit is contained in:
parent
bb50452422
commit
6120bbd7c3
1 changed files with 17 additions and 9 deletions
|
@ -10,20 +10,28 @@
|
|||
#include <wiiuse/wpad.h>
|
||||
|
||||
int main() {
|
||||
u32 WPADDown;
|
||||
|
||||
// Initialise the Graphics & Video subsystem
|
||||
GRRLIB_Init();
|
||||
|
||||
// Initialise the Wiimotes
|
||||
WPAD_Init();
|
||||
|
||||
// Loop forever
|
||||
while(1) {
|
||||
WPAD_ScanPads();
|
||||
WPADDown = WPAD_ButtonsDown(0);
|
||||
|
||||
GRRLIB_Render();
|
||||
if(WPADDown & WPAD_BUTTON_HOME) {
|
||||
break;
|
||||
}
|
||||
WPAD_ScanPads(); // Scan the wiimotes
|
||||
|
||||
// If [HOME] was pressed on the first Wiimote, break out of the loop
|
||||
if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) break ;
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Place your drawing code here
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
GRRLIB_Render(); // Render the frame buffer to the TV
|
||||
}
|
||||
|
||||
GRRLIB_Exit(); // Be a good boy, clear the memory allocated by GRRLIB
|
||||
return 0;
|
||||
|
||||
exit(0); // Use exit() to exit a program, do not use 'return' from main()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue