Path: chuka.playstation.co.uk!news From: "Greg Cook" Newsgroups: scee.yaroze.freetalk.english Subject: Basic beginner questions Date: Sun, 12 May 2002 10:20:28 +1200 Organization: PlayStation Net Yaroze (SCEE) Lines: 95 Message-ID: NNTP-Posting-Host: 203-96-148-202.apx1.paradise.net.nz X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Hi Guys, well i feel so far behind, i see people releasing invaders and and other games, and yet im just starting out, anyway can anyone help with this. The aim of my code is to start with a blank screen, then fade into the yaroze sceen logo and then puase for a few seconds and then fade out to black. Now im still a little confused as to how all the vsyncs ect work, and when you actually use them, previously i tried a loop like matt wrote in my previous post and i didnt see any of the fade effects, one second the logo was there, and then the next it was gone. Anyways ive posted some of my first yaroze code, can anyone help me with this. thanks This is just the main loop, the graphics do appear on the screen no worries. void main (void) { int vsync = 0; // vertical screen sync int BufferIndex; // buffer index int frame; Initialise(); InitSprite((u_long *)YAROZE_SCENE_ADD); BufferIndex = GsGetActiveBuff(); // Returns either 1 or 0, GameState = RUNNING; while(GameState) // Check that we are still playing the game { switch(GameState) { case RUNNING: // The Normal GamePlay break; case TITLESCREEN: // The TitleScreen for(frame=0;frame<=60; frame++) { sprite.r -= 1; sprite.g -= 1; sprite.b -= 1; VSync(0); } GameState = RUNNING; break; case PAUSE: // Pause Command break; case GAMEOVER: // GameOver break; } DealWithPad(); GsSetWorkBase((PACKET*)packetArea[BufferIndex]); GsClearOt(0, 0, &WorldOT[BufferIndex]); //clear out the present OT ready for drawing // now lets set up the image GsSortFastSprite(&sprite,&WorldOT[BufferIndex],0); // register the sprite in the ordering table DrawSync(0); vsync = VSync(1); VSync(0); // get the vertical sync interval FntPrint("HSYNC: %d\n", vsync); ResetGraph(1); GsSwapDispBuff(); GsSortClear(0, 0, 0, &WorldOT[BufferIndex]); GsDrawOt(&WorldOT[BufferIndex]); // draw the current off screen buffer to the screen BufferIndex = BufferIndex^1; // change side to 1 or 0 FntFlush(-1); // print all font calls } ResetGraph(0); }