Commit graph

24319 commits

Author SHA1 Message Date
Itms
5f3b9d6d45
Ignore cast warning in mongoose
This fixes -Wcast-function-type warnings under GCC 8.
2024-12-05 09:51:27 +01:00
Itms
c11cf80ecb
Initialize some floats in CCmpPosition
This fixes -Wmaybe-uninitialized warnings under GCC 8 and clang 9.
2024-12-05 09:51:25 +01:00
Itms
91289c8362
Fix error in build-macos-libs.sh
Issue introduced in 9fd05e38a4, revealed by c280df9e64.
2024-12-05 09:51:24 +01:00
Itms
d85a56142d
Revert "Use -Og or equivalent for debug builds"
This reverts commit 81171f3bb4.

Backed out because of issue #7281.
2024-12-05 09:46:53 +01:00
wowgetoffyourcellphone
4ebf2037fe Capitoline Wolf by nifa 2024-12-05 03:37:24 +01:00
Antoine Le Gonidec
649cd9b318
Add myself (vv221) to the list of programming contributors 2024-12-03 13:54:38 +01:00
Antoine Le Gonidec
2451167a37
Update the MacOS libraries build process to avoid "empty" error messages
The die function now only displays a message if it has been called with
a message argument.
2024-12-03 13:53:42 +01:00
Antoine Le Gonidec
c280df9e64
Fix errors handling when building the libraries for MacOS
The shell option "set -e" has a tricky, but standard, behaviour:
Anything called on the left side of a || or && token ignores "set -e",
so failure in a command in a subshell called on the left side of "|| die"
does not prevent the execution of the following commands in the subshell.

Adding explicit "|| die" calls after each command that could fail (and
should interrupt the process) works around this behaviour, by emulating
the intuitive "set -e" behaviour.
2024-12-03 13:53:34 +01:00
real_tabasco_sauce
82386a68be add real_tabasco_sauce to the art credits 2024-12-01 20:45:48 +01:00
real_tabasco_sauce
c279b1c327 improve pack/unpack pngs 2024-12-01 20:45:48 +01:00
Ralph Sennhauser
81171f3bb4 Use -Og or equivalent for debug builds
Unless minimal cflags is set add -Og or equivalent to CXXFLAGS for debug
build configuration.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-01 09:48:53 +01:00
Ralph Sennhauser
b97f1233ad Limit FORTIFY_SOURCE to release builds
FORTIFY_SOURCE relies on optimizations being enabled which is only the
case for the release configuration. Therefore remove it from the debug
configuration as to prevent the compiler issuing a warning on each
invocation.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-01 09:48:53 +01:00
Ralph Sennhauser
c497744548 Don't define DEBUG on non VS actions
DEBUG is unused by pyrogenesis and unconditionally adding it to defines
prevents building against a non debug version of spidermonkey. This will
allow building only one copy of spidermonkey, which can be trivially be
replaced with the other depending on needs independent of pyrogenesis
debug or release build.

This also allows to build either build configuration against system
spidermonkey, which obviously is either one build type or the other.
Requires a compilecheck until the pc file gets fixed upstream.

A comment in the spidermonkey build.sh says on FreeBSD spidermonkey
debug configuration doesn't even build and so pyrogenesis debug build
wasn't possible either.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-01 09:48:53 +01:00
wraitii
a3ce07c3bb const {} bool 2024-12-01 09:47:01 +01:00
Lancelot de Ferrière
def0f57365 Try to anticipate unit collisions to improve pathing 2024-12-01 09:47:01 +01:00
Lancelot de Ferrière
533429e800 Handle phenotype in Transform, tweak SetPhenotype logic 2024-11-30 19:12:11 +01:00
Ralph Sennhauser
7aa5890236
Fix getting host jid after 0a455fbe2d
During the removal of glooxwrapper the function GetJID was mapped to
getID. This results in NetClient querying for host jid not getting the
right value which prevents hosting a game in the lobby.

Reported-by: Dunedan
Refs: #7203
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-11-29 05:50:16 +01:00
Ralph Sennhauser
a5fec576f9 Set default workspace instead of requiring outpath
This uses ./build/workspaces/default as location for generated build
files as well as build products. Using the name "default" to avoid the
dilemma gcc vs clang vs premake generator. Doesn't impact scripts
already using --outpath and allows running premake5 --help without a
wrapper.

Also update .gitignore to make using arbitrary workspaces cleaner.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-11-28 06:38:21 +01:00
Ralph Sennhauser
cb08933e88 Remove --prefer-local-libs premake option
This option doesn't handle includes, further we rely on system includes
and pkg-config to locate dependencies.

