This changes:
utf8::char_t -> char
utf8::string -> std::string
utf16::char_t -> char16_t
utf16::string -> std::u16string
ucs4::char_t -> char32_t
ucs4::string -> std::u32string
utf16::string and ucs4::string are now proper strings instead of vectors of characters too.
In order to get this change to compile at all, I needed to add a ucs4_convert_impl::convert_impl
specialization for wchar_t alongside the new char16_t specialization; both point to the same
conversion implementation type.
This commit doesn't do any additional cleanup. I'm sure if we looked, we could get rid of a
lot of the custom conversion code and probably a bunch of stuff that might have had to do with
supporting utf16::string and ucs4::string being vectors instead of basic_string specializations.
Either way, I don't know the code (or encoding handling in general) to make a call as to what's
needed or not. I'll let someone else do that.
(cherry-picked from commit 1deacd89f6)
I had disabled this when I redid the End Credits screen in GUI2 (476027f) since (IIRC)
I didn't want to figure out about parsing the new config-based credits storage. The topic
remained in Help, empty. We've decided the new End Credits screen is a better method for
viewing the credits anyway, so I'm now removing the topic.
This fixes#1774. Essentially, I made the help browser use both ability name and ids when
deciding which ones to add topics for. To facilitate that, I've gotten rid of the separate
vectors for ability names and descriptions and consolidated all the data into a single
ability_metadata struct to unit_type. It still needs to be expanded for use in the unit
class (which I intend to do), which is why it has a whole bunch of fields I don't use.
I've also totally refactored the ability topic generation code in the help browser.
A few of them are quite small, so this has no performance effect on those, but a few others
are potentially quite large, such as the one in campaign_server.cpp.
this not only fixes a very theoretical case where an era could have the same id as an era form another faction. It also makes it possible to check whether a topic describes a faction by just checking it's id prefix.
For example the factions of Default Era and Age of Heroes have the same id's, which caused the faction help topics to have the same id's as well, leading to a faction link on both era pages to lead to the same faction page. Adding an era prefix to the faction topic id's makes them unique and solves the problem.
Covers more cases of:
* push_back(std::pair
* push_back(std::make_pair
* push_back(std::make_tuple
* push_back(T) where T is an empty object of type T
Small thing I noticed: this does mean the numbers in font::subset_descriptor are no longer 'cast' to size_t before being
added to the vector, but that shouldn't matter (hopefully).
This (should) allow sdl/utils.hpp to be modified without a huge rebuild, since a number
of widely used headers included that file simply for the surface class type.
Change all includes to start at the base instead of assuming the directory where included from.
This makes it more apparent exactly which header has been included, since many have the same name.
This also allows moving all header files out of the src directory.
This involves splitting standard colors out of font/constants.cpp.
Serialization/string_utils.cpp, that is part of wesnothlib
(compiled into both client and server) uses ellipsis and Unicode minus sign
from font constants, which means that font/constants.cpp must be part of
wesnothlib as well. However, one of standard colors is evaluated by calling
inverse(const SDL_Color&) declared in sdl/utils.hpp. Sdl/utils.cpp has way
too many dependencies to live in wesnothlib.
Hence, standard colors are now in a file of their own:
font/standard_colors.cpp. That file is part of wesnoth (not wesnothlib) and
only available for the client.
This commit still doesn't fix all of them. I decided to leave alone
cases where variables with the same name are assigned in multiple
conditions of the same if...else if...else statement, and cases where a
scope logging macro is used multiple times in the same scope. In any
case, this commit greatly reduces the warning count on MSVC2015 and makes
new warnings much easier to spot.
This removes the ugly string markup and makes the dialog parse the config directly.
This also temporarily disables the display of credits in the help browser.
This constitutes drop-in replacements for:
* boost::shared_ptr
* boost::scoped_ptr
* boost::weak_ptr
* boost::enable_shared_from_this
* boost::static_pointer_cast
* boost::dynamic_pointer_cast
This excludes boost::intrusive_ptr, except for stray includes. Refactoring that is more complicated.
Since GUI1 widgets seem to rely on the given font size values in font.hpp
for their dimensions, those are unchanged. ThemeWML-provided sizes were adjusted,
and larger sizes assigned to elements that were too small with the new font.
Theme element rects were also adjusted as necessary.