fix legacymenu.cpp for build on windows by Joe
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4823 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 64beae4d839c93c3bcc49d82c57be3cce8c42b55 Former-commit-id: 99351cc58dcd8944a628c3aee354fa1092f87d9c
This commit is contained in:
parent
e913327d8e
commit
f092b05c88
3 changed files with 15 additions and 10 deletions
|
@ -12,4 +12,4 @@ ADD_SUBDIRECTORY(raceengine)
|
|||
ADD_SUBDIRECTORY(learning)
|
||||
ADD_SUBDIRECTORY(math)
|
||||
ADD_SUBDIRECTORY(portability)
|
||||
ADD_SUBDIRECTORY(metar)
|
||||
#ADD_SUBDIRECTORY(metar)
|
||||
|
|
|
@ -66,10 +66,6 @@
|
|||
email: matumoto@math.keio.ac.jp
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <simgear_config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> // for random(), srandom()
|
||||
#include <time.h> // for time() to seed srandom()
|
||||
|
@ -91,6 +87,7 @@ static int initf = 0;
|
|||
static unsigned long *next;
|
||||
|
||||
/* initializes state[N] with a seed */
|
||||
|
||||
void init_genrand(unsigned long s)
|
||||
{
|
||||
int j;
|
||||
|
@ -129,27 +126,35 @@ static void next_state(void)
|
|||
|
||||
// Seed the random number generater with time() so we don't see the
|
||||
// same sequence every time
|
||||
void sg_srandom_time() {
|
||||
|
||||
void sg_srandom_time()
|
||||
{
|
||||
init_genrand(time(NULL));
|
||||
}
|
||||
|
||||
// Seed the random number generater with time() in 10 minute intervals
|
||||
// so we get the same sequence within 10 minutes interval.
|
||||
// This is useful for synchronizing two display systems.
|
||||
void sg_srandom_time_10() {
|
||||
|
||||
void sg_srandom_time_10()
|
||||
{
|
||||
init_genrand(time(NULL) / 600);
|
||||
}
|
||||
|
||||
|
||||
// Seed the random number generater with your own seed so can set up
|
||||
// repeatable randomization.
|
||||
void sg_srandom( unsigned int seed ) {
|
||||
|
||||
void sg_srandom( unsigned int seed )
|
||||
{
|
||||
init_genrand( seed );
|
||||
}
|
||||
|
||||
|
||||
// return a random number between [0.0, 1.0)
|
||||
double sg_random() {
|
||||
|
||||
double sg_random()
|
||||
{
|
||||
unsigned long y;
|
||||
|
||||
if (--left == 0)
|
||||
|
|
|
@ -74,7 +74,7 @@ LegacyMenu& LegacyMenu::self() {
|
|||
}
|
||||
|
||||
LegacyMenu::LegacyMenu(const std::string& strShLibName, void* hShLibHandle)
|
||||
: GfModule(strShLibName, hShLibHandle), _piRaceEngine(0), _piGraphicsEngine(0),
|
||||
: GfModule(strShLibName, hShLibHandle), _piRaceEngine(0), _piGraphicsEngine(0), _piSoundEngine(0),
|
||||
_hscrReUpdateStateHook(0), _hscrGame(0), _bfGraphicsState(0) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue