Commit Graph

359 Commits

Author SHA1 Message Date
rubidium 291f6490c6 (svn r18366) -Codechange: move the OPF ship pathfinder 'magic' that was in ship_cmd.cpp to the pathfinder code itself 2009-12-01 23:22:41 +00:00
rubidium 5d7af2561f (svn r18365) -Cleanup: remove duplicate table 2009-12-01 23:19:46 +00:00
rubidium f52e27c688 (svn r18364) -Codechange: move the pathfinders and their related files into a separate directory 2009-12-01 22:45:39 +00:00
rubidium 3a83eab967 (svn r18362) -Cleanup: remove OPF for RVs and NTP to clean up lots of code and simplify some things for the future 2009-12-01 22:18:51 +00:00
frosch d507136e04 (svn r18268) -Feature: [NewGRF] Make price base multipliers related to vehicles only apply to the GRF locally, if it defines engines of that type itself. 2009-11-24 13:15:58 +00:00
frosch 912bce0b8c (svn r18266) -Codechange: Add a function to compute prices from price base and cost factor and use it consistently for vehicle purchase, running cost, and refit cost. 2009-11-24 13:12:34 +00:00
rubidium bae066ecaf (svn r18123) -Codechange: try our best to keep the vehicles within the build vehicle list/autoreplace lists instead of overflowing. 2009-11-16 17:58:46 +00:00
rubidium 1c5a92ae98 (svn r18121) -Codechange: pass the maximum left/right location to the Draw*Engine functions 2009-11-16 17:15:42 +00:00
frosch ba1fc280e3 (svn r18005) -Codechange: Convert the Prices struct into an array and an enum. 2009-11-07 22:47:54 +00:00
frosch 00aca63b48 (svn r17899) -Codechange: Deduplicate code for refitting vehicles. 2009-10-28 21:09:37 +00:00
frosch 83894809d0 (svn r17897) -Fix [FS#3255]: CB15 and CB36 (capacity) were not always called when they should.
-Codechange: Move capacity calculation to a single function for all vehicle types, so the behaviour can be kept consistent easier.
2009-10-28 18:31:16 +00:00
frosch 334b809644 (svn r17894) -Fix: Invalidate cache of vehicle vars 40-43 after testruns of certain commands, that change them temporarily. 2009-10-27 20:37:55 +00:00
frosch f3aacb8fe3 (svn r17725) -Codechange: Reduce usage of EngInfo and XxxVehInfo, esp. when a Engine * is already present. 2009-10-06 19:17:07 +00:00
frosch b243f6ca97 (svn r17700) -Codechange: Integrate ShipVehicleInfo::refittable into EngineInfo::refit_mask during initialisation. 2009-10-04 20:33:18 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
frosch e261d8d9a0 (svn r17616) -Codechange [FS#3222]: Enumerize properties used in callback 0x36. Based on Terkhen's work. 2009-09-22 19:28:57 +00:00
frosch 7fa4d576ca (svn r17594) -Fix: Vehicle image was not always updated when needed. 2009-09-20 19:36:27 +00:00
rubidium 04d5b67eb6 (svn r17567) -Fix: some doxygen warnings 2009-09-18 14:23:58 +00:00
rubidium 64bafcbe18 (svn r17534) -Codechange: unify the naming of callback masks/flags 2009-09-14 12:22:57 +00:00
frosch ebd916be3d (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 2009-09-13 19:15:59 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
frosch efcaefd178 (svn r17121) -Fix [FS#3060]: Update vehicle position cache when the vehicle sprite changes. 2009-08-08 18:45:12 +00:00
smatz adcc5338f3 (svn r17085) -Codechange: unify the place where vehicle's cargo ages 2009-08-06 12:44:10 +00:00
rubidium 1fe3ad3288 (svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives 2009-08-05 17:59:21 +00:00
rubidium 3b8d0621a2 (svn r16785) -Codechange: make ships going to buoys use OT_GOTO_WAYPOINT too 2009-07-10 18:30:02 +00:00
yexo 44c15e4196 (svn r16647) -Codechange: remove newgrf.h include from newgrf_engine.h to prevent unnecessary inclusion newgrf.h anyway 2009-06-24 21:33:11 +00:00
smatz 05c695a647 (svn r16646) -Codechange: rename GetDepotByTile() to Depot::GetByTile() 2009-06-24 19:26:41 +00:00
smatz 8343340acb (svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile() 2009-06-24 17:39:54 +00:00
rubidium 512b021e26 (svn r16581) -Codechange: unify the access to Engine::lifelength. 2009-06-16 13:52:18 +00:00
rubidium 4b05617c42 (svn r16580) -Codechange: rename Engine::image_index to original_image_index to not confuse it with image_index from *VehInfo. 2009-06-16 13:31:06 +00:00
frosch 0d782b0f96 (svn r16498) -Codechange: Remove hardly used HASBITS. 2009-06-01 15:01:54 +00:00
frosch 9853c0dc22 (svn r16480) -Fix (r15617): Invalidate newgrf variable caches of more vehicles in more places. Esp. they were only invalidated for trains. 2009-05-31 12:03:14 +00:00
smatz 5a463c8347 (svn r16442) -Codechange: use new Vehicle accessors at more places 2009-05-26 22:45:48 +00:00
yexo 0d56cfabfa (svn r16439) -Change: Make the default vehicle servicing settings company-based settings, so in a multiplayer game everyone can change them. 2009-05-26 21:59:49 +00:00
rubidium 984bd3b98d (svn r16427) -Codechange: replace a few magic numbers with an existing constant and unduplicate a few lines. 2009-05-26 08:53:16 +00:00
frosch a4557c7da4 (svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted. 2009-05-24 16:52:42 +00:00
rubidium 6d1c974254 (svn r16384) -Codechange: move u.effect to EffectVehicle 2009-05-22 18:56:25 +00:00
rubidium 441011b782 (svn r16382) -Codechange: make GetVehicleTrackdir a member function of Vehicle. 2009-05-22 18:17:20 +00:00
smatz b687ac51ee (svn r16376) -Codechange: Vehicle::Tick() now returns false if the vehicle was deleted 2009-05-22 13:53:14 +00:00
smatz 8808f3beea (svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get() 2009-05-18 16:21:28 +00:00
smatz 871107f529 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 2009-05-17 01:00:56 +00:00
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 2009-05-16 23:34:14 +00:00
frosch 32ecc48ec8 (svn r16303) -Codechange: Use the question mark as default sprite when creating vehicles, instead of arbitrary sprites not related to the vehicle. (though that also applies to the question mark) 2009-05-13 21:45:56 +00:00
frosch 677ea100b3 (svn r16260) -Codechange: Add Vehicle::IncrementOrderIndex() to deduplicate some code. 2009-05-09 13:37:18 +00:00
rubidium 59d45a04d6 (svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible. 2009-04-21 23:40:56 +00:00
rubidium b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 2009-03-15 00:32:18 +00:00
rubidium 9d018723b7 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 2009-03-14 18:16:29 +00:00
rubidium 655b0ccc2e (svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove. 2009-03-11 20:43:14 +00:00
rubidium 8316c4381f (svn r15545) -Fix [FS#2653]: if a buoy was placed directly in front of a dock, that dock was seen as a buoy and thus skipped once within 3 tiles. 2009-02-21 14:02:00 +00:00
frosch d3850e101c (svn r15541) -Revert (r15399): 'v->cargo_type' is also used in other places, which cannot accept CT_INVALID.
-Codechange: Add Engine::GetDefaultCargoType() and Engine::CanCarryCargo() and use them.
-Fix [FS#2617]: When articulated parts have no available default cargo, use the cargo type of the first part for livery selection.
-Change: To decide whether a vehicle is refittable do not test its current capacity for being zero, but always use the 'capacity property'.
  Note: The property is used unmodifed without calling CB 15/36. By setting it to a non-zero value and returning zero in the callback vehicles can be refitted to/from zero capacity for e.g. livery effects.
  Note: It is intentional that you cannot control refittability by CB 36.
2009-02-21 12:52:41 +00:00
rubidium c2d9c85c0f (svn r15518) -Fix [FS#2631]: use distance to closest station tile as estimate for YAPF too (NPF already does so). This makes it behave 'better' with wide stations. 2009-02-19 00:15:36 +00:00
rubidium d846eef0b6 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 2009-02-09 21:20:05 +00:00
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 2009-02-09 02:57:15 +00:00
frosch 9c4c0ff3a1 (svn r15326) -Fix: Old-ai-ishm when refitting vehicles. 2009-02-03 20:39:06 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
frosch 7dbd0582b6 (svn r15286) -Fix: Refitting did not invalidate vehicle-colour-maps of road-vehicles, ships and aircraft, as well vehicle-length of road-vehicles. 2009-01-27 19:44:36 +00:00
glx c1cf3934fa (svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication. 2009-01-25 00:57:03 +00:00
glx c5f0fe7c40 (svn r15210) -Fix: Vehicle::GetRunningCost() was wrong for ships and aircraft 2009-01-22 21:33:08 +00:00
smatz e00cf92f47 (svn r15077) -Codechange: enumify DAYS_IN_YEAR and DAYS_IN_LEAP_YEAR
-Change: when computing daily running cost, divide by 365 (instead of 364). Since r12134, the rounding errors don't need this correction anymore
2009-01-13 22:58:03 +00:00
truebrain a3dd7506d3 (svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
NoAI is an API (a framework) to build your own AIs in. See:
   http://wiki.openttd.org/wiki/index.php/AI:Main_Page
 With many thanks to:
  - glx and Rubidium for their syncing, feedback and hard work
  - Yexo for his feedback, patches, and AIs which tested the system very deep
  - Morloth for his feedback and patches
  - TJIP for hosting a challenge which kept NoAI on track
  - All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
2009-01-12 17:11:45 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
rubidium f0b0691bfe (svn r14933) -Codechange: check the whether a pool item can be constructed instead of trying to make it and check for NULL. 2009-01-09 14:59:02 +00:00
smatz 67bf6a0998 (svn r14835) -Change: apply the 'warn if train's income is negative' setting to other vehicle types, too 2009-01-04 18:34:23 +00:00
rubidium 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 2008-12-28 14:37:19 +00:00
rubidium 3ebe66a5e4 (svn r14748) -Codechange: unduplicate window updating when deleting vehicles. 2008-12-26 21:08:51 +00:00
smatz 419f6e099f (svn r14743) -Codechange: use INVALID_TILE to indicate station doesn't have queried facility (or station/roadstop is invalid) instead of 0 (Yexo) 2008-12-26 18:01:15 +00:00
rubidium 272b2ef0e9 (svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus) 2008-10-14 18:38:51 +00:00
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 2008-09-30 20:51:04 +00:00
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 2008-09-30 20:39:50 +00:00
smatz 6987e6015a (svn r14395) -Fix [FS#2285]: crashes and GUI desyncs when order is deleted/modified while the timetable window is open
-Fix: close any dropdown and child windows in the Order and Timetable windows when selected order is deselected, deleted, ...
2008-09-24 16:40:06 +00:00
smatz 66be028ad4 (svn r14307) -Fix: when deleting a station, remove news items regarding it 2008-09-13 10:19:51 +00:00
rubidium c8e8911ef6 (svn r14223) -Codechange: make GetSprite aware of the 4 different types of sprites: fonts, recolour, mapgen and normal sprites. 2008-09-02 15:20:38 +00:00
peter1138 9d0e1b635a (svn r14078) -Codechange: Rename *VehicleInfo::base_cost to cost_factor, indicating what it actually is. 2008-08-15 17:54:43 +00:00
frosch 844a83ed58 (svn r14076) -Codechange: Merge the four start/stop commands into a single CMD_START_STOP_VEHICLE. 2008-08-15 13:57:43 +00:00
smatz 447ec39f49 (svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not 2008-07-09 20:55:47 +00:00
rubidium 7f6382badd (svn r13464) -Codechange: support NewGRF Action 0x05, type 12. 2008-06-11 13:54:01 +00:00
rubidium 923e21129c (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games. 2008-05-29 15:13:28 +00:00
rubidium 8c9cc415e3 (svn r13255) -Codechange: move _opt to _settings. 2008-05-25 22:36:44 +00:00
rubidium 4625695653 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
2008-05-25 19:17:03 +00:00
rubidium 9defec7876 (svn r13165) -Codechange: replace some RebuildXXXList/ResortXXXList+InvalidateWindowXXX with InvalidateWindowXXXData. 2008-05-18 16:51:44 +00:00
rubidium 76b8970a33 (svn r13100) -Codechange: reduce the amount of parameters passed via AddNewsMessage as there is (for each news message type) a tuple of 4 parameters that is the same for all calls. 2008-05-15 13:39:36 +00:00
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 2008-05-06 15:11:33 +00:00
peter1138 a00371c8db (svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist. 2008-04-29 21:31:29 +00:00
smatz 345f160978 (svn r12870) -Codechange: remove some magic numbers from u.ship.state handling 2008-04-24 13:05:51 +00:00
rubidium 6939569362 (svn r12855) -Codechange: do not use autoptr's for testing whether certain objects can be build, but check it directly in the pool so we do not have to call destructors in the testing phase. Stations still use the autoptr though. 2008-04-23 20:56:08 +00:00
peter1138 5dcd689f56 (svn r12824) -Codechange: Standardise routines for drawing vehicle images, using correct types and less duplication. 2008-04-21 20:50:58 +00:00
rubidium 22140d82c6 (svn r12818) -Codechange: make callbacks 31 and 37 behave like they do in TTDP according to frosch's survey. 2008-04-21 13:45:03 +00:00
rubidium b139756e2b (svn r12804) -Codechange: move the effect vehicle handling out of vehicle.cpp 2008-04-20 11:12:07 +00:00
rubidium f55ffd14bd (svn r12803) -Cleanup: rename SpecialVehicle to EffectVehicle to have a uniform naming of the thing instead of using both names for the same thing. 2008-04-20 10:13:54 +00:00
rubidium 0e624275ee (svn r12795) -Fix [FS#1938]: vehicles could break down during loading and keep loading. The intention of the break down code is not to break down when having zero speed, therefor break downs now do not happen when loading. 2008-04-19 21:23:42 +00:00
rubidium 02cdf01507 (svn r12754) -Codechange: split depot.h into depot_map.h, depot_func.h and depot_base.h and remove quite a lot of unneeded (before this) includes of depot.h. 2008-04-17 19:10:30 +00:00
smatz 059e94e355 (svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used 2008-04-17 18:24:45 +00:00
smatz 9488db56d4 (svn r12745) -Codechange: a bit of naming conventions, introduce Is*DepotTile() 2008-04-17 00:44:20 +00:00
rubidium 14b307a621 (svn r12698) -Codechange: skip orders to stations that do not have a train part anymore, just like is done for road vehicles and ships. 2008-04-14 07:08:43 +00:00
rubidium 570519d79b (svn r12658) -Codechange: unify a vast portion of the CmdSend<VehicleType>ToDepot commands. 2008-04-11 08:40:10 +00:00
rubidium 62bdc381e7 (svn r12657) -Codechange: add 'FindClosestDepot' to the vehicle class. 2008-04-11 08:14:43 +00:00
frosch 96700d5605 (svn r12629) -Codechange: Split VehicleNeedsService() into Vehicle::NeedsServicing() and Vehicle::NeedsAutomaticServicing().
-Fix (r11052): Disable servicing by service-interval if a vehicle has depot orders.
2008-04-08 15:48:32 +00:00
rubidium f1cd7ef5ee (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness. 2008-04-07 19:18:56 +00:00
rubidium fb1c4eccd8 (svn r12593) -Codechange: hide Order's flags in most of the code. 2008-04-06 15:09:45 +00:00
rubidium d6623cf654 (svn r12588) -Codechange: do not access the destination of an order directly. 2008-04-06 07:48:51 +00:00
rubidium 5b47f81b0f (svn r12584) -Codechange: do not access the order type directly. 2008-04-05 23:36:54 +00:00
rubidium 5eb5889954 (svn r12578) -Codechange: merge the aircrafts ProcessOrder too into the 'unified' ProcessOrder. 2008-04-05 12:01:34 +00:00
rubidium bdd64495cd (svn r12575) -Codechange: unduplicate Process*Orders for trains, ships and road vehicles. 2008-04-05 10:55:50 +00:00
frosch 5e5e074a5d (svn r12540) -Codechange: Enumify some values in original pathfinder and remove an unused variable. 2008-04-02 13:57:25 +00:00
frosch 15a9fba867 (svn r12531) -Codechange: Rename some variables for consistency. 2008-04-01 14:03:20 +00:00
rubidium ef2be7d0fc (svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h. 2008-03-31 00:17:39 +00:00
rubidium 2edd403656 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h. 2008-03-31 00:06:17 +00:00
rubidium 4a1035ab95 (svn r12488) -Codechange: split order.h into order_base.h and order_func.h. 2008-03-30 23:24:18 +00:00
rubidium eeabab4555 (svn r12459) -Codechange: split news.h into news_type.h and news_func.h. 2008-03-28 08:53:36 +00:00
frosch b7993793c8 (svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus(). 2008-02-20 17:49:50 +00:00
frosch f5929d413b (svn r12193) -Codechange: Rename a magic variable, give it a decent type, and remove a 'goto'. 2008-02-20 15:13:42 +00:00
smatz a0ddc43e92 (svn r12134) -Change: count the number of ticks a vehicle was running this day to calculate running cost
-Fix [FS#1739]: vehicle profit is now counted with 8bit fract, so it is now shown properly in the vehicle details window
2008-02-13 19:24:40 +00:00
smatz fd51465c8b (svn r12132) -Cleanup: convert pathfinder selection from if/else to switch/case at many places 2008-02-13 17:54:11 +00:00
smatz 507728f46b (svn r12129) -Change [FS#1759]: simplified patch settings for pathfinders (Yorick) 2008-02-13 14:21:36 +00:00
frosch 7b9efcea21 (svn r12085) -Fix(r12058): Road vehicles could get stuck, when NPF told them to reverse on junction tiles. (spotted by SmatZ) 2008-02-08 16:25:55 +00:00
glx 525409b0fc (svn r12037) -Codechange: replace OnNewDay_(Aircraft|RoadVeh|Ship|Train) with an OnNewDay method in the Vehicle class 2008-02-01 22:02:14 +00:00
smatz d6eaf1a11a (svn r11962) -Cleanup: OPF is no longer used to update signals 2008-01-23 17:30:28 +00:00
smatz 1d59439166 (svn r11916) -Codechange: use enums from VehicleViewWindowWidgets instead of constants
-Fix: refit button widget was not correctly updated
2008-01-18 13:02:47 +00:00
smatz ac7bc24b0e (svn r11882) -Codechange: introduce MarkSingleVehicleDirty() and simplify the code at some places 2008-01-16 21:17:31 +00:00
rubidium 576f8ad93e (svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*. 2008-01-15 18:44:22 +00:00
rubidium dc87b05e8c (svn r11834) -Codechange: only include settings_type.h if needed. 2008-01-13 14:37:30 +00:00
rubidium d4e6a6bf57 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 2008-01-13 01:21:35 +00:00
peter1138 ab8382c0db (svn r11822) -Codechange: Replaced fixed size custom name array. Names are now attached to their object directly and there is
no limit to the amount of names.
-Fix: NewGRF engines could not be renamed.
2008-01-12 19:58:06 +00:00
rubidium ac528411df (svn r11818) -Codechange: split player.h into smaller pieces. 2008-01-12 14:10:35 +00:00
rubidium 998d7644f6 (svn r11800) -Codechange: move some functions to a more logical location + some type safety. 2008-01-09 21:05:03 +00:00
rubidium 46650c54b6 (svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114). 2008-01-09 16:55:48 +00:00
peter1138 a01fc4c142 (svn r11789) -Codechange: coding style for global variable names 2008-01-09 10:15:20 +00:00
rubidium 0e517fe023 (svn r11787) -Codechange: more header rewrites. This time related to viewport.h. 2008-01-09 09:45:45 +00:00
rubidium a8a3a7e3f2 (svn r11775) -Codechange: move all autoreplace/autorenew functions to a single location. 2008-01-07 09:19:53 +00:00
rubidium b0ac283aec (svn r11774) -Change: do not include variables.h in a header when it is not needed. 2008-01-07 00:57:19 +00:00
rubidium e5e75bd8f8 (svn r11719) -Codechange: split sound.h in a header with types and one with functions. 2007-12-29 09:24:26 +00:00
smatz 38f0e422ac (svn r11707) -Fix: do not allow refitting flooded (destroyed) vehicles 2007-12-27 14:10:47 +00:00
rubidium 384503e7d3 (svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes. 2007-12-27 13:35:39 +00:00
rubidium b9046c97fb (svn r11702) -Codechange: move all date related stuff to date*. 2007-12-26 13:50:40 +00:00
rubidium 2786d789a1 (svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h). 2007-12-26 11:45:43 +00:00
rubidium 429521a7d1 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 2007-12-25 11:26:07 +00:00
rubidium 6a9e77e079 (svn r11680) -Codechange: refactor more out of openttd.h and functions.h. 2007-12-21 22:50:51 +00:00
rubidium 9e9cfe6e59 (svn r11677) -Codechange: move price and command related types/functions to their respective places. 2007-12-21 21:50:46 +00:00
rubidium 433a9f3c09 (svn r11675) -Codechange: split the string types from the string functions. 2007-12-21 19:49:27 +00:00
rubidium 5b49e75453 (svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h 2007-12-19 23:26:02 +00:00
rubidium 5dc0e86d1b (svn r11605) -Fix [FS#1482, FS#1523]: wrong count of Kirby trains when a ship was build. 2007-12-09 15:15:26 +00:00
skidd13 a91c2a4c39 (svn r11485) -Codechange: Remove the doubled function ToggleBitT and rename the remaining to fit with the naming style 2007-11-20 14:11:19 +00:00
skidd13 eeaa348f8b (svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style 2007-11-20 13:35:54 +00:00
skidd13 5c31a973a1 (svn r11482) -Codechange: Remove the doubled function ClrBitT and rename the remaining to fit with the naming style 2007-11-19 21:32:20 +00:00
skidd13 71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 2007-11-19 21:02:30 +00:00
rubidium f486486dd8 (svn r11365) -Fix [FS#1288]: when stopping a ship or aircraft, set their speed to 0 so they won't continue at the speed where they were stopped at. 2007-10-31 22:09:23 +00:00
rubidium 4bb210614b (svn r11332) -Fix: vehicles getting a value of 0 on construction.
-Fix: assertion when selling vehicles.
2007-10-21 16:45:00 +00:00
rubidium b6c9bc80cf (svn r11229) -Fix [FS#1307]: one could sell vehicles that were crashed in a depot, which would still yield money. 2007-10-08 20:06:37 +00:00
rubidium 127c7c9b0f (svn r11173) -Codechange: rename some callback enums so they are more uniform. 2007-09-26 17:33:32 +00:00
rubidium 38ff181ebf (svn r11072) -Fix [FS#1045]: when a vehicle had a service order, the goto-depot button did not make it possible to stop the vehicle at that depot. 2007-09-09 17:42:59 +00:00
rubidium 2c8e50f20c (svn r11017) -Codechange: unify determining whether a vehicle needs/can be service a little more. 2007-08-31 17:13:39 +00:00
rubidium a407d53d1b (svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot. 2007-08-29 21:49:08 +00:00
bjarni a973c893fb (svn r10823) -Fix r8610 [FS#1097]: the autoreplace window vehicle count didn't always update correctly) (Matthias) 2007-08-07 23:07:10 +00:00
rubidium 836105864c (svn r10770) -Codechange: use the pool item class as super class for the vehicle struct.
-Codechange: do not force "special" vehicles to be allocated in the low 1024 vehicle slots and non "special" vehicles in the rest of the slots.
2007-08-03 19:36:00 +00:00
rubidium 5bd241eb5b (svn r10697) -Codechange: give a more sensible names to some of the unkX variables. 2007-07-26 15:37:19 +00:00
rubidium efc7fdf2fd (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h 2007-07-16 09:16:58 +00:00
rubidium 90f85c957a (svn r10409) -Codechange: replace (Aircraft|RoadVeh|Ship|Train)_Tick with a Tick method in the Vehicle class. 2007-07-01 19:24:54 +00:00
rubidium 83a880c882 (svn r10408) -Codechange: make GetImage a class method of Vehicle instead of Get(Aircraft|RoadVeh|Ship|Train)Image. 2007-07-01 19:11:47 +00:00
peter1138 de357c74c1 (svn r10363) -Fix [FS#911]: invalidating autoreplace windows didn't take account of vehicle group (Matthias Wolf) 2007-06-27 20:40:20 +00:00
maedhros fb284a9264 (svn r10335) -Fix (r10331): Increment the current order index *after* using it in UpdateVehicleTimetable. 2007-06-25 23:14:13 +00:00
rubidium e5c352818d (svn r10266) -Codechange: keep track of the origin, time of travel and accumulated feeder share (transfers) of individual pieces of cargo. This means that cargo isn't thrown on a big pile when it's put in a station or unloaded at a station, however the GUI does not reflect these changes yet so you will not actually see it. 2007-06-22 11:58:59 +00:00
maedhros cf0118ee63 (svn r10236) -Feature: Introduce a form of timetabling for vehicles. 2007-06-20 19:17:22 +00:00
rubidium 2ee73b50b8 (svn r10208) -Codechange: replace int32 with Money where appropriate. 2007-06-18 21:44:47 +00:00
rubidium 49220cc6f1 (svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified. 2007-06-18 19:53:50 +00:00
rubidium 966e2738b9 (svn r10197) -Codechange: replace int32 with CommandCost where appropriate. 2007-06-18 10:48:15 +00:00
rubidium 97b74fe4f2 (svn r10131) -Fix [FS#810]: when removing a dock, a ship will always try to reach the old location of the dock even when it cannot anymore because it the old location of the dock is now land instead of water. 2007-06-13 09:12:10 +00:00
rubidium 440d723d84 (svn r9914) -Codechange: prepare GTTS and the pathfinders to handle multiple road types on a single tile. 2007-05-24 22:41:50 +00:00
rubidium 42f920964b (svn r9833) -Fix: also 'leave' the station when leaving for automatic servicing. 2007-05-14 08:07:20 +00:00
peter1138 1d5135830a (svn r9828) -Codechange: [NewGRF] Add support for changing cargo capacity with callback 36. This is set on construction for ships and roadvehicles, and whenever carriages are attached for trains. 2007-05-12 07:05:34 +00:00
peter1138 bc7d762196 (svn r9809) -Codechange: [NewGRF] Add callback 36 properties to purchase lists and add running cost changing for ships. 2007-05-07 16:38:21 +00:00
rubidium 2efecd34c4 (svn r9808) -Codechange: unify the Handle<VehicleType>Loading functions. 2007-05-07 16:21:34 +00:00
rubidium 161786e222 (svn r9807) -Codechange: unify playing of sound when vehicle has been loaded and leaves the station. 2007-05-07 15:58:05 +00:00
peter1138 4591fb5b0d (svn r9806) -Codechange: [NewGRF] Add callback 36 support for purchase cost, for all vehicle types. 2007-05-07 13:26:10 +00:00
rubidium abbaa1691e (svn r9794) -Codechange: refactor the question whether a vehicle can be loaded into LoadUnloadVehicle instead of duplicating it for each vehicle. 2007-05-06 14:59:01 +00:00
rubidium 981bf52bdd (svn r9770) -Codechange: perform the payment of cargo when loading/unloading, but when arriving at the station. 2007-05-02 18:29:11 +00:00
rubidium a4e045a3fb (svn r9760) -Codechange: remove the need for saving some vehicle variables. 2007-05-01 16:35:14 +00:00
rubidium ec9ac99d01 (svn r9755) -Codechange: refactor some more of the begin loading stuff. 2007-04-29 22:33:51 +00:00
rubidium 202009522c (svn r9754) -Codechange: make classes for all vehicle types, so we can make nicer/better maintainable code, i.e. virtual methods instead of switches. 2007-04-29 21:24:08 +00:00
rubidium 6440440f12 (svn r9752) -Codechange: remove some duplication related to BeginLoading. 2007-04-29 18:21:24 +00:00
maedhros 02e770ff2c (svn r9742) -Fix (r9689) [FS#739]: Fix cloning with refit costs again, hopefully for good this time. 2007-04-29 08:43:00 +00:00
maedhros 034f3591cf (svn r9685) -Fix (r9683): Call v->LeaveStation() when a vehicle in a station is sent to a depot. 2007-04-20 11:39:01 +00:00
rubidium 80c259f64f (svn r9672) -Cleanup: lots of coding style fixes around operands. 2007-04-18 22:10:36 +00:00
peter1138 41cf2fa69b (svn r9671) -Codechange: Implement NewGRF callback 36, which allows changing of various properties which were previously static. Vehicle max speed and train power/te/running costs are adjustable. 2007-04-18 18:37:40 +00:00
maedhros ccaaa7d33a (svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist. 2007-04-12 13:07:15 +00:00
belugas dfe5533db6 (svn r9556) -Documentation: doxygen and comment-style changes. 'R', 'S'.. The end of the preliminary work is near 2007-04-04 01:35:16 +00:00
maedhros eae03e0f72 (svn r9543) -Fix [FS#691]: Split up STR_ENGINE_NOT_BUILDABLE into four strings so it can be
translated properly and remove "buildable", since it isn't actually a word.
2007-04-02 11:35:08 +00:00
belugas 06d3669bb5 (svn r9400) -Codechange: Use some more representative enum names for landscape types. 2007-03-22 03:42:43 +00:00
peter1138 92486ac980 (svn r9259) -Codechange: NUM_CARGO isn't a valid cargo type... 2007-03-16 21:42:11 +00:00
bjarni c2b7d0192d (svn r9072) -Codechange: [Orders] added methods to orders to free them and check if they are in use 2007-03-08 21:39:34 +00:00
rubidium ce919e8c71 (svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code). 2007-03-08 16:27:54 +00:00
rubidium 24c4d5b06d (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 2007-03-07 12:11:48 +00:00
rubidium 36bb92ae24 (svn r9050) -Codechange: Foo(void) -> Foo() 2007-03-07 11:47:46 +00:00
maedhros 469fbc912c (svn r8946) -Feature: [NewGRF] Add support for vehicle variables 0xFE and 0xFF bit 10,
which is set when a vehicle was built during the exclusive testing phase.
2007-02-28 17:59:05 +00:00
maedhros aadd8a4b44 (svn r8945) -Codechange: Rename v->load_status to v->vehicle_flags so it can be used for more than just the gradual loading status. 2007-02-28 17:18:36 +00:00
tron 1ce43c1a37 (svn r8897) -Fix
Change the signature of GetNewVehiclePos():
-void GetNewVehiclePos(const Vehicle *v, GetNewVehiclePosResult *gp);
+GetNewVehiclePosResult GetNewVehiclePos(const Vehicle *v);
2007-02-25 10:49:13 +00:00
tron 696b895b77 (svn r8896) -Fix
Most (i.e. 13 of 15) callers of GetNewVehiclePos() do not care for the return and the others can figure it out by inspecting the information returned in struct GetNewVehiclePosResult.
Therefore remove the return value.
2007-02-25 10:25:25 +00:00
rubidium d1d1d170f3 (svn r8703) -Codechange/cleanup: some magic numbers -> enums and other small coding style changes to the ShipController and TrainController. 2007-02-13 11:29:20 +00:00
rubidium 4ec7eb2201 (svn r8701) -Codechange: replace magic numbers with enums for u.rail.track. 2007-02-13 10:46:45 +00:00
rubidium a419f4aeda (svn r8698) -Codechange: enumify the returns of VehicleEnterTile 2007-02-13 10:26:53 +00:00
bjarni 0c8078ae29 (svn r8661) -Fix: [depot windows] Enlarge the blocks in the depot window if a sprite is too big to fit (ships and aircraft only)
-Codechange: depot windows default now makes a 1x1 matrix and resize the window by block size*number of blocks
   This will make less vehicle type specific code and easier to read resizing based on sprite sizes
2007-02-10 13:37:32 +00:00