65219 Commits

Author SHA1 Message Date
Gregory A Lundberg
140cc946bb Fix bug: libpng warning: iCCP: known incorrect sRGB profile
Some changes in libpng 1.6+ cause it issue warning or even not work correctly with the original HP/MS sRGB profile. You will notice this in stderr:

    libpng warning: iCCP: known incorrect sRGB profile

The old profile uses a D50 whitepoint, where D65 is standard. This profile is not uncommon, being used by Adobe Photoshop, although it was not embedded into images by default.

The simplest solution is simply to remove the embedded profile from your image. This can cause a slight shift in color *IF* have have a properly calibrated system, monitor, and software.
2016-08-04 22:37:44 -05:00
JaMiT
53f6ec19c0 Remove color information from transparent pixels
This makes the images smaller, and it circumvents bug #23909.
2016-08-04 22:01:15 -05:00
Charles Dang
a6dd6c668c Ran wmlindent and fixed badly formatted code 2016-08-05 13:46:39 +11:00
Charles Dang
6d298803fa Don't need to make minimal unit type name small, the label is already small.
For the default definition, name is a separate widget that uses default sizes, so it makes
sense to apply small markup.
2016-08-05 12:53:44 +11:00
Charles Dang
6b5f7929d8 Change a0c4b38f5276 to use image_mods() instead of TC_image_mods()
This allows the inclusion of effects such as custom unit TC applied by [effect]
2016-08-05 12:18:44 +11:00
Charles Dang
086a903dfa Removed a few formatter() usecases that aren't actually needed 2016-08-05 12:12:29 +11:00
Charles Dang
6130c668c4 Use cleaner format for formatter() when possible 2016-08-05 11:58:42 +11:00
Charles Dang
7154a587b8 Small code cleanup to unit::TC_image_mods() and unit::image_mods() 2016-08-05 11:43:15 +11:00
Charles Dang
a0c4b38f52 Make use of unit::TC_image_mods()
This allows code dealing with individual unit TC (not types) to be simplified.
2016-08-05 11:36:15 +11:00
Charles Dang
788671e45c Don't try to set save index leader image TC if flag_rgb is empty
This silences some "invalid image ~(RC>1)" warnings in console.
2016-08-05 10:45:37 +11:00
Charles Dang
1bb78a18f1 Expanded use of GUI2_SHOW_UNHANDLED_EVENT_WARNINGS guard 2016-08-05 10:31:11 +11:00
Celtic Minstrel
79fc5cb77c Redo constexpr/noexcept macros to function as keywords 2016-08-04 16:13:08 -04:00
Celtic Minstrel
e0392bef87 Use preprocessor checks in formatter.hpp 2016-08-04 16:01:22 -04:00
Celtic Minstrel
6b019cbc2d Macros intended for detecting C++11 features
These cover the most useful features that MSVC 2103 does not support.
They should be tested with #if rather than #ifdef
2016-08-04 16:01:20 -04:00
Celtic Minstrel
8689bedde7 Fix indentation 2016-08-04 16:01:18 -04:00
Celtic Minstrel
46aef43913 Merge pull request #720 from cbeck88/formatter
give formatter an x-value conversion to std::string (C++11)
2016-08-04 16:01:15 -04:00
gfgtdf
a0233a1d4d fix debug kill command beeing unsynced 2016-08-04 21:41:05 +02:00
Jyrki Vesterinen
9336b76764 Fix scenario end events not being run on debug-killing the enemy leader
If a developer used the "kill unit" debug command to end a scenario,
the scenario did something special on victory (e.g. showing messages)
and the scenario didn't explicitly set victory_when_enemies_defeated=no,
the special actions were skipped.

The cause was a reference with a too long lifetime.
Menu_handler::kill_unit() obtained a reference to the mouse position and
used it to send "last_breath" and "die" events. But if the mouse position
changed in between (for example, as a result of the last_breath event
doing something), the reference switched to point to the new mouse
position. As a result, the function sent the "die" event with incorrect
coordinates, filtering dropped the event, and the event handlers weren't
run.

Fixed by copying the mouse position instead.
2016-08-04 21:19:02 +03:00
Charles Dang
95fecb9d90 Small code and border cleanups 2016-08-05 05:06:52 +11:00
gfgtdf
e75325a399 fix assertion in synced_context::ask_server_choice 2016-08-04 17:53:51 +02:00
Jyrki Vesterinen
3cbf249b66 play_controller::check_victory(): use underscore in event name
Semantically this doesn't change anything because spaces in event names are
automatically replaced with underscores.

