Commit Graph

247 Commits (88b77661579831ddaa309acbaae4ed5df6e46835)

Author SHA1 Message Date
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
peter1138 67ce8b9ea0 (svn r5191) - NewGRF: add cargo refit support for road vehicles 18 years ago
peter1138 8c9de5e593 (svn r5146) - NewGRF: Support selection of aircraft default cargo type by checking its refit mask. If aircraft can be refitted to passengers, no change happens, else the first refittable type is chosen. Also use refit capacity to determine the default capacity. 18 years ago
tron ce9639c6bc (svn r5120) Add IsShipInDepot{Stopped,}() and remove some redundant checks 18 years ago
tron d26e40ca7e (svn r5118) Add IsRoadVehInDepot{Stopped,}() 18 years ago
tron cfdbb53a82 (svn r5116) Move the overly generic GetDepotDirection() from a header to its only consumer 18 years ago
tron 3cb526d0d9 (svn r5101) Add a function to convert an axis and a flag for north/south into a DiagDirection. Use it for bridge ramps and ship depots 18 years ago
tron 9ee944cabb (svn r5094) Remove _new_{aircraft,roadveh,ship,train,wagon}_id. _new_vehicle_id is enough. 18 years ago
bjarni 337e896661 (svn r4967) -Fix: [clone vehicles] a cloned train engine heads the same way as the original (pointed out by bobingabout)
[autoreplace] the same applies to autoreplaced trains if the engine is a single unit (not dualheaded or articulated)
18 years ago
tron 2b17d16ce2 (svn r4937) Reduce the use of _error_message a bit 18 years ago
bjarni cbcf207e5e (svn r4829) -Codechage: [clone vehilces] only check for a free unitnumber for the first engine in the test run as well as execute run (to improve speed. The result should be unchanged) 18 years ago
bjarni f17a23e06a (svn r4826) -Fix: [autoreplace] fixed possible problem when autoreplacing and was number of vehicles (of a type, not total) was reached
now the new vehicle gets the same number as the old one, completely removing the problem where we could run out of numbers
	since we don't have to find free numbers for the new vehicles, autoreplace should be somewhat faster, specially in late games
	NOTE: in CmdBuildRailVehicle(), bit 0 and 1 in p2 have been switched to make the meaning of bit 0 consistent with the other build commands. CmdCloneVehicle() is modified to follow this as well
18 years ago
bjarni 37ec349dec (svn r4825) - Fix [clone FS#159]: Game crashes when cloning reaches train-limit. 18 years ago
tron 1be0d9926e (svn r4790) Remove slope magic from EnsureNoVehicleZ() and rename it to EnsureNoVehicleOnGround() to make more clear what it does 18 years ago
bjarni 31cfb1318f (svn r4599) -Fix: [Cloning, autoreplace] FS#141 clone service-interval
now cloned vehicles get the same service interval as the original vehicle
	I applied this to autoreplace as well even though it's not mentioned in the bug report (autorenew should not alter service interval)
18 years ago
tron b57640e28a (svn r4572) Remove vehicle_leave_tile_proc
There's exactly one implemented function (unbarring a level crossing) and one place where it can be triggered (a train leaves a level crossing)
It's a bit overkill, so just handle this one case where it can happen
18 years ago
tron 6dbc9c9ced (svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE} 18 years ago
tron dd180a1e18 (svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums 18 years ago
peter1138 100cc6fea7 (svn r4471) - Pools: Add a facility for calling a custom function during pool block clean up. 18 years ago
tron 35e93e451f (svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
Remove DoCommandByTile(), because now it does the same as DoCommand()
19 years ago
celestar b0b5641639 (svn r4341) -Fix (FS#101) When a player got bankrupt, slots were not cleared, because vehicles got deleted directly by DeleteVehicle 19 years ago
celestar 8cbe98a3fd (svn r4259) -[multistop] Fix/Feature/Codechange:
1) Improved the road vehicle allocation (aka slotting) for multistop. Stops can now accept unlimited, er... 256, vehicles.
2) Removed the "wait for stop" feature, because it did not work in practise.
3) Slotting now ignores unreachable stations. Uses NPF at the moment because the old pathfinder cannot do it (yet)
4) Now matter how many vehicles approach a station, they will always be distributed evenly over existing stops.
5) Hopefully the last fundamental change to multistop
19 years ago
peter1138 39f21f5d85 (svn r4256) - Codechange: Replace lone map access in vehicle.c with its map accessor. 19 years ago
celestar 69e1c716e8 (svn r4249) -Codechange: Replace more occurences of 16 by TILE_SIZE and of 8 by TILE_HEIGHT. Reverted one change from the previous commit because it was faulty 19 years ago
celestar 6443c14ebd (svn r4246) -Codechange. Replaced about 100 occurences of '16' by TILE_SIZE 19 years ago
bjarni 10358a773e (svn r4228) -Fix: [autoreplace] allow replacement of wagons even when the engine fails to be replaced 19 years ago
peter1138 98c77c363f (svn r4227) - Fix: Wagon replace nows checks if the cargo types are the same before seeing if it can refit. 19 years ago
celestar 2ab5b8e666 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency 19 years ago
peter1138 eb15688358 (svn r4201) - Codechange: Do for _engine_info[] what we do for _*_vehicle_info[]; create and use a function to retrieve data, and ensure constness. 19 years ago
bjarni 166465fa4e (svn r4159) added missing comments about refitting in CmdCloneVehicle 19 years ago
bjarni 1fe0a3241f (svn r4158) -Fix: [autoreplace] cost for refitting the new vehicle is now added to the cost animation. The player always paid for it, but it was not displayed until now 19 years ago
celestar 6c44bf5012 (svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas. 19 years ago
belugas ed86c3d818 (svn r4092) CodeChange : Named sprites instead of magic numbers plus create/use helper macro/enum for recoloring scheme 19 years ago
Darkvater 650b1b0c93 (svn r3895) - Add proper SLE(G)_CONDNULL macros for the empty space reservation in savegames and update where used
- Also add this capability to settings
19 years ago
tron eeb5bf41a1 (svn r3831) Add and use GetRailDepotDirection() 19 years ago
tron 25606a2e0b (svn r3816) Use existing accessors 19 years ago
bjarni eac8e5e473 (svn r3811) -Fix: [autoreplace]: (FS#67) autoreplacing trains now keep their tile length instead of their pixel length 19 years ago
peter1138 fca5823238 (svn r3805) - [FS#62] Fix doxygen comments to refer to the correct parameter. (sulai) 19 years ago
tron ab9af3b05d (svn r3787) Use DirToDiagDir() instead of >> 1 19 years ago
tron 9273d0d2b9 (svn r3784) Add a type and functions to handle direction changes 19 years ago
tron 8cfcdaa733 (svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends 19 years ago
tron 332b54d5a6 (svn r3757) -Feature: Delete news items about vehicles, when they get stale
This is used to delete
- all news about a vehicle, when it gets deleted
- "vehicle has stopped in depot" news, when it gets started
- "vehicle has invalid orders" news, when the orders get changed
19 years ago
tron d851781663 (svn r3747) Change HASBIT() to return 0/1 instead of 0/value of tested bit, because the name suggests it does the former and current behavior broke in some places in very subtle ways (for example HASBIT(x, 0) != HASBIT(y, 1) doesn't work, returning a bool after HASBIT(x, 9) neither) 19 years ago
peter1138 058ccfb157 (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. 19 years ago
peter1138 5a9f6081dd (svn r3701) [2cc] move vehicle/engine palette functions out of header file and document the remaining definitions 19 years ago
Darkvater bf27f0c77b (svn r3627) - Change all hardcoded 255 max-saveload versions with the define SL_MAX_VERSION 19 years ago
peter1138 b5cd24f05d (svn r3620) - 2cc: Replace use of macro to determine colour map with a function call for drawing of vehicles. 19 years ago
Darkvater dac14d4210 (svn r3619) - Codechange: Simplify a NullStruct initialization in the vehicle array (merge the two together to avoid confusion) 19 years ago
truelight d83711fb2e (svn r3598) -Fix: suppress invalid warning by assigning value to variable 19 years ago
peter1138 30429dc4fb (svn r3589) - Rename u.road.unk2 to u.road.blocked_ctr 19 years ago