int main(int argc,char **argv) { // initialize RAIN and write name of server puts(RainInit()); // do we have anything to play? if(argc<2) {puts("No soundfile to play.");return 1;} // hook our function that will be called each time some sound ends ReportEnd=OurReportEnd; // start playing sound ourSoundHandle=RainPlay(argv[1],0,0,0/*no loop*/,64/*volume*/,0/*panning*/); // repeat until sound end or user abort do { RainPoll(); } while(!ourSoundEnded && !kbhit()); // clear keypresses while(kbhit()) getch(); return 0; }
/* * D3DParticlesInit: Sets up particle emitters for all particle systems. */ void D3DParticlesInit(bool reset) { int height = PlayerGetHeight(); // Delete existing emitters if necessary, create new emitters. SandstormInit(); RainInit(); SnowInit(); FireworksInit(); if (reset) { // Sets where the player is - must be done after emitter creation. D3DParticleSystemSetPlayerPos((float)player.x, (float)player.y, (float)height); } }