I just spent a considerable amount of time searching for code that fires
the enemies_defeated event, only to find that it's called
"enemies defeated", with a space, at the call site. Let's use the
underscored name everywhere to make the function easier to find.
2016-08-04 17:28:37 +03:00
gfgtdf
531b91359a fix wrong underlying_id parsing on 64 bit systems. 2016-08-04 16:01:29 +02:00
Jyrki Vesterinen
4c2338d616 Avoid a GCC warning about breaking strict-aliasing rules 2016-08-04 12:51:19 +03:00
loonycyborg
059de7266a Update changelog 2016-08-04 12:42:38 +03:00
fendrin
f321e71685 SoF 08: Removed some more [+unit]. 2016-08-04 03:09:30 +02:00
fendrin
5a9f45ddba UtBS 01: Replace some calls to unit_utils macros with [+unit] by single macro calls.
This also fixes "Eranor" being a female Archer from time to time.
2016-08-04 02:40:36 +02:00
loonycyborg
d5370aa382 Fix segfault caused by incorrect use of std::copy_if 2016-08-04 02:59:35 +03:00
Charles Dang
e2d48f4482 Cleaned up some unused code
This was left around after switching the dialog to a unit preview pane widget.
2016-08-04 08:09:40 +11:00
fendrin
7e0c853f42 Campaigns: [+units] -> [units] 2016-08-03 22:04:47 +02:00
fendrin
f5e22bf03a UtBS: [+units] -> [units] 2016-08-03 21:50:43 +02:00
fendrin
bd5ff0e35f LoW: [+units] -> [units] 2016-08-03 21:45:47 +02:00
fendrin
0fd792a676 Removed a silly use of [+unit]. 2016-08-03 20:10:53 +02:00
Fabian Müller
f7c48a0222 LoW: Add Great Ogre unit. 2016-08-03 17:07:39 +02:00
Charles Dang
c2b09cbe5b tunit_preview_pane: general cleanup and functionality improvements
This includes:
* Allowing the details area to scroll should the parent dialog not be long enough.
* Scaling all displayed sprites to 144x144 while maintaining aspect ratio.
* Forcing extra width so all mainline unit names have enough space to appear.
* Removing the unused 'minimal' definition. Might be added back later.
* Fixing the borders. The internal widgets shouldn't have outside borders, since borders
  should be set for the widget instance in a containing dialog.
2016-08-04 01:11:47 +11:00
Charles Dang
e7068e35d5 tunit_recruit: capture recruit list for the recruit list 2016-08-04 01:11:45 +11:00
Celtic Minstrel
29ca22b5da Fix [modify_side][ai] 2016-08-03 09:00:13 -04:00
Charles Dang
b3b6c14371 tunit_preview_pane: some consistency between view modes 2016-08-03 14:56:15 +11:00
Charles Dang
5b8a64405a Load Game: used a spacer to force space in the details area 2016-08-03 14:46:39 +11:00
Charles Dang
f2825f8aac Consistency 2016-08-03 14:42:54 +11:00
Charles Dang
ba59cba052 Formatting fixup from 12601cc6e291 2016-08-03 14:39:26 +11:00
Charles Dang
d05e1ff6ee tgame_load: code cleanup 2016-08-03 14:36:22 +11:00
Charles Dang
bd9c915c0c Use keyboard_capture() for filter boxes to trigger focused state
This enabled the cursor to appear in it as a visual indicator of focus. Otherwise, this is
functionally identical to add_to_keyboard_chain().
2016-08-03 12:16:23 +11:00
Charles Dang
895774bb43 Accidentally enabled the GUI2 addons manager in 12601cc6e291. Oops 2016-08-03 11:44:19 +11:00
Charles Dang
12601cc6e2 Convert several GUI2 dialogs to use the new sorting code 2016-08-03 11:42:16 +11:00
Charles Dang
df84646026 Lambda-based replacement for e75eaca5a00f
Should also fix underlying cause of 7e6a1892bba0
2016-08-03 10:40:31 +11:00
Celtic Minstrel
44d171ab58 Include builtin conditions in wesnoth.wml_conditions
This excludes the [true] and [false] ConditionalWML tags,
which are still hard-coded. (People shouldn't be trying to
override or extend these anyway.)
2016-08-02 16:57:46 -04:00
Gregory A Lundberg
09e124aa8e Unique items: don't be a pig
And the Lord said, "Thou hast already consumed My Holy Water, thou needest another not."

And, hearing the Word of the Lord, Posieden said, "Yo! Storm Trident! Dude, look in your hand!"
2016-08-02 14:58:09 -05:00
Celtic Minstrel
e75eaca5a0 Attempt to fix recall dialog crashes 2016-08-02 14:55:52 -04:00
Jyrki Vesterinen
c4d51b1bbb Add @PoignardAzur to credits 2016-08-02 15:43:09 +03:00
Jyrki Vesterinen
3a77d8db53 Merge pull request #723 from PoignardAzur/add_override
Add override specifier to derived virtual methods
2016-08-02 15:18:09 +03:00