Peter Nelson
ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. ( #11445 )
...
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
7 months ago
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
9 months ago
Patric Stout
d1a0ca67be
Codechange: simplify splitting of CargoPacket ( #11286 )
9 months ago
Patric Stout
7e3cdbaf62
Fix: mark next_station as INVALID_STATION when loading from older savegames
9 months ago
Patric Stout
e6c02ebee6
Fix b0e73277: cargodist information got lost when splitting of cargo ( #11280 )
...
During b0e73277
we removed loaded_at_xy, but I kinda forgot that
it was a union with next_station. Now next_station wasn't copied
anymore, or checked in AreMergable.
9 months ago
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
9 months ago
Patric Stout
b0e73277d6
Codechange: remove loaded_at_xy from CargoPacket as it was unused ( #11276 )
9 months ago
Patric Stout
299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed ( #10761 )
10 months ago
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
11 months ago
rubidium42
9f6fec01cd
Codechange: rename cargo aging days to periods, as they are not really days ( #11112 )
11 months ago
PeterN
584faaf064
Change: Reorganise industry accept/produce arrays. ( #10853 )
...
Use a array of struct for each cargo instead of an array for each statistic.
This makes iterating for acceptance and production much simpler.
pct_transported is now calculated when needed.
1 year ago
Peter Nelson
76516d7f70
Codechange: Use IsValidCargoID/IsValidCargoType.
...
IsValidCargoType() is used only for unmapped IDs.
1 year ago
Rubidium
3323402aaa
Codechange: rename smallvec_type to container_func and use only when needed
1 year ago
Peter Nelson
56085be9bd
Codechange: Move includes for common STL headers to stdafx.
1 year ago
Michael Lutz
72c7536325
Codechange: Use a dedicated variable for disaster vehicle action state. ( #10798 )
1 year ago
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar ( #10753 )
1 year ago
Patric Stout
36a0818bc5
Remove: buying/selling/owning company shares ( #10709 )
1 year ago
Tyler Trahan
930f0a16d8
Codechange: Define Date/Year/Month/Day within TimerGameCalendar class
1 year ago
Patric Stout
31ad990831
Codechange: move tick-counter into TimerGameTick ( #10712 )
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
Patric Stout
ed83c4b0da
Change: replace per-AI "start_date" with a global "competitors_interval" ( #10653 )
...
The per-AI "start_date" is a lot of custom code, and was rarely
used in the way it was meant.
While at it, also ported this part over to the new timer system.
1 year ago
Peter Nelson
65e0b0dcb7
Codechange: Be consistent with how company masks are set to all.
1 year ago
Rubidium
580d0a6343
Codechange: make use of Tile in for all direct map accesses
1 year ago
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
1 year ago
Rubidium
7cdc23fd64
Codechange: hide the map's size related fields in the Map structure
1 year ago
Rubidium
953445a5ac
Codechange: use MakeSea/AllocateMap in the oldloader instead of MemSetT
1 year ago
Peter Nelson
cbf48c4dd9
Change: Add extra random seed to StartupEngines().
...
This means that calling reset_engines will rerandomise introduction dates
and reliability.
Probably not necessary.
1 year ago
Peter Nelson
3485709f53
Add: Additional vehicle flags to control variants.
1 year ago
dP
548f0496a9
Change: Make _tick_counter 64bit to avoid wrapping ( #10035 )
2 years ago
Niels Martin Hansen
e68bf58989
Codechange: Use anonymous union for vehicle orders/old orders list
2 years ago
Michael Lutz
b0990fcff7
Codechange: Make TileIndex a "strong" typedef to give it a distinct type.
...
This is accomplished by changing it to a single member struct with the
appropriate operator overloads to make it all work with not too much
source modifications.
3 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
3 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
3 years ago
Matt Kimber
9b28b15e67
Codechange: create MutableSpriteCache to remove the need to cast Vehicle to a mutable type in render methods
3 years ago
Michael Lutz
c558936ec3
Fix 63ccb36ef3: Crash trying to load TTO/TTD savegames. ( #8356 )
4 years ago
glx
9116b22386
Fix #8011 , f5381798: Dock tile in TTD savegame was only 2 bytes
4 years ago
glx
ee7a8eebca
Codechange: Replace FOR_ALL_TOWNS with range-based for loops
5 years ago
glx
d8a1be48cd
Codechange: Replace vehicle related FOR_ALL with range-based for loops
5 years ago
glx
fa9769f81a
Codechange: Replace FOR_ALL_DEPOTS with range-based for loops
5 years ago
glx
3a14cea068
Codechange: Replace FOR_ALL_COMPANIES with range-based for loops
5 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
peter1138
f538179878
Feature: Multi-tile docks and docking points.
5 years ago
Charles Pigott
931d32f414
Codechange: Remove RailTypeByte type
5 years ago
Michael Lutz
4e85ccf3c0
Codechange: Replace SmallStackSafeStackAlloc with std::array.
...
The only port that ever used it to make heap allocations instead of stack ones was the NDS port, which got thrown out some time ago.
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
5 years ago
Henry Wilson
c01a2e2a81
Codechange: Removed SmallVector completely
5 years ago
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
5 years ago
PeterN
42b43c9983
Change: Available railtypes is always calculated on load, so no need to load value for old savegames ( #6782 )
6 years ago
Michael Lutz
7dd6027194
Codechange: Use a SmallVec for the animated tile list instead of replicating most of the logic.
6 years ago
frosch
117e73751c
(svn r27668) -Feature: [NewGRF] Allow composing vehicles from multiple sprites.
8 years ago