58952 Commits

Author SHA1 Message Date
Chris Beck
651344ee1b commit a patch to our fribidi cmake, from downstream (macports)
see here:
https://trac.macports.org/browser/trunk/dports/games/wesnoth/files/patch-cmake-FindFriBiDi.cmake.diff

i tested that cmake still works and finds fribidi for me (linux)
2014-10-28 12:52:03 -04:00
Ignacio R. Morelle
1d41b1533b Spanish translation update 2014-10-28 02:14:29 -03:00
Chris Beck
ea23fc4f4a xBRZ fixup attempt: averaged alpha
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.
2014-10-27 23:15:39 -04:00
Chris Beck
4e31794962 xBRZ alpha blending fixup attempt 2014-10-27 22:39:11 -04:00
Chris Beck
a60c7efd9e fixup b88d2af26fbac5157f4c084bc08ce250a5c66c58 2014-10-27 17:05:41 -04:00
Chris Beck
b88d2af26f scons: add selected headers for boost libs locale, random 2014-10-27 16:54:25 -04:00
Chris Beck
e97bd1a2bc fixup std::abs in map_location.hpp
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
2014-10-27 16:30:24 -04:00
mattsc
0ed27f5043 Changelog: Add comment about new Xcode compile package requirement 2014-10-27 09:42:35 -07:00
mattsc
6b7db24ce2 Release notes: Add comment about new Xcode compile package requirement 2014-10-27 09:41:49 -07:00
mattsc
4fb0923bd2 Xcode project: finish switching to using the new boost filesystem code
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.
2014-10-27 09:29:54 -07:00
Chris Beck
7ce9199e47 fixup compilation for OS X
Apparently OS X does not provide an int std::abs(int) at all, or
we aren't including it properly or someting. I work around this.
2014-10-27 03:04:21 -04:00
Chris Beck
b05773c409 resolve ambiguities in referring to std::abs, in map_location.hpp
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.
2014-10-27 02:38:20 -04:00
Chris Beck
afaca721a3 Merge branch 'master' of https://github.com/wesnoth/wesnoth 2014-10-26 22:03:03 -04:00
Chris Beck
07657622e2 remove an unnecessary ppa from travis
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
2014-10-26 22:01:58 -04:00
Ignacio R. Morelle
f0d06b9146 Restore string constness intention lost in Boost.locale deployment
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.
2014-10-26 22:03:06 -03:00
Chris Beck
e7db876b3a Merge branch 'master' of https://github.com/wesnoth/wesnoth 2014-10-26 01:04:15 -04:00
gfgtdf
f0017586d0 fix saved_game::cancel_orders() 2014-10-26 02:57:24 +02:00
Chris Beck
b0daa673ad Merge branch 'master' of https://github.com/wesnoth/wesnoth 2014-10-25 20:41:13 -04:00
Chris Beck
5f0cfd8603 fixup pandora compilation with SDL < 1.2.12
This was checked to compile (but not link of course) on my system,
using cmake with pandora enabled, and pointed to the SDL_mixer
1.2.0 header.
2014-10-25 20:40:26 -04:00
gfgtdf
618cc110b3 move some savegame manipulation to saved_game.cpp 2014-10-26 02:38:43 +02:00
gfgtdf
91b845d0a5 use LOG_G instead of std::cerr 2014-10-26 02:38:40 +02:00
Chris Beck
cef5e2ed9c for cmake + ENABLE_PANDORA, reduce SDL_mixer dep to 1.2 from 1.2.12 2014-10-25 19:27:58 -04:00
Chris Beck
419f154f42 in cmake, make PANDORA option force the BFS option to false 2014-10-25 19:23:28 -04:00
Chris Beck
48217f8da0 add boost locale to travis 2014-10-25 19:09:04 -04:00
Chris Beck
bdd109ebcb Fixup boost filesystem options for cmake, scons
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.
2014-10-25 18:53:43 -04:00
gfgtdf
e723de7be3 Merge pull request #311 from gfgtdf/gettext_reorder
new boost gettext implementation that can handle utf8 paths on windows.
2014-10-25 22:54:22 +02:00
gfgtdf
fed433d829 fix image translations 2014-10-25 22:03:05 +02:00
gfgtdf
4fc2368229 fix gettext_boost.cpp 2014-10-25 22:03:04 +02:00
Chris Beck
807f4ead5f Merge branch 'master' of https://github.com/wesnoth/wesnoth 2014-10-25 15:03:01 -04:00
Chris Beck
4f382ebc2a gracefully catch exceptions generated by changing the language 2014-10-25 15:02:06 -04:00
gfgtdf
588c008890 fix comilation
move LC_MESSAGES out of wesnoth.cpp and game_config_manager.cpp
2014-10-25 19:02:12 +02:00
gfgtdf
9c799b9a47 fix compilation
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
2014-10-25 19:02:10 +02:00
gfgtdf
2fee9e2522 fix unused warnings. 2014-10-25 19:02:09 +02:00
gfgtdf
c4e2c4bf51 use boost locale gettext
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).
2014-10-25 18:56:45 +02:00
gfgtdf
9742c9cb54 make gettext.hpp return std::string.
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.
2014-10-25 18:54:03 +02:00
gfgtdf
c5cf699210 reorder gettext.hpp
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.
2014-10-25 18:52:26 +02:00
gfgtdf
6737805258 remove unneeded check
io_type != IO_CLIENT implies io_type == SERVER
2014-10-25 13:34:14 +02:00
gfgtdf
33becb6100 dont always show mpconnect in debugmode in sp 2014-10-25 13:28:16 +02:00
Ignacio R. Morelle
70b953cbd3 Updated big button graphics by LordBob
From <http://r.wesnoth.org/p577072>.

Fixes a weird light source angle issue with the active variants.
2014-10-25 01:39:38 -03:00
Chris Beck
7247d14535 fixup headers in strftime.hpp, (missing <string>) 2014-10-24 19:40:38 -04:00
gfgtdf
f6291d33eb Update filesystem_common.cpp 2014-10-25 01:36:47 +02:00
Chris Beck
88dcdeb1ee fixup help pages for units, only one sprite (as usual)
Only show one sprite, not all the scaled samples.
Only show ~xBRZ(2), not the straight baseframe.
2014-10-24 18:42:18 -04:00
Chris Beck
1582026ec9 implement advanced graphics options back-end
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.
2014-10-24 18:42:18 -04:00
Chris Beck
07b6eeedb2 add "advanced graphics" preference dialog, for scaling algo options
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...
2014-10-24 18:42:18 -04:00
Chris Beck
3f18331a08 as a test, use xBRZ when zooming images
This also sets the max zoom to 288 so you can reach 3x and 4x if
desired.
2014-10-24 18:42:18 -04:00
Chris Beck
760cb18b3e Revert "Anchor unit overlays to the topleft corner of the sprite."
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
2014-10-24 18:42:18 -04:00
Chris Beck
8932fda902 add wesnoth default scaling results along-side xBRZ in help pages 2014-10-24 18:42:17 -04:00
Chris Beck
6040e9bf01 fixup xbrz blending handling of alpha channel
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.
2014-10-24 18:42:17 -04:00
Chris Beck
eeb92161e0 xBRZ trial commit
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
2014-10-24 18:42:17 -04:00
Nils Kneuper
0c738779da updated Slovak translation 2014-10-24 20:09:09 +02:00