Commit Graph

38 Commits

Author SHA1 Message Date
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Peter Nelson cff48c0f63 Codechange: Templatise SlStationSpecList to reduce duplication.
SlStationSpecList now handles both StationSpec and RoadStopSpec, and replaces indexed array access with range-for and reserve/emplace_back pattern.
2024-03-02 21:16:15 +00:00
Peter Nelson 41b3314d76 Codechange: Replace separate Station/RoadStopSpecList with template struct.
Reduces duplication and simplifies reuse.

Additionally naming an item that is used in a list as a ...List was
pretty weird.
2024-03-02 21:16:15 +00:00
Peter Nelson 1071acb483
Codechange: Redundant use of char * and c_str(). (#11454) 2023-11-10 00:17:36 +00: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 912eb68981 Change: Extend entity override manager and station spec lists to support 16 bit IDs. 2023-05-05 07:08:40 +01:00
Tyler Trahan 930f0a16d8 Codechange: Define Date/Year/Month/Day within TimerGameCalendar class 2023-04-26 07:14:03 -04:00
Jonathan G Rennison 4c1406a4b5 Add: NewGRF road stops 2023-02-26 21:28:30 +01:00
Peter Nelson 22803f997b Codechange: Use std::vector for station speclist
This removes manual memory allocation, although we still manage the list
size in roughly the same way.
2022-11-06 16:50:42 +01:00
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 2020-05-21 20:02:34 +02:00
Jonathan G Rennison c3223903ed Codechange: Cache resolved town, station and industry name strings 2020-01-12 19:37:43 +00:00
glx ddabfed1cd Codechange: Replace station related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
Niels Martin Hansen 9900af38f5
Fix #7847: Use ViewportSign coordinates for sign Kdtree coordinates (#7849)
Ensure the same coordinates are used for station/town/player signs regardless of how the landscape changes below it after the coordinates were first determined.

By keeping track of whether each ViewportSign is valid for Kdtree use (and only ever registering the viewport sign when the object is valid) a lot of code can be simplified and become more robust at the same time.
2019-12-01 23:17:33 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Charles Pigott 5b34c8019f Codechange: Remove Company/OwnerByte types 2019-04-29 17:40:22 +01:00
Charles Pigott fb6ae81415 Codechange: Remove StationFacilityByte type 2019-04-29 17:40:22 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Niels Martin Hansen ce10d9be3f Fix #7374: Ensure k-d trees are always updated when station sign moves 2019-03-24 19:26:13 +01:00
PeterN 4cebebcf68
Change: Add CargoTypes type for cargo masks. (#6790) 2018-05-21 22:08:39 +01:00
frosch db894b0b3f (svn r26085) -Codechange: Pass ResolverObjects as reference instead of pointer since they are never NULL. 2013-11-24 14:41:19 +00:00
peter1138 c00a400cc7 (svn r24905) -Feature(ish): Implement station randomisation triggers. 2013-01-11 07:39:25 +00:00
truebrain 1c9bec1999 (svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC) 2011-12-20 17:57:56 +00:00
alberth f65a9a5515 (svn r21593) -Codechange: endif comment correcttions. 2010-12-22 10:50:32 +00:00
yexo bf6167710f (svn r19351) -Codechange: use TileArea for AfterRemoveRect 2010-03-06 13:38:46 +00:00
alberth 6a3dbaf99a (svn r19350) -Codechange: StationRect::BeforeAddRect() returns a CommandCost. 2010-03-06 13:23:33 +00:00
alberth d4b748e27e (svn r19335) -Codechange: StationRect::BeforeAddTile() returns a CommandCost. 2010-03-06 12:15:03 +00:00
alberth 993c9e6f62 (svn r19334) -Codechange: method-call codestyle fixes, and introduction of const reference formal parameter. 2010-03-06 11:54:59 +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 2e2f72b971 (svn r18342) -Fix: erroneous spaces before ; 2009-11-29 19:20:39 +00:00
rubidium c60cebd4bb (svn r17508) -Fix [FS#3195] (r16859): join station window didn't get updated when stations were removed from the pool 2009-09-12 12:56:49 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium 47a37b6093 (svn r16965) -Codechange: use tile area instead of sets of variables for the station joiner code. 2009-07-26 21:07:03 +00:00
rubidium 2dd998ab06 (svn r16962) -Codechange: more work towards multi tile waypoints 2009-07-26 16:17:49 +00:00
rubidium 7440ec7a73 (svn r16947) -Codechange: use TileArea instead of train_tile, trainst_w and trainst_h. 2009-07-25 08:54:19 +00:00
rubidium 63f2da7492 (svn r16945) -Fix (r16940): comments got swapped 2009-07-24 19:17:45 +00:00
rubidium c3d2c47faa (svn r16940) -Codechange: make the pathfinders behave the same when finding waypoints or stations, i.e. don't force exactly one destination tile for a waypoint 2009-07-24 15:18:25 +00:00
rubidium 803cf87885 (svn r16934) -Codechange: introduce a simple helper function to check whether a station is pending deletion or not 2009-07-24 07:38:10 +00:00
rubidium 6e3d999dce (svn r16914) -Codechange: split Station and BaseStation into different files 2009-07-22 11:35:35 +00:00