Index: src/mersenne.cpp =================================================================== --- src/mersenne.cpp (Revision 11280) +++ src/mersenne.cpp (Arbeitskopie) @@ -4,6 +4,7 @@ #include "stdafx.h" #include "openttd.h" +#include "functions.h" #ifdef MERSENNE_TWISTER Index: config.lib =================================================================== --- config.lib (Revision 11280) +++ config.lib (Arbeitskopie) @@ -34,6 +34,7 @@ enable_debug="0" enable_profiling="0" enable_dedicated="0" + enable_mersenne="0" enable_network="1" enable_static="1" enable_translator="0" @@ -62,7 +63,7 @@ with_psp_config="1" with_threads="1" - save_params_array="build host cc_build cc_host cxx_build cxx_host windres strip awk lipo os cpu_type revision endian config_log prefix_dir binary_dir data_dir icon_dir personal_dir install_dir enable_debug enable_profiling enable_dedicated enable_network enable_static enable_translator enable_assert enable_strip with_distcc with_osx_sysroot enable_universal enable_osx_g5 enable_unicode with_application_bundle with_sdl with_cocoa with_zlib with_png with_makedepend with_direct_music with_sort with_iconv with_midi with_midi_arg with_libtimidity with_freetype with_fontconfig with_psp_config with_threads CC CXX CFLAGS LDFLAGS" + save_params_array="build host cc_build cc_host cxx_build cxx_host windres strip awk lipo os cpu_type revision endian config_log prefix_dir binary_dir data_dir icon_dir personal_dir install_dir enable_debug enable_profiling enable_dedicated enable_mersenne enable_network enable_static enable_translator enable_assert enable_strip with_distcc with_osx_sysroot enable_universal enable_osx_g5 enable_unicode with_application_bundle with_sdl with_cocoa with_zlib with_png with_makedepend with_direct_music with_sort with_iconv with_midi with_midi_arg with_libtimidity with_freetype with_fontconfig with_psp_config with_threads CC CXX CFLAGS LDFLAGS" } detect_params() { @@ -146,6 +147,8 @@ --enable-profiling=*) enable_profiling="$optarg";; --enable-dedicated) enable_dedicated="1";; --enable-dedicated=*) enable_dedicated="$optarg";; + --enable-mersenne) enable_mersenne="1";; + --enable-mersenne=*) enable_mersenne="$optarg";; --enable-network=*) enable_network="$optarg";; --disable-network) enable_network="0";; --disable-static) enable_static="0";; @@ -454,6 +457,12 @@ log 1 "checking network... disabled" fi + if [ "$enable_mersenne" != "0" ] && [ "$enable_network" != "0"]; then + log 1 "WARNING: using mersenne is not multiplayer stable" + enable_network="0" + log 1 "WARNING: disabling network" + fi + if [ "$enable_translator" != "0" ]; then log 1 "checking translator... debug" # -t shows TODO items, normally they are muted @@ -1020,6 +1029,10 @@ CFLAGS="$CFLAGS -DDEDICATED" fi + if [ "$enable_mersenne" != "0" ]; then + CFLAGS="$CFLAGS -DMERSENNE_TWISTER" + fi + if [ "$enable_unicode" != "0" ]; then CFLAGS="$CFLAGS -DUNICODE -D_UNICODE" fi @@ -2139,6 +2152,8 @@ echo " --enable-debug[=LVL] enable debug-mode (LVL=[0123], 0 is release)" echo " --enable-profiling enables profiling" echo " --enable-dedicated compile a dedicated server (without video)" + echo " --enable-mersenne use the mersenne twister for random numbers" + echo " (Not multiplayer save)" echo " --enable-static enable static compile (doesn't work for" echo " all HOSTs)" echo " --enable-translator enable extra output for translators"