it might be that this is the way to go as far as how to blend, and
to avoid messy unit edges, just try to ensure that the color
distance function takes alpha into account
I'm still unsure about averaged alpha as an approach though, it
doesn't really make that much sense to me.
The reason that OS X wasn't finding std::abs(int) is that we
weren't including <cstdlib>, which is where it resides, not
<cmath>. This commit adds cstdlib, and reverts the other fix
attempts.
This fixes up two previous commits:
b05773c4099e9a2c987adc0c656ec7ed96dec0ff
7ce9199e470025b69935812d8445fc280767fb42
This includes adding a new library (libboost_localew.dylib; with
libboost_filesystemw.dylib already having been added a few days ago),
so a new version of the Mac compile package is needed for compiling.
Ancestral reported compilation errors with clang on OS X,
basically similar to what is reported here:
https://github.com/Project-OSRM/osrm-backend/issues/1000
I fix it by replacing calls to std::abs, with calls to _abs, a
function pointer I define to be & _abs, so that I can control
exactly which overload is selected and thus resolve the ambiguity.
Because we are including saucy now (to get SDL mixer 1.2.12),
adding this test ppa is unnecessary (saucy has g++-4.8), and it
can only serve to confuse / cause us to accidentally get
mismatching lib versions, so I remove it
These few strings were used as though `const char* const` was intended
but their indirect value constness was dropped during the conversion
since their pointer value was not const.
The option should control the compilation, in wesnoth-core, of
filesystem_boost.cpp, and gettext_boost.cpp, vs. the old versions.
Using the new code is now the default option, you must explicitly
deactivate with both cmake and scons to get the old stuff back.
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