summaryrefslogtreecommitdiff
path: root/vehicle.c
AgeCommit message (Collapse)Author
2006-03-24(svn r4092) CodeChange : Named sprites instead of magic numbers plus ↵belugas
create/use helper macro/enum for recoloring scheme
2006-03-16(svn r3895) - Add proper SLE(G)_CONDNULL macros for the empty space ↵Darkvater
reservation in savegames and update where used - Also add this capability to settings
2006-03-12(svn r3831) Add and use GetRailDepotDirection()tron
2006-03-11(svn r3816) Use existing accessorstron
2006-03-10(svn r3811) -Fix: [autoreplace]: (FS#67) autoreplacing trains now keep their ↵bjarni
tile length instead of their pixel length
2006-03-09(svn r3805) - [FS#62] Fix doxygen comments to refer to the correct ↵peter1138
parameter. (sulai)
2006-03-08(svn r3787) Use DirToDiagDir() instead of >> 1tron
2006-03-08(svn r3784) Add a type and functions to handle direction changestron
2006-03-08(svn r3783) Replace further ints and magic numbers by Direction, ↵tron
DiagDirection and friends
2006-03-04(svn r3757) -Feature: Delete news items about vehicles, when they get staletron
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
2006-03-03(svn r3747) Change HASBIT() to return 0/1 instead of 0/value of tested bit, ↵tron
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)
2006-03-01(svn r3717) - [2cc] Add 2cc colour maps and use for newgrf engines requiring ↵peter1138
them. Currently the second colour is fixed to be the player's colour.
2006-03-01(svn r3701) [2cc] move vehicle/engine palette functions out of header file ↵peter1138
and document the remaining definitions
2006-02-20(svn r3627) - Change all hardcoded 255 max-saveload versions with the define ↵Darkvater
SL_MAX_VERSION
2006-02-20(svn r3620) - 2cc: Replace use of macro to determine colour map with a ↵peter1138
function call for drawing of vehicles.
2006-02-20(svn r3619) - Codechange: Simplify a NullStruct initialization in the ↵Darkvater
vehicle array (merge the two together to avoid confusion)
2006-02-13(svn r3598) -Fix: suppress invalid warning by assigning value to variabletruelight
2006-02-11(svn r3589) - Rename u.road.unk2 to u.road.blocked_ctrpeter1138
2006-02-08(svn r3579) v->u.rail.first_engine holds an engine type, not a vehicle ↵peter1138
index, so use INVALID_ENGINE.
2006-02-08(svn r3576) - Allow unused wagons have their ->first set. This fixes the ↵peter1138
faulty cache warning message, and noticably speeds up depot operations in large games.
2006-02-07(svn r3573) - Replace assert(0) with NOT_REACHED(). This commit sponsored by ↵peter1138
"giving Darkvater credit for the last three".
2006-02-07(svn r3572) - Rewrite GetFreeUnitNumber() so that only one loop of vehicles ↵peter1138
is required. Instead a list of used/unused numbers is created and the first unused number is chosen. This significantly improves performance in large games.
2006-02-07(svn r3571) - When loading a game, call TrainConsistChanged() for each train ↵peter1138
head separately before updating images, as v->first is used extensively in GetTrainImage() for custom graphics. This gives a significant speed improvement on loading a game.
2006-02-04(svn r3535) -Feature: [autoreplace] allow autoreplacing of train wagonsbjarni
currently ALL available wagons are displayed in the right menu in the replace window however the replacement will only be done if the new wagon can be refitted to carry same cargo as the old one is currently carrying Since the standard vehicles do not have any valid wagon replacements, this feature can only be used when using newgrf sets
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2006-02-01(svn r3510) Fiddle with whitespace and parenthesestron
2006-01-31(svn r3498) Fix the edge case for r3419/r3488: when a vehicle just enters a ↵tron
tile, the height difference can be 8
2006-01-30(svn r3488) Simplify the check in r3419tron
2006-01-29(svn r3482) - Fix: since multiheaded links are not saved anymore do NOT save ↵Darkvater
them anymore at all, return the extra space. Since Bjarni's fix for this was abominable, the weird situation arises of 2 NULL structs of free space, of which the first isn't usable.
2006-01-29(svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it ↵Darkvater
in branch/pbs. This reverts revisions r3158, r3140, r3075, r2977, r2674, r2625, r2621, r2529, r2528, r2525, r2524, r2519, r2517, r2516, r2507, r2499. (in conjunction with Tron) - The only change is that the nsignalsw.grf file is kept and that existing nightlies with PBS signals get those signals converted to combo-signals.
2006-01-22(svn r3419) - Fix: [FS#40] (Possible) game crash on removing track/road ↵Darkvater
under bridge. This was caused by a wrong tile-occupancy testing where it was assumed that a vehicle's height is only a multitude of 8 (a single height-difference). This is incorrect as a vehicle on a slope will assume all height levels between the lower-and upper-bounds. The crash is still possible as seen in the Flyspray bugreport but this has a different cause.
2006-01-18(svn r3403) -Codechange: [multiheaded engines] the references between the ↵bjarni
front and rear engines are no longer saved instead the pointers are generated on load
2006-01-12(svn r3396) - Autoreplace changes:peter1138
- 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-08(svn r3390) -Fix: [autoreplace] fixed issue where autoreplace failed to ↵bjarni
attach the cars if the front engine was replaced and the front engine was multiheaded and the first vehicle after it was the rear part of that engine
2006-01-05(svn r3367) Unify the 4 distinct ↵tron
CMD_CHANGE_{AIRCRAFT,ROADVEH,SHIP,TRAIN}_SERVICE_INT commands into one CMD_CHANGE_SERVICE_INT command. As side effect this is a -Fix: The default AI tried to change the service intervals of vehicles via the CMD_CHANGE_TRAIN_SERVICE_INT command - regardless of the type of the vehicle - which of course failed for non-trains
2006-01-05(svn r3365) Staticise 36 functionstron
2006-01-04(svn r3362) Fix issue with loading old (TTD) savegames:peter1138
- move call to convert from old to new train subtypes. - ensure AI is started for AI players.
2006-01-04(svn r3361) - Clone Vehicle: Disallow cloning of crashed rail vehicles after ↵peter1138
starting removal process.
2005-12-29(svn r3353) Simplify the automatic length adjustment algorithm for replacing ↵tron
trains: Use the length of the train before the replacement as reference length
2005-12-28(svn r3352) - NewGRF: Move initialization of vehicle random_bits to DC_EXEC ↵peter1138
blocks to allow use of Random() instead of InteractiveRandom(), which will alleviate some possible network desyncs.
2005-12-24(svn r3339) Remove unnecessary includestron
2005-12-14(svn r3298) Remove unused and write-only variablestron
2005-12-14(svn r3297) Staticisetron
2005-12-05(svn r3261) - Autoreplace: If a replaced vehicle had a custom name, transfer ↵peter1138
it to the new vehicle. Fixes "[ 1370039 ] Autoreplaced vehicles lose their names"
2005-11-29(svn r3248) - Codechange: Change interface of CanRefitTo() to supply the ↵peter1138
engine type directly instead of getting it from a vehicle. This allows the function to be used before vehicles are involved.
2005-11-26(svn r3239) - Codechange: Introduce and use helper functions for engine ↵peter1138
replacement code.
2005-11-22(svn r3227) -Codechange: [Savegame] removed 'minor' version, and renamed ↵truelight
'major' version to just: version.
2005-11-19(svn r3223) -Fix: [autoreplace] fixed crash when replacing a train engine ↵bjarni
without any cars (introduced in r3220)
2005-11-19(svn r3220) -Fix: [autoreplace] Autoreplaced trains now replace their cargo ↵bjarni
to the train instead of just the new engine This applies to wagon removal during autoreplace too
2005-11-19(svn r3219) -Codechange: removed the now obsolite code in the build train ↵bjarni
command to make half multiheaded engines