2009-02-13 00:23:20 +00:00
|
|
|
/*===========================================
|
2009-03-11 17:23:41 +00:00
|
|
|
GRRLIB (GX Version)
|
|
|
|
- Template Code -
|
2009-02-13 00:23:20 +00:00
|
|
|
|
|
|
|
Minimum Code To Use GRRLIB
|
|
|
|
============================================*/
|
2009-08-20 22:05:44 +00:00
|
|
|
#include <grrlib.h>
|
2009-02-13 00:23:20 +00:00
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <wiiuse/wpad.h>
|
|
|
|
|
|
|
|
int main() {
|
2009-08-23 14:59:48 +00:00
|
|
|
// Initialise the Graphics & Video subsystem
|
2009-02-13 00:23:20 +00:00
|
|
|
GRRLIB_Init();
|
2009-08-23 14:59:48 +00:00
|
|
|
|
|
|
|
// Initialise the Wiimotes
|
2009-02-13 00:23:20 +00:00
|
|
|
WPAD_Init();
|
|
|
|
|
2009-08-23 14:59:48 +00:00
|
|
|
// Loop forever
|
2009-02-13 00:23:20 +00:00
|
|
|
while(1) {
|
|
|
|
|
2009-08-23 14:59:48 +00:00
|
|
|
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
|
2009-02-13 00:23:20 +00:00
|
|
|
}
|
2009-08-23 14:59:48 +00:00
|
|
|
|
2009-02-13 00:23:20 +00:00
|
|
|
GRRLIB_Exit(); // Be a good boy, clear the memory allocated by GRRLIB
|
2009-08-23 14:59:48 +00:00
|
|
|
|
|
|
|
exit(0); // Use exit() to exit a program, do not use 'return' from main()
|
2009-02-13 00:23:20 +00:00
|
|
|
}
|