* Change _ctype.h and __locale to cctype and clocale
* Change _wctype.h to cwctype in game.cpp
* Change __functional_base to functional
* Remove libcxx internal headers
* Remove UNIX system headers
* Fix clang-tidy error with -nostdinc++
Use the new clang-tidy check to convert a bunch of declarations to
static.
In a few cases, there were 'secret' dependencies being exposed without
headers. Convert those to work via headers instead.
* Helper script to run IWYU
* Run IWYU
* Update deprecated headers
* Run IWYU again
* Re-suppress cxxabi.h
This pragma got accidentally removed because it was deemed to be a
comment attached to a #include.
* Remove extra SDL header includes
* Fix ime.cpp headers
Some tweaks to help IWYU not break this file by messing with
platform-specific stuff not relevant on Linux.
* Update game.h
* Move new point.h includes inside #ifdef
* Re-add platform_win.h to mapsharing.cpp
* Apply suggestions from code review
Co-authored-by: ZhilkinSerg <ZhilkinSerg@users.noreply.github.com>
* Rebalance archery take... 5?
* Require a ranged weapon to break a damage threshold in order to inflict a critical hit.
* Re-audit strength requirements.
* Apply suggestions from code review
Co-Authored-By: Isaac Freund <ifreund@ifreund.xyz>
* Outline archery balance guidelines.
Co-authored-by: Isaac Freund <ifreund@ifreund.xyz>
* Add IWYU pragma: keep
* Run IWYU and astyle
* Run IWYU a second time
* Prevent #include <cxxabi.h>
Unclear why IWYU thinks this is needed. It isn't, and it causes
problems on Visual Studio.
* Fix missing declarations
Mark functions with no prior declarations as static, and remove the
unused ones.
* Move debug_is_safe_string definition
Put it inside !WIN32 since it's only used there.
After discovering that setpos can break the vehicle cache stuff, add
some sanity checks in various places in the tests where I'm concerned
they might unknowingly be moving a player out of a vehicle.
A first step towards IWYU support. Doing the sorting first because it
makes reviewing any additions or removals of headers much simpler.
The IWYU order is:
- Associated headers
- Misc system headers
- C++ STL headers
- Other project headers
The biggest change is moving system headers before project headers (they
are usually afterwards in Cata at the moment.
The associated header for a cpp file is the header file which declares
the functions defined in that cpp file. Normally that's the one which
shares the same name (up to extension), and if so IWYU figures it out
automatically.
However, in this project there are many corner cases, so we need to use
IWYU pragma: associated to tell it which header (or, in some cases,
which headers) is the associated header. We are unusual in having
multiple associated headers for some files, which might lead to
discovering some interesting IWYU bugs later, but in theory it is
supported.
This test does 500 iterations and requires than the zombie is killed in
none of them. This fails sometimes (about 1% of the time). I looked
into a failure and it seemed like it was just the player getting really
lucky with a series of four headshots.
Therefore, changing the test to permit up to 1 zombie death out of 500
iterations. This should reduce the failure rate to about 1 in 10000.
* origin/pr/25410:
Tiny throwing tweak
Fix possible invalidated pos index on throw
Fix failing throwing tests after rebalance
Rebalance throwing
Fix test to model correct behavior
Force player to wield when throwing
Add passing throwing balance tests
Templatize statistics class
Now that there's tests to model the current throwing behavior, we should
modify the test to match the behavior we want.
Here that is a simple matter of changing the range on
test_player_kills_monster from 10 to 1 which will cause it to fail until
the behavior is fixed.