Commit Graph

143 Commits (7e4d0f112edbe2acb8ceebdf3161fa7c90cd66f9)

Author SHA1 Message Date
bjarni 21195804c3 (svn r6376) -Codechange: [vehicle refit] moved all refit cost calculations into GetRefitCost()
Now it's possible to tell refit costs for an EngineID without actually having build a vehicle
18 years ago
bjarni 71da9f3abc (svn r6291) -Feature: Vehicle lists from the station window now also got the goto depot button
-Codechange: unified the code for mass goto depot to avoid duplicated code
-Fix: Vehicles already on the way to depots will not be cancelled by mass goto depot (made it really hard to send all vehicles at once)
18 years ago
bjarni 7d6692d41d (svn r6282) -Codechange: made a function to create the vehicle list for vehicle list windows
this list is also used by mass goto depot to ensure that they use the same vehicles
	right now only the list of all vehicles use this for goto depot, but eventually all the types will use this
18 years ago
Darkvater 7c32626771 (svn r6279) -Codechange (r1525): Use proper const pointers for functions that do not change them . 18 years ago
bjarni 1d011b57d2 (svn r6246) -Feature: added the many times requested "send all vehicle to depot" button
it's located in the vehicle list screen and does the same as in the shared orders window (send all vehicles in list to a depot)
	it will still not inform the player if a vehicle failed to find a depot, so don't take for granted that all of them go
18 years ago
bjarni 386468dc72 (svn r6229) -Feature: Shared order lists now got a "goto depot" button
this will try to send all vehicles in the list to depots/hangars
	currently if one fails to find a depot, it will not tell the player
