Commit Graph

55 Commits

Author SHA1 Message Date
peter1138 a55ac6efac (svn r4738) - Newstations: attach all sprite group cargo types, not just the default and purchase pseudo types, to a station spec. 2006-05-04 19:15:02 +00:00
peter1138 cd0a67dc65 (svn r4201) - Codechange: Do for _engine_info[] what we do for _*_vehicle_info[]; create and use a function to retrieve data, and ensure constness. 2006-03-31 12:59:43 +00:00
Darkvater d5909f901a (svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type. 2006-03-26 22:23:32 +00:00
peter1138 741fc26522 (svn r3717) - [2cc] Add 2cc colour maps and use for newgrf engines requiring them. Currently the second colour is fixed to be the player's colour. 2006-03-01 23:14:03 +00:00
peter1138 56c3f42397 (svn r3684) - NewGRF: Support loading of miscellaneous flags (not used yet) 2006-02-28 08:13:15 +00:00
peter1138 601b226f04 (svn r3602) - Move _railveh_score data to _rail_vehicle_info->ai_rank and remove global variable to return data as we can now access this directly. 2006-02-13 22:13:02 +00:00
peter1138 67573ed605 (svn r3586) - NewGRF: Load callback masks for all vehicle types. 2006-02-11 07:34:05 +00:00
peter1138 b88904f345 (svn r3524) - Split newgrf features from engine.[ch] into newgrf_engine.[ch], and add the new files to project files. 2006-02-03 12:55:21 +00:00
peter1138 90aff7a026 (svn r3396) - Autoreplace changes:
- Change fixed array per player to a single pool. This avoids future problems
    with vehicle numbers and decreases savegame size. Engine replacements from
    previous savegames will be lost.
  - Move engine replacement code from players.c to engine.c.
                                      (thanks to blathijs for rewriting this)
2006-01-12 15:52:18 +00:00
peter1138 e81c316134 (svn r3388) - NewGRF: Allow train running cost class to differ from engine class. Also fix typo in r3384. 2006-01-07 16:47:59 +00:00
tron e272b03fee (svn r3365) Staticise 36 functions 2006-01-05 12:40:50 +00:00
peter1138 3532b91eef (svn r3316) - NewGRF: Unload engine names before loading grf files. This fixes names in climates where the engines don't get loaded. Renamed function to reflect its purpose. 2005-12-18 14:03:28 +00:00
tron 28fe368b7f (svn r3308) BAD
foo.h: int bar;

GOOD
foo.h: extern int bar;
foo.c: int bar;
2005-12-15 17:55:59 +00:00
peter1138 bc25cd89bf (svn r3148) -NewGRF, Feature: Add support for cargo refitting specification by cargo classes. 2005-11-06 13:42:26 +00:00
peter1138 267314b4d0 (svn r3139) -NewGRF, Feature: support for articulated rail vehicles. This is used, for example, by coal tenders. 2005-11-05 16:07:26 +00:00
peter1138 d5eb4183b8 (svn r3071) -NewGRF: Add support for rail vehicle weight greater than 255 tons. 2005-10-20 15:15:58 +00:00
tron f3de172560 (svn r3059) Use bitfields to encode railtype and climates of engines instead of manual shifting/anding 2005-10-18 11:23:58 +00:00
peter1138 abe60acbbb (svn r3017) -NewGRF: Implement sprite group unreferencing and unloading. 2005-10-04 21:42:00 +00:00
tron 0cc45ecd8e (svn r3003) Change int, uint, uin16 and byte to EngineID where appropriate, plus some related changes (mostly casts) 2005-10-01 12:43:34 +00:00
peter1138 fbf06041ca (svn r2990) Remove _engine_original_sprites and replace all uses with references to our (new) original engine/vehicle tables. 2005-09-26 19:01:49 +00:00
peter1138 2314431a59 (svn r2989) - Make engine/vehicle information tables constant. Duplicate them so NewGRF data can be loaded without wiping out the default data. 2005-09-26 18:43:58 +00:00
Darkvater 8e6a911700 (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
2005-09-18 20:56:44 +00:00
truelight 235d84583f (svn r2857) -Fix: PlayerID is not a valid type for a player-bit-field. Partly reverted r2290 2005-08-11 19:21:46 +00:00
tron a227065ab7 (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
celestar 448467a9a1 (svn r2639) -Add: Added the vehicle names in table/engines.h so that you know what line represents what vehicle (I hope I didn't mess that up). Added some comments while I'm at it and include the table/ directory in the Doxygen generation 2005-07-19 20:45:47 +00:00
tron b64c9b8b1f (svn r2504) Move Draw*EngineInfo to engine_gui.c to reduce dependencies 2005-07-01 14:05:44 +00:00
tron fa8f46c0b7 (svn r2432) Use GetEngine() instead of DEREF_ENGINE() or even _engines[] 2005-06-07 18:13:49 +00:00
hackykid 6d78b70075 (svn r2428) - Feature: [newgrf] Implement shorter train vehicles (Therax), and the callback that goes with it.
- Codechange: Remove some magic numbers (PALETTE_CRASH)
2005-06-06 22:44:11 +00:00
hackykid 2fbb96bfa5 (svn r2415) - Fix: [newgrf] Powered Wagons - Don't assume an undefined callback will fail. 2005-06-06 01:31:36 +00:00
hackykid 1018d3b786 (svn r2414) - Feature: [newgrf] Implement powered wagons, and the callback that goes with it. 2005-06-06 00:19:24 +00:00
hackykid ad2eef0a30 (svn r2401) - Fix: [newgrf] Finish up callback mechanism, implement 'refit capacity' callback slightly more correct. 2005-06-03 10:39:30 +00:00
hackykid 351d7aaa9f (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
- Feature: [newgrf] Implement the 'refit capacity' callback.
2005-06-01 11:34:37 +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
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 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
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
celestar 8ed132a5b9 (svn r1410) Replaced all occurences of 'passanger' by 'passenger' in the code 2005-01-07 08:38:27 +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
tron aa183e35d8 (svn r923) Forgot s/rail_vehinfo/RailVehInfo/ 2004-12-04 00:34:20 +00:00
tron 56dd31f33b (svn r920) Replace vehicle info macros with inline functions and add asserts to check limits 2004-12-03 21:57:05 +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
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
darkvater e656a91736 (svn r602) -newgrf: Move DrawTileSeqStruct & co and struct SpriteGroup to sprite.h (pasky) 2004-11-14 16:42:08 +00:00
celestar eb50427670 (svn r581) -newgrf: Basic support for new stations - only waypoints supported now and only
the first custom one can be placed (no selector GUI, coming soon). This
also moves some global variables to {struct GRFFile} and reorders which
actions are processed in what stage, to get it all working together --
(pasky)
2004-11-14 09:07:15 +00:00