Replaced rand()/srand() with RandomSource. Of course, util_getRandom() is a

pretty unnecessary function - we could call RandomSource directly - but
let's take this one thing at a time.

svn-id: r17863
This commit is contained in:
Torbjörn Andersson 2005-04-29 15:01:03 +00:00
parent 9bd7d78199
commit 5a2d871a2b
3 changed files with 2 additions and 3 deletions

View file

@ -51,7 +51,7 @@ public:
void shutdown();
Common::RandomSource _rnd;
};
extern GobEngine *_vm;

View file

@ -68,7 +68,6 @@ void init_soundVideo(int32 smallHeap, int16 flag) {
videoMode);
pFileHandler = 0;
srand(0);
//if ((flag & 4) == 0)
// vid_findVideo();

View file

@ -126,7 +126,7 @@ int16 util_checkKey(void) {
}
int16 util_getRandom(int16 max) {
return ((int32)rand() * max) / (RAND_MAX + 1);
return _vm->_rnd.getRandomNumber(max - 1);
}
void util_processInput() {