mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-11-25 08:12:20 +00:00
37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
|
/*===========================================
|
||
|
GRRLIB (GX Version)
|
||
|
- Template Code -
|
||
|
|
||
|
Minimum Code To Use GRRLIB
|
||
|
============================================*/
|
||
|
#include <grrlib.h>
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
#include <ogc/pad.h>
|
||
|
|
||
|
int main(int argc, char **argv) {
|
||
|
// Initialise the Graphics & Video subsystem
|
||
|
GRRLIB_Init();
|
||
|
|
||
|
// Initialise the GameCube controllers
|
||
|
PAD_Init();
|
||
|
|
||
|
// Loop forever
|
||
|
while(1) {
|
||
|
PAD_ScanPads(); // Scan the GameCube controllers
|
||
|
|
||
|
// If [START/PAUSE] was pressed on the first GameCube controller, break out of the loop
|
||
|
if (PAD_ButtonsDown(0) & PAD_BUTTON_START) 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
|
||
|
|
||
|
exit(0); // Use exit() to exit a program, do not use 'return' from main()
|
||
|
}
|