Commit Graph

38 Commits

Author SHA1 Message Date
Paco Esteban b477a8458c Codechange: Use arc4random_buf on random_func.cpp for OpenBSD 2024-04-17 19:29:26 +02:00
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Rubidium a06814c173 Codechange: use std::source_location over __FILE__ and __LINE__ for Random 2024-03-11 20:30:33 +01:00
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 2024-01-22 09:04:34 -05:00
Patric Stout 71b8801b61
Fix bd85f61a: [Linux] don't include sys/random.h on older glibc systems (#11844) 2024-01-20 20:43:06 +00:00
Patric Stout bd85f61a40 Change: use a stronger hash and actual random information to generate Uids 2024-01-20 14:23:03 +01:00
Rubidium 47c0184a0b Codechange: replace ROR/ROL with std::rotr/rotl 2024-01-17 23:05:40 +01:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Patric Stout 7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 2023-04-24 15:56:01 +00:00
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
peter1138 cea2c3490a (svn r27049) -Fix (r26482): Fix compilation with --enable-desync-debug. 2014-10-28 11:32:19 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
fonsinchen fe550c2db3 (svn r25893) -Fix: Document RandomRange and change misleading parameter name 'max' in random functions. 2013-10-20 14:48:08 +00:00
rubidium a48e3cb891 (svn r23854) -Codechange: make it easier to put random debug stuff into the random log 2012-01-26 17:24:56 +00:00
rubidium 2a0754b678 (svn r23814) -Codechange: write the random-debug output directly to a file 2012-01-15 21:15:38 +00:00
rubidium eb299736c1 (svn r21886) -Codechange: move documentation towards the code to make it more likely to be updated [n]. 2011-01-22 09:53:15 +00:00
rubidium ff015ac62c (svn r21336) -Fix (r21030) [FS#4274]: compile failure when desync debugging is enabled (fonsinchen) 2010-11-27 12:55:43 +00:00
frosch 184fa43df2 (svn r19652) -Fix: RandomRange() is used for bigger ranges in many cases, so generally extent it to handle 32 bits. 2010-04-17 11:49:25 +00:00
frosch 2141ca2368 (svn r19643) -Fix (r19120): Industry generation failed for large maps and lots of industry types. 2010-04-16 21:21:54 +00:00
frosch b0496c339f (svn r19125) -Fix (r18809): Compiling with desync-debug failed. 2010-02-13 20:13:34 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
smatz 62a7948af0 (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 2009-05-22 15:13:50 +00:00
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 2009-05-16 23:34:14 +00:00
rubidium d4b6cc997d (svn r14910) -Codechange: merge the command queue handling into a single location 2009-01-08 13:57:50 +00:00
rubidium 703831ec6d (svn r14761) -Fix (r14730): missed the one DEREF_CLIENT in the random debug code :( 2008-12-28 22:23:43 +00:00
smatz 7a031b60cd (svn r14486) -Fix (r13343)(r14484): compilation with desync debug was broken 2008-10-18 14:16:29 +00:00
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 2008-09-30 20:51:04 +00:00
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 2008-09-30 20:39:50 +00:00
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 2008-05-06 15:11:33 +00:00
skidd13 9d914a803c (svn r12516) -Revert r2583: Removed mersenne PRNG cause it is not used and won't be used in the future 2008-03-31 16:07:50 +00:00
rubidium 20e9abed47 (svn r12050) -Fix: random_func broke for desync debug. 2008-02-03 16:21:19 +00:00
rubidium 3b2145aafe (svn r12004) -Codechange: refactor the random functions to reduce code duplication. 2008-01-29 00:27:25 +00:00
rubidium 0b1d3e43e5 (svn r11704) -Codechange: remove another bunch of useless includes. 2007-12-26 23:04:26 +00:00
rubidium 01e20c9140 (svn r11674) -Codechange: refactor some functions out of macros.h into more logical locations. 2007-12-21 19:21:21 +00:00
rubidium 214d25905a (svn r11640) -Fix: missed change of include when moving stuff to random_func.cpp 2007-12-15 22:05:02 +00:00
skidd13 1d56af1d33 (svn r11489) -Fix r11488: Somehow the code was added multiple times 2007-11-21 19:18:34 +00:00
skidd13 83601671c7 (svn r11488) -Codechange: Spilt the random functions out to seperate file
-Codechange: Make the mersenne twister more readable
-Codechange: Unify the seeding process of random
2007-11-21 19:13:38 +00:00