mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-11-22 06:52:20 +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>
|
#include <wiiuse/wpad.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
u32 WPADDown;
|
// Initialise the Graphics & Video subsystem
|
||||||
|
|
||||||
GRRLIB_Init();
|
GRRLIB_Init();
|
||||||
|
|
||||||
|
// Initialise the Wiimotes
|
||||||
WPAD_Init();
|
WPAD_Init();
|
||||||
|
|
||||||
|
// Loop forever
|
||||||
while(1) {
|
while(1) {
|
||||||
WPAD_ScanPads();
|
|
||||||
WPADDown = WPAD_ButtonsDown(0);
|
|
||||||
|
|
||||||
GRRLIB_Render();
|
WPAD_ScanPads(); // Scan the wiimotes
|
||||||
if(WPADDown & WPAD_BUTTON_HOME) {
|
|
||||||
break;
|
// 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
|
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