18 years ago
rubidium 86dc219b4b (svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc. 18 years ago
truelight 7f84bcc917 (svn r6157) -Codechange: DeleteVehicle removes a vehicle from the pool
-Codechange: DestroyVehicle is called by DeleteVehicle to remove all things where a vehicle depends on.
  Last 2 changes to prepare for new pool system. Not pretty now, will be soon.
18 years ago
truelight b17d389667 (svn r6144) -Codechange: renamed OrderID to VehicleOrderID, because it had nothing to do
with the Order-pool, but with the place of the order within the vehicle-order 
 (hence its name) (part of FS#13, blathijs)
18 years ago
truelight 44e5e7f0e4 (svn r6137) -Codechange: some very minor cleanups:
- Start using DeleteXXX for every pool item, not manually doing it
  - Use some wrapper to improve logic
  - Rewrote some pieces to improve logic
18 years ago
truelight 15aff22c96 (svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 (or, will do that).
It isn't the best name, but we couldn't find any better.
  This unifies the pool-system even more.
18 years ago
truelight 213c71be3f (svn r6053) -Codechange: renamed all IsXXXIndex to IsValidXXXID
-Codechange: IsValidXXXID now also checks if XXX is really valid, not if the number is within range
  Both changes again in preperation of the new mem-pool system, which requires this.
  IsValidXXXID is not a bit less pretty, but that will be cleaned up after the new mem-pool system
18 years ago
truelight 505566da5c (svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips invalid ones
-Codechange: use IsValidXXX where ever possible
  Note: both changes to prepare for new pool system, which needs those changes.
  For every pool there are 2 ugly lines, which will be removed when done
  implementing new pool system.
  Based on FS#13 by blathijs, partly implemented.
18 years ago
rubidium 908d3bcfe6 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 18 years ago
rubidium 6fb092aa7a (svn r5999) -Feature: change the original date format to a 32 bits format based at the year 0.
The game date subsystem now allows someone to start in the year 0 and continue
up to the year 5 000 000. However, you currently cannot build anything before 
1920 as there is no newgrf support for dates before 1920 or after 2090 yet.
18 years ago
rubidium f4762cdae4 (svn r5919) -Cleanup: use the type Date when the variable really is a date 18 years ago
tron 9900f3d871 (svn r5614) Move a type declaration to its only user 18 years ago
tron 677ecc624c (svn r5613) Rename VS_DISASTER to VS_SHADOW, because this is what this flag actually means 18 years ago
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
tron 7fd88e5798 (svn r5155) - Remove the bridge branch merge (revision r5070) 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 9ee944cabb (svn r5094) Remove _new_{aircraft,roadveh,ship,train,wagon}_id. _new_vehicle_id is enough. 18 years ago
celestar b618b75c9b (svn r5070) Merged the bridge branch
-Feature: Bridges can now be placed above:
	Any railway track combination (excluding depots and waypoints)
	Any road combination (excluding depots)
	Clear tiles (duh), including fields
	Tunnel entrances
	Bridge heads

Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing

There are still a number of visual problems remaining, especially when electric railways are on or under the bridge.
DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
18 years ago
tron 2b17d16ce2 (svn r4937) Reduce the use of _error_message a bit 18 years ago
peter1138 70306b544f (svn r4910) - NewGRF: add and initialize cargo subtype for vehicle visual variations 18 years ago
celestar 277f8cbda2 (svn r4466) -Fix: (FS#71) Game no longer crashes when the last vehicle serving a station has been deleted.
-Negative side effect: upon loading old games, stations whose last vehicle was a station have (temporarily) lower ratings.
   -Positive side effect: station.h no longer includes vehicle.h (breaks the station.h->vehicle.h->rail.h chain)
18 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
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
Darkvater d155f182ac (svn r4131) - CodeChange: Add proper semantics for StationID for such variables instead of using the general uint16-type. StationID was added for depots, waypoints and stations where necessary. We probably need to change GetDepot(), IsDepotIndex(), IsStationIndex(), GetWaypoint() and IsWaypointIndex() as well to use StationID. 19 years ago
Darkvater e91fa54a15 (svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type. 19 years ago
tron c40740e058 (svn r4120) Use the new station functions where appropriate 19 years ago
bjarni aa22bfb178 (svn r3944) -Feature: it's now possible to turn a single unit in a train
control-click on a unit in a train in a depot will make the click unit turn around
	this is useful if you want "normal" engines to act as dualheaded (one each way) or similar
	this only works on single unit units. Multiheaded and articulated engines get a red error box
	this is based on a quick hack peter1138 while I made it network safe and correctly handling of multible unit engines
19 years ago
peter1138 fca5823238 (svn r3805) - [FS#62] Fix doxygen comments to refer to the correct parameter. (sulai) 19 years ago
tron ee03f15f27 (svn r3803) Change the second parameter of UpdateSignalsOnSegment() from Direction to DiagDirection as that's what it really operates on 19 years ago
tron 8cfcdaa733 (svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends 19 years ago
tron 49cb8eb470 (svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends 19 years ago
celestar db4777c818 (svn r3730) Multistop modifications:
-Codechange: Completely rewritten the slot assignment system. It now consumes less CPU cycles and memory
-Codechange: Increased maximum number of roadstops to 16.
-Fix: Several conditions where a slot becomes unliked from a vehicle
-Codechange: ClearSlot now only takes one parameter, the vehicle
-Feature: Console command 'clearslots' to clear ALL currently assinged slots. debug usage only
-Feature: vehicles that cannot get a slot now wait on the road instead of planlessly blocking stops or circling around
-Codechange: Adjusted debug levels
TODO: Make the slot finder compatible with (a) pathfinder(s).
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
peter1138 b5cd24f05d (svn r3620) - 2cc: Replace use of macro to determine colour map with a function call for drawing of vehicles. 19 years ago
peter1138 ee9f64ecf4 (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. 19 years ago
peter1138 30429dc4fb (svn r3589) - Rename u.road.unk2 to u.road.blocked_ctr 19 years ago
peter1138 f9b4537228 (svn r3588) - Refit: Use only one global to return the refit capacity rather than one per vehicle type. 19 years ago
Darkvater 4014e36aec (svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it 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.
19 years ago
bjarni a4d1725de7 (svn r3403) -Codechange: [multiheaded engines] the references between the front and rear engines are no longer saved
instead the pointers are generated on load
19 years ago
peter1138 2222907a40 (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)
19 years ago
tron 9b87635c1f (svn r3366) Make an unnecessarily global variable local 19 years ago
tron 318fe153eb (svn r3365) Staticise 36 functions 19 years ago
peter1138 28668bc30b (svn r3362) Fix issue with loading old (TTD) savegames:
- move call to convert from old to new train subtypes.
 - ensure AI is started for AI players.
19 years ago
tron ed4b89ee36 (svn r3353) Simplify the automatic length adjustment algorithm for replacing trains: Use the length of the train before the replacement as reference length 19 years ago
peter1138 901068fd6e (svn r3352) - NewGRF: Move initialization of vehicle random_bits to DC_EXEC blocks to allow use of Random() instead of InteractiveRandom(), which will alleviate some possible network desyncs. 19 years ago