/[enigma]/enigma/src/video.cc
ViewVC logotype

Diff of /enigma/src/video.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by dheck, Wed Jun 18 18:19:20 2003 UTC revision 1.7 by dheck, Thu Jun 26 17:25:52 2003 UTC
# Line 643  video::FX_Push (Surface *newscr, int ori Line 643  video::FX_Push (Surface *newscr, int ori
643      scr->flush_updates();      scr->flush_updates();
644  }  }
645    
 /* Returns a random number between a and b (inclusive). */  
 static int  
 irand(int a, int b)  
 {  
     int r = int((b-a+1) * (rand()/(RAND_MAX+1.0)));  
     return r+a;  
 }  
   
646  void  void
647  video::ShowScreen (TransitionModes tm, Surface *newscr)  video::ShowScreen (TransitionModes tm, Surface *newscr)
648  {  {
# Line 673  video::ShowScreen (TransitionModes tm, S Line 665  video::ShowScreen (TransitionModes tm, S
665          {          {
666              int xo=0, yo=0;              int xo=0, yo=0;
667              while (xo==0 && yo==0) {              while (xo==0 && yo==0) {
668                  xo = irand(-1,1)*scrw;                  xo = enigma::IntegerRand(-1,1)*scrw;
669                  yo = irand(-1,1)*scrh;                  yo = enigma::IntegerRand(-1,1)*scrh;
670              }              }
671              FX_Push (newscr, xo, yo);              FX_Push (newscr, xo, yo);
672          }          }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26