it seems like sometimes libintl.h is needed for LC_MESSAGES so we need
to move that last code that uses LV_MESSAGES out of language.cpp into
gettext.cpp
This includuces an alternative implementation of gettext.cpp. Libintl gettext doesn't seem to support utf8 filenames on windows. Also it causes problems when changign the language on my msvc build. That why i want to use boost locale gettext at least for our windows builds.
This requires boost locale which is introduced in boost 1.48 (That's why i still hesitate to make it the default on all systems).
in 99% of cases the returned value was moved into a std::string anyway. We do this becasue the boost gettext functions also return std::string so it makes replacing them easier.
We want to put all dependencies of linintl.h to getttext.cpp so we can easily replace gettext/libintl with boost locale gettext by replacing that file.
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...
This reverts commit 8f49cbad5508d761c1139c65e064c31ea3c79a00.
This commit breaks the game when you zoom in, since I'm trying to
make changes to how that works it is inconvenient to have to deal
with it right now. This bug was assigned to lipk more than a month
ago when he first introduced it.
Conflicts:
changelog
src/unit_drawer.cpp
xbrz reference implementation assumes that there is no alpha in
the sprites, and indeed, when it would blend any colors would zero
out the alpha channel. This is not suitable for our needs, as our
sprites have alpha, and SDL treats 0 alpha as being transparent.
This commit adds --placeholder-- alpha channel code. It does not
do proper alpha compositing, it just checks if either the source
or blend pixel has < 50% alpha (if so it ignores and takes the
other), and otherwise it applies full alpha to the pixel. This
seems to work fine in the ``typical'' cases I have observed but
a ``real'' implementation is needed here.
This commit adds the xBRZ algorithm to the codebase, and adds
an imagepath modification to use it, and adds a bunch of extra
images showcasing it to the unit help pages.
xBRZ was obtained from sourceforge (xBRZ.zip):
http://sourceforge.net/projects/hqmame/files/
It is modified, the original program wants to be compiled as
C++11, so I had to make minor changes so that it can compile as
C++98 w/ boost.
Main changes: get boost/cstdint and typedef uint32_t from there,
comment out all static asserts
change all cases of lambda functions to boost bind instances or
otherwise.
Fix non-utf8 characters.
dos2unix on all new files
Renanme files .h -> .hpp, as config.h is in our .gitignore
Suppress warnings from unused functions.
Fixup warnings from negligible initialization of POD types
Mark some templates results with attribute unused
It's convenient for me to do this, because I use scripts to keep
all the configuration info set up correctly, and I have a few diff
versions of mingw and of boost floating around...
This version of the commit removes the orphaned melee attack animation
frame, which is superseded by a 2-frame set. The 1.12.x version of this
commit keeps the file as a copy of the new melee attack animation frame
for compatibility with existing add-ons.
Animation WML and art reference taken from the existing L3 Lich.
we now use boost::istreams instead of boost::filesystem::fstream because the later doesnt work with mingw.
we now use a custom codecvt instead of boost locale because we want to get better error messages for invalid utf8 strings using our _ERR streams
we now use unicode prgamm commandline args on windows..