Added extra documentation to template code

This commit is contained in:
csBlueChip 2009-08-23 14:59:48 +00:00
parent bb50452422
commit 6120bbd7c3

View file

@ -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()
}