Commit Graph

186 Commits

Author SHA1 Message Date
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
6d597879d0 Codechange: let ReadLine return a string instead of passing a buffer 2023-06-09 19:58:29 +02:00
Rubidium
802d6cb509 Fix: memory leak when parsing (strgen) commands by moving to C++ containers 2023-06-02 11:57:23 +02:00
Rubidium
4f94655cc2 Codechange: use vector/unorder_map over custom implementation 2023-06-02 11:57:23 +02:00
Rubidium
234a143ee5 Codechange: use std::string for LangString over C-style strings 2023-06-02 11:57:23 +02:00
Rubidium
f372373e6f Codechange: use std::string/vector for language cases over manual management 2023-06-02 11:57:23 +02:00
Rubidium
6eb51666bc Codechange: use C++ file APIs for writing language files 2023-06-02 11:57:23 +02:00
Rubidium
2efd88d513 Cleanup: version of strgen/settingsgen was always $Revision$, so remove it 2023-05-21 19:39:09 +02:00
Rubidium
411379f587 Codechange: replace puts with fmt::print 2023-05-21 15:12:02 +02:00
Rubidium
275ebf4509 Codechange: replace fprintf(<FILE*> with fmt::print(<FILE*> 2023-05-21 15:12:02 +02:00
Rubidium
c518293135 Codechange: replace printf with fmt::print 2023-05-21 15:12:02 +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
199e41c762
Codechange: use default dtor instead of empty (#10826) 2023-05-14 23:31:03 +02:00
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.
2023-05-08 16:49:23 +02:00
Rubidium
19ec4e8beb Codechange: replace ClampToI32/U16 with ClampTo<int32_t/uint16_t> 2023-05-06 21:26:13 +02:00
Charles Pigott
80bd5ad727
Codechange: Use std::strto* variants everywhere (#10720) 2023-04-26 12:56:14 +01:00
Rubidium
f74e26ca7e Codechange: replace error/usererror printf variant with fmt variant and rename 2023-04-25 17:55:09 +02:00
Rubidium
7b539fa7c9 Fix: fmt's {:#04X} yields '0X00', not '0x0000'
Technically the 0X vs 0x is not a big problem, just not pretty. However, the
length also including the 0x results in unexpected behaviour, so it probably
better to not use it.
2023-04-20 21:39:57 +02:00
Rubidium
dfe52da1ea Codechange: use string/fmt instead of print for strgen warnings/errors/fatals 2023-04-18 23:20:53 +02:00
Charles Pigott
6fc28d649e Cleanup: Unused alloca definitions and includes 2023-04-15 16:57:00 +01:00
Charles Pigott
b282664242 Codechange: Replace all usages of alloca/AllocaM with more modern/less discouraged alternatives 2023-04-15 16:57:00 +01:00
glx22
af15dca316 Change: [Script] Extract params info from GS strings 2023-02-28 18:53:17 +01:00
rubidium42
6ba55e663e Codechange: do not hide variables with other variables 2023-01-29 07:21:34 +01:00
Loïc Guilloux
b6fb020388
Change: [strgen] Change warnings for translations into infos (#9406)
Unless invoked with -w, --warning ("print a warning for any untranslated strings") or -t, --todo ("replace any untranslated strings with '<TODO>'").

Eints normally fixes the warnings after a Pull Request, so it is not really useful information for the developer to see as a warning.
2021-06-29 22:19:24 +02:00
rubidium42
ddaedaf32a Fix: empty undocumented branches 2021-05-15 10:16:10 +02:00
frosch
a9740cef82 Add: show completion progress of languages in the language dropdown for non-release builds. 2021-04-22 22:16:56 +02:00
glx22
2cbfcd2327 Change: [CMake] Bump minimum version to 3.9 2021-02-07 16:21:13 +01:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
glx22
d1fa6b129c Add: [CMake] Option to only build tools/docs 2020-12-13 22:46:46 +01:00
glx22
a06fe8e8a7 Fix: [CMake] cross-compiling requires native tools 2020-12-04 09:49:31 +00:00
Patric Stout
56d54cf60e Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.

Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.

This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.

Addtiionally, this heavily improves our detection of libraries, etc.
2020-06-05 19:36:05 +02:00
Quipyowert2
acb3d10832 Codechange: Format unsigned integers with %u instead of %i or %d. 2020-02-13 21:36:37 +01:00
S. D. Cloudt
13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
glx22
cef9a76c3f
Fix #7553: check bounds when loading strings (#7554) 2019-05-01 19:12:37 +02:00
peter1138
4f052fc2a4 Cleanup: Fix alignment after NULL -> nullptr change. 2019-04-13 20:35:10 +01:00
Henry Wilson
7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
glx22
66dd7c3879
Fix: MSVC warnings (#7423) 2019-03-28 00:09:33 +01: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
a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 2019-03-26 20:15:57 +00:00
Henry Wilson
bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 2019-03-26 20:15:57 +00:00
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.
2019-03-24 16:10:04 +01:00
Patric Stout
aea1726f45 Fix: MingW and MSVC compiled strgen had different path separator behaviour
If it was compiled with MingW, both / and \ were accepted as
path separator. On MSVC, only \ was. This is an unexpected
difference between binaries for the same platform. Remove this
discrepancy by accepting both / and \ on all platforms.
2019-03-11 10:16:00 +01:00
Patric Stout
7784d77713 Remove: MorphOS / AmigaOS support
In 10 years there is no commit to change how MorphOS works, and we
have no active maintainer for it. It is unlikely it works in its
current state (but not impossible).

With the arrival of SDL2 (and removal of SDL), MorphOS is no longer
support. There is an SDL2 port for MorphOS, but it is not maintained
by upstream SDL2, and nobody can currently test it out.

If anyone wants to re-add MorphOS, please do (revert this patch,
fix the problems, and create a Pull Request). If you need any help
doing so, let us know! It is not that we don't like MorphOS, it is
that we don't have anyone fixing the problems :(
2019-03-05 22:03:00 +01:00
glx
2fcd4e61db Fix: make sure strgen fails when english.txt contains invalid commands 2019-01-29 22:25:50 +01:00
glx
c540d72445 Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32 2018-12-27 18:09:16 +01:00
Charles Pigott
b5028efc1f Fix: Protect against a few out of bounds or uninitialised usage errors 2018-10-31 12:41:49 +01:00
Charles Pigott
f5b1115039 Doc: Lots and lots of doxymentation fixes 2018-10-31 12:35:54 +01:00
frosch
a09cc8dda0 (svn r27759) -Fix: strgen compilation 2017-02-26 20:10:41 +00:00