summaryrefslogtreecommitdiff
path: root/engine.c
AgeCommit message (Collapse)Author
2005-07-30(svn r2762) Simplify a loop, remove an unused variable and add many conststron
2005-07-26(svn r2720) Remove unused declarations and definitionstron
2005-07-26(svn r2717) Move _userstring to strings.[ch]tron
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron
2005-07-21(svn r2669) Shuffle some more stuff around to reduce dependenciestron
2005-07-20(svn r2657) -Codechange: The available railtypes per player are now a ↵celestar
bitmask, so that railtypes do not be in ascending order of appearance. Allows easier implementation or more railtypes
2005-07-20(svn r2650) Convert many explicit shifts+ands to extract bits to invocations ↵tron
of GB - should be a bit nicer to read
2005-06-27(svn r2494) - Fix: [newgrf] Dont assume a spriteset can only have 4 or 8 ↵hackykid
sprites.
2005-06-21(svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayercelestar
2005-06-07(svn r2432) Use GetEngine() instead of DEREF_ENGINE() or even _engines[]tron
2005-06-06(svn r2414) - Feature: [newgrf] Implement powered wagons, and the callback ↵hackykid
that goes with it.
2005-06-05(svn r2410) - Fix: [newgrf] When resolving callbacks, dont ignore wagon ↵hackykid
overrides.
2005-06-02(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.Darkvater
2005-06-01(svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf ↵hackykid
callbacks. - Feature: [newgrf] Implement the 'refit capacity' callback.
2005-05-30(svn r2387) - CodeChange: made the saveload code more readable and also ↵Darkvater
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.
2005-05-22(svn r2361) - Feature: [newgrf] Implement varaction2 property 0x41 and ↵hackykid
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.
2005-05-17(svn r2345) - Fix: Don't allow stuff to be renamed to nothing if we don't ↵Darkvater
support it. Only valid ones are signs (delete) and waypoints (rename to default).
2005-05-15(svn r2324) Introduce _cmd_text for passing strings with a command instead ↵tron
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.
2005-05-14(svn r2306) - CodeChange: Check the last commands; refits. This needed an ↵Darkvater
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"
2005-05-11(svn r2290) - CodeChange: protect the next batch of commands. This brings us ↵Darkvater
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.
2005-03-25(svn r2064) - Codechange: GetVehicleSpriteGroup() cleanup - drop ↵pasky
overriding_engine, which was around probably only for historical reasons. (Paralellily developed by HackyKid.)
2005-03-25(svn r2063) Fix: the 0x40 deterministic spritegroup for vehicles was wrong, ↵pasky
modified to match the wiki again. (The wiki was partially wrong, too! ;) (Patch by HackyKid.)
2005-03-24(svn r2043) -Fix: committed too many files in the last committruelight
2005-03-24(svn r2042) -Fix: forgot to remove a printf ;)truelight
2005-03-10(svn r1981) Typedef some structs and enumstron
2005-03-09(svn r1979) Const correctnesstron
2005-03-09(svn r1978) - Fix: Plug some memleaks; thanks ValgrindDarkvater
2005-02-06(svn r1833) byte -> char transition: the resttron
2005-02-06(svn r1832) Next byte -> char iteration: custom namestron
2005-02-05(svn r1803) Move debugging stuff into files of it's owntron
2005-01-27(svn r1701) Style police ^^tron
2005-01-27(svn r1700) - Fix: Hacked clients can no longer be used to build vehicles ↵bjarni
that are not available yet (Hackykid)
2005-01-22(svn r1597) fix: autoreplace vehicle lists are now redrawn when a new ↵bjarni
vehicle becomes available (thanks LordOfThePigs for pointing this one out)
2005-01-22(svn r1594) Convert all undefined parameter lists to (void) and add the ↵tron
appropriate warning flags in the Makefile
2005-01-14(svn r1508) Remove duplicate declarations and include proper headers where ↵tron
necessary
2005-01-10(svn r1456) Simplify isWagon(), make it static and give it a canonical name ↵tron
(IsWagon)
2005-01-08(svn r1426) -Codechange: cleaned up the reference code in the saveload routinestruelight
-Codechange: removed next_in_chain_old, and saved ->next for Vehicles (and bumped savegame revision for that to version 4.4) -Codechange: Added _sl.full_version, which has both major and minor version
2005-01-06(svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns ↵truelight
and _industries (in prepare of dynamic arrays): - DEREF_XXX is changed into GetXXX - All direct call are directed via GetXXX - struct Industry has now an index-field - ENUM'd some stuff - Replaced home built loops with FOR_ALL_XXX - Added _stations_size, _vehicles_size, ... which gives the length of the array (which will be dynamic in the near future) - Changed lengtof(XXX) to _XXX_size (e.g. _stations_size) - Removed all endof(XXX) (because mostly it was part of a FOR_ALL_XXX) - Made the sort-functions of all 4 dynamic - Made all 4 Initialize functions more of the same - Some minor tab-fixing and stuff (tnx to Tron for proof-reading my 100kb patch ;)) Note for all: please do NOT directly call _stations, _vehicles, _towns and _industries, but use the right wrapper to access them. Thank you. Ps: please also do not use 'v++', where v is of type Vehicle *.
2005-01-06(svn r1402) Trim trailing whitespacetron
2005-01-02(svn r1323) Adding autoreplace featurebjarni
This feature works much like autorenew, but it will get you a new engine type instead of a new one of the same type. Once ordered, it will automatically replace the engines while they visits a depot. The GUI for setting this up have been added on the vehicle overview windows Note: autorenew is now autoreplace, but to the same engine type Nice new features, that was added to make this possible - windows can now have two independant vertical scrollbars - CMD_SHOW_NO_ERROR have been added as a flag for DoCommandP. It will make it do the action instead of showing the red box with estimated costs even if shift is pressed - fixed problem where enginetypes where not initialized when loading a game. It's now done in InitializeGame()
2004-12-28(svn r1290) Added type to typedef struct Engine and filled in the same data ↵bjarni
as in type in vehicle it was kind of lame that you should use AircraftVehInfo(), ShipVehInfo() etc. if you wanted to know what type the engine is
2004-12-21(svn r1196) -Fix: Preview Vehicle had a small glitch. Fixed now.truelight
2004-12-05(svn r955) Replace uint16 for orders with struct Ordertron
This adds no functionality, but is a stepping stone for future improvement (like 16bit order indices) and is easier to read. This changes preserves binary compatibility wrt savegames.
2004-12-04(svn r942) -Merged branch/network back into the trunktruelight
2004-12-04(svn r939) -Fix: Fixed compiler errorstruelight
2004-11-25(svn r815) Include strings.h only in the files which need it.tron
This should reduce the compile time after altering english.txt by about 1/3, because "only" 62 instead of 90 .c files must be recompiled.
2004-11-22(svn r767) Introduce USERSTRING_LEN (128) and try to make sure we don't ↵pasky
overflow it anywhere (as long as we keep USERSTRING_LEN above 7 or so).
2004-11-17(svn r654) Hopefully complete support for randomized variational ↵tron
spritegroups (i.e. the cars transporter in DBSetXL gets different cars each time) (pasky)
2004-11-15(svn r635) Fix choosing a spritegroup from deterministic variational ↵tron
spritegroups if there is no structure to search (i.e. in purchase lists) (pasky)