Commit Graph

189 Commits

Author SHA1 Message Date
smatz
e54aca7905 (svn r16148) -Fix [FS#2839]: misleading comment (part by Bilbo) 2009-04-25 22:22:27 +00:00
rubidium
110f15c638 (svn r16130) -Fix [FS#2855]: the overflowsafe type didn't like dividing by int64 larger than MAX_INT32 causing division by negative numbers and small anomolies when drawing graphs. 2009-04-23 23:29:44 +00:00
frosch
870e234d23 (svn r16006) -Fix (r0): Chance16() did not work for b = 1. Also transform the formula to not use divisions. 2009-04-09 22:37:59 +00:00
rubidium
bc7a870a61 (svn r15931) -Codechange: let the host and ban lists use of SmallVector. 2009-04-03 12:49:58 +00:00
rubidium
4eea5c9669 (svn r15777) -Add: helper functions to get the least common multiple and the greatest common divisor (Alberth) 2009-03-21 01:34:31 +00:00
rubidium
f3e0fd7416 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 2009-03-14 18:16:29 +00:00
rubidium
75a32223c6 (svn r15649) -Fix (r15556): don't unnecessarily reallocate 2009-03-09 09:38:00 +00:00
rubidium
2972ad372b (svn r15603) -Fix [FS#2696]: crash when using an extraordinarily large sprite as cursor. 2009-03-03 20:33:57 +00:00
smatz
3707a11e5e (svn r15571) -Fix: incorrect use of memset 2009-02-24 22:25:23 +00:00
rubidium
9ab8a2aab1 (svn r15556) -Change: don't temporary malloc+free when encoding sprites, just reuse the same piece of allocated memory for each encoding. 2009-02-23 17:54:02 +00:00
smatz
d6d2da171f (svn r15508) -Fix: three header files had incorrect 'anti-multiple-inclusion' header 2009-02-17 02:08:53 +00:00
peter1138
eeaa4c8d9a (svn r15447) -Codechange: void functions don't tend to return true if and only if anyway 2009-02-11 07:17:39 +00:00
belugas
06bdc9d575 (svn r15446) -Revert(r15445): Seems that "iff" stands for "if and only if". So not much of a typo.
Thanks, Yexo.  I feel less ignorant today :D
2009-02-11 02:53:15 +00:00
belugas
002c9b7c67 (svn r15445) -Fix: little typos 2009-02-11 02:30:08 +00:00
smatz
16d1904e70 (svn r15324) -Codechange: unify the class used for comparing of strings for std::map 2009-02-03 18:08:07 +00:00
smatz
9021c20b5e (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
Yexo
e8f190849e (svn r15291) -Cleanup: Move the station list widgets to their class from station_gui.h
-Fix: comment for ReallocT was wrong, the memory is not zeroed.
2009-01-29 02:42:36 +00:00
rubidium
72b0341ed0 (svn r15126) -Feature: downloading content from a central server (content.openttd.org) where authors can upload they NewGRFS/AI etc. This should make joining servers that use only NewGRFs that are distributed via this system easier as the players can download the NewGRFs from in the game. It should also make it easier to see whether there are updates for NewGRFs and make the necessary updates. 2009-01-17 16:53:32 +00:00
smatz
f528593a40 (svn r15031) -Fix (r15027): merge reverted r15026, so do it once again 2009-01-12 17:31:43 +00:00
truebrain
c2406cd42d (svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
NoAI is an API (a framework) to build your own AIs in. See:
   http://wiki.openttd.org/wiki/index.php/AI:Main_Page
 With many thanks to:
  - glx and Rubidium for their syncing, feedback and hard work
  - Yexo for his feedback, patches, and AIs which tested the system very deep
  - Morloth for his feedback and patches
  - TJIP for hosting a challenge which kept NoAI on track
  - All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
2009-01-12 17:11:45 +00:00
smatz
ec97e1fd0d (svn r15026) -Codechange: use SpriteTypeByte instead of SpriteType in the SpriteCache struct in order to make it smaller 2009-01-12 16:53:11 +00:00
rubidium
28ea38ae55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
rubidium
4df86694a7 (svn r14910) -Codechange: merge the command queue handling into a single location 2009-01-08 13:57:50 +00:00
peter1138
766bf8deaa (svn r14776) -Fix (r14742): ListPositionMap relied on std::map having sorted the map, which is now done by a manual key sorter on SmallMap. This fixes engine ID list sorting. 2008-12-30 21:04:09 +00:00
rubidium
5c8a281e00 (svn r14761) -Fix (r14730): missed the one DEREF_CLIENT in the random debug code :( 2008-12-28 22:23:43 +00:00
smatz
bd92143e7b (svn r14742) -Codechange: use SmallMap in two cases to reduce compilation time and binary size 2008-12-26 13:50:46 +00:00
frosch
dca37f1cb0 (svn r14704) -Codechange: Add set capabilities to SmallVector. 2008-12-20 17:09:44 +00:00
smatz
ae6107535a (svn r14669) -Codechange: use SmallVector instead of std::list at one place 2008-12-13 15:59:25 +00:00
smatz
ad0a578b69 (svn r14486) -Fix (r13343)(r14484): compilation with desync debug was broken 2008-10-18 14:16:29 +00:00
rubidium
e589c7e580 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 2008-09-30 20:51:04 +00:00
rubidium
f56e630e5c (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
smatz
5c6a23f8fa (svn r14232) -Codechange: use builtin for byte swapping for gcc >= 4.3 2008-09-02 21:11:48 +00:00
frosch
92f3c368b8 (svn r14083) -Fix [FS#1264, FS#2037, FS#2038, FS#2110]: Rewrite the autoreplace kernel. 2008-08-16 14:02:20 +00:00
rubidium
019a519446 (svn r13910) -Document: string drawing related functions and types (Alberth) 2008-08-01 09:34:34 +00:00
peter1138
2466b7f01e (svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file. 2008-07-22 14:17:29 +00:00
rubidium
cde65455ac (svn r13731) -Codechange: make a pool of the array of players. 2008-07-18 16:40:29 +00:00
smatz
faebe10d81 (svn r13639) -Codechange: rewrite 32bpp-anim and 32bpp-optimized drawing and encoding so it uses similiar scheme as 8bpp-optimized
All zoom levels are stored and a kind of RLE is used. Together with further changes and reducing number of variables, drawing is ~50% faster in average.
2008-06-26 15:46:19 +00:00
skidd13
6169c3fc17 (svn r13607) -Fix (r13606): some coding style issues got fixed but some got/stayed broken 2008-06-22 15:41:38 +00:00
skidd13
8b7d893d85 (svn r13606) -Codechange: use "static FORCEINLINE" where possible as default for core functions (big functions use just inline instead) 2008-06-22 15:21:51 +00:00
skidd13
ad9b19b77a (svn r13575) -Codechange: Move small vector to core since it fits better in there
-Codechange: convert smallvector from struct to class
2008-06-19 10:19:02 +00:00
smatz
cf489a25b0 (svn r13552) -Codechange: use TTD_ENDIAN comparations instead of tests if TTD_[BIG/LITTLE]_ENDIAN is defined 2008-06-17 19:38:00 +00:00
skidd13
149bf45b77 (svn r13517) -Add: remaining used typesafe versions of the mem* functions from <string.h> 2008-06-14 16:41:03 +00:00
skidd13
a8bb6177ee (svn r13516) -Codechange: Move MemCpyT to a fitting core header
-Codechange: Split the sorting code from the sortlist to an appropriate header
2008-06-14 16:23:08 +00:00
smatz
506cde94b6 (svn r13456) -Codechange: use AllocaM() macro instead of alloca() at most places 2008-06-10 21:59:22 +00:00
glx
b3d7ca0ceb (svn r13273) -Fix [FS#2042]: MSVC warnings (again) 2008-05-26 20:20:38 +00:00
rubidium
1ce0b03bf0 (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
rubidium
300c7e459a (svn r12936) -Doc: a few structs in geometry_type.hpp. Patch by Alberth. 2008-05-04 08:38:21 +00:00
rubidium
4016d15bc7 (svn r12873) -Fix [FS#1946]: MSVC is whining because it doesn't understand that bytes should be cast to ints. 2008-04-24 17:53:45 +00:00
smatz
6813a17d15 (svn r12778) -Codechange: add the NORETURN attribute to *allocError() functions 2008-04-18 21:38:36 +00:00
rubidium
ca1f8fbe2e (svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators. 2008-04-18 04:37:06 +00:00
rubidium
2752568d61 (svn r12749) -Codechange: store the viewport information in the windows that have a viewport instead of one global array with a viewport for each window, even when they do not use the viewport. 2008-04-17 09:42:44 +00:00
rubidium
8ab49198b9 (svn r12695) -Codechange: only allocate window structs when needed. Based on a patch by Alberth. 2008-04-13 19:25:14 +00:00
smatz
c3399b6848 (svn r12573) -Codechange: use defined constants instead of numbers in math_func.hpp 2008-04-04 20:34:09 +00:00
smatz
6a501c85fc (svn r12572) -Fix (r12192): min() has 32bit arguments, clamping of 64bit values didn't work 2008-04-04 20:03:49 +00:00
rubidium
571ba97f56 (svn r12536) -Codechange: some stack allocations were too large for NDS, so use the SmallStackSafeStackAlloc wrapper. Allocate on the stack by default and on the heap for NDS (or other devices that have a very small stack). 2008-04-01 21:12:51 +00:00
skidd13
b93a612dfd (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
1c1a721d63 (svn r12438) -Fix-ish: typo spotted by Biblo. 2008-03-27 13:59:35 +00:00
smatz
e0b0ecc5a7 (svn r12204) -Fix (r12192): using UINT16_MAX broke compilation on many targets 2008-02-20 19:42:06 +00:00
smatz
44a8293364 (svn r12192) -Fix: clamp various town variables to 16bit prior to returning the value 2008-02-20 14:30:53 +00:00
smatz
7d45415b3d (svn r12156) -Fix (r11454): Chance16I was now biased towards zero - round to nearest now 2008-02-16 00:46:38 +00:00
smatz
05169f53be (svn r12115) -Codechange: move malloc/realloc error messages to separate file to spare 4-8kB of binary size 2008-02-11 20:23:38 +00:00
rubidium
4a4f4b7459 (svn r12050) -Fix: random_func broke for desync debug. 2008-02-03 16:21:19 +00:00
rubidium
1b7051768c (svn r12004) -Codechange: refactor the random functions to reduce code duplication. 2008-01-29 00:27:25 +00:00
rubidium
38d690acc8 (svn r11943) -Codechange: add and use a simple structure to support small stacks by allocating it on the heap or pushing a few kB of data onto the stack when there is a large stack. 2008-01-22 12:09:12 +00:00
glx
bba1a62db1 (svn r11914) -Documentation: fix some @file statement 2008-01-18 03:48:29 +00:00
rubidium
7f037d15d7 (svn r11704) -Codechange: remove another bunch of useless includes. 2007-12-26 23:04:26 +00:00
rubidium
d821e5e92b (svn r11697) -Fix [FS#1585]: strgen did not (always) compile properly. 2007-12-25 14:08:56 +00:00
skidd13
7bcc4d28e1 (svn r11695) -Codechange: Converted the md5 algorithm to OOP
-Codechange: Adapt the md5 algorithm to the OpenTTD source
2007-12-25 13:59:21 +00:00
rubidium
851f19b341 (svn r11694) -Codechange: move more endianness related stuff to endian_func.hpp. 2007-12-25 13:28:09 +00:00
rubidium
00c9d3ef20 (svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed. 2007-12-25 09:48:53 +00:00
egladil
217539ee24 (svn r11688) -Fix [FS#1581]: Compilation was broken on OS X again. 2007-12-23 18:08:39 +00:00
skidd13
fec9cd587c (svn r11687) -Codechange: move some defines to a better place 2007-12-23 14:06:03 +00:00
rubidium
507463e420 (svn r11684) -Codechange: split gfx.h in a type and functional header. 2007-12-23 10:56:02 +00:00
rubidium
1f6043458c (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type. 2007-12-22 23:30:28 +00:00
rubidium
8ebdfb258f (svn r11674) -Codechange: refactor some functions out of macros.h into more logical locations. 2007-12-21 19:21:21 +00:00
rubidium
60c82d0f8c (svn r11673) -Codechange: move the overflow safe type to a separate file. 2007-12-21 08:34:53 +00:00
rubidium
0995194162 (svn r11661) -Codechange: some header reworks in order to try to reduce the compile time of OpenTTD by reduce the amount of circular-ish dependencies. 2007-12-18 19:52:14 +00:00
smatz
d5dbce8331 (svn r11652) -Codechange: add the svn $ header for several files 2007-12-17 01:35:45 +00:00
rubidium
ad218166ec (svn r11640) -Fix: missed change of include when moving stuff to random_func.cpp 2007-12-15 22:05:02 +00:00
rubidium
28c436a054 (svn r11616) -Fix [FS#1526]: sometimes large values could go off the chart. 2007-12-10 22:26:24 +00:00
skidd13
5d74f2ced4 (svn r11564) -Codechange: Increase the usage of the for_each_bit macro and rename it fitting to the naming style 2007-12-03 09:19:19 +00:00
rubidium
8c0122f429 (svn r11559) -Fix [FS#1505]: overflow when drawing graphics with high company values. 2007-12-02 19:21:56 +00:00
skidd13
057ae477b5 (svn r11527) -Codechange: Split the bitmath functions of to their own files 2007-11-26 17:50:22 +00:00
skidd13
f56579e0d9 (svn r11526) -Codechange: Rename the function delta fitting to the naming style 2007-11-26 16:01:29 +00:00
skidd13
e36dba227b (svn r11523) -Codechange: Move the CHANCE macros to core/random_func.cpp cause they depend on Random()
-Codechange: Convert the CHANCE macros to functions and rename them fitting to the naming style
2007-11-25 15:35:25 +00:00
skidd13
815b8d8df1 (svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style 2007-11-24 10:38:43 +00:00
skidd13
4e12073b27 (svn r11490) -Codechange: Split the math functions to their own header
-Codechange: Replace the rest of the math macros with functions
2007-11-22 18:01:51 +00:00
skidd13
f26e908466 (svn r11489) -Fix r11488: Somehow the code was added multiple times 2007-11-21 19:18:34 +00:00
skidd13
039570342d (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