73047 Commits

Author SHA1 Message Date
DisherProject
023b575d0b TRoW: Clear new TODOs 2018-10-18 12:24:32 -05:00
DisherProject
5e2ccd911b TRoW S14: Fix sea serpents placement 2018-10-18 12:24:32 -05:00
DisherProject
9c267b1433 TRoW S4: Fix scorpions placement 2018-10-18 12:24:32 -05:00
DisherProject
8a0490b111 TRoW: Give monsters and undeads their own sides
Noticing that orcs can control undead units feels strange. This
can give the AI an advantage too. One would expect monsters and
undeads to move autonomously.
2018-10-18 12:24:32 -05:00
DisherProject
1311aa0aed TRoW: use [show_if] inside the [objectives] tag 2018-10-18 12:24:32 -05:00
DisherProject
dd24dd6b6e TRoW S22: Fix win and defeat conditions
This makes sure that when Jevyan dies, we check for Aethyr's
presence before doing anything, so the player loses immediately
if he's alive.
Furthermore, we must hide the last orc leader, or his death will
make the player lose.
2018-10-18 12:24:32 -05:00
DisherProject
b911e9a196 TRoW S17d: Kill all enemy units in the end
For consistency to what Haldric says before
2018-10-18 12:24:32 -05:00
DisherProject
7c6bb12515 TRoW S15: Update Dionli's unit image 2018-10-18 12:24:32 -05:00
DisherProject
60d24516ef TRoW S6: Replace old sound with unit's own defending animation 2018-10-18 12:24:32 -05:00
DisherProject
2dbf9f87eb TRoW: Fix some TODOs and add more 2018-10-18 12:24:32 -05:00
DisherProject
15d2b035e5 TRoW: Replace deprecated keys 2018-10-18 12:24:32 -05:00
DisherProject
5be5d32690 TRoW: General cleanup
Clear variables, macros and comments
2018-10-18 12:24:32 -05:00
newfrenchy83
f594019433 Update Code::Blocks project and add documentation
Manual merge of pull request #3626.
2018-10-18 16:44:22 +03:00
nemaara
313959c83e
DiD S10: added time over defeat scene 2018-10-17 12:45:21 -05:00
Jyrki Vesterinen
b3e1680f88 Revert "put [resource] before other content; fixes #3345"
This reverts commit 706740220957a9313909f5cc358ba5aba3bf4118.

The commit used the `pos` iterator after invalidating
it (passing an iterator to `config::add_child_at()`
invalidates it), resulting in undefined behavior.
2018-10-17 19:53:09 +03:00
Jyrki Vesterinen
2bf39f7ee8 Fix #2884: minimap buttons don't do anything
Charry-pick of commit
a0b54b1513e840498e90572e0e4b9687df36a9cd.
2018-10-17 19:52:19 +03:00
Charles Dang
f6933b98f8 Shot-in-the-dark attempt to fix the tests 2018-10-17 14:30:42 +11:00
Charles Dang
6b30c18d54 Refactor out custom wesnothd_connection_ptr class again
I originally did this in 699047766a8852014df20c44d5ed84dadb37015e and then reverted it in
08a866dc20e678602f65f0cdedb21fb28a0bfa8c due to @gfgtdf pointing out the object was never
actually destroyed since io_service::stop was never called (issue #1927).

This new method foregoes the custom wrapper class and instead waits for the worker thread
to terminate in the wesnothd_connection dtor. The use of the wrapper class is also why using
thread::detach alone worked (@jyrkive) and using join did not.

Additionally, the ptr alias is now of a unique_ptr instead of a shared_ptr.

I have verified that the connection dtor is actually called. This new method makes it clearer
what's actually going on.
2018-10-17 14:30:41 +11:00
Charles Dang
121365f4d2 Loading Screen: rethrow exception if worker thread creation fails 2018-10-17 12:30:56 +11:00
Charles Dang
dbbd153d3f Loading Screen: temporarily disable animation rate limiter
Seems to make the loading screen progress faster and gets rid of the weird issue
where the animation sometime wouldn't show up on game launch. Odd.
2018-10-17 12:30:55 +11:00
Charles Dang
f5125ea860 Loading Screen: refactor and clean up implementation
This covers several things:

Instead of creating a new worker thread manually and having it set class member state flags,
I instead utilized std::future and std::async. As far as I can tell, this should avoid the
(albeit unlikely) potential race condition wherein the ls could close before loading at all
if the thread was delayed in starting.

Removed the timer interface and split it into two components:
* A drawing callback that handles the animation. This has its granularity retained at 100 ms,
  but can be easily adjusted if we want it to go faster.
* A pump monitor that runs much more frequently (every time events::run_event_loop is called,
  technically). This handles checking the state of the std::future object and will then close
  the window. This makes the loading screen a bit speedier compared to the previous iteration
  since it no longer wastes time waiting for the next timer callback to close.

The one bit I'm not 100% sure about is the check for the future object's ready state in the dtor.
Though, relatedly, I wonder if perhaps we should wait for the worker thread to complete in that
case instead of exiting....

Also shuffled a few things around, such as immediately setting enter/esc disabled in pre_show
instead of waiting for everything there to finish.

Do note there occasionally seem to be a few odd issues with the dot animation after this commit.
Will look into that. But it may be some texture cache-related issue...

This also cleans up some unused log defines and a VS 2013 conditional include.
2018-10-17 12:30:55 +11:00
Charles Dang
519447b0cb Convert uses of boost::thread to std::thread
Also covers uses of boost::this_thread.

Turns out std::thread calls std::terminate if it's destroyed while still joinable.
thread::detach needs to be called or else the program will crash.

There's also no standard library equivalent of boost:🧵:timed_join so I just
replaced it with the is_worker_running_ variable.
2018-10-17 12:30:54 +11:00
gfgtdf
ae5c5c4043
fix missing comma 2018-10-17 00:13:27 +02:00
gfgtdf
1a7724e547 reset unit overlay & image_mods on advance_to
this fixes remove_modification for these effects, and also a bug where these effect would be applied twice after a unit advances.

fixes #3264
fixes #3220

This also changes the implementation of [unit_overlay] to use [effect]s now so tht changesdone via [unit_overlay] ae persistent as they were before.
2018-10-16 23:03:37 +02:00
gfgtdf
03ea39b4af add debug info in battle_context 2018-10-16 21:14:30 +02:00
gfgtdf
e1c66ae215 remove unused cctors 2018-10-16 21:14:29 +02:00
Wedge009
2dd7e87039 MSVC project update.
* Remove invalid entries
* Add files necessary for compilation after master rewrite.

[ci skip]
2018-10-16 22:23:36 +11:00
gfgtdf
b4196af8c0 refactor battle_context
this has multiple advantages:;
1) it fixes #3594, an assertion failue that happend when a unit with
only one attack attacked when that one attack was disabled.
2) It now creates each pair or battle_context_unit_stats only once for
each pauir of attacks, previsouly the coud would create multiple
temporary battle_context_unit_stats objects to for exampel check
"disabled"
3) It simplifies the code by removing special handling of some cases.
2018-10-16 12:29:17 +02:00
gfgtdf
bc9953f0f2 partly revert cleanup to fix merging conflict 2018-10-16 11:02:14 +02:00
Charles Dang
663da0e053 Attempt to fix tests
Fixup a02100a0f15bd015c2322b7b528b0b9b60a1c678.
2018-10-15 21:14:22 +03:00
Martin Hrubý (hrubymar10)
99032c043a
Fix Xcode project after changes in master 2018-10-15 19:30:35 +02:00
pentarctagon
617c69529e Fix cmake linking against libboost_thread. 2018-10-14 21:40:53 -05:00
Charles Dang
7f2cf74292 Fixup 7767902
(cherry picked from commit fee641516b3f3ac954aa787d3625e254d652a86c)
2018-10-14 19:22:50 -05:00
Charles Dang
4a487ad451 Update tests for acc3fe8
We can just use a wesnothd_connection object directly here.

