Commit Graph

217 Commits (b5fe577523f25765888b2b813107e98e3f8bb069)

Author SHA1 Message Date
bjarni c545edf46f (svn r6424) -Codechange: [autoreplace] removed a loop though all vehicles from each time the window is redrawn
To do this, the player struct contains an array, that contains the count of each engine type that the player owns
   Those arrays are updated each time a vehicle is build or deleted and is calculated on load (it's not saved)
   It's possible to access the arrays outside of the autoreplace GUI, so feel free to read from them in other patches as well
18 years ago
Darkvater 7e4d0f112e (svn r6406) -Codechange: Rename TileOffsByDir to TileOffsByDiagDir because it accepts
DiagDirections, and add TileOffsByDir that handles Directions.
-Codechange: Make the treeloop use TileOffsByDir().
18 years ago
rubidium 21ac20aeca (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
-Cleanup: whitespace alignment of a few tables.
18 years ago
Darkvater 52fa30022a (svn r6378) -Codechange: Rename VLW_FLAGS to VLW_MASK as it is a mask 18 years ago
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 fa7309cded (svn r6356) -Fix: FS#263 planes come out of hangar and drive back into hangar
Now all vehicles are serviced when it's time for service and they are in a depot
   This will avoid the goto depot order from ever showing up when in a depot
18 years ago
tron d5e5a78cf4 (svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
DestinationID being a union of these types is just hassle without benefit and cannot be handled correctly everywhere because of local lack of information
18 years ago
bjarni 5a86b502c2 (svn r6352) -Fix: FS#322 Send to depot bug
now vehicles can't be sent to a depot when they are already inside a depot
   before they would remember the order and try to turn around when leaving the depot
18 years ago
bjarni 14e8615cf2 (svn r6304) -Codechange r6295: Use !! instead of (bool) in commands to send vehicles to depots 18 years ago
bjarni 545584ec51 (svn r6295) -Feature: using goto depot with a different control selection will now alter the service/stopping in depot flag instead of cancelling the goto depot order 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 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
KUDr 01048caeb0 (svn r6223) -Fix: RVs with empty order list were able to enter the depot or road stop from the back. I introduced this bug when I "improved" GetTileTrackStatus(). (thanks glx for the report and fix). 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
bjarni 422d073910 (svn r6165) -Feature: control click Goto Depot will now make the vehicle service
at the depot and leave right away.
 To tell the difference the status of stopping vehicles will be in red,
 while servicing vehicles will be green.
-Codechange: remove some dead code in CmdSendAircraftToHangar() since it is
 conflicting with new functionality. Now p2 means the same for all types
18 years ago
truelight 65f5ec13f6 (svn r6142) -Codechange: added WaypointID (sorry DV, couldn't splits it anymore)
-Codechange: introduced DestinationID, which is in fact an union of several types
  Used in Order struct, so no longer StationID is abused for all targets.
  Hangars are a big exception, as they use a station-id with GOTO_DEPOT (go figure)
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 bdc1d681a7 (svn r6052) -Codechange: change OrderType (order->type) in a typedef
-Codechange: renamed DeleteDestinationFromVehicleOrder to RemoveOrderFromAllVehicles to reflect his function better
-Codechange: changed the params of RemoveOrderFromAllVehicles, to avoid unneeded variable-creation
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 db397d5a75 (svn r6002) -Cleanup: remove the now redundant BASE_YEAR constant. 18 years ago
rubidium e87e065e41 (svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
-Codechange: store all year related variables that are _not_ stored in a savegame/transported over the network in the same format as _cur_year
18 years ago
Darkvater 8152d0a223 (svn r5899) - Fix [FS#242]: Multistop not working when using NPF (r5033) (mart3p) 18 years ago
rubidium 9fc837ad85 (svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
18 years ago
peter1138 8048e8c5bd (svn r5822) - NewGRF: add support for callback 31, vehicle start/stop check. This allows a set to disallow a vehicle from being started, i.e. to not be able to leave the depot. This is almost a partner to callback 1D. 18 years ago
peter1138 53d2650d9b (svn r5819) - NewGRF: add support for refit costs specified in NewGRF. This may affect the default refit costs for the default rail vehicles. 18 years ago
tron 86e3804dad (svn r5617) if cascade -> switch 18 years ago
tron 4ad467cbce (svn r5607) -Regression [r3597]: Let a road vehicle only overtake if there is no vehicle close except the two involved 18 years ago
peter1138 34e18cbdfe (svn r5427) - Codechange: testing for "== true" is redundant. 18 years ago
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
tron 7fd88e5798 (svn r5155) - Remove the bridge branch merge (revision r5070) 18 years ago
tron d26e40ca7e (svn r5118) Add IsRoadVehInDepot{Stopped,}() 18 years ago
tron 5dd68173c8 (svn r5117) Remove a redundant check: If a road vehicle is in the state 'in depot', don't test if it's a road depot 18 years ago
tron 9ee944cabb (svn r5094) Remove _new_{aircraft,roadveh,ship,train,wagon}_id. _new_vehicle_id is enough. 18 years ago
KUDr 6b1f0d610c (svn r5093) -CodeChange: [YAPF] min. debug level changed from 1 to 3 and 4 for frequent debug messages (performance stats) 18 years ago
KUDr 01aecb8416 (svn r5080) -Fix: RVs can enter other player's depot or roadstop (introduced by YAPF related change of GetTileTrackStatus() - r4419) 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
KUDr af1b942906 (svn r5033) -CodeChange: [YAPF] RoadFindPathToStop() can now use YAPF for multistop handling. 18 years ago
KUDr 308f27a3de (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing. 18 years ago
peter1138 70306b544f (svn r4910) - NewGRF: add and initialize cargo subtype for vehicle visual variations 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
rubidium 2a337ab009 (svn r4789) - Codechange: rename RoadType to RoadTileType and ROAD_{NORMAL,CROSSING,DEPOT} to ROAD_TILE_* for consistency 18 years ago
tron 6dbc9c9ced (svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE} 18 years ago
Darkvater 0a0b8f22aa (svn r4529) - Codechange: Use proper naming for hex numbers in debug prints eg. 0xF3A6. Use fixed lengths where applicable (newgrf). Unfortunately '%#X' is unusable since it gives 0XFF3 and '%#x' gives 0xff3 while we want 0xFF3 :P 18 years ago
celestar 78f95ecdeb (svn r4507) Just a comment 18 years ago
celestar dd3a3adbbd (svn r4506) -Fix: (FS#95) Use the tile hash when pathfinding to a depot. Eats a tiny bit of performance, but the likelihood that the depot is found is greatly increased 18 years ago
Darkvater fd8e02119c (svn r4435) - Fix: an assertion triggered when trying to remove a bridge with the remove-tool (r4348 surfaced this). In CmdRemoveRoad tiletype was not checked for ownership. Intorudce IsLevelCrossingTile() which checks if a tile is a crossing without knowing the type. Suggested by peter1138 and Tron. 18 years ago
belugas fbf6dd2cb9 (svn r4359) MSV6 Release mode now compiles (problem of UINT_MAX. stdafx.h should be the first include). Thanks to KUDr for solution and testing 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()
18 years ago