gemrb/gemrb — pull request #17 by VanNostrand (2014-03-20 12:10:53+00:00)
Title: New RNG

Here is the new RNG I talked about in the forums and I also replaced all rand() calls from gemrb core to use the new RNG:
```
rand % foo becomes RAND(0, foo-1)
rand & foo becomes RAND(0, foo)
```
I'd also like to replace the following rand() calls from the plugins:
```
./gemrb/plugins/CREImporter/CREImporter.cpp: stat=randcolors[i][rand()%RandRows];
./gemrb/plugins/CREImporter/CREImporter.cpp: stat=randcolors[i][rand()%RandRows];
./gemrb/plugins/FXOpcodes/FXOpcodes.cpp: fx->Parameter1 = rndstr->at(rand()%rndstr->size());
./gemrb/plugins/GUIScript/GUIScript.cpp: int i=rand()%5;
./gemrb/plugins/GUIScript/GUIScript.cpp: if (rand()%100 >= percent) {
./gemrb/plugins/OpenALAudio/AmbientMgrAL.cpp: int index = rand() % soundrefs.size();
./gemrb/plugins/PSTOpcodes/PSTOpcodes.cpp: ieWord tmp =(ieWord) rand();
```
but as soon as I do it, I get undefined references to the RNG class from the linker, though it is included in libgem_core.so after building. This is probably a CMake thing.