summaryrefslogtreecommitdiff
path: root/engine.c
AgeCommit message (Collapse)Author
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)
2004-11-15(svn r625) Almost complete support for deterministic variational vehicle ↵tron
spritegroups. (pasky)
2004-11-14(svn r611) -newgrf: Change GetCustomEngineSprite() calling convention ↵darkvater
(invisible to users of GetCustomVehicle*() wrappers). Needed for deterministic spritegroups support (pasky).
2004-11-14(svn r607) -Patch: [ 985102 ] static cleanuptron
Thanks to lvoge
2004-11-14(svn r605) -newgrf: Framework for supporting variational spritegroups . ↵darkvater
Deterministic only at the moment, but random ones support shouldn't be that difficult now It doesn't do anything, but makes these actions actually possible (pasky).
2004-11-14(svn r602) -newgrf: Move DrawTileSeqStruct & co and struct SpriteGroup to ↵darkvater
sprite.h (pasky)
2004-11-12(svn r557) -newgrf: Rename all 'superset' tokens to 'group' and some other ↵darkvater
small renamings (pasky and octo).
2004-09-19(svn r298) Fix: Engines from other climates do not appear any more when ↵dominik
never_expire_vehicles is enabled
2004-09-15(svn r262) Fix: [ 1028234 ] Monorail and MagLev infrastructure not available ↵dominik
in 1920s any more
2004-09-12(svn r221) -Feature: console command and variable hookingsignde
-Fix: added another network.c stub -Consolecommand: "scrollto <tile>" center main view on <tile> [Darkvater] -Consolecommand: "resettile <tile>" force bulldoze <tile> without any checks (DEBUG only) [Darkvater] -Fix: resetengines is hooked to be not available in network games -Codechange: "connect <connectstr>": the connect command now uses a connectionstring like the network-gui -Fix: Direct Connect editbox can handle up to max ~35 characters [Darkvater]
2004-09-11(svn r206) -Fix: [1001540] i lost all wagons. Half-assed fix for lost ↵darkvater
wagons. But now users can at least fix this problem. Consolecommand: "resetengines"
2004-09-10(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!truelight
2004-08-23(svn r115) Fix: monorail/maglev became available around 1927dominik
2004-08-09(svn r1) Import of revision 975 of old (crashed) SVNtruelight