1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| int main(void )
{
KWindow *gamewindow = NULL;
KSound2 *music;
KGraphic *menupicture;
gamewindow = KPTK::createKWindow(K_OPENGL);
gamewindow -> createGameWindow(800, 600, 32, true, "Koko Banjo");
menupicture = KPTK::createKGraphic();
menupicture -> loadPicture(KMiscTools::makeFilePath("menufont.tga"),true,true);
menupicture -> blitRect( 0,0,800,600,0,0 );
snd_music = new KSound2;
snd_music -> loadStream("menu.ogg" , true, 0.5f);
snd_music -> playStream();
do
{
//KWindow::processEvents( ) ;
gamewindow -> setDefaultWorldView();
// ... render
gamewindow -> flipBackBuffer();
} while ( gamewindow -> isQuit() == false );
gamewindow -> terminate();
delete music;
delete gamewindow;
return 0;
} |
Partager