Commit Graph

406 Commits (05b55c4d4349b69026213ce12e1a41af8e87b069)

Author SHA1 Message Date
Rubidium c6411168d8 Cleanup: missing spaces before continuation * in some comments 8 months ago
Rubidium 37f84b7372 Codechange: replace x.size() != 0 with !x.empty() 8 months ago
Patric Stout 0238a2b567
Codechange: use std::variant instead of using bitflags in the value (#11191) 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
12 months ago
Richard Wheeler 3b2934c479
Change: Make terraforming point selection sprite visible at >2x zoom out (#11017) 1 year ago
Rubidium 321f01602a Codechange: reduce passing around parameters, but formatting strings earlier 1 year ago
Rubidium f48baa7d00 Codechange: move sign invisibility check out of loop 1 year ago
Rubidium 836541b41c Codechange: use SetDParam and CopyOutDParam for tooltips 1 year ago
Rubidium ac0c932ce7 Codechange: use SetDParam to set measurement tooltip parameters 1 year ago
Jonathan G Rennison d7bf6b2c07 Feature: Highlight waypoint tiles when adjacent or distant joining 1 year ago
Jonathan G Rennison 84b53213af Codechange: Refactor viewport catchment overlay change handling 1 year ago
Rubidium 63d9bb93b8 Codechange: migrate from C-style GetString to C++-style GetString 1 year ago
Peter Nelson 56085be9bd Codechange: Move includes for common STL headers to stdafx. 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
PeterN c1077212d7
Codechange: Use a shared_ptr for viewport overlay. (#10586) 1 year ago
rubidium42 6ba55e663e Codechange: do not hide variables with other variables 1 year ago
Rubidium f001e84e5e Codechange: use RAII to automatically restore _cur_dpi after use 1 year ago
Rubidium 04d10b3d2d Codechange: instead of global pointer to stack variable, just put variable in that global
Removes one indirection and a dangling pointer to a stack location
1 year ago
Rubidium 71b46db8d0 Cleanup: remove commented out code 1 year ago
Rubidium fe2bcd2a58 Codechange: migrate size related functions to Map structure 1 year ago
PeterN c8cc61d889
Fix #10150: Force FS_SMALL for small viewport signs. (#10283)
* Fix #10150: Force FS_SMALL for small viewport signs.

This is a workaround for string widths being different with mixed
font-sizes.

* Fix: Flag small sign shadow as small text.

(This method of drawing shadows is hilarious and needs replacing, but
this is a quick fix.)
2 years ago
Peter Nelson 138198e971 Change: Separate ground sprite from foundation sprite offsets. 2 years ago
Peter Nelson 002fe67bef Add: Optionally disable child sprites drawing relative to parent sprites offsets. 2 years ago
PeterN f6e7e44169
Fix #10151: Use smaller padding for viewport signs. (#10272)
Before variable-scaling, the padding was always 1x1 pixel. This was
changed to be scaled, except using the wrong dimension of 2x1 pixels
instead of 1x1 pixel.
2 years ago
Peter Nelson 890b2666d3 Change: Use scaled WidgetDimensions. 2 years ago
Tyler Trahan fbbc80f79e Fix #9020: Update station coverage highlight when adding/removing tiles 2 years ago
Michael Lutz 58cff7b081 Codechange: Un-bitstuff the remaining on-map commands. 3 years ago
Michael Lutz 7048e1522f Codechange: Move flags in CommandProc in front of the command arguments. 3 years ago
Michael Lutz 33ca4f2b99 Codechange: Let the compile generate the master command table out of templated command traits.
This is using a non-intrusive type-traits like templated system, which
allows compile-time validation that the command table and the command
enum match up.
3 years ago
Patric Stout 8ab267496b
Codechange: reference a string by its name, not with "another + 1" (#9517)
It is wrong anyway, as "TINY" normally is at -1. Just weird code.
3 years ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
rubidium42 2e136285e1 Codechange: move from C-string to std::string for DoCommand 3 years ago
rubidium42 b791ffc6de Fix: do not hide parameter by local variable with the same name 3 years ago
frosch f96f113951 Codechange: use IterateFromBack/Front only if the order is important.
Use Iterate if the order does not matter.
3 years ago
frosch 22567a1f43 Codechange: use iterators instead of 'subranges' when iterating from a specific window.
Using iterators makes it easier to include or exclude the start window in the iteration.
3 years ago
glx22 14e92bd8e2 Codechange: Replace window related FOR_ALL with range-based for loops 3 years ago
Jonathan G Rennison 3ede756d23 Fix: Viewport drag tooltips not being removed when dragging over other windows 3 years ago
Loïc Guilloux b927da73c1
Fix 81d335b081: Use non-pulsating red highlight for coverage (#8622) 3 years ago
SamuXarick a4035af337
Codechange: Apply coding style (#8640)
* Fix: Missing or needed spaces

* Codechange: Remove space

* Codechange: Remove space

* Codechange: More missing spaces

* Codechange: Missing spaces

* Codechange: Remove space

* Codechange: Remove space
3 years ago
Matt Kimber 40d5fe1631
Fix eeb88e8: Trains reversed while paused do not correctly update sprite bounds (#8540) 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 4 years ago
Niels Martin Hansen 2d9fa81bd0 Feature: Plant clumps of trees in editor by dragging on the landscape 4 years ago
dP e82333cf77 Feature #7962: Improve rendering of large viewports 4 years ago
dP 5ca8a0bda9 Feature #7962: Significantly improve sprite sorter performance 4 years ago
Michael Lutz 79240eab1e Codechange: Make use of the improved C++17 emplace_back function. 4 years ago
TechGeekNZ a10013dd00 Codechange: Spell 'Viewport' consistently
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
4 years ago
TechGeekNZ 8652a4db76 Cleanup: Give `SetDirtyBlocks` a more descriptive name. 4 years ago
Jonathan G Rennison 14af8701df Fix #6566: Fix signed integer overflow in viewport draw area chunking
This caused drawing areas larger than 2097151 pixels at 8x zoom to
not be subdivided into smaller chunks as required.
This resulted in pathological performance issues in the sprite sorter.
4 years ago
glx ee7a8eebca Codechange: Replace FOR_ALL_TOWNS with range-based for loops 5 years ago