Loïc Guilloux
bf4b669628
Fix: [Script] Improve ScriptText validation ( #11721 )
...
The validation is now done in two steps:
- First we get the list of parameters in the same order they used to be in encoded string
- Then we validate the parameter types like FormatString would use them while encoding the string
9 months ago
Peter Nelson
49dae08a3b
Codechange: Add missing override specifiers.
1 year ago
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
1 year ago
Rubidium
6d597879d0
Codechange: let ReadLine return a string instead of passing a buffer
1 year ago
Rubidium
13cdf5fffa
Codechange: use std::filesystem::path for the language file's path
1 year ago
Rubidium
802d6cb509
Fix: memory leak when parsing (strgen) commands by moving to C++ containers
1 year ago
Rubidium
4f94655cc2
Codechange: use vector/unorder_map over custom implementation
1 year ago
Rubidium
234a143ee5
Codechange: use std::string for LangString over C-style strings
1 year ago
Peter Nelson
83f2ad500e
Codechange: stdarg.h include not needed as cstdarg is included.
1 year ago
Rubidium
6e3d3c0e7c
Codechange: introduce std::string variant of sq_pushstring
1 year ago
Rubidium
68ff3fd062
Change: include fmt.h C++ headers in stdafx.h
...
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
1 year ago
Rubidium
dfe52da1ea
Codechange: use string/fmt instead of print for strgen warnings/errors/fatals
1 year ago
glx22
9a957f1d4b
Change: [Script] Improve ScriptText validation error messages
2 years ago
glx22
af15dca316
Change: [Script] Extract params info from GS strings
2 years ago
Rubidium
90f1768006
Codechange: add non-nullptr asserts in cases where it should never be nullptr
...
Though where similar calls are checked for nullptr as in those instances of
the use of that function it can actually return nullptr. In other words, write
down the assumption that the function never returns nullptr in an assert.
2 years ago
Rubidium
d31a535c87
Cleanup: remove some unneeded c_str() calls
3 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
3 years ago
glx22
34215f7faa
Codechange: Replace FOR_ALL_TARS with range-based for loops
3 years ago
Michael Lutz
b408fe77f7
Codechange: Use std::string in file scanners.
4 years ago
Michael Lutz
5cbb2da794
Codechange: Even more std::string usage in file IO.
4 years ago
Michael Lutz
9b6f5e3bb8
Codechange: Store GS lang texts in std::strings.
4 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
Michael Lutz
b73622a01c
Fix #7600 : Don't read uninitialised memory when parsing GS language files.
5 years ago
glx22
76788a1eb3
Fix 2bb80d2: really increase the maximum number of GameScript texts to 64k ( #7555 )
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
Michael Lutz
e804173595
Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector.
6 years ago
Michael Lutz
d3e113eb5f
Codechange: Use std::vector instead of AutoDeleteSmallVector in GS text handling.
6 years ago
Michael Lutz
d95c7083ea
Fix: Don't crash if reading a GS string file from disk produces an error.
...
The raw_strings vector may not include NULLs as no consumer can deal with it.
6 years ago
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
6 years ago
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
6 years ago
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
6 years ago
Henry Wilson
af7d9020a1
Codechange: Use override specifer for overriding member declarations
...
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.
Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
6 years ago
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
6 years ago
rubidium
33ab505567
(svn r26774) -Cleanup [Squirrel]: remove _SC macro
10 years ago
rubidium
7c4e9dd71d
(svn r26771) -Cleanup: remove OTTD2SQ and SQ2OTTD
10 years ago
rubidium
5e90054f20
(svn r26511) -Codechange: use strecpy in game_text
11 years ago
rubidium
9ed12b0f07
(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)
11 years ago
rubidium
e61fe21237
(svn r26506) -Codechange: replace most of vsnprintf with vseprintf
11 years ago
frosch
fad2d3c709
(svn r26505) -Fix (r23634, r26493): Incorrect usage of strecpy/strecat
11 years ago
frosch
d71cc434e4
(svn r26504) -Fix (r26499): Obiwan and his gang.
11 years ago
rubidium
8960939b22
(svn r26499) -Codechange: replace strndup with stredup
11 years ago
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
11 years ago
rubidium
c54a70cce8
(svn r26090) -Fix: leaking of file descriptor when reading strings for game texts
11 years ago
frosch
bf0f5345ea
(svn r25818) -Fix [FS#5750]: [GS] Language file scanner considered filenames starting with '.' as valid translations, resulting in languages with empty name, which causes trouble.
11 years ago
frosch
5046922f61
(svn r25117) -Fix [FS#5511]: Silence warning.
12 years ago
frosch
9eab26a1a1
(svn r25114) -Fix [FS#5509]: GS lang files did not work, when inside a tar.
12 years ago
frosch
16760cff8b
(svn r24516) -Add: [GS] Support ##plural pragma in GS lang files.
12 years ago
frosch
2ec6136113
(svn r24515) -Fix: GStexts were compied incompletely when containing certain string codes.
12 years ago
rubidium
6d6be50ae0
(svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files
13 years ago
truebrain
2ae87e7213
(svn r23634) -Add: support language files for GameScript (Rubidium)
13 years ago