For systems where installing into local is reasonable this paths should
already be in system/ld paths. So in practice this offers no value.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-11-28 06:34:38 +01:00
real_tabasco_sauce
f1afa611a9 add coast_range map 2024-11-27 18:31:30 +01:00
Ralph Sennhauser
197e63465b
Always enable --large-address-aware build option
This option is needed to be able to use more than 2GB on 32bit Windows
builds.

Having to explicitly enable this turns out to be a pitfall. Release
builds are done with this option enabled and when then building from
source and running out of memory it's not immediately obvious what the
reason is.

The documented intent is that this behaviour might be useful to find
memory leaks. The large-address-aware enabled build already perfectly
serves this role this days and the memory pressure is an important
reason for the ongoing Windows 64bit build efforts. Also there are
arguably better tools for this purpose.

Refs: commit a8403bd7e5
Refs: issue #1619
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-11-26 18:27:38 +01:00
real_tabasco_sauce
06f47f0f46 Add additional range checks to Attack.js
This may decrease performance but increases the feeling of responsiveness in units and addresses unit overshoot.
fixes #7074
2024-11-26 11:09:17 +01:00
Itms
66c2fc07d7
Run Linux CI on GCC 8 and clang 9
Those are the minimum supported versions. Only PCH builds are performed
to save build time.
2024-11-25 23:04:45 +01:00
phosit
32b26e6d0c Remove unused delta in Camera.cpp
The variable was introduced in 5470eff53c but never used.
2024-11-25 21:23:05 +01:00
Ralph Sennhauser
0a455fbe2d Remove glooxwrapper
This wrapper was meant to support multiple C++ ABIs with a single
pre-built gloox library wrap as a C library. A new ABI change was
rejected a few years back, so this will probably take a while for it to
be on the table again. With the bug tracker and mailing list currently
unavailable and known TLS issues we might have replaced gloox by then
anyway.

Supporting multiple ABIs with the current setup isn't an issue either
and is already done for 32bit vs 64bit ABI on Windows.

Therefore use gloox types directly in lobby code instead of wrapper
types and delete the wrapper and build-integration.

Migrate to override where applicable, as it helped avoid subtle
differences in signatures and finding missing inheritance of LogHandler.

Finally use version check instead of os check to work around Windows
using the 1.1 development branch instead of releases.

Fixes: #7198
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-11-25 20:01:00 +01:00
real_tabasco_sauce
087f62d062 Update migration and rename the previous map "land grab" 2024-11-25 19:24:01 +01:00
real_tabasco_sauce
98b042a90a add foothills map 2024-11-22 05:08:15 +01:00
Ralph Sennhauser
49507c04e0
Make failed audio device query non fatal
Querring the audio device name may fail. The name is only used for the
sake of logging it for debugging. Avoid querry failure to be fatal and
insted just log the issue.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-11-21 15:08:04 +01:00
Ralph Sennhauser
bb1910ff4c
Fix segfault with openal-1.24.0
With version 1.24.0 alcIsExtensionPresent() has dropped case insensitive
string comparison [1], use upper case names.

The internal strings are uppercase since the first git commit importing
openal 17 years ago.

[1] upstream commit 785f794141d62a4c308db26aa4a4819e6a92525e

Report: https://wildfiregames.com/forum/topic/125203-crash-on-start-due-to-soundmanager
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-11-21 15:08:03 +01:00
Stan
28da29e96b
Cache resource gatherer max distance and range.
The string -> double conversion is fairly slow. And we don't need to create many objects this way.
Based on a patch by: @wraitii
2024-11-18 10:36:45 +01:00
phosit
f8afd49ae1 Return by value from CCamera::GetScreenCoordinates
Pack the two `float`s in to a `CVector2D`.
Rename some variables to not use underscore.
2024-11-17 20:27:58 +01:00
phosit
998dc30b6d Return by value from CCamera::BuildCameraRay
Some return values can be assigned to a `const auto`, somewhere `dir` is
mutated so the whole result has to be assigned to a non `const` variable
and once only dir is used, so structured binding isn't used there.
2024-11-17 20:27:58 +01:00
phosit
cf92c20020 Return by value from CCamera::GetViewQuad
Remove some temporaries by passing the return value directly to
range-based for loops.
2024-11-17 20:27:58 +01:00
Itms
5ed3a54603
Do not pin or atomize ParamNode strings
When building a JS::Value from CParamNode, strings have been "interned"
since the conversion was written in dd501b2a5a. This means that the JS
string object could be used outside a JS realm, and also that those
strings could be compared efficiently instead of char-by-char.

This was unnecessary, and the only place in the code where we used
"interned" strings. The upgrade to SpiderMonkey 45 (64b477625d) changed
the name of related methods, and some of them are removed from the
public API in SM 102, so stop pinning and atomizing those strings.

Additionally, the switch of CParamNode to utf8 in 35ed55cfd6 missed one
of the two utf16 handlings, so fix that as well.
2024-11-17 18:59:48 +01:00
phosit
48d1b7586d Clear modsToInstall earlier
Dataflow is now more clear.

The `std::vector` is cleared earlyer, so there is a bit less memory
used.
2024-11-17 18:03:49 +01:00
phosit
3c8f6762c8 Change flags to a single bool
In `RunGameOrAtlas` only one of thous flags is used. Using a `bool` is
simpler and less error-prone.

Also reset the variable earlier, so it's easyer to reason about it.
2024-11-17 18:03:49 +01:00
phosit
31d9b0ed05 Make the TaskManager a automatic livetime object
This way the destructor can be used for cleanup.
2024-11-17 18:03:49 +01:00
phosit
256152df6d Add CXeromycesEngine
This way the destructor can be used for clean up and `Singleton` can be
used.
2024-11-17 18:03:49 +01:00
Vantha
f796beee11 Enable most ships to collect sea treasures
Previously, only merchantmen were able to collect treasures on the sea.
This patch enables all types of ships to do so:
fishing boats, merchantmen, and warships (except fireships).
2024-11-16 22:01:42 +01:00
Dunedan
67cf07b897
Update URLs to the terms to point to Gitea 2024-11-14 19:58:40 +01:00
phosit
400878b374 Include utility in Future.h
Fix building without precompiled headers.
Defect introduced in 778972602a
2024-11-14 19:25:28 +01:00
Itms
ebd66fef89
Retry non-incremental CI builds as a new run
When a non-incremental build is needed for a PR, the current code cleans
up workspaces and retries, but this leaves the build error in the
console output. This marks the build as unstable, as if warnings were
present.

Instead, let the build fail and instead reschedule a clean build, which
will override the build status in Gitea.
2024-11-14 14:10:14 +01:00
Vantha
6582e7348e Fix the mouse event mask of the flare button
Update the reference in Minimap.xml to some name changes in
a1796ed71f.
2024-11-14 13:55:58 +01:00
Vantha
a1796ed71f Enable observers to see and send flares
This patch gives observers the possibility to see and send flares.
Players keep their color after resigning and "true" observers flare in white.
Observers render all flares; the ones sent by any player or observer.
Player continue to only see their allies' flares.
The flare notification option is converted into a dropdown.
-> adding the possibility to only receive them as observer.
2024-11-14 11:58:15 +01:00
Stan
9e5e2708f4 Raise Loot.js and Looter.js' coverage to 100% 2024-11-13 23:19:56 +01:00
Stan
d116d27327 Fix testing components with no Init method() 2024-11-13 23:19:56 +01:00
Stan
ce588689ee
Move Windows tool executables to win source libs. 2024-11-13 21:13:18 +01:00
Ralph Sennhauser
8d993b9250 Generate sources in workspace
Modify our cxxtest module so that it generates sources in the
configured build directory instead of the source tree. This simplifies
cleaning build output and .gitignore.

Make test_root.cpp a build target so it doesn't have to be generated on
each run. This means no more building and linking into test target
unless needed either. Unfortunately there is no source for test_root.cpp
and an update to cxxtest might require a manual make clean.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-11-13 19:16:33 +01:00
trompetin17
4e98704b71
fix Propagation mousewheel event in game
Propagation mousewheel event was introduce to have the opportunity to
parent handle this event if an only if the child doenst handle and the
parent set a handler for that event.
The error foundedd by elexis inside a game relay on the message waw
propagated outsie IGUIObjects to CGUI.cpp that shouldnt be at the
beggin. I forget to stop the propagation when all objects in the tree
was validated, because of that the message was propagate to CGUI.cpp
andd then hanle by camera.
the fix suggest to only propagate the event in the GUI tree, not outside
the GUI tree
2024-11-12 15:03:28 -05:00
trompetin17
73a3602475
Fix GUI Action on MouseWheel events
Now that we are propagating mousewheel events to parent we need to
explicitly mark that the event was handle in JS and shouldnt be handle
by parent.
this error was informed by Elexis
2024-11-12 15:01:44 -05:00