Commit Graph

78 Commits

Author SHA1 Message Date
Peter Nelson 322ca6ef54 Codechange: Shuffle members of Vehicle to reduce size.
This reduces space wasted due to member alignment.
2024-03-17 16:22:38 +00:00
frosch b1718478c8 Codechange: Replace old non-standard attributes with C++17/20 standard attributes. 2024-02-02 22:29:28 +01:00
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 2024-01-22 09:04:34 -05:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Peter Nelson 56085be9bd Codechange: Move includes for common STL headers to stdafx. 2023-05-17 10:14:41 +01:00
Rubidium 375a5b8e3f Codechange: refactor FindClosestDepot to not use pointers, but return a struct 2023-01-04 22:30:48 +01:00
Artin Alavi fd4f148c62
Feature: Hotkey to honk a vehicle's horn (#10110) 2022-11-10 21:36:18 +01:00
Tyler Trahan f4ca94d3f6 Codechange: Revenue is not the same as Income
Income is revenue minus costs. Let's name things correctly (without breaking the script API).
2022-04-25 21:51:51 +02:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
glx d8a1be48cd Codechange: Replace vehicle related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
peter1138 f538179878 Feature: Multi-tile docks and docking points. 2019-06-30 16:46:32 +02:00
Charles Pigott 96097b34a5 Codechange: Remove Direction*Byte types 2019-04-29 17:40:22 +01:00
Charles Pigott 9f3928658b Codechange: Remove Track{dir,}{Bits,}Byte types 2019-04-29 17:40:22 +01:00
peter1138 f656f5e8eb Change: Remove ship max order distance.
It is skipped when NPF is in use.
It is trivial to work around by adding and removing dummy orders.
It is mostly alleviated by the ship path cache in YAPF.
2019-03-31 17:22:54 +01:00
Peter Nelson 33e3f49161 Fix #7119: When rotating a ship, apply an additional offset to avoid movement glitch. 2019-02-04 00:19:48 +00:00
Peter Nelson 225790892d Change: Make ships stop and change direction slowly instead of instantly turning. 2019-01-24 20:47:40 +00:00
Peter Nelson 81330b8d6e Change: Add path cache for ships. 2019-01-19 23:11:17 +00:00
Peter Nelson 7af53d7588 Codechange: Use const instead of magic number for ship order distance. Allow slightly further distance when following orders. 2019-01-14 19:57:07 +00:00
PeterN a07394a63a
Change: Remove direction parameter from Vehicle::UpdateDeltaXY. (#6792)
The value is either unused or always the same as this->direction.
2018-05-22 18:43:34 +01:00
frosch d2393b4f6c (svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq. 2016-10-16 14:57:56 +00:00
fonsinchen c915d9fa55 (svn r26546) -Codechange: Make order wait_time, travel_time and max_speed private 2014-05-01 14:48:44 +00:00
michi_cc 245e32a10e (svn r24839) -Feature [FS#5271]: [NewGRF] Support oversized purchase list sprites. (Based on patch by Eddi) 2012-12-23 01:00:25 +00:00
michi_cc ce5c936b07 (svn r24246) -Add [FS#5052-ish]: [NewGRF] Variable with the current max speed for vehicles. 2012-05-14 19:56:49 +00:00
smatz 33d283fdb1 (svn r23588) -Codechange: use the 'final' keyword so compiler can optimise out some indirect calls 2011-12-18 17:17:18 +00:00
frosch bbc3409942 (svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs. 2011-11-01 16:51:47 +00:00
michi_cc 45b95ed629 (svn r22801) -Feature: [YAPF] Take canal/ocean speed fraction of ships into account. 2011-08-21 14:13:22 +00:00
rubidium 5a620d1c65 (svn r22406) -Document: some more "random-ish" tidbits 2011-05-01 19:51:52 +00:00
alberth da0b09557c (svn r21930) -Codechange: Remove unused vehicle GetTypeString() functions. 2011-01-30 21:32:21 +00:00
smatz 6dc24cf643 (svn r21876) -Codechange: typedef SpecializedVehicleBase and GroundVehicleBase to reduce typing 2011-01-21 14:43:38 +00:00
terkhen 25d1b2f54b (svn r21098) -Codechange: Ships now store their max speed in the cache instead of recalculating it every time. 2010-11-06 13:03:17 +00:00
terkhen 0753669fa7 (svn r20143) -Codechange: Remove RecalcShipStuff function. 2010-07-14 12:27:51 +00:00
smatz 00a52cc475 (svn r19756) -Codechange: move UpdateViewport() from Vehicle to SpecializedVehicle in order to improve performance 2010-05-03 23:36:17 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium 833c6f36f3 (svn r18779) -Codechange: merge the command callbacks of the primary vehicles; they are identical 2010-01-11 18:34:02 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium 2fc0cb3e76 (svn r16505) -Fix [FS#2951] (r16472): since g++ 4.4 the implicit (default) constructor will zero the whole class. This caused all vehicle indices to be 0, which causes all kinds of trouble. 2009-06-02 19:12:28 +00:00
smatz 8c11d612e4 (svn r16472) -Codechange: set vehicle type in SpecializedVehicle constructor instead of constructor of each vehicle type 2009-05-30 20:13:12 +00:00
smatz faae8f0177 (svn r16445) -Codechange: update old comments (Yexo) 2009-05-26 23:24:34 +00:00
smatz 5a463c8347 (svn r16442) -Codechange: use new Vehicle accessors at more places 2009-05-26 22:45:48 +00:00
smatz 7ee882d03f (svn r16441) -Codechange: new class SpecializedVehicle used as superclass for all vehicle types 2009-05-26 22:10:13 +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
frosch de9a6fc90b (svn r15308) -Codechange: Deduplicate km-ish/h -> mph conversions. 2009-02-01 17:14:39 +00:00
glx c5f0fe7c40 (svn r15210) -Fix: Vehicle::GetRunningCost() was wrong for ships and aircraft 2009-01-22 21:33:08 +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
smatz 9fc355fca5 (svn r12862) -Codechange: reduce code duplication for VehicleType -> WindowClass lookup 2008-04-24 09:55:20 +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