Commit graph

33042 commits

Author SHA1 Message Date
gfgtdf
f093341bb4 automaticially end replaymode at the end of a mp turn replay.
previously it did happen that users did not know how to 'escape'
from the replay mode in that case.
2018-05-26 14:09:54 +02:00
gfgtdf
beeb5b43e2 fix [animate_unit] freezing the game
#2970
#3084
2018-05-26 14:09:41 +02:00
Charles Dang
dab7022552 GUI2/Addon List: don't hardcode green text color for publishable addons 2018-05-26 19:04:10 +11:00
Charles Dang
107ef77e45 Used RAL 6038 (#00b51a) for font::GOOD_COLOR
This is apparently the closest RAL color to RGB 0,255,0 and it happens to look good.
2018-05-26 19:04:09 +11:00
Charles Dang
0f1029a933 Surface: restrict a workaround to SDL 2.0.6 only
It was fixed in 2.0.7.
2018-05-26 18:10:06 +11:00
newfrenchy83
5386841088 Update advancement.cpp 2018-05-26 08:55:11 +03:00
gfgtdf
acf9a9874c
fix untranslatable string. 2018-05-26 03:16:43 +02:00
Charles Dang
47bef433a9 Campaign Difficulty: restore the description parentheses on request 2018-05-25 12:00:13 +11:00
Charles Dang
47d766d374 Bump font::GRAY_COLOR from #777 to #888
Bit brighter, looks a bit better.
2018-05-25 11:59:41 +11:00
Charles Dang
67530c4375 Campaign Difficulty: rearranged entry layout 2018-05-25 11:46:58 +11:00
Charles Dang
b24de54fb9 Removed now-unused preference getters/setters 2018-05-25 11:26:02 +11:00
Charles Dang
e754e64987 MP Lobby: removed manual player list sorting
It didn't make much sense to have these since there's really no situation you'd want
the "default" sorting order, which is however the server decided to send the list.
2018-05-25 11:16:40 +11:00
Charles Dang
e6183aa0d4 Campaign Difficulty: colored description column gray 2018-05-25 09:32:52 +11:00
Jyrki Vesterinen
bd5be036b7 terrain_filter::match_internal(): use std::make_shared() 2018-05-24 20:33:44 +03:00
Jyrki Vesterinen
f861883683 Fix memory leak in terrain filter matching 2018-05-24 20:33:30 +03:00
Charles Dang
27d0a6f6fe Fixed animation-wide text_color and blend_color keys being overwritten
Regression from a0199c73f9. This should fix
an issue where levein/levelout fading was sometimes black instead of white.
2018-05-24 13:36:56 +11:00
Iris Morelle
e8c803d426 gui2/preferences: Add version info button
Also simplifies the layout of the bottom-most row of the dialog a bit.
2018-05-23 19:39:55 -04:00
gfgtdf
fef4254c84 fix different carryover when loading startofscenario-save
this removes a hack in connect_engine.cpp that set save_id to a value to make sure that other connect_engine.cpp code does not chnge it later to the plyers id, (it did so at some point iirc).

Instead we update carryover.cpp to make sure that a side with no save_id  (or id since save_id defaults to id) is not carried over to the next scenario,

fixes #3152
2018-05-24 10:25:52 +11:00
gfgtdf
fb54b0376d don't autosave after using 'back to turn' in mp 2018-05-23 22:02:04 +11:00
gfgtdf
31d4579500 fix oos when using 'back to turn' in mp 2018-05-23 22:02:03 +11:00
Charles Dang
a1de152ded Game Events/Manager: formatting cleanup 2018-05-23 12:49:24 +11:00
Charles Dang
b011faa244 GUI2/Canvas: merge draw() and render() and remove commented-out blur code 2018-05-22 22:40:10 +11:00
Charles Dang
6e4327f313 GUI2/Canvas: reset size_changed_ flag after setting formula variables (fixup 02858f2) 2018-05-22 22:20:54 +11:00
Charles Dang
1a9c6a7eca Removed an outdated comment
Outdated as of b2fc0f2.
2018-05-22 22:15:08 +11:00
Charles Dang
2819f549a1 GUI2:Canvas: remove custom drawing function interface
This was only needed for the minimap since each canvas had its own texture, and the
minimap widget's canvas texture needed to be passed to image::render_minimap (that
function operated on the current render target, in this case, the canvas texture).
As of 02858f2259 we render directly to the screen instead,
so this isn't needed anymore.
2018-05-22 22:14:34 +11:00
Charles Dang
b2fc0f25e0 GUI2: removed unused offset parameters from drawing functions
These were added in 8f945cf235, but since the "new" listbox
implementation never came to be, these have just been unused clutter. There was one place
they were used as parameters in a manual call to calculate_blitting_rectangle, but that was
refactored out in 3332ae9757.

This also removes an overload of widget::draw_debug_border, since without the offsets, both
functions now did the same thing.

