Commit Graph

85 Commits

Author SHA1 Message Date
truelight b23f719ab9 (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
2006-08-22 18:15:17 +00:00
truelight 0461d89612 (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.
2006-08-22 15:33:35 +00:00
rubidium 480af9c917 (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. 2006-08-22 14:38:37 +00:00
rubidium a0b4a29a57 (svn r5919) -Cleanup: use the type Date when the variable really is a date 2006-08-15 16:55:40 +00:00
tron 68c2a77910 (svn r5896) Remove pointless indirection similar to r5894 and remove an unnecessary global variable 2006-08-14 21:02:48 +00:00
tron 8ed7b09c52 (svn r5615) Move GetStationTileForVehicle() to its only user 2006-07-26 10:00:33 +00:00
richk a832ca51fe (svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
Commuter airport: Small. 5x4. 3 terminals, 2 helipads.
Intercontinental: massive. 9x11. 8 terminals, 2 helipads, 4 runways.
Helidepot: a small heliport with a depot for helis only.
Helistation: a large heliport with 3 helipads and a depot.
2006-06-23 22:05:40 +00:00
celestar 65a6286345 (svn r5063) -Codechange: Add a function to determine the length of a platform (request by KUDr) 2006-06-01 09:41:35 +00:00
KUDr 5e73dce0e7 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing. 2006-05-27 16:12:16 +00:00
celestar 48d991b819 (svn r4822) -Feature: Station List View can now be sorted and filtered (by waiting cargo type and facilities) 2006-05-11 10:33:58 +00:00
peter1138 7d41c0d7cf (svn r4782) - Newstations: fix issue with saving/loading games with newstations on big endian architectures. 2006-05-08 13:35:25 +00:00
peter1138 10992deeb3 (svn r4757) - Newstations: add saveload support for custom station speclists 2006-05-06 21:46:26 +00:00
peter1138 f689b20874 (svn r4754) - Newstations: expose default station display data via a function so we can use it (rarely) in other places. 2006-05-06 20:33:22 +00:00
peter1138 725f04b0e1 (svn r4612) - NewStations: add random bits (for graphic variation) to stations 2006-04-28 20:48:45 +00:00
peter1138 de84d6338d (svn r4473) - Newstations:
- Alter parameters of CMD_BUILD_RAILROAD_STATION to accept a custom station class and id.
  - Add a dynamically allocated list of custom stations that the SpecIndex (m4) references.
2006-04-19 07:17:00 +00:00
celestar e75e4e8f74 (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)
2006-04-18 08:50:17 +00:00
peter1138 3b6cbf62d4 (svn r4460) - Newstations: remove unused class_id / stat_id variables from the
Station struct.
2006-04-17 18:47:50 +00:00
belugas 88e0bab283 (svn r4426) Code Cleaning : replacing tabs with spaces, removing obvious comments, aligning arrays etc... 2006-04-15 03:08:14 +00:00
tron 90836a461d (svn r4324) Remove the unused road stop type attribute from struct RoadStop 2006-04-08 13:50:01 +00:00
celestar 8b151d8faa (svn r4272) -Codechange: Moved the map-accessing stuff from station.h into station_map.h 2006-04-04 11:35:52 +00:00
celestar 5931b34aff (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
2006-04-03 14:25:32 +00:00
celestar 446493149c (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency 2006-03-31 19:10:54 +00:00
celestar 3ae99e17bb (svn r4155) -Changed GetRoadStopByTile to use GetStationType and moved it. TODO: unify RS_TRUCK and STATION_TRUCK (same for bus) 2006-03-29 19:37:18 +00:00
Darkvater 2c27f45cdc (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. 2006-03-26 22:55:27 +00:00
tron 9ad72f2d47 (svn r4111) Fix/Remove some stale comments 2006-03-26 11:08:44 +00:00
tron f007ad282c (svn r3766) Add a function to get the RoadBits from an arbitrary tile 2006-03-05 12:22:20 +00:00
celestar 9d54e51ef9 (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).
2006-03-02 08:55:12 +00:00
peter1138 23b13d3f42 (svn r3681) - [Multistop] Check the RoadStop type before check its status. This fixes an assert introduced in r3663. Also fix the return type of GetRoadStopType(). 2006-02-27 19:43:19 +00:00
peter1138 6cfefdb275 (svn r3612) - RoadStop->slot[] stores a vehicle index. Adjust its type and use INVALID_VEHICLE instead of nonsense INVALID_SLOT. 2006-02-18 14:11:23 +00:00
peter1138 05d7d046c7 (svn r3530) - NewGRF: Move station resolver to newgrf_station 2006-02-03 23:02:01 +00:00
peter1138 ea4c5bbd2d (svn r3525) - Rename station_newgrf.[ch] to newgrf_station.[ch], and update project files. 2006-02-03 15:51:00 +00:00
tron e272b03fee (svn r3365) Staticise 36 functions 2006-01-05 12:40:50 +00:00
tron 246c126d25 (svn r3353) Simplify the automatic length adjustment algorithm for replacing trains: Use the length of the train before the replacement as reference length 2005-12-29 12:42:59 +00:00
tron 833032adc0 (svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT 2005-11-14 08:09:57 +00:00
peter1138 ff8223150a (svn r3167) - NewGRF: Start moving custom station code to separate files.
Rewrite handling of station classes.
          Allow for more than 8 station tile layouts.
          Start of code to unload custom stations.
2005-11-12 00:19:34 +00:00
bjarni 5481dcd191 (svn r3155) -Feature: [autoreplace] autoreplace can now remove cars from too long trains
-Trains will now remember the length of stations it visits and sell cars
        when being autoreplaced if they became too long
        -If it needs to remove cars, then it starts from the front and sells
        all it can find until the train is short enough
        -This only works for trains, that knows the station length of the route
        so a full uninterrupted run is needed
        -a train needs 1-2 runs to detect if the shortest station is expanded
        -This feature can be turned on and off in the train replace window
        and each company can have it's own setting
        -NOTE: minor savegame version bump
2005-11-07 23:20:47 +00:00
tron 2cc2154ad2 (svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
2005-10-22 06:39:32 +00:00
tron 66bf4f863d (svn r3049) Replace byte/int/uint by RailType where appropriate 2005-10-16 09:13:04 +00:00
tron 3397e202c8 (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants 2005-10-07 07:35:15 +00:00
peter1138 9fabe008a0 (svn r3014) -NewGRF, Codechange: Make all sprite group references be pointers instead of copying the data around. 2005-10-04 19:52:26 +00:00
tron ed8c9c91d6 (svn r3001) s/Player*/const Player*/
s/byte/PlayerID/
s/int/PlayerID/
and related changes
2005-09-30 20:37:25 +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
tron a227065ab7 (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
tron e53c4db866 (svn r2664) Remove depedency on player.h from variables.h 2005-07-21 19:36:43 +00:00
tron 8c1d74162f (svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes. 2005-07-13 18:04:01 +00:00
tron 3154e7148d (svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile" 2005-06-24 12:38:35 +00:00
celestar 9b8cb17831 (svn r2441) -Feature: You can now give transfer order to set up feeder systems 2005-06-15 16:58:15 +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
tron 69a09c6f77 (svn r2272) Remove unused attribute from struct Station 2005-05-06 06:59:24 +00:00
matthijs 2ab5eee78b (svn r2255) - Fix: [ 9680363 ] [NPF] Broken buoy handling for ships
Buoys will now try to get within 3 tiles of a buoy instead of a the actual buoy tile. This gets ships to got past buoys in a realistic (IMO) way instead of barging right through them.
- Fix: [NPF] Trains get curves penalties sometimes even when the track is straight.
- Add: [NPF] Ships get a penalty for going over buoys now, so they will try to go around.
- Add: [NPF] Ships get a penalty for curves too, yay for straight lines.
- Add: TrackdirToTrack(), TrackToTrackdir(), IsDiagonalTrack() and IsDiagonalTrackdir() helper functions.
- Add: IsBuoy() and IsBuoyTile() helper functions.
- Codechange: Rearranged part of the control flow of ShipController(), removing a goto.
2005-05-02 22:13:20 +00:00