Peter Nelson
6cf7a899e9
Codechange: Use EnumBitSet for PauseMode. ( #13553 )
2025-02-14 08:30:04 +00:00
Peter Nelson
7c1898eaf1
Codechange: Store EncodedString for text effects.
...
This replaces capturing and storing string parameters.
2025-02-10 22:49:14 +00:00
Peter Nelson
8c48f9fc49
Codechange: Pass preformatted string when updating sign positions. ( #13480 )
...
This forces the strings to be formatted in advance and avoids using global string parameters.
2025-02-07 13:19:00 +00:00
Peter Nelson
4b573b2703
Codechange: Use EnumBitSet for ViewportStringFlags.
2025-01-29 21:46:39 +00:00
Peter Nelson
810dc23215
Codechange: Replace viewport StringID specialisation with flags. ( #13237 )
...
When drawing viewport strings, the StringID is used to determine how to draw the sign. Instead, allow the behaviour to be set by the caller with flags. This means that some of the viewport-specific strings are no longer necessary.
ViewportAddString() now returns a pointer to a string as it may not actually add the string, in which case preparing the string parameters in advance is a waste of time.
2025-01-02 20:47:12 +00:00
Peter Nelson
5575c0ba5a
Codechange: Deduplicate text effect strings.
...
Small viewport signs are drawn with FS_SMALL, so there is no need to duplicate text effect strings for both normal and small versions.
This also avoids an extra string format when text effect positions are updated.
2024-12-08 10:23:52 +00:00
Peter Nelson
059a4b22f7
Codechange: Use projection-based std::range::find where possible.
...
This simplifies matching by class members and avoids wordy lambdas.
2024-11-24 10:36:03 +00:00
Peter Nelson
3d8d0e0d26
Codechange: Use std::variant to store string parameter data.
...
This avoids storing two separate values and makes the test for which type is held clearer.
This replaces use of unique_ptr for conditionally storing a string, and is also used in place of StringParameterBackup.
2024-09-14 15:31:05 +01:00
Peter Nelson
9854553e10
Codechange: ZOOM_LVL_SHIFT/BASE are not actually ZOOM_LVLs.
...
Rename to ZOOM_BASE_SHIFT and ZOOM_BASE respectively, and derive from ZOOM_LVL instead of numeric value.
2024-04-04 22:27:03 +01:00
Peter Nelson
7c322ebcf1
Codechange: Define a ZOOM_LVL for minimum text effect visibility.
2024-04-04 22:27:03 +01:00
Peter Nelson
3c61c642a9
Codechange: Don't allocate a text effect with INVALID_TE_ID.
...
Previously, despite INVALID_TE_ID existing, it was not checked during allocation and there was no limit to the number of text effects.
2023-09-09 19:26:47 +01:00
Peter Nelson
78b841d14e
Codechange: Take reference to text effect instead of pointer when updating.
2023-09-09 19:26:47 +01:00
Peter Nelson
7519f7ad79
Codechange: Use std::find_if to find or assign a text effect slot.
...
This replaces an index-based loop.
2023-09-09 19:26:47 +01:00
Richard Wheeler
96fdfb941a
Feature: Transparency option for cost and income indicators ( #11001 )
2023-08-25 16:04:40 +02:00
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
2023-07-19 19:30:14 +02:00
Rubidium
8b7c34d7d4
Codechange: use string parameter backps for the text effects
2023-07-03 00:00:12 +02:00
Rubidium
321f01602a
Codechange: reduce passing around parameters, but formatting strings earlier
2023-06-23 06:48:13 +02:00
Rubidium
3323402aaa
Codechange: rename smallvec_type to container_func and use only when needed
2023-05-20 16:53:10 +02:00
Patric Stout
1ba4dcc924
Codechange: migrate all Window-related timers to the new framework
...
This means we also say goodbye to GUITimers.
2023-04-15 13:58:55 +02:00
PeterN
0bc6f32346
Fix #9174 : Don't update text effect if it has been reset. ( #9183 )
2021-05-03 15:12:47 +01:00
PeterN
18651dd8b1
Fix: Update text effect size when font zoom is changed. ( #9174 )
2021-05-02 10:43:14 +01:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Henry Wilson
c01a2e2a81
Codechange: Removed SmallVector completely
2019-03-26 20:15:57 +00:00
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
2019-03-26 20:15:57 +00:00
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
2019-03-26 20:15:57 +00:00
Henry Wilson
aa7ca7fe64
Codechange: Replaced SmallVector::Get(n) non-const with std::vector::data() + n
2019-03-26 20:15:57 +00:00
Henry Wilson
f3938fdb83
Codechange: Replaced SmallVector::Reset() with std::vector::clear() + shrink_to_fit()
2019-03-26 20:15:57 +00:00
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
2019-03-26 20:15:57 +00:00
Peter Nelson
806e7d25dd
Change: Use GUITimer class instead of bare int/uints.
2019-01-11 11:56:21 +00:00
Peter Nelson
59fe4f28c8
Change: Animate text effects by real time instead of game ticks.
2019-01-11 11:56:21 +00:00
frosch
9fb56ca02e
(svn r27248) -Fix [FS#6257]: Town labels on smallmap and zoomed-out viewports were not centered. (_dp_)
2015-04-25 11:58:19 +00:00
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
2014-04-23 20:13:33 +00:00
rubidium
446d50f658
(svn r25011) -Codechange: allow vehicle transfer and profit text effects to be shown at the same time (fonsinchen)
2013-02-17 14:50:54 +00:00
rubidium
113746b3a6
(svn r24068) -Change/fix [FS#5103]: significantly reduce the area that is redrawn for text effects (Rhamphoryncus)
2012-03-25 19:30:05 +00:00
rubidium
6db0753a46
(svn r24066) -Change: do not redraw the text effect when nothing changed (Rhamphoryncus)
2012-03-25 19:23:59 +00:00
peter1138
7337e7ff49
(svn r23318) -Change: Make text effects rise at their previous speed.
2011-11-24 17:15:38 +00:00
peter1138
81598273e9
(svn r23316) -Feature: Add ability to zoom in to 2x and 4x level.
2011-11-24 12:38:48 +00:00
smatz
c5b34444af
(svn r19084) -Codechange: minor coding-style fixups
2010-02-10 17:37:47 +00:00
rubidium
82fc28f77f
(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
2010-01-15 16:41:15 +00:00
smatz
9cefcdab82
(svn r18636) -Codechange: make TextEffect::duration a value in ticks instead of ticks * 8
2009-12-25 23:22:41 +00:00
smatz
e6d6704f32
(svn r18635) -Codechange: store TextEffects in a SmallVector
2009-12-25 23:15:08 +00:00
rubidium
b0603f4c2e
(svn r18602) -Codechange: unify the viewport sign and text effect drawing
...
-Fix [FS#3394]: signs could occasionally glitch
2009-12-22 12:50:41 +00:00
frosch
c24d6d3f4e
(svn r18244) -Codechange: Make texteffects big font aware.
2009-11-22 20:23:41 +00:00
rubidium
d6cded5380
(svn r17693) -Cleanup: remove some unneeded includes
2009-10-04 17:16:41 +00:00
rubidium
7fbc33dae1
(svn r17248) -Fix: add GPL license notice where appropriate
2009-08-21 20:21:05 +00:00
rubidium
5375b32aee
(svn r16691) -Codechange: what's the point of getting the fifth dparam and then using that as the second dparam later on? Especially when the fifth dparam is never set and the second dparam is never used.
2009-06-29 09:32:58 +00:00
smatz
0d3f5e6e74
(svn r15299) -Cleanup: remove many redundant includes
2009-01-31 20:16:06 +00:00
rubidium
d0c1a989a4
(svn r14047) -Codechange: move chatmessage handling to the network directory as that's the only case chat messages are used. Furthermore remove any trace of chatmessages when compiling without network support.
2008-08-11 22:45:11 +00:00
frosch
ecc5d648df
(svn r13649) -Codechange: Split the GfxFillRect() special flags from 'color' into their own parameter.
2008-06-28 15:44:24 +00:00
rubidium
923e21129c
(svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
2008-05-29 15:13:28 +00:00