MacOS requires some UI-related API calls to happen on the main thread.
There are several SDL functions that call UI-things, and those were,
since #500 / 08b4d96cf2, in a separate thread.
This crashes on Catalina, instead of simply warning (see #5470).
It is not the first time we had such issues, as originally the Engine
was on the main thread and AtlasUI on a separate thread.
That didn't work on MacOS, so the threading was inverted in #500 /
08b4d96cf2, with AtlasUI on the main thread and the Engine in another
thread.
Unfortunately, this still wasn't enough.
This formally unthreads the engine, running it on a wxTimer, to avoid
these issues.
Future work should focus on:
- Further decoupling the simulation from the engine itself, as what
Atlas really needs is a threaded simulation, not a threaded engine.
- Making the simulation itself more threaded
- Making it possible to do tasks asynchronously under Atlas.
Refs #500Fixes#5470
Differential Revision: https://code.wildfiregames.com/D2752
This was SVN commit r24361.
This makes 'dancing' impossible with patrol, for both single units and
formations.
It further makes the formation and regular patrol code more similar.
The diff harcodes an integer wait time as it relies on timer calls
instead of range queries, as that was much simpler to implement.
Animations for the waypoint-waiting is also unimplemented.
Reviewed By: Freagarach
Refs #5106
Differential Revision: https://code.wildfiregames.com/D2913
This was SVN commit r24360.
This made entites use slaughter against the wolves instead of normal
attacks.
After b97d251322 the class is not needed anymore to be able to move the
wolves.
The fix of the wolves stacking in one place is deferred.
Patch by: @Dunedan
Differential Revision: D2771
Reviewed by: @wraitii
Comments by: @elexis
This was SVN commit r24359.
And total gatherers next to the population icon.
Closes#643
Patch by: @mammadori
Differential Revision: D3155
Earlier revisions reviewed by: @Angen, @wraitii
Comments by: @Nescio, @s0600204, @Stan
This was SVN commit r24357.
Preview entity IDs vary from user to user.
Reported by: Freagarach
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3196
This was SVN commit r24354.
- Add a 'dev' option to the mac bundle that's much faster, intended to
quickly test bundle-like behaviour.
- Add an option to only archive the 'mod' folder, intended to speed up
the CI weekly builds and avoid taking too much disk
space.
- Tweak the windows installer, add an option to create a shortcut to the
desktop (Fixes#1637). This uses the readme 'hack'
which appears to be a relatively standard way of doing that.
- Make the scripts executable.
- Update jenkinsfile.
Follows d95550248b
Differential Revision: https://code.wildfiregames.com/D3191
This was SVN commit r24353.
GUIObjectBase is made a IGUIObject* to avoid including those headers
un-necessarily. Subsequent diffs ought to clean up the various of
pointers for that with a similar type with reference semantics.
Also:
- Add standard C and C++ headers (mostly cstring for memcpy, string and
vector) where needed.
- Swap out some includes for forward declarations
- Clean up un-necessary boost includes in precompiled and other headers.
- Clean up precompiled headers, including fewer things.
- Move ACPI to the windows-specific folder as it's included there only
and mostly specific to that platform.
Thanks Stan for the testing.
Differential Revision: https://code.wildfiregames.com/D3129
This was SVN commit r24352.
d0fc8ff67d / D2759 made ranges account for entity size, making auras
larger than they needed to be. This accounts for that.
Units haven't been changed, the delta is not worth modifying imo.
As discussed with Nescio, this means that, for a given aura, larger
buildings will now have a larger "aura area". This particularly affects
oblong buildings.
A proper solution for this would be to not approximate some structures
as a circle, but remains to be implemented.
Note that for current 0 A.D., this effect is unlikely to be a
significant gameplay advantage to one civilisation over another.
Reviewed By: Nescio
Differential Revision: https://code.wildfiregames.com/D3169
This was SVN commit r24349.
Identity classes where added to construction previews in D576 /
7bf933d5f6. This meant they counted towarde entity limits, as they were
not local entities.
This diff fixes that by making them local entities.
Thanks for s0600204 for raising the issue
Reported by: wowgetoffyourcellphone
Refs #2907
Differential Revision: https://code.wildfiregames.com/D3187
This was SVN commit r24347.
This reworks the OSX bundle script, to run it easily on CI and to
further also build the unix tarballs and the windows installer.
Clean up the MacOS bundle detection, by not forcing a compilation-time
switch.
Clean up shared library compilation: changing the installation name
isn't necessary for 0 A.D.
Differential Revision: https://code.wildfiregames.com/D3161
This was SVN commit r24343.
This ugprades 0 A.D. to the latest ESR at the moment of writing.
Mostly straighforward API changes (see meta-Bug 1633145)
- js::Class is merged with JSClass
- JSNewArrayObject becomes JS::NewArrayObject
- ArrayObject-functions are moved to a new public header Array.h
- JSMSG error messages have again been changed, requiring some tweaks.
- AutoValueArray becomes RootedBalueArray (Bug 1634435)
- 'uneval' is behind a Realm flag (Bug 1565170), but no removal is
planned in the short-term future.
- Some minor GC API changes (Bugs 1569564 and 1633405)
- Error reporting has had some tweaks, and error flags have been removed
(Bug 1620583)
- StructuredClone are now always thread-safe, simplifying an API change
introduced in SM52 (Bug 1607791)
Tested by: Stan, Freagarach, mammadori
Closes#5861
Differential Revision: https://code.wildfiregames.com/D3168
This was SVN commit r24333.
SM78 drops usage of Python 2 in favour of Python 3.
SM78 is the first ESR to actually use rust, which means a new static
library is bundled.
This means LLVM-objdump is now a dependency of Spidermonkey, and also 0
A.D.
SM78 also removes the need for NSPR on Windows (Bug 1556646).
Tested by: Stan, Freagarach, mammadori
Refs #5694
Refs #5861
Differential Revision: https://code.wildfiregames.com/D3167
This was SVN commit r24332.
Move repetitive cost change for mercenary from templates to technology
json.
Differential revision: https://code.wildfiregames.com/D2685
Patch by: Nescio
This was SVN commit r24330.
b57abe806c had some errors in the patch. @Nescio noted that the fortress
builder script was using the wrong civ. And the committer noticed the
elephantine random map was broken.
Differential Revision: D3122
Tested by: @Nescio
This was SVN commit r24328.
Since relics ought to be undestroyable, a health component makes no
sense. This makes that the Invulnerability-flag can be removed and
relics can be captured again (after 0f91c5ac61#inline-5236).
Differential Revision: D1268
Original patch by: @temple
Reviewed by: @wraitii
Comments by: @bb, @elexisFixes#5007, #5847, 0f91c5ac61#inline-5236
This was SVN commit r24327.
Based on a patch by: @NF
Tested by: @nephele
Tested on FreeBSD, Windows, Kubuntu, macOS
Fixes: #1325
Differential Revision: https://code.wildfiregames.com/D2399
This was SVN commit r24323.
This patch increases the attack base hack damage of pikemen from 1 to 2.
Differential revision: D2972
Patch by: borg-
Reviewed by: Nescio
Comments by: myou5e, wraitii, badosu, ValihrAnt
This was SVN commit r24316.
Original diff D2512
Reported on forum by gameboy:
https://wildfiregames.com/forum/index.php?/topic/27384-strange-landing-on-the-island-and-unable-to-attack/
Units with goal where minrange = maxrange rarely arrive to destination,
because they miss it.
See Todo in unitmotion
Relative part:
In the meantime, one should avoid that 'Speed over a turn' > MaxRange -
MinRange, in case where min-range is not 0 and max-range is not
infinity.
For that reason avoid passing minrange = maxrange from ai.
Also warn in cpp unitmoition when getting this kind of command.
Differential revision: D3149
Reviewed by: @wraitii
This was SVN commit r24315.
- Remove the last usage of the MACRO "TRUE" as it's deprecated and
replace it by its value "1" the == operator is overloaded to return a
UBool(int8_t) refs 9b9a96382c
- Remove two unused DLLs
- Update and add EOL to headers.
Refs #3004
This was SVN commit r24314.
The `pology` library runs on Python2 and development appears stalled. It
is also not available on pip.
The `babel` library, BSD-licensed, provides, amongst many other things,
a replacement for .POT / .PO manipulation.
The `poediff` tool that we used to detect spurious i18n change is
replaced with a Python script that does a simpler but good enough job
(it is also much, much faster).
These replacements let the i18n scripts run on Python3 entirely.
Makes D506 redundant.
Comments by: Itms
Reviewed By: Gallaecio
Refs #5694
Differential Revision: https://code.wildfiregames.com/D2757
This was SVN commit r24313.
f78d3ddf71 / D1781 would fix an important source of lag... If it
actually used the code.
Also clean up some comments.
Reported by: Vladislav
Differential Revision: https://code.wildfiregames.com/D3176
This was SVN commit r24312.
Supported compilers are Clang 5, GCC 7, Visual Studio 17, Xcode 9.3
Update Atlas alongside since the replacement APIs are c++17 only.
De-activate the StyledTextCtrl module of WxWidgets on mac, since that is
a wrapper around the Scintilla Text editor and doesn't compile with
C++17 (as it uses auto_ptr). We don't use the editor, so this is also a
win on the compilation time front.
Closes#5862
Differential Revision: https://code.wildfiregames.com/D3166
This was SVN commit r24308.
CText requires re-rendering every message when adding a new one, which
quickly becomes very slow.
Use CList and a custom method to work around this.
These classes are in need of a more complete refactoring.
Based on a patch by: nani
Differential Revision: https://code.wildfiregames.com/D1781
This was SVN commit r24306.
C++14 deprecates and C++17 removes functions we use for random sounds.
This makes FastRand() fit the URG interface, and uses the appropriate
function.
Refs #5862
Differential Revision: https://code.wildfiregames.com/D3107
This was SVN commit r24302.
std::binary_function was a pre-C++11 construct, that is removed entirely
in c++17, and no longer necessary regardless.
Refs #5862
Differential Revision: https://code.wildfiregames.com/D3164
This was SVN commit r24301.
No noteworthy API changes.
Details:
- Remove UTF16 script execution since UTF8 is supported in SM68 and
going forward
- Several new headers includes are required
- Realms replace Compartments as "global holders" (see meta-Bug 1357862)
- JSRequests are removed entirely (Bug 722345), see also aae417bd29
- Trivial API updates in ProxyHandlers, ArrayBuffer, Warnings, GC
reasons, Context options, ObjectIsFunction, ValueVectors and
JSCompartment
See also the migration guide:
https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/esr78/docs/Migration%20Guide.md
Tested by: Freagarach, Stan, Subitaneo
Fixes#5860
Differential Revision: https://code.wildfiregames.com/D3144
This was SVN commit r24297.
No noteworthy build system changes, however rust is now necessary for
Spidermonkey compilation.
On windows, clang-cl is now necessary.
Tested by: Freagarach, Stan, Subitaneo
Refs #5860
Differential Revision: https://code.wildfiregames.com/D3143
This was SVN commit r24296.