Rubidium
8ab0936491
Codechange: use parameter pack/folding instead of va_arg macros for widget states
9 months ago
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
10 months ago
PeterN
afc1ea8135
Codechange: Using alias and std::array for company expense storage. ( #11273 )
...
This simplifies passing yearly expenses to functions and use of std algorithms.
10 months 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.
10 months ago
Patric Stout
299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed ( #10761 )
11 months ago
Patric Stout
b7acf9e50e
Codechange: use TimerGameCalendar::Year and friends when working with years ( #11188 )
11 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
glx22
46b504a700
Fix: ini_key issues reported by the script
12 months ago
PeterN
d42a78f3e8
Codechange: Make DropDownListStringItem preformat and remove other implementations. ( #11063 )
...
Having to choose between DropDownListStringItem, DropDownListCharStringItem, and DropDownListParamStringItem depending on whether to draw a StringID, a raw string, or a StringID with extra parameters was needlessly complex.
Instead, allow passing a StringID or raw string to DropDownListStringItem. This will preformat the StringID into a raw string, and can therefore accept parameters via the normal SetDParam mechanism.
This also means that strings no longer need to be formatted on every draw.
1 year ago
Rubidium
7c37dcb8e3
Fix: do not use {STRING} when {STRING1} or {STRING2} is needed
1 year ago
Patric Stout
3b1407d240
Feature: allow to do a hostile takeover of an AI company (in singleplayer) ( #10914 )
...
With the removal of the share-system, you could no longer make an
AI disappear in a single player game. At least, not without going
into the console.
1 year ago
Patric Stout
772729cc7d
Fix: when syncing width of GUI items, take padding into account ( #10915 )
1 year ago
Rubidium
f29606fd14
Codechange: use std::string to cache engine/group/vehicle names
1 year ago
PeterN
64930c343a
Codechange: Pass reference instead of pointer to GUI*Lists. ( #10822 )
...
Pointer-avoidance.
1 year ago
Tyler Trahan
98d809c33b
Codechange: Don't use macros for DAYS_TILL and friends ( #10746 )
1 year ago
Rubidium
e33b2afd87
Codechange: pass (uint) money as Money for CmdGiveMoney
1 year ago
Peter Nelson
0880616851
Codechange: Remove various STRING strings.
1 year ago
Peter Nelson
e18f688db5
Codechange: Remove various COMMA strings.
1 year ago
Peter Nelson
35ba49bfb4
Change: Rename text colour NWidgetPart to SetTextStyle and add font size.
...
This allows to set both text colour and size for any widget with default
drawing.
1 year ago
Rubidium
c829930440
Codechange: replace strnatcmp with C++ string capable version
1 year ago
Patric Stout
36a0818bc5
Remove: buying/selling/owning company shares ( #10709 )
1 year ago
Charles Pigott
80bd5ad727
Codechange: Use std::strto* variants everywhere ( #10720 )
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
PeterN
018f0f63a6
Change: Centre company face in scaled widget. ( #10688 )
1 year ago
Patric Stout
1ba4dcc924
Codechange: migrate all Window-related timers to the new framework
...
This means we also say goodbye to GUITimers.
1 year ago
Peter Nelson
701092003d
Fix: DropDownListColourItem didn't provide width nor scale vertical padding.
1 year ago
PeterN
2d3250923c
Fix #10554 : Let Scrollbar::SetPosition clamp instead of assert. ( #10555 )
1 year ago
Rubidium
947a789bf6
Codechange: split large function into smaller steps and simplify logic
1 year ago
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
1 year ago
Rubidium
b3b8c3fd2d
Codechange: pass the randomizer to use directly to the company face generation
1 year ago
Rubidium
170f37d07f
Codechange: silence some potentially uninitialized local variable errors
...
In these cases technically they are false positives, however dismissing the
alerts when the underlying code may make them true positives does not seem
like the safest solution.
1 year ago
Rubidium
496ec1f012
Fix: use reference and array indexing to prevent suspicious pointer scaling
1 year ago
Tyler Trahan
0d631a6fda
Change: Reword Finance window's Net Profit to Profit
2 years ago
Tyler Trahan
adf94d7970
Change: Add a Total caption to each category of the finance window
2 years ago
Tyler Trahan
bba1a16836
Change: Make Company GUI Bank Balance text white
2 years ago
Peter Nelson
920e588334
Change: Use standard dimensions instead of custom widths.
2 years ago
Peter Nelson
890b2666d3
Change: Use scaled WidgetDimensions.
2 years ago
Peter Nelson
46a1ab0937
Change: Use Rect when drawing infrastructure window.
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
Peter Nelson
632464a623
Codechange: Use Rect in DropDownListItem::Draw().
2 years ago
Peter Nelson
eb4ba1991b
Change: Use CenterBounds function in more places.
...
CenterBounds may have a 1 pixel difference so the result is not exactly
the same.
2 years ago
SamuXarick
e604b76d18
Fix: List a max of four share owners instead of three
...
An AI company may have four different share owners, but the company information window is limited to display a max of three. This commit increases that limit.
2 years ago
PeterN
d7ceb7efea
Change: Use widget string parameters for face window. ( #10046 )
...
The face window previously drew the buttons of face settings itself.
Instead we can provide parameters for each widget and let the widget
system draw the buttons.
2 years ago
Tyler Trahan
a4e00c5cb5
Fix #9989 : Zero Net Profit is neither negative nor positive ( #9991 )
2 years ago
Tyler Trahan
41de69c5b7
Feature: Improved Finance window
2 years ago
Rubidium
c73f578e8c
Codechange: replace magic numbers and C-style arrays with C++-style array for share owners
2 years ago
Michael Lutz
13528bfcd0
Codechange: Un-bitstuff all remaining commands.
3 years ago
Michael Lutz
58cff7b081
Codechange: Un-bitstuff the remaining on-map commands.
3 years ago
Michael Lutz
e08b3abe7f
Codechange: Un-bitstuff group and autoreplace 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