* Converted coordinate_conversions.h usages
* missed to remove an 'inline'
* sorting out merge issues
* Update src/iexamine.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* should alternate lines from the two sources in merge
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Catch2 provides a customization point for converting our types to
strings by specializing the StringMaker template.
We have some specializations in stringmaker.h, but this feature was only
working intermittently. I finally figured out that was due to an ODR
violation. The test files that didn't include stringmaker.h were
compiling a different specialization than the ones that did.
Re-jig the test includes so that any file including catch.hpp also
includes stringmaker.h, thereby ensuring that the custom
specializations are used everywhere and there is no ODR violation.
I achieved this by adding a new cata_catch.h header and making all
existing headers include catch.hpp via the new header.
* 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.
Things we want to be able to call on these new point types:
* square_dist
* trig_dist
* rl_dist
* manhattan_dist
* direction_from
* line_to
* midpoint
And tests for all the above.
It was never clear how project_remain should work for tripoints. Should
the z coordinate be included in the quotient, the remainder, or both?
This implementation allows the client code to choose which of the two
will contain it (you must pick exactly one).
Add project_combine, which is the opposite operation, and a test that
one operation reverses the other.
Using these points in a larger proof of concept revealed the need for
more operators. Add them.
* Allow adding or subtracting raw points from coord_points (so that e.g.
point_north, etc. can be used easily).
* Allow more mixed-dimension arithmetic.
* Allow subtracting two similarly-typed points to create a relative
point.
* Allow non-const access to individual coordinates.
After reading this code more, I've decided that the notation and
mnemonics I'm adding are easier to understand if you put the origin
before scale.
e.g. point_sm_ms is a "submap map square", and point_rel_omt is a
"relative overmap terrain".