Several header files used the .tpp extension, which means that they are not correctly detected as C++ (though this can be overridden and has been for one case in the XCode project). The .tpp extension is one of several intended for private template instantiations, but these headers were topleve headers included in many places.
Instead of creating an enum, the MAKE_ENUM macro now creates a struct
which holds an enum and provides functions for enum <-> string
conversion.
This has multiple advantages:
1) We don't need MAKE_ENUM_STREAM_OPS anymore.
2) The generated struct is much easier to use in templates
3) We don't allow implicit to int conversions anymore.
4) The enum values are now declared inside the structs scope.
This commit makes the `image` namespace check the advanced options
when selecting how to scale a sprite. It also makes the advanced
graphics options window flush the caches when an option is changed.
This permits the user to experiment with different graphics
algorithms while playing the game.
This commit also gives the smart enums in src/make_enum.hpp
introspective capabilities, by giving them a static const size_t
which tells how many possible values they may take (hence the range
of the enum.) It was convenient for the dialog implementation
to have this.
Note that, I had to make use of __attribute__((unused)) to compile
this. I apply this using a macro which adds it for gcc, clang, and
mingw which I know respond to this attribute. I don't know what is
the equivalent MSVC device, or if it is even necessary, so its
possible that this commit needs to be fixed up.
We also disable unit tests for the new advanced graphics dialog,
there are no tests for it right now...