diff --git a/changelog.txt b/changelog.txt index 5ebd897..8daabb9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,7 +1,8 @@ ZEngine Version Log for Version 0.8.3 -$Id: changelog.txt,v 1.32 2003/04/27 21:50:43 cozman Exp $ +$Id: changelog.txt,v 1.33 2003/04/27 22:49:14 cozman Exp $ 0.8.3 + -Added Random Number generation to the ZEngine singleton. -Fixed project files for people who don't want to add ZEngine to their path. -Altered layout of some of the header files to hopefully be more readable. -Fixed minor bugs in ZImage, allowing Gewi to work properly. diff --git a/include/ZE_ZEngine.h b/include/ZE_ZEngine.h index 843848d..78bb445 100644 --- a/include/ZE_ZEngine.h +++ b/include/ZE_ZEngine.h @@ -13,7 +13,7 @@ File: ZE_ZEngine.h
Description: Header file for ZEngine class, the core of the ZEngine.
Author(s): James Turk
-$Id: ZE_ZEngine.h,v 1.22 2003/04/27 21:50:47 cozman Exp $
+$Id: ZE_ZEngine.h,v 1.23 2003/04/27 22:49:14 cozman Exp $
\file ZE_ZEngine.h \brief Definition file for core ZEngine class. @@ -566,60 +566,6 @@ class ZEngine **/ void FlushErrors(); - //////////////////////////// - //Random Number Generation// - //////////////////////////// - /*! - \brief Seed random number generator. - - Reseed Mersenne Twister (MT19937) random number generator. NOTE: Generator is initialized upon creation of ZEngine using time. - (Faster and more random than rand(), see src/external/mt19937ar.c) - \since 0.8.3 - \param seed Seed for random sequence. - **/ - void SeedRandom(unsigned long seed); - - /*! - \brief Obtain random integer [0,max). - - Obtain random long l where 0 <= l < max. - \since 0.8.3 - \param max Limit for random number. - \return Random unsigned long. - **/ - unsigned long RandLong(unsigned long max); - - /*! - \brief Obtain random integer [min,max]. - - Obtain random long l where min <= l <= max. - \since 0.8.3 - \param min Lower limit for random number. - \param max Upper limit for random number. - \return Random long. - **/ - long RandLong(long min, long max); - - /*! - \brief Obtain random double [0,1). - - Obtain random double d where 0 <= d < 1. - \since 0.8.3 - \return Random double [0,1). - **/ - double RandDouble(); - - /*! - \brief Obtain random double [min,max]. - - Obtain random double d where min <= d <= max. - \since 0.8.3 - \param min Lower limit for random number. - \param max Upper limit for random number. - \return Random double [min,max]. - **/ - double RandDouble(double min, double max); - //////////////////////////// //Data Loading + Unloading// //////////////////////////// diff --git a/src/ZE_ZEngine.cpp b/src/ZE_ZEngine.cpp index f73d3a8..8652dd6 100644 --- a/src/ZE_ZEngine.cpp +++ b/src/ZE_ZEngine.cpp @@ -13,7 +13,7 @@ File: ZE_ZEngine.cpp
Description: Implementation source file for ZEngine library main singleton class.
Author(s): James Turk
-$Id: ZE_ZEngine.cpp,v 1.36 2003/04/27 22:05:25 cozman Exp $
+$Id: ZE_ZEngine.cpp,v 1.37 2003/04/27 22:49:14 cozman Exp $
\file ZE_ZEngine.cpp \brief Central source file for ZEngine. @@ -645,7 +645,7 @@ unsigned long ZEngine::RandLong(unsigned long max) long ZEngine::RandLong(long min, long max) { - return min + genrand_int32()%(max-min); + return min + genrand_int32()%(max-min+1); } double ZEngine::RandDouble() diff --git a/vc6/ZEngine.dsp b/vc6/ZEngine.dsp index d61ff42..17d1421 100755 --- a/vc6/ZEngine.dsp +++ b/vc6/ZEngine.dsp @@ -122,6 +122,10 @@ SOURCE=..\src\ZE_ZTimer.cpp # End Source File # Begin Source File +SOURCE=..\src\external\mt19937ar.cpp +# End Source File +# Begin Source File + SOURCE=..\src\external\physfsrwops.cpp # End Source File # End Group @@ -194,6 +198,10 @@ SOURCE=..\include\ZEngine.h # End Source File # Begin Source File +SOURCE=..\include\external\mt19937ar.h +# End Source File +# Begin Source File + SOURCE=..\include\external\physfsrwops.h # End Source File # End Group