Commit Graph

76 Commits (0ecab5110ef6e4b5599f5ca19b77774a8b7da4aa)

Author SHA1 Message Date
tron 9d0e7b6458 (svn r3181) -Bracing
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
19 years ago
peter1138 34c503cabf (svn r3148) -NewGRF, Feature: Add support for cargo refitting specification by cargo classes. 19 years ago
peter1138 0d9379f904 (svn r3139) -NewGRF, Feature: support for articulated rail vehicles. This is used, for example, by coal tenders. 19 years ago
peter1138 4f5dee9e58 (svn r3126) Autoreplace: Only the first vehicle in a chain should be marked as entering a depot, so call moved out of DoVehicleTrigger loop. 19 years ago
bjarni fa5ca040e9 (svn r3111) -Fix: [autoreplace] [ 1341783 ] Assertion failure in vehicle.c line 378
running MaybeReplaceVehicle() is now delayed until after the loop in CallVehicleTicks()
	This avoids selling the vehicle the loop currently works with (and continues to work with afterwards)
19 years ago
tron 0b936c3222 (svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
19 years ago
tron 24253c17cc (svn r3059) Use bitfields to encode railtype and climates of engines instead of manual shifting/anding 19 years ago
peter1138 13d02ca965 (svn r3017) -NewGRF: Implement sprite group unreferencing and unloading. 19 years ago
peter1138 f614b86114 (svn r3016) -NewGRF: Implement the start of reference counting for sprite groups. This will allow unloading. 19 years ago
peter1138 4879e04986 (svn r3015) -NewGRF: Add a new sprite group result type, and support loading of callbacks results within random and "real" groups. (Not fully supported yet.) 19 years ago
peter1138 e8bca26b74 (svn r3014) -NewGRF, Codechange: Make all sprite group references be pointers instead of copying the data around. 19 years ago
tron 0ad3902acf (svn r3003) Change int, uint, uin16 and byte to EngineID where appropriate, plus some related changes (mostly casts) 19 years ago
tron 90e33aed22 (svn r2995) Replace 0xFF/0xFFFF with CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate 19 years ago
tron f589bbb1c3 (svn r2762) Simplify a loop, remove an unused variable and add many consts 19 years ago
tron 452652e85e (svn r2720) Remove unused declarations and definitions 19 years ago
tron c043670cf8 (svn r2717) Move _userstring to strings.[ch] 19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
tron 54cbd01825 (svn r2673) Include functions.h directly, not globally via openttd.h 19 years ago
tron 71140a5768 (svn r2669) Shuffle some more stuff around to reduce dependencies 19 years ago
celestar 7bce410f61 (svn r2657) -Codechange: The available railtypes per player are now a bitmask, so
that railtypes do not be in ascending order of appearance. Allows easier
implementation or more railtypes
19 years ago
tron f09638ad3d (svn r2650) Convert many explicit shifts+ands to extract bits to invocations of GB - should be a bit nicer to read 19 years ago
hackykid 77d99eb807 (svn r2494) - Fix: [newgrf] Dont assume a spriteset can only have 4 or 8 sprites. 19 years ago
celestar 354058341b (svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer 19 years ago
tron d2364f1d51 (svn r2432) Use GetEngine() instead of DEREF_ENGINE() or even _engines[] 19 years ago
hackykid 26e87892e2 (svn r2414) - Feature: [newgrf] Implement powered wagons, and the callback that goes with it. 19 years ago
hackykid b30a413cfe (svn r2410) - Fix: [newgrf] When resolving callbacks, dont ignore wagon overrides. 19 years ago
Darkvater ba8c649fac (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 19 years ago
hackykid 799e1f5c50 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
- Feature: [newgrf] Implement the 'refit capacity' callback.
19 years ago
Darkvater f4f5cb93f8 (svn r2387) - CodeChange: made the saveload code more readable and also removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big.
- Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
19 years ago
hackykid 6065b27f40 (svn r2361) - Feature: [newgrf] Implement varaction2 property 0x41 and 0xDA. These are the position in and length of chain of consecutive vehicles with the same type, and index of the next wagon in the chain (INVALID_VEHICLE if last), resp. Improves displaying of some engines in the dbsetxl. 19 years ago
Darkvater abc5fd1272 (svn r2345) - Fix: Don't allow stuff to be renamed to nothing if we don't support it. Only valid ones are signs (delete) and waypoints (rename to default). 19 years ago
tron 4eebeff58c (svn r2324) Introduce _cmd_text for passing strings with a command instead of abusing _decode_parameters as text buffer. This should prevent several possible buffer overruns and is a bit cleaner to use. As bonus it reduces the size of most command packets by 79 bytes. 19 years ago
Darkvater 7470322a3d (svn r2306) - CodeChange: Check the last commands; refits. This needed an extensive rewrite and global/local-cargo ID juggling and bitmasking. However with this done it looks better as well and is compatible with newgrf handling. Big thanks to HackyKid for doing most of the work. This also closes patch "[ 1199277 ] Command checks" 19 years ago
Darkvater b43331c931 (svn r2290) - CodeChange: protect the next batch of commands. This brings us to a total of 61, which is 53% :)
- CodeChange: To correctly accept engine-prototypes, the best-player checking has been moved to its own function, I hope it functions the same as before.
- CodeChange: Added symbolic types of PlayerID, OrderID and EngineID. For engines also added GetEngine() and IsEngineIndex(), similar to the other such functions.
- CodeChange: To correctly build industries, some tables have been moved to build_industry.h. The only way to find out currently if an industry is valid in a climate is by looping all industries and checking if it matches. Also to comply with the patch setting build_rawmaterial_industries, it is assumed that these industries do not accept any cargo of any type. This can and probably should changed in the future to some flag in their struct. Also use _opt_ptr instead of _opt.
- CodeChange: implemented the HQ checking code inspired by MarkR2 in "[ 1190944 ] Many commands not checked for security".  Unfortunately it is impossible to prevent only deleting a HQ by a modified client atm.
- CodeChange: For insert order and modify order their parameters are implicitely truncated to 8 bits, instead of the 16 bits said in the comments.
19 years ago
pasky d77530b3ab (svn r2064) - Codechange: GetVehicleSpriteGroup() cleanup - drop overriding_engine, which was around probably only for historical reasons. (Paralellily developed by HackyKid.) 20 years ago
pasky 7a4d83407a (svn r2063) Fix: the 0x40 deterministic spritegroup for vehicles was wrong, modified to match the wiki again. (The wiki was partially wrong, too! ;) (Patch by HackyKid.) 20 years ago
truelight 813e84bf9e (svn r2043) -Fix: committed too many files in the last commit 20 years ago
truelight e51659da60 (svn r2042) -Fix: forgot to remove a printf ;) 20 years ago
tron ca3ccff729 (svn r1981) Typedef some structs and enums 20 years ago
tron eea2dc6c78 (svn r1979) Const correctness 20 years ago
Darkvater 4f2816db05 (svn r1978) - Fix: Plug some memleaks; thanks Valgrind 20 years ago
tron 257e97c09a (svn r1833) byte -> char transition: the rest 20 years ago
tron 6984d6cd31 (svn r1832) Next byte -> char iteration: custom names 20 years ago
tron 36c9758c94 (svn r1803) Move debugging stuff into files of it's own 20 years ago
tron dba55a5742 (svn r1701) Style police ^^ 20 years ago
bjarni 72b9358291 (svn r1700) - Fix: Hacked clients can no longer be used to build vehicles that are not available yet (Hackykid) 20 years ago
bjarni afbac4c317 (svn r1597) fix: autoreplace vehicle lists are now redrawn when a new vehicle becomes available (thanks LordOfThePigs for pointing this one out) 20 years ago
tron 94d5aeabb2 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 20 years ago
tron 589215c822 (svn r1508) Remove duplicate declarations and include proper headers where necessary 20 years ago
tron a864d05ac0 (svn r1456) Simplify isWagon(), make it static and give it a canonical name (IsWagon) 20 years ago