This affects:
* widget::draw_background
* widget::draw_children
* widget::draw_foreground
* widget::impl_draw_background (offset overload removed)
* widget::impl_draw_children
* widget::impl_draw_foreground
* widget::calculate_blitting_rectangle
* widget::calculate_clipping_rectangle
* widget::draw_debug_border
2018-05-22 21:33:21 +11:00
Charles Dang
eecc46f02f GUI2/Canvas: restored handling of immutable shapes (fixup 02858f2) 2018-05-22 20:59:29 +11:00
Charles Dang
02858f2259 GUI2/Canvas: discard individual canvas texture in favor of direct-to-screen rendering
This is a lot more efficient since it allows the GPU to parallelize draws AND it magically
fixes the bad alpha rendering we've been having!

Fixes #1568
Fixes #1744
2018-05-22 19:37:21 +11:00
gfgtdf
7eec132d76 don't generate a savegame snapshot unless needed
fixes #3150
2018-05-22 15:11:21 +11:00
gfgtdf
29120661f4 remove 'cannot handle require_scenario=' warning
since it triggers on mainline content
2018-05-22 10:39:01 +11:00
Jyrki Vesterinen
1066de1a82 Revert "Preallocate memory for image/file presence caches"
This reverts commit a3ef80853c.

Vector reallocation cost is logarithmic. Assuming that a vector
starts at a size of one and doubles its size in each allocation, the
result is 11 allocations - completely negligible compared with, you
know, loading 20 000 images from disk.
2018-05-21 16:33:50 +03:00
Charles Dang
949266b5aa Preallocate memory for image/file presence caches
Should avoid unnecessary reallocations.
2018-05-22 00:28:26 +11:00
gfgtdf
5dffb16d5e wb: dont resend 'bump_later' commands
these caused 'illegal whiteboard data' messages from the mp server.
2018-05-21 21:34:52 +11:00
Severin Glöckner
fd8473e3da GUI: add a translation prefix
Depending on the context there are different possible word
to translate 'to' with.

[ci skip]
2018-05-21 08:52:50 +02:00
Charles Dang
d9315199ee Remove the CMake/Scons compile-time check for IEEE 754 compliance
Now handled by a static assertion.
2018-05-21 14:38:16 +11:00
Charles Dang
1bfa8e363c Added a static assertion for IEEE 754 floating point compliance 2018-05-21 14:07:03 +11:00
Iris Morelle
ae127ea73a Clamp tod_color values in the [-510, 510] range instead of [-255, 255]
[color_adjust] needs to be able to use absolute values as large as
2*255 in certain edge cases to set the screen a single solid colour when
interacting with time of day colour shifts.

Fixes #3144.
2018-05-20 21:12:34 -04:00
Charles Dang
7f673dcd1f Unit Recall: select the first row after applying sorting
Reported on the forums: https://forums.wesnoth.org/viewtopic.php?f=4&t=48219
2018-05-21 10:36:53 +11:00
gfgtdf
0f2b4fae1d wb: fixup fix handling of extra_recruit and [filter_recall]
this was probably lost during rebasing.
2018-05-20 22:44:58 +11:00
Charles Dang
23732cf40f Removed useless Hide Help entry for debug terrain info 2018-05-20 16:02:47 +11:00
gfgtdf
5785ef7925 wb: fix handling of extra_recruit and [filter_recall]
fixes #3100
2018-05-20 13:55:20 +11:00
gfgtdf
7ef9f9a18f fix require_resource in [resource]
previously 918cdfcb36/src/saved_game.cpp (L293) would fail for [resource] because cfg["addon_id"] was empty.
2018-05-20 12:19:04 +11:00
Celtic Minstrel
c9d5832845 Fix preprocessor error with deprecated macros intended to be used as an attribute value 2018-05-19 20:52:08 -04:00
gfgtdf
a10287c5c2 fix require_scenario=yes not working with map_generation
this fixes require_scenario=yes for scenarios that use map_generation or
scenario_generation, the problem was that create_engine does not call
saved_game::expand_scenario for random maps, (which is the function that
checks require_scenario=yes)

fixes #3105
2018-05-20 10:09:48 +11:00
Celtic Minstrel
b28c61c6dc Remove now-obsolete compile flag for disabling translation completion filtering 2018-05-19 16:03:49 -04:00
Celtic Minstrel
fc74e782b7 Add a command-line option to show incomplete translations in the language list 2018-05-19 16:02:04 -04:00
Celtic Minstrel
5e28c13b87 Sort command-line options so the comment isn't lying 2018-05-19 15:58:23 -04:00
Jyrki Vesterinen
a388c2d891 Fix build with -Werror=unused-variable 2018-05-19 16:41:15 +03:00
Jyrki Vesterinen
3deef64439 Listbox: don't try to keep the selected item visible (#3016)
@Vultraz stated in Discord that list box should keep the scroll position
instead.

Resolves #3016.
2018-05-19 15:34:03 +03:00
Charles Dang
fc6825fcd5 Removed deprecated put_unit arg orders
x, y, unit and plain unit
2018-05-17 11:08:01 +11:00