1
1
forked from 0ad/0ad
Commit Graph

21058 Commits

Author SHA1 Message Date
369c2e8801 Further header & precompiled cleanup, fix no-PCH builds.
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.
2020-12-09 14:39:14 +00:00
bb
715f441fbb Add context for mustang attack
Reviewed By: Nescio, wraitii
Differential Revision: D3197
This was SVN commit r24350.
2020-12-08 22:33:56 +00:00
050c5401b1 Adjust range visualisation and aura ranges following d0fc8ff67d
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.
2020-12-08 12:53:07 +00:00
4bfc7048f0 Fix tests in bdbd0b9dbf
Forgetting about the tests is a categorical imperative.

This was SVN commit r24348.
2020-12-08 09:29:04 +00:00
bdbd0b9dbf Make construction previews local entities (fix 7bf933d5f6)
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.
2020-12-08 08:32:15 +00:00
d4773df0c1 Version the documentation pipeline used on Jenkins
This was SVN commit r24344.
2020-12-07 15:49:47 +00:00
d95550248b Rework bundle creation scripts.
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.
2020-12-07 13:44:42 +00:00
a2f3b25923 Update tinygettext to match upstream.
We're now ISO on the plural forms
(https://github.com/tinygettext/tinygettext/pull/30), so remove the
modified warning.
We use boost filesystem as <filesystem> and <experimental/filesystem>
are not available on the macOS CI yet.
(https://github.com/tinygettext/tinygettext/issues/31)

Differential Revision: https://code.wildfiregames.com/D3185
This was SVN commit r24342.
2020-12-07 13:15:31 +00:00
421fbfd278 Make Profiler2 configurable in visual mode. Non visual doesn't load the config so it's not possible. Also update the profiler2 page to be able to change the port
Differential Revision: https://code.wildfiregames.com/D2444
This was SVN commit r24340.
2020-12-07 08:11:23 +00:00
d92a2118b0 [SM78 2/2] Update to Spidermonkey 78 APIs
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.
2020-12-06 14:03:02 +00:00
6da64bf354 [SM78 1/2] Upgrade Spidermonkey build system and binaries to 78.6.0
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.
2020-12-06 14:00:57 +00:00
Angen
46413134bb simplify mercenary cost
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.
2020-12-06 08:34:31 +00:00
Angen
1bd3d7ee5b Fix macos-differential typo
This was SVN commit r24329.
2020-12-06 07:56:07 +00:00
f62d233f55 Two fixes after the moving of templates to civ-dirs.
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.
2020-12-06 07:39:27 +00:00
2e79c0a177 Remove health component from relics.
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, @elexis
Fixes #5007, #5847, 0f91c5ac61#inline-5236

This was SVN commit r24327.
2020-12-06 07:22:51 +00:00
40f3a967d9 Handle unknown APIC IDs in the ACPI SRAT
Patch by: Itms
Fixes: #5412

Differential Revision: https://code.wildfiregames.com/D1789
This was SVN commit r24326.
2020-12-05 13:40:29 +00:00
d20e68ff0f Revert 429d5d6194 as the linking is broken
This was SVN commit r24324.
2020-12-04 19:02:07 +00:00
429d5d6194 Fix FCollada on platforms without ecvt
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.
2020-12-04 14:39:07 +00:00
f44390f3fc Fix 3391542fec: AA / Sharpness not being correctly enabled at the start.
Reported by: OptimusShepard
Tested By: OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D3138
This was SVN commit r24318.
2020-12-03 12:19:44 +00:00
72d8bf47d4 Fix potential UB in 783e77cc8d
Reported by: Vladislav
Differential Revision: https://code.wildfiregames.com/D3180
This was SVN commit r24317.
2020-12-03 12:16:19 +00:00
Angen
b3704338e9 [gameplay-a24] Increase hack damage of pikemen
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.
2020-12-02 18:39:17 +00:00
Angen
3ffc23008d [Petra] do not pass min == max range in moveToRange
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.
2020-12-02 18:11:02 +00:00
5a66f89044 Update ICU on Windows to 68.1 with the v140_xp toolset.
- 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.
2020-12-02 16:47:28 +00:00
1b150b303f Update i18n scripts to run on Python3
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.
2020-12-02 10:05:27 +00:00
783e77cc8d Fix f78d3ddf71 - actually speed up MP/lobby chat.
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.
2020-12-02 09:28:46 +00:00
d38fde3682 Do not attempt to rebuild bundled libs every time, and do not run CMAKE for nvtt everytime. Also pass -fpic for NVTT to prevent build failures on FreeBSD (reported by @nephele).
Unify the build scripts between macOS and Linux.

Reviewed by: @Freagarach, @wraitii
Differential Revision: https://code.wildfiregames.com/D3173
This was SVN commit r24310.
2020-12-01 19:29:21 +00:00
6f841d0ccb Update mac WxWidgets to 3.0.5.1
This was SVN commit r24309.
2020-12-01 14:18:24 +00:00
7e91806be3 Use C++17 to compile 0 A.D.
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.
2020-12-01 14:17:12 +00:00
f78d3ddf71 Fix Lobby/MP Gamesetup chat lag with many messages.
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.
2020-12-01 09:42:05 +00:00
dcc73561c2 Remove Xcursor dependency following bbcd9b34cc
Fixes #5842

This was SVN commit r24304.
2020-11-30 18:10:02 +00:00
d719a66b43 [gameplay] remove female inspiration aura
Discussed with: @Imarok, @wraitii
Thread:
https://wildfiregames.com/forum/topic/33873-please-make-it-a-little-less-sexist/?tab=comments#comment-411342

Differential Revision: https://code.wildfiregames.com/D3172
This was SVN commit r24303.
2020-11-30 15:57:13 +00:00
48c31ce03f Update random_shuffle usage for C++17
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.
2020-11-30 15:52:16 +00:00
46399371ed Remove binary_function usage.
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.
2020-11-30 15:45:05 +00:00
ad2f08a355 Use a more common locale, en_US.UTF-8 is not always present.
Refs https://code.wildfiregames.com/D2101
Thread:
https://wildfiregames.com/forum/topic/28209-binariessystemtest-fmtsprintf-f-with-separator/?tab=comments#comment-396875

This was SVN commit r24300.
2020-11-30 13:59:05 +00:00
6eda2b1803 Fix debug_printf warning
This was SVN commit r24299.
2020-11-30 13:52:12 +00:00
02578e46bf [SM68 2/2] Update to Spidermonkey 68 APIs
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.
2020-11-30 09:03:20 +00:00
d8332a2938 [SM68 1/2] Upgrade Spidermonkey build system and binaries to 68.12.1
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.
2020-11-30 08:59:49 +00:00
d2075bed5d Fix graphics issue with old AMD cards.
Reviewed by: @vladislavbelov
https://upload.jabberfr.org/hUkR3nTdfhbhHI92/0b5c64c3-136c-4744-a4ca-a70222a3cfaf.png

This was SVN commit r24292.
2020-11-29 16:26:28 +00:00
f230988e0e Add globalscript helper function for Auras
Similar to those for templates and technologies.

This was SVN commit r24290.
2020-11-29 04:44:38 +00:00
7cde8a9df4 Rewrite the civinfo page to use OOP principles
Tested by: Nescio, Freagarach
Refs: #5387
Differential Revision: https://code.wildfiregames.com/D2822
This was SVN commit r24289.
2020-11-29 04:20:17 +00:00
416cc90c3e Drop support for compiling with Visual Studio 2015
Ahead of the SM68 migration, where we will need to use VS17, drop
support for compiling with VS16.

Refs #5862

Differential Revision: https://code.wildfiregames.com/D3158
This was SVN commit r24286.
2020-11-28 16:54:48 +00:00
3b81fff942 Fix BuildingAI error in FireArrows
Fixes d0fc8ff67d

Differential Revision: https://code.wildfiregames.com/D3159
This was SVN commit r24284.
2020-11-28 14:06:17 +00:00
2cfd1b9fac Fix MacOs bundle for Python3
Update the lib used to handle plists, as dmgbuild changed things for
Python3.

Refs #5694

Differential Revision: https://code.wildfiregames.com/D3157
This was SVN commit r24282.
2020-11-28 10:23:06 +00:00
cf6aaf37a4 Fix visual-replays not processing turn 0 commands.
Use FinishedOwnCommands, which is intented to plan commands for the N+2
turn, but can be used to run commands immediately by the replay manager,
and unlike FinishedUpdate is called before the first update.

Reported by: Freagarach
Fixes #5546

Differential Revision: https://code.wildfiregames.com/D3067
This was SVN commit r24280.
2020-11-28 09:14:29 +00:00
7bf933d5f6 Fix VisualActor tech changes for mirages
Correctly recompute the actor when something changes that could modify
it (ownership change, ...).
Make sure mirages are updated when they reappear after being hidden.
Make sure foundations have proper identity classes.
Make sure mirages don't respond to value modifications in the visual
component.
Clarify a few comments.

Earlier work by: Sandarac
Fixes #2907

Differential Revision: https://code.wildfiregames.com/D576
This was SVN commit r24279.
2020-11-28 08:57:15 +00:00
b79c7186f8 Fix Hotkey/input handling in input boxes.
If modifiers (except shift) are used, hotkeys should still be triggered.

Fixes a4852c4c01 / D2814

Reported by: Stan`
Differential Revision: https://code.wildfiregames.com/D3154
This was SVN commit r24278.
2020-11-28 08:24:39 +00:00
7b49f9217e Fix incorrect index in 9ae084519f
Noticed by: @Angen
This was SVN commit r24276.
2020-11-27 20:02:34 +00:00
259c57929d Fix MP OOS when rejoining on turn 0
Reported by: elexis
Fixes #5185

Differential Revision: https://code.wildfiregames.com/D3068
This was SVN commit r24275.
2020-11-27 15:41:24 +00:00
4b76e33e4d Fix MacOS bundle build
clean-workspaces.sh now cleans SM libs, so it needs to be called before
building libraries.

Differential Revision: https://code.wildfiregames.com/D3153
This was SVN commit r24274.
2020-11-27 11:00:53 +00:00
d867b829b4 Add missing file in https://code.wildfiregames.com/D3126 / 9ae084519f
This was SVN commit r24273.
2020-11-27 09:40:45 +00:00