(cherry picked from commit 7767902261e60f64a541cac11d647b0075ea1049)
2018-10-14 19:22:50 -05:00
pentarctagon
9c2eb0fcb9 Re-add libsdl2-ttf to dockerfile. 2018-10-14 19:05:45 -05:00
pentarctagon
68db6956d2 Revert "Update branch name: master -> development"
This reverts commit 6cf9d04de5a41dd49731103b8ad6bf55c2ee6dbf.
2018-10-14 18:59:18 -05:00
loonycyborg
60fd504caf Add missing #include <ctime> 2018-10-14 23:50:24 +03:00
josteph
392d75c9a1 Fix VC14 project files
Reported by @newfrenchy83
2018-10-14 19:28:49 +00:00
josteph
e77bb3451d Fix "unknown pragma" warnings on gcc. 2018-10-14 19:19:57 +00:00
josteph
0f129f2d10 Units: Add is_visible_to_team() overload and use it to improve the previous commit. 2018-10-14 17:56:49 +00:00
josteph
180971da2b Unit Display: When a unit teleports, don't scroll to the source or destination hex if the unit is invisible there. 2018-10-14 17:55:33 +00:00
josteph
6cf9d04de5 Update branch name: master -> development
Based on:
ba68d52aa135fff6d279e1486a70b6a1952fefa7
ef8fc9df939f8875d8c69ef41619c40a1287a352
ae332bf8b1a810ce255ee5207008f564371254ed
in the 1.14 branch.
2018-10-14 16:36:26 +00:00
Iris Morelle
9c2bdf7ada wesnothd/fuh: Do not consider stale temporary bans from phpBB's banlist table
It turns out that as of phpBB 3.2.2 these are only cleared on the next
call to user_ban()/user_unban(), so they may linger around for long
after they've expired. Fixed this by making FUH aware of the existence
of the ban_end column.
2018-10-14 12:11:20 +03:00
Charles Dang
9e4210c6ce Sync changelog with 1.14
[ci skip]
2018-10-14 12:11:20 +03:00
Nils Kneuper
d371d57561 updated French translation 2018-10-14 12:11:20 +03:00
ln-zookeeper
71c6cdaa53 Updated Kwandulin's credits 2018-10-14 12:11:20 +03:00
Jyrki Vesterinen
1fd668bb1e Add @JGelfand to credits 2018-10-14 12:11:20 +03:00
Joseph Gelfand
80f4bd839f Made Blitting more permissive (#3584)
Made Blitting more permissive

SDL_BlitSurface's documentation (https://wiki.libsdl.org/SDL_BlitSurface) notes that "Blits with negative dstrect coordinates will be clipped properly".

Looking at the source code for SDL_UpperBlit() convinced me that dstrect coordinates that were too big would also be handled appropriately.

Fixes #2225.
2018-10-14 12:11:20 +03:00
Nils Kneuper
b854057054 updated Chinese (Traditional) translation 2018-10-14 12:11:19 +03:00
Severin Glöckner
a1adce8ca3 manpage: add missing options
fixes #3537

[ci skip]
2018-10-14 12:11:19 +03:00