Commit Graph

47 Commits

Author SHA1 Message Date
hackykid 726f86e020 (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. 2005-05-22 14:10:20 +00:00
Darkvater cb5107f97f (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). 2005-05-17 20:58:58 +00:00
tron fea5965679 (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. 2005-05-15 18:50:55 +00:00
Darkvater 5174d3adfe (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" 2005-05-14 12:36:16 +00:00
Darkvater 5e6923e936 (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.
2005-05-11 00:00:27 +00:00
pasky 339785dad7 (svn r2064) - Codechange: GetVehicleSpriteGroup() cleanup - drop overriding_engine, which was around probably only for historical reasons. (Paralellily developed by HackyKid.) 2005-03-25 16:07:35 +00:00
pasky 7fceb7ea86 (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.) 2005-03-25 15:31:01 +00:00
truelight 9b1e6e6d3e (svn r2043) -Fix: committed too many files in the last commit 2005-03-24 14:33:05 +00:00
truelight fbb11ea366 (svn r2042) -Fix: forgot to remove a printf ;) 2005-03-24 14:31:27 +00:00
tron 4bf173e9c1 (svn r1981) Typedef some structs and enums 2005-03-10 07:01:43 +00:00
tron e5121e70d0 (svn r1979) Const correctness 2005-03-09 21:54:52 +00:00
Darkvater 9bd079d425 (svn r1978) - Fix: Plug some memleaks; thanks Valgrind 2005-03-09 19:48:20 +00:00
tron eed181245d (svn r1833) byte -> char transition: the rest 2005-02-06 22:25:27 +00:00
tron 27dc506a03 (svn r1832) Next byte -> char iteration: custom names 2005-02-06 20:53:31 +00:00
tron f0f85a7ef3 (svn r1803) Move debugging stuff into files of it's own 2005-02-05 15:58:59 +00:00
tron 3e0dcfd47f (svn r1701) Style police ^^ 2005-01-27 21:18:03 +00:00
bjarni 99338d278d (svn r1700) - Fix: Hacked clients can no longer be used to build vehicles that are not available yet (Hackykid) 2005-01-27 21:00:05 +00:00
bjarni 8313879b3c (svn r1597) fix: autoreplace vehicle lists are now redrawn when a new vehicle becomes available (thanks LordOfThePigs for pointing this one out) 2005-01-22 23:11:25 +00:00
tron 189ca73707 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 2005-01-22 20:23:18 +00:00
tron 4136f395bf (svn r1508) Remove duplicate declarations and include proper headers where necessary 2005-01-14 19:41:24 +00:00
tron b9fed3391b (svn r1456) Simplify isWagon(), make it static and give it a canonical name (IsWagon) 2005-01-10 08:25:43 +00:00
truelight dcca3cf80b (svn r1426) -Codechange: cleaned up the reference code in the saveload routines
-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-08 09:48:08 +00:00
truelight 63e97754fb (svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns 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 22:31:58 +00:00
tron 8b7c1e94e1 (svn r1402) Trim trailing whitespace 2005-01-06 18:45:28 +00:00
bjarni 29d8c5bb50 (svn r1323) Adding autoreplace feature
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()
2005-01-02 17:23:04 +00:00
bjarni c4d073a4de (svn r1290) Added type to typedef struct Engine and filled in the same data 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-28 17:18:46 +00:00
truelight 245bc59c68 (svn r1196) -Fix: Preview Vehicle had a small glitch. Fixed now. 2004-12-21 14:42:06 +00:00
tron 7c2448ecea (svn r955) Replace uint16 for orders with struct Order
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-05 12:43:04 +00:00
truelight b8f6d41418 (svn r942) -Merged branch/network back into the trunk 2004-12-04 17:54:56 +00:00
truelight 0434287ef8 (svn r939) -Fix: Fixed compiler errors 2004-12-04 15:02:45 +00:00
tron acbd1801c7 (svn r815) Include strings.h only in the files which need it.
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-25 10:47:30 +00:00
pasky 3ee0dee12a (svn r767) Introduce USERSTRING_LEN (128) and try to make sure we don't overflow it anywhere (as long as we keep USERSTRING_LEN above 7 or so). 2004-11-22 21:41:25 +00:00
tron 13f0b6c0cf (svn r654) Hopefully complete support for randomized variational spritegroups (i.e. the cars transporter in DBSetXL gets different cars each time) (pasky) 2004-11-17 08:52:47 +00:00
tron b65bda506c (svn r635) Fix choosing a spritegroup from deterministic variational spritegroups if there is no structure to search (i.e. in purchase lists) (pasky) 2004-11-15 20:52:11 +00:00
tron 2f35fea097 (svn r625) Almost complete support for deterministic variational vehicle spritegroups. (pasky) 2004-11-15 11:54:35 +00:00
darkvater 051e094921 (svn r611) -newgrf: Change GetCustomEngineSprite() calling convention (invisible to users of GetCustomVehicle*() wrappers). Needed for deterministic spritegroups support (pasky). 2004-11-14 20:53:34 +00:00
tron 249a170ace (svn r607) -Patch: [ 985102 ] static cleanup
Thanks to lvoge
2004-11-14 19:44:06 +00:00
darkvater 183c33931d (svn r605) -newgrf: Framework for supporting variational spritegroups . 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 18:18:28 +00:00
darkvater e656a91736 (svn r602) -newgrf: Move DrawTileSeqStruct & co and struct SpriteGroup to sprite.h (pasky) 2004-11-14 16:42:08 +00:00
darkvater 22f627c8e1 (svn r557) -newgrf: Rename all 'superset' tokens to 'group' and some other small renamings (pasky and octo). 2004-11-12 23:59:51 +00:00
dominik eb445b5189 (svn r298) Fix: Engines from other climates do not appear any more when never_expire_vehicles is enabled 2004-09-19 19:56:40 +00:00
dominik 39f1c6dda3 (svn r262) Fix: [ 1028234 ] Monorail and MagLev infrastructure not available in 1920s any more 2004-09-15 06:51:23 +00:00
signde d6cab2e06d (svn r221) -Feature: console command and variable hooking
-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-12 20:15:18 +00:00
darkvater d03afadad2 (svn r206) -Fix: [1001540] i lost all wagons. Half-assed fix for lost wagons. But now users can at least fix this problem. Consolecommand: "resetengines" 2004-09-11 19:18:30 +00:00
truelight eb49a19460 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way! 2004-09-10 19:02:27 +00:00
dominik d15aa14334 (svn r115) Fix: monorail/maglev became available around 1927 2004-08-23 07:50:01 +00:00
truelight efaeb275f7 (svn r1) Import of revision 975 of old (crashed) SVN 2004-08-09 17:04:08 +00:00