Peter Nelson
18fb8e153f
Codechange: Add __FILE__/__LINE__ of WindowDesc to WindowDesc.
...
This is to allow unit-tests to produce more useful output.
11 months ago
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
1 year ago
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
1 year ago
Tyler Trahan
fca2b37726
Codechange: Move Ticks into their own class
1 year ago
Peter Nelson
e8015e497d
Codechange: Use begin/end of nwidget parts of begin/length.
...
This simplifies processing nwidget parts as, unlike the remaining length, the pointer to the end of the list never changes. This is the same principle as we use(d) for tracking end instead of length for C-style strings.
And this removes 160~ instances of the lengthof() macro.
1 year ago
Patric Stout
b7acf9e50e
Codechange: use TimerGameCalendar::Year and friends when working with years ( #11188 )
1 year 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
1 year ago
glx22
6c7f977197
Codechange: Use {COLOUR} to simplify drawing of timetables
1 year ago
Peter Nelson
531d1ae8bc
Codechange: Use GetScrolled(Row/Item)FromWidget in more places.
...
In many instances the clicked row position is 'manually' calculated
instead of using the GetScrolledRowFromWidget helper function, with
variations on checks. Replace with the two helpers where possible.
1 year ago
Rubidium
68ff3fd062
Change: include fmt.h C++ headers in stdafx.h
...
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
1 year ago
Rubidium
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
1 year ago
Peter Nelson
0880616851
Codechange: Remove various STRING strings.
1 year ago
Charles Pigott
80bd5ad727
Codechange: Use std::strto* variants everywhere ( #10720 )
1 year ago
Tyler Trahan
930f0a16d8
Codechange: Define Date/Year/Month/Day within TimerGameCalendar class
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
Tyler Trahan
f45509848a
Fix #10289 : Don't silently fail when setting timetable start dates ( #10690 )
1 year ago
Tyler Trahan
394192dde8
Codechange: Refactor timetable GUI ( #10613 )
1 year ago
Charles Pigott
b282664242
Codechange: Replace all usages of alloca/AllocaM with more modern/less discouraged alternatives
1 year ago
PeterN
f1144de509
Feature: Separate rail/road and sea/air velocity units, and add knots. ( #10594 )
...
This is achieved by packing vehicle type along with the velocity so that
the string system can decode and pick the appropriate unit.
2 years ago
Bilongozhko, Serhii (Contractor)
35ad964c6b
Feature: Ctrl+Click to reset late counter for the entire vehicle group.
2 years ago
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
2 years ago
Rubidium
c1ff471c77
Fix: bad oddness checks
...
Modulo on a signed number returns negative values for negative values, so
i % 2 == 1 will only return true for positive odd numbers, whereas i % 2 != 0
returns true for both positive and negative odd numbers.
2 years ago
Tyler Trahan
8063fcb6e0
Feature: Ctrl-click to bulk edit timetable speeds/waiting times ( #10265 )
2 years ago
Peter Nelson
890b2666d3
Change: Use scaled WidgetDimensions.
2 years ago
Peter Nelson
6f95e04005
Change: Use Rect helpers for widget drawing.
...
This replaces repetitive and sometimes unwieldy use of constants.
2 years ago
Niels Martin Hansen
e68bf58989
Codechange: Use anonymous union for vehicle orders/old orders list
3 years ago
Michael Lutz
2637c06f88
Codechange: Un-bitstuff timetable commands.
3 years ago
Michael Lutz
0f64ee5ce1
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 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
Michael Lutz
a38bbefe1b
Codechange: Untangle command code, flags and error string for DoCommand*.
3 years ago
Michael Lutz
549caca39c
Codechange: Move command arguments to the back of the networked command function calls.
3 years ago
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
3 years ago
rubidium42
b280f16316
Codechange: remove unneeded comparison and casts
...
Division by resize_y is already yielding an unsigned number, so when clicking in the WD_FRAMERECT_TOP you would already get a huge value, so sel would never be negative. So, leave sel an unsigned number and remove the <= check.
3 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
6 years ago
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
6 years ago
frosch
b4b98e5165
(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)
7 years ago
frosch
4d2107bd61
(svn r26639) -Codechange: Simplify drawing early/late dates in timetable GUI.
10 years ago
fonsinchen
64e4e52c33
(svn r26550) -Change: Show measured order times in timetable GUI
11 years ago
fonsinchen
3ee31a8f89
(svn r26547) -Codechange: Collect order travel and wait times independent of timetables
11 years ago
fonsinchen
c915d9fa55
(svn r26546) -Codechange: Make order wait_time, travel_time and max_speed private
11 years ago
rubidium
0463dbdc9e
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
11 years ago
rubidium
fb1d479a51
(svn r25617) -Fix [FS#5655] (r25377): crash when Ctrl+clicking the start date button in timetable window without any orders
11 years ago
rubidium
a2af1f69af
(svn r25377) -Feature: timetable spreading of vehicles by Ctrl+Click when setting a start date
11 years ago
frosch
ce110eed32
(svn r25313) -Fix: Do not assume '8' to be the broadest digit, but test all of them.
12 years ago
frosch
4e4e635916
(svn r25294) -Feature: Add another button to window title bars to resize the window to its default size.
12 years ago
frosch
8157a8afd8
(svn r25290) -Add: Assign string names to notable windows.
12 years ago
frosch
56e4a8c4d6
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
12 years ago