problems with grrlib buffer August 31, 2010 07:53AM | Registered: 13 years ago Posts: 12 |
#includeEDIT: The headers I included are: grrlib.h, stdlib.h. ogcsys.h, gccore.h, wiiuse/wpad.h, ogc/lwp.h, uninstd.h, malloc.h#include #include #include #include #include #include #include #include "player.h" extern u16 *GRRLIB_buffer; int main(int argc, char **argv) { GRRLIB_buffer = (u16 *)malloc(256*240*2); // Initialise the Graphics & Video subsystem GRRLIB_Init(); // Initialise the Wiimotes WPAD_Init(); objOscar Oscar; // Loop forever while(1) { GRRLIB_FillScreen(0x00f0); 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) exit(0);//break; // --------------------------------------------------------------------- // Place your drawing code here // --------------------------------------------------------------------- //Oscar.update(); Oscar.draw(); Oscar.moving(); 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() }
Re: problems with grrlib buffer August 31, 2010 03:31PM | Registered: 15 years ago Posts: 175 |