seeding the random number generator based on the time

git-svn-id: svn://anubis/anaglym/trunk@116 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
Josh Holtrop 2009-10-20 18:09:08 +00:00
parent e1281bde17
commit ebb8667962

View File

@ -3,7 +3,7 @@
#include "anaglym.h" #include "anaglym.h"
#include "Engine.h" #include "Engine.h"
#include "SDL.h" #include "SDL.h"
#include <stdlib.h> /* exit() */ #include <stdlib.h> /* exit(), srand() */
#include <iostream> #include <iostream>
#include <string> #include <string>
using namespace std; using namespace std;
@ -69,6 +69,8 @@ int main(int argc, char * argv[])
usage(); usage();
} }
srand(time(NULL));
Video video; Video video;
video.start(width, height, fullscreen, grab_input); video.start(width, height, fullscreen, grab_input);