Commit Graph

79 Commits (fd073a281082cd984890bad22fae2e39088f3b9e)

Author SHA1 Message Date
Patric Stout fd073a2810 Remove: replace custom span with std::span 5 months ago
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 5 months ago
Peter Nelson ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
7 months ago
Peter Nelson 7d4a91ef9e
Cleanup: Remove some unused functions. (#11429)
These were picked up with cppcheck.
7 months ago
Patric Stout 299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed (#10761) 10 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
Rubidium 3e488465f8 Codechange: allow string temporaries in a StringParameter 11 months ago
Rubidium b2edf82b69 Cleanup: remove unneeded CopyOutDParam version with StringID 11 months ago
Rubidium 7ed90a859f Codechange: function to check whether string parameters have changed since the backup 11 months ago
Rubidium 05ef3f0998 Cleanup: remove old backup/restore of string parameters 11 months ago
Rubidium 2687704afc Codechange: introduce new type and functions for StringParameter backups 11 months ago
Rubidium 381e8b69d2 Codechange: make size and offset size_t 12 months ago
Rubidium 1d902a97ce Codechange: move StringParameters to strings_internal.h 12 months ago
Rubidium ad048b143a Codechange: move implementation of Set/GetDParam to strings.cpp 12 months ago
Rubidium dd53a738bb Codechange: automatically set/check the correct type for string parameters/genders 12 months ago
Rubidium 0a5e58451b Codechange: pass string parameters by reference 12 months ago
Rubidium 43f91bc50c Cleanup: unused GetDataPointer function 12 months ago
Rubidium aba0d27a28 Codechange: use StringParameters for remapping the NewGRF string control codes 12 months ago
Rubidium 613ad80581 Codechange: remove need for GetDParamX 12 months ago
Rubidium f86500df92 Codechange: remove need for SetDParamX 12 months ago
Rubidium 6c6f365d2f Codechange: remove offset parameter for copying DParams in and out 12 months ago
Rubidium 14915526ad Cleanup: remove stre-style GetString 1 year ago
Rubidium 36aaa9d683 Codechange: let GetStringWithArgs use StringBuilder 1 year ago
Patric Stout 199e41c762
Codechange: use default dtor instead of empty (#10826) 1 year ago
Patric Stout febe394806
Codechange: replace C-style strings with C++-style strings in textfile (#10772) 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.
1 year ago
frosch fea6a34684
Codechange: SetDParamStr borrows contents from std::string::c_str(). Prevent calling it with temporaries. (#10136) 2 years ago
Peter Nelson f6ad8e1c9c Change: Rename some freetype things to fontcache.
The font cache supports more than just FreeType as a font provider, but still used freetype in some naming.

This now uses more suitable terms.
2 years ago
rubidium42 979783f90e Codechange: replace InjectDParam/ShiftParameters by setting the right parameter values in the first place 3 years ago
rubidium42 2e0297b0fa Add: GetString that returns std::string instead of filling a passed buffer 3 years ago
rubidium42 6bca9e090d Codechange: add SetDParamStr that accepts std::string& 3 years ago
Patric Stout 98400974a9 Codechange: nobody was using "str" parameter, so remove it 3 years ago
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 3 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Michael Lutz d2ed426077 Codechange: [Win32] Pass a native GDI font description around when we have one, instead of repeatedly guessing the font. 5 years ago
glx 8899272614 Codechange: use std::vector for _language_dropdown 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
frosch 2bb80d280c (svn r27758) -Change: Increase the maximum number of GameScript texts to 64k, and NewGRF texts to 512k. 7 years ago
frosch a56e2bccd0 (svn r27756) -Codechange: Add StringTab enum 7 years ago
frosch f4da8ece0c (svn r27755) -Codechange: Move TAB_SIZE to strings_type.h and use it consistently. 7 years ago
frosch 9ad09627ad (svn r27754) -Codechange: Add GetStringTab(), GetStringIndex() and MakeStringID() to access the structure of StringIDs. 7 years ago
frosch 5ab39cc651 (svn r26238) -Codechange: Use StringParameters::GetDataLeft to check for left space in the param array. 11 years ago
frosch bc86bf9b12 (svn r26237) -Cleanup: Remove unused SCC_STRING_ID. 11 years ago
frosch ce110eed32 (svn r25313) -Fix: Do not assume '8' to be the broadest digit, but test all of them. 11 years ago
frosch b533523258 (svn r24801) -Codechange: Add functions to set integral DParams to suitable values for size computations. 12 years ago
yexo 2f042ea198 (svn r24593) -Fix [FS#5333]: crash when a gamescript provided too many parameters to a GSText object 12 years ago
michi_cc 76344163c7 (svn r23945) -Fix: Better rounding when converting internal speed to displayed speed. 12 years ago
rubidium c02aabf1b8 (svn r23644) -Fix [FS#4899]: prevent game scripts using StringIDs that are not coming from themselves, so the game script doesn't "accidentally" try to display an invalid string or try to display a town name in from an unknown town name generator 13 years ago
rubidium c06a3555fb (svn r23478) -Codechange: add a method to copy string parameters *and* its raw strings 13 years ago
rubidium 462b875b4a (svn r23276) -Codechange: add the answer for the question whether we're looking for monospace fonts in the searcher 13 years ago