Libwiisprite help September 01, 2008 01:48PM | Registered: 16 years ago Posts: 211 |
#include#include #include #include #include #include #include #include #include #include "menu.h" using namespace wsp; GameWindow gameWindow; Sprite sprite; Image image; //--------------------------------------------------------------------------------- int main(int argc, char **argv) { //--------------------------------------------------------------------------------- fatInitDefault(); gameWindow.InitVideo(); LayerManager manager(1); if(image.LoadImage("data/menu_screen.png") != IMG_LOAD_ERROR_NONE)exit(0); sprite.SetImage(&image); sprite.SetPosition(0, 0); manager.Append(&sprite); PAD_Init(); WPAD_Init(); while (1) { WPAD_ScanPads(); u32 pressed = WPAD_ButtonsHeld(WPAD_CHAN_0); if ( pressed & WPAD_BUTTON_HOME ) exit(0); manager.Draw(0, 0); gameWindow.Flush(); } // flush WPAD and video systems then exist to HBC WPAD_Flush(WPAD_CHAN_ALL); WPAD_Disconnect(WPAD_CHAN_ALL); WPAD_Shutdown(); if (gameWindow.IsInitialized()) gameWindow.StopVideo(); gameWindow.Flush(); exit(0); return 0; }
Re: Libwiisprite help September 05, 2008 07:18PM | Registered: 16 years ago Posts: 3 |
Re: Libwiisprite help September 06, 2008 01:46AM | Registered: 16 years ago Posts: 211 |