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.
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.
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.
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.
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.
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.
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.
This fixes tab buttons not playing sounds when pressed.
Original patch by: Stan
Amended patch reviewed by: Stan
Differential Revision: https://code.wildfiregames.com/D3109
This was SVN commit r24270.
We now support the most recent released version of `fmt` available (at
the time
of committing).
As we no longer patch `fmt` to get it to work within `pyrogenesis`, this
commit
also mostly removes its source from our code-tree (some headers are
retained for
Windows builds).
If you are a user of...
Linux/BSD: You will now need to have `fmt` installed from your
distribution's
package repository. The minimum supported version of `fmt` is
`4.0`.
OSX: The source is acquired and compiled (in `build-osx-libs.sh`),
then included and linked automatically.
Windows: The relevant header files are retained and, along with a
pre-built
library, are the only things still bundled.
Accepted by: wraitii
Tested by:
* Freagarach (Lubuntu 18.04, `fmt 4.0.0`)
* Krinkle (MacOS 10.14, `fmt 6.1.2`)
* nephele (Alpine Linux)
* wraitii (MacOS 10.14)
* Nescio (Fedora 33, `fmt 7.0.3`)
Windows library files built by: Stan
Fixes: #3190
Differential Revision: https://code.wildfiregames.com/D2689
This was SVN commit r24267.
Fix in b1a78ce285 actually worked by accident, and introduced more
serious issue with minimal range.
Differential revision: D3148
Fixes: #5864
Reviewed by: wraitii
This was SVN commit r24264.
Introduce a DISCARD macro to ignore the warn_unused_result attribute
used by Spidermonkey, and reuse it elsewhere.
Differential Revision: https://code.wildfiregames.com/D3147
This was SVN commit r24261.
All are updated except:
- WxWidgets (not sure about compatibility)
- libogg (doesn't compile)
- zlib/libsodimum which have no update.
This drops supports for 10.11 and earlier, meaning we can now assume
SSE4.1 is present.
Updates the build system to account for this.
Closes#5777 (by virtue of upgrading to SDL 2.12)
Refs #4362
Differential Revision: https://code.wildfiregames.com/D3111
This was SVN commit r24257.
Two noteworthy changes:
- Proxies are update to the SM60 API, having an explicit reserved slot
and a private slot, in which the 'proxy data' and the C++ object are
stored. This fixes a debug assertion failure of SM52 (See bugs 1237504
and 1339411)
- The GC callback behaviour has changed slightly, and we should now only
look for GC_SLICE_BEGIN and GC_SLICE_END calls (Bug 1364547)
Other updates are minor:
- Bug 1339036: JSTYPE_VOID beomes JSTYPE_UNDEFINED
- Bug 1308236 - avoid ambiguous comparison by changing NULL to nullptr
- Bug 1421358, GC::reason::REFRESH_FRAME was removed. API is indicated
in jsapi.h so use that.
- Compartment behaviours update
- ClassOps changes (Bug 1389510 removed the getter/setter - 7c04ea0211 -
and bug 1370608 added one more before that so net minus one)
- Minor tests touchups again.
Tested by: SubitaNeo, Stan
Thanks to bellaz89 for the Shared Array fix
Closes#5859
Differential Revision: https://code.wildfiregames.com/D3116
This was SVN commit r24243.
This changes VS to use the same library name as other platforms, since
the toolsets are binary-compatible going forward. This makes the build
script slightly more streamlined on windows.
Also enable building NSPR on windows as part of the spidermonkey build,
instead of compiling it separately.
Tested by: SubitaNeo, Stan
Refs #5859
Differential Revision: https://code.wildfiregames.com/D3115
This was SVN commit r24242.
UniqueRange was a unique_ptr replacement with a few tweaks (such as a
compulsory custom deleter). Its features are not really used, it
contains outdated atomic calls, and it blocks D1511, thus it is removed.
Refs #5165
Differential Revision: https://code.wildfiregames.com/D613
This was SVN commit r24234.
Two issues are fixed:
- Atlas on non-Mac crashed when started from within the game.
- MSAA options crashed if enabled on startup.
The underlying issues where improper shutdown, and assuming the renderer
was initialised than it might not be (in particular, the post-processor
wasn't).
Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3131
This was SVN commit r24233.
Follows from d0fc8ff67d, 95dbb8be25.
The original diff asserted that only "real" entities would make range
queries. This proved inaccurate as building previews can too. However,
simply removing the assertion doesn't fix the issue, given that they
still aren't found and we still need to account for their size.
This fixes that properly by special-casing local entities.
Thanks s0600204 for giving this a look.
Reported by: Mr.lie
Differential Revision: https://code.wildfiregames.com/D3132
This was SVN commit r24231.
The JS-side counterparts of C++ objects are now Proxy objects, in
anticipation of SM60 changes that remove the get/set hooks entirely.
This makes semantic sense too as they are essentially phantom wrappers
around the C++ objects, with no proper JS representation.
By using different proxy handlers for different GUI object types, we can
further fix issues encountered in D2136 by defining the relevant
functions only on objects that should have them.
The main complexity with proxy handlers is that Spidermonkey assumes in
several places that they are static and data-less, so they cannot be
used directly to hold data. This diff works around that issue by storing
per-script-interface data in the CGui directly.
Further API changes in SM60 make this slightly cleaner.
Comments by: Itms
Refs #5859
Differential Revision: https://code.wildfiregames.com/D2768
This was SVN commit r24229.
Rendering options use this capability to simplify their implementation.
This makes it easier to add new options.
Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2293
This was SVN commit r24228.
This cleans up many un-necessary header includes, either simply
providing nothing or forward declarations in their place.
No major compilation time change here, though this does reduce depencies
in some headers.
Also fix up old MacOS STL-include fixes that are no longer relevant.
Differential Revision: https://code.wildfiregames.com/D3128
This was SVN commit r24227.
I incorrectly assumed no local entities would be making range queries,
but some building previews do. The assert is thus incorrect.
Reported by: SubitaNeo
Fixes#5870
Differential Revision: https://code.wildfiregames.com/D3125
This was SVN commit r24223.
CCmpRangeManager queries do not take obstruction size into account,
meaning they return fewer entities than they should. This particularly
affects buildings with ranged attacks, gates, and a few other templates.
This is, unfortunately, a slight performance decrease.
Discovered following Angen's comment [[
https://code.wildfiregames.com/D2738#116269 | here ]].
Comments by: Angen
Reviewed By: bb
Refs #3381 (not marking it down as 'fixes' and I'm not entirely sure it
was the only moving part here).
Differential Revision: https://code.wildfiregames.com/D2759
This was SVN commit r24217.
- Provide a "Hotkey" screen to let players remap hotkeys in-game using a
convenient setup.
- Make all .cfg hotkeys refer to scancodes (i.e. position on the
keyboard), so that default hotkeys now translate correctly for AZERTY,
QWERTZ and other layouts.
- 'BackSpace' is now an alias for 'Delete', and works for killing units.
This fixes#1917, as macs don't have a proper delete key and would need
to use Fn+Del otherwise. This shifts "timewarp" to Shift+BackSpace.
Functionally, this switches hotkeys to scancodes, as that makes more
sense (they are combinations of key positions, not actual text output).
SDL includes are cleaned and key names are reused.
Fixes#2850, Fixes#2604, Refs #1810, Fixes#1917.
Follows work in 3d7784d2af.
Various diffs tested by: Angen, Stan, Freagarach
Comments by: Nescio
Differential Revision: https://code.wildfiregames.com/D2814
This was SVN commit r24215.
No particularly noteworthy changes, as most complex API changes were
already supported in SM45 and done.
The addition of JSStructuredCloneData allows to remove our custom class.
Changes:
- InformalValueTypeName is back in the API, so remove our
implementation.
- Stop using JSRuntime entirely in favour of JSContext*
- JSPropertyDescriptor is renamed.
- CompartmentOptions are tweaked slightly (no functional changes)
- JS::Construct - API update.
- JSClass split - API update.
- A js.msg error message was removed, so we had to use a different one.
- Tests fix: fix comparison of union instances
- Disable warning in spidermonkey Vector.h
- Update error reporting to SM52 (minor API updates)
- Ignore warnings about unused return values (would come from OOM, which
isn't recoverable)
Most of the patching was done by Itms.
Tested by: Stan, Freagarach
Fixes#4893
Differential Revision: https://code.wildfiregames.com/D3095
This was SVN commit r24203.
Of note is the change to static linking on *nix (MacOS already used it).
The logic is that we can only use one single version of SM, so that
advantage of dynamic linking is lost regardless. We might also see
performance gains in the future with LTO enabled. It is also slightly
easier to distribute the program as a result. Expect a negligible size
increase in the binary size (offset somewhat by no longer needing to
distribute .so files). Finally, it streamlines the build script.
Also noteworthy in this commit:
- The MacOS build script is folded back into the general build script.
- the perl/sed command is replaced by patching the configuration file,
which at least warns if it starts failing in the future.
Binaries for windows provided by @Itms
The bulk of the patching was also done by @Itms.
Tested by: Stan, Freagarach
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3094
This was SVN commit r24202.
Broken in several recent diffs.
This also fixes (very) old missing standard headers.
Differential Revision: https://code.wildfiregames.com/D3110
This was SVN commit r24200.