Joan Josep
6b7537646d
Fix: Allow NewGRF inspection of road tiles. ( #11323 )
1 year ago
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
1 year ago
Michael Lutz
a6f2f3c042
Add: [NewGRF] Inspection window for airports.
...
As as the station window combines all station types, accessing the
debug view is via the parent of the airport tile only.
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
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
Rubidium
d9f8a4c380
Codechange: use std::string GetString variant
1 year ago
Peter Nelson
76516d7f70
Codechange: Use IsValidCargoID/IsValidCargoType.
...
IsValidCargoType() is used only for unmapped IDs.
1 year ago
Peter Nelson
c38df2d589
Codechange: Use std::map instead of custom SmallMap.
1 year ago
Peter Nelson
83f2ad500e
Codechange: stdarg.h include not needed as cstdarg is included.
1 year ago
Patric Stout
199e41c762
Codechange: use default dtor instead of empty ( #10826 )
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
Peter Nelson
d2034d9c38
Codechange: Scrollbar methods now accept size_t.
...
This clears up a lot of casts from size_t to int.
1 year ago
Peter Nelson
e18f688db5
Codechange: Remove various COMMA strings.
1 year ago
Rubidium
630d3bc053
Codechange: use fmt::format instead of printf for the NewGRF profiler
1 year ago
Rubidium
3105d0b09e
Codechange: replace text-buf printf with fmt::format
1 year ago
Charles Pigott
80bd5ad727
Codechange: Use std::strto* variants everywhere ( #10720 )
1 year ago
PeterN
e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. ( #10663 )
...
This avoids a (soft) namespace conflict between the four ST_* enums.
1 year ago
Tyler Trahan
0bf6f82305
Cleanup: Don't mix switches and early returns in widget selection
2 years ago
Jonathan G Rennison
4c1406a4b5
Add: NewGRF road stops
2 years ago
Rubidium
f001e84e5e
Codechange: use RAII to automatically restore _cur_dpi after use
2 years ago
Peter Nelson
5eb7e1d3ab
Fix: Improve sprite aligner list size and alignment.
2 years ago
Peter Nelson
8adc47858d
Change: Set minimal size on aligner buttons.
2 years ago
Peter Nelson
33eb9688cf
Add: Sprite centre and crosshair toggles on sprite aligner.
2 years ago
PeterN
53682b4b6b
Fix #10114 : Wonky depot layout. ( #10191 )
...
Depot lists internal layout was not handled well. This is improved by
throwing more Rects at it:
- Vehicle images are now be vertically centred in the rect.
- Image clipping is relaxed to cover the rect, improving larger sprites.
- Outline highlight is now aware of bevel thickness.
2 years ago
Peter Nelson
890b2666d3
Change: Use scaled WidgetDimensions.
2 years ago
Peter Nelson
b6ed595176
Codechange: Prefer suggested widget padding.
2 years ago
Peter Nelson
fea7247072
Change: Use standard 'frametext' padding for settings 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
f5f035a22b
Codechange: Make use of Rect Width/Height helpers.
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
rubidium42
e588923bff
Codechange: add std::string accepting SetDParamStr to ErrorMessageData
3 years ago
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
3 years ago
Rubidium
fdc11a9f94
Codechange: introduce SpriteFile to be used by the sprite loader instead of the global FIO slot functionality
3 years ago
Peter Nelson
af70195e44
Fix: Tidy up sizing of sprite aligner window sprite list.
3 years ago
Patric Stout
853bfc3562
Codechange: replace _realtime_tick with std::chrono for mouse events
4 years ago
Michael Lutz
84636fc2af
Codechange: Remove all remaining uses of cpp_offset.
4 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
dP
3db7cf54fd
Fix: sprite preview in sprite aligner is too small with scaled UI
4 years ago
Michael Lutz
f2b40f40aa
Codechange: Replace SmallPair with std::pair.
...
std::pair is already the smallest possible pair, and it already handles non-POD types correctly.
4 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
stormcone
6396ec05fe
Fix #7609 : In the sprite aligner window the 'Reset relative' button crashes the game.
...
The 'offs_start_map' is a 'SmallMap', so its own 'Erase' function should be called instead of the underlying vector's 'erase' function.
And fix a "typo". :)
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
glx22
66dd7c3879
Fix: MSVC warnings ( #7423 )
6 years ago
Henry Wilson
c01a2e2a81
Codechange: Removed SmallVector completely
6 years ago
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
6 years ago
Henry Wilson
ca2f33c6d0
Codechange: Replaced SmallVector::Erase() with std::vector::erase()
6 years ago
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
6 years ago
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
6 years ago
alberth
e9f12d666d
(svn r27451) -Feature[FS#6241]: Move sprite 8 positions in sprite aligner with ctrl+click. (based on work by juzza1)
9 years ago
alberth
a5843149b5
(svn r27174) -Feature[FS#6236]: Display relative offset changes in the sprite aligner (juzza1).
10 years ago