Commit graph

5338 commits

Author SHA1 Message Date
30144d1dfd shadow: Use std::vector in LearnedGraph
shadow's LearnedGraph relied on manual memory management and non-default
copy operators, which is error-prone (in fact, m_pAxis was being leaked)
and does not provide any benefits over std::vector.


Former-commit-id: 0ade39d572f94ba718556072a2ea3da15b9aabfe
Former-commit-id: ef035240597399743265a4c17a2ee47399956976
2024-12-25 07:38:01 +01:00
42a85d9f70 shadow: Move s_shared to Driver
Defining a m_pShared as a per-object pointer that always points to the
same object is redundant, and can introduce a risk for dangling
pointers.

Instead, s_shared (now, m_pShared) has been defined as a static member
in Driver.


Former-commit-id: 1f0baed4cfba1ddc47dc905d1791780164a23cc7
Former-commit-id: 7f8bdec56810b51ed8dde0d76e5aac4d462e6e87
2024-12-25 07:38:01 +01:00
00adba4eac shadow: Read skill from GfLocalDir (fixup)
Former-commit-id: 5075e9abe0fe435857382da309153f287480c103
Former-commit-id: 0d36d7303233b3251ab0bf9cf8a23f8f53384904
2024-12-25 07:38:01 +01:00
913168351f shadow: Remove unneeded operator overloads
An excessive use of operator= overloads was defined so as to copy
common parameters from Path-derived classes, such as ClothoidPath and
PitPath. However, this could be simplified since the default copy
operator would suffice.


Former-commit-id: c8954549c68036713840357c6851aec68ce713cb
Former-commit-id: bd91f618590a9f3dcc1c5cfec2ae995536840526
2024-12-25 07:38:01 +01:00
a7bad18d40 shadow: Fix out-of-bounds access
Even if shadow was defined with OOP in mind, for some unknown reason
Driver::Drive relied on a statically allocated array with an arbitrary
size of MAX_MOD_ITF elements (20). Because now the game supports a
virtually unlimited number of drivers (aka interfaces), it was possible
to read past the last_srslip array and cause undefined behaviour.

As hinted above, this array did not make any sense since last_srslip
should be part of each Driver object, and not a statically allocated
array.


Former-commit-id: e365060392b1d08c40a1e3d27f0e113d5a31594d
Former-commit-id: d8954641d78f83d198493e7cb36ffe3db9ef0a55
2024-12-25 07:38:01 +01:00
a596778f28 Look for driver name instead of index
Since driver indexes are now recalculated every time GfDrivers::reload
is called, they can be no longer relied on. Instead, driver names are
now used to find a specific driver, since names are set on creation.


Former-commit-id: 7a1d950db421e3cffee05736e0c31948cf534e4c
Former-commit-id: a6e0b38cbffb89ee9a47c1da926fc5959f1b7424
2024-12-25 07:38:00 +01:00
ca14f297ed CarModel.cpp: Add missing initialisers
Former-commit-id: cde7ed296281a1103d8a9554ec986355dafa1da5
Former-commit-id: d7dad55ee9517d9b27e135fc5974fb741f994238
2024-12-25 07:38:00 +01:00
3f0e4fd664 dandroid/driver.cpp: Read parameters from GfLocalDir
Driver parameters (name, short name, code, etc.) are now stored into
GfLocalDir by GfDrivers::reload.


Former-commit-id: c02545750adda862a4c31f837dc6e710a256cdb7
Former-commit-id: a258d6510bb7da1402b3fca3e82a2d1d7a56a2f3
2024-12-25 07:38:00 +01:00
916c316e58 src/drivers: Remove static limitations
So far, every robot would set up an arbitrary limit on the number of
drivers that could be defined. Not only it was an inefficient approach
because of the fixed-size statically allocated buffers this would incur,
but also there is no reason why this should not be allocated
dynamically.

Now, the internal data structures for each robot are generated
dynamically depending on the number of drivers defined by its parameter
file.


Former-commit-id: 65682fb3d457e2a38fe62cd5b2f00e908bb6aca8
Former-commit-id: 10d86064d066c96f0061080b9ec817e39548277f
2024-12-25 07:38:00 +01:00
4ae0ad6f44 shadow: Remove useless struct
Former-commit-id: 75cc75dfe59c0a08dbea011abb56396345f718c6
Former-commit-id: 46f66e8a0518f903c23a7f8b55b0f60e4c0328b5
2024-12-25 07:38:00 +01:00
6c00aa0c84 src/drivers: Read parameters from GfLocalDir
Since drivers can be now dynamically generated and this requires write
permissions, they are now always stored into GfLocalDir instead of
GfDataDir.


Former-commit-id: 2dac3225c4710caa2afa5da36cbbe5a9b86d3be8
Former-commit-id: 317f9d9b04b4ff7f78e3da15c82f1b77c894415c
2024-12-25 07:37:59 +01:00
afa040bf31 driverselect: Implement driver generation
Now, drivers from any category, robot type or car model can be generated
or deleted from the driver selection menu.


Former-commit-id: 41f2eec41a9ce23d84fe3779c496223c5a19da9b
Former-commit-id: 1957959d6bb70cc75caf980e9931c089b3d0d17c
2024-12-25 07:37:59 +01:00
825f2a645e drivers.cpp drivers.h
Former-commit-id: b72e3170374cb5daf950083f7124ec5805278966
Former-commit-id: bea07017d34527f2f2b7c486ab6ce1f375f87c26
2024-12-25 07:37:59 +01:00
8fe30c47f9 drivers.cpp: const-qualify pCurModule
Former-commit-id: 87f479cc083005205ed50a6d8259c4e637d055bf
Former-commit-id: 654d6f0815e86f955cc4cf143abcbd736abc72f6
2024-12-25 07:37:59 +01:00
1f604ffa93 Reload car list on exiting the in-game downloader
Since cars can be now downloaded from the in-game download manager,
the internal list of cars must be updated without having to restart the
game.


Former-commit-id: 0f5f9a71ad85129e7640df853cbdf9e917c4e5a8
Former-commit-id: c9482b032444635021a00970310ccca57d49fe50
2024-12-25 07:37:59 +01:00
295d66e383 driverselect.cpp: List driver type even if empty
Former-commit-id: 815c1ecedd310daa17d72b2839363f5cdd7fc1d5
Former-commit-id: 6ddcdc956d19b3cb52642a2d6fc7beaf4dab34aa
2024-12-25 07:37:59 +01:00
67805f06dd drivers.cpp: Remove lookup exceptions
Future commits will simplify the current directory structure of
per-category robot directories (e.g.: "dandroid_ls1", "usr_mp5"),
instead only having one directory per robot (e.g.: "dandroid", "usr").

Therefore, these exceptions must be removed so that drivers can still be
looked up.


Former-commit-id: 390647d05f9d09d0976a475e836a21015a40c785
Former-commit-id: 060cde8bb168ef7a4a57420911097e6e205bcb29
2024-12-25 07:37:58 +01:00
4a0015272e drivers: Fix leaked skill handles
This should fix some of the leaks as reported by:

https://sourceforge.net/p/speed-dreams/tickets/1297/

Former-commit-id: 5f077f2955f87078eca94048fba8093c066f3e25
Former-commit-id: ade4ccc2a849bbd45bb3e864f21fa9bafd3c3d93
2024-12-25 07:37:58 +01:00
957ecae31a tgf.h: Add tag to enum
Future commits will make use of this tag.


Former-commit-id: 9a47827be752dccb90f977215b366e2e728a044d
Former-commit-id: d1c9f47d0b7b19f8dfbcb9c241a16dae7969b461
2024-12-25 07:37:58 +01:00
da0953da0e CMakeLists.txt: Ensure LF-terminated
Former-commit-id: d9c509125842c707c489868cf76b53701be6bbfe
Former-commit-id: 1dfc1324ddbbd0620a1c1ec16e149e4c769bca3d
2024-12-25 07:37:58 +01:00
5cecc69067 linuxspec.cpp: Ensure FList::unknown
While it is true that FList::unknown equals zero and therefore it is
implicitly initialised by the prior call to calloc(3), it is still
advisable to initialise it explicitly for enhanced readability.


Former-commit-id: 6ca4ae3b6e8aca4ac2bb2c3553f75f98247cfccf
Former-commit-id: 48006ca77dbe6faf4c0e41c3d3bafc0fb6f82ef2
2024-12-25 07:37:58 +01:00
b288af7b3b windowsspec.cpp: Fix wrong file attribute lookup
Regular files in Windows might not only include the _A_NORMAL attribute
[1]. In fact, experiments with WINE revealed that most files would in
fact include the _A_ARCH attribute.

Otherwise, most files would default to FList::unknown and therefore
functions relying on FList::file would not work.

[1]: https://learn.microsoft.com/en-us/cpp/c-runtime-library/filename-search-functions?view=msvc-170


Former-commit-id: 4fb5d0a07fe84b67ebe6541a7e0c9bc630579b42
Former-commit-id: 6dc6253ef0a737ab1c7881adc9b02088e7722243
2024-12-25 07:37:52 +01:00
harunasan
ad907a7e64 Bots - USR: Significant changes to racing behavior across the board.
- Improved overtaking response to slower cars
- Greatly reduced lifting of throttle when letting faster cars past
- Improved tire selection capability for both race starts and during pit stops, depending on both track temperature *and* race length
- Shifting point is now adjustable. Use parameter "shift up point" (range: 0.01 - 1.0)
- Improved tire change strategies. Bots will now pit when their most worn tire reaches "Pit Tire Wear Threshold" (range: 0.0 - 100.0, default 25.0). If they do not reach this point when they pit, they will change tires anyway if the remaining life is less than 2x this threshold value.

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9647 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: a2cf9acfa90744298531d98e9fb4bd135fe356e2
Former-commit-id: 73064a7ada0a992c0282ef4ef3ce345f618bf541
2024-12-25 00:41:36 +00:00
harunasan
78a9a4082b SimuV5: Camber and tire pressure now effect tire heating
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9636 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: f5fe82626f705c818387a9f272ec45a01d37923c
Former-commit-id: 51a2d32da0b3b6bccba87ae195ca380c8d87c3ec
2024-12-06 05:38:16 +00:00
harunasan
8e220f7b0b Sounds and Sound Interfaces: Added snow surface sound samples on tracks with snow and ice. Add sound sample and changes to sound interfaces for tire "scrubbing", for better audio feedback about vehicle grip.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9635 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: de9343d0c13f92ee630269b383c1a32a906fa75c
Former-commit-id: babf1a8bd587125685d47cd524ce9a4ad5a0d548
2024-12-01 02:29:47 +00:00
harunasan
bb2261477d SimuV5: Attempted fix for a regression introduced in [r9629], where left side tires do not heat as quickly as right side ones.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9634 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 6032fdeb68f4f1df1c36c549660bbe39d576a1a2
Former-commit-id: ec6fa7c0144f8c61f869303bee3a3d9631dd9b61
2024-11-29 17:13:50 +00:00
harunasan
f5fe9971bf Interfaces: Update car.h with "fuel mass mult" parameter
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9631 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: a6c17a7dc737bd2ef8678be623a6c195bc92bb79
Former-commit-id: 1527ca0f39993ec828431d096de519181bb4c810
2024-11-29 16:08:07 +00:00
harunasan
aa63927ae6 Remove ID tag from wheel.cpp comment, per new standards
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9630 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 25f5a33331fc77673689b852a27a17ef7598fc52
Former-commit-id: c73e83506eaa086716f853341ae3ead536157ccd
2024-11-29 16:07:07 +00:00
harunasan
b30507306f SimuV5: Added "fuel mass mult" parameter. This multiplies the weight of fuel, with a value of 1.0 being 1 kg per liter.
Also roll back a change to tire pressure that caused strange behavior with very small cars, like karts.

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9629 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 0cf90392430b237ee451169ed8e86c8f924b992e
Former-commit-id: 99fc40c6f0dcbb44c1ba4390dc32ef62b95d8146
2024-11-29 16:06:02 +00:00
harunasan
b2e5728af9 USR: Reduce clutch usage when engine RPM is low. Helps with cars that have very long gear ratios or very little low RPM torque, such as the MPE-Arc (long single gear car) and SDR Kart 125 (little low-end torque).
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9628 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: c1fa6009b1244eff13e5cfa42a51e02390733c1c
Former-commit-id: 78f6f046dfd2afbf401fe9bf299563948856c187
2024-11-29 16:03:04 +00:00
xavi92
841825181a Revert "Revert "main.cpp: Ignore errors from portability::rmdir_r""
According to the documentation, applications using SHFileOperation
should only check for zero or non-zero. Moreover, the return values for
SHFileOperation are marked as not reliable or stable. [1]

Because of this, it is not possible to achieve the same behaviour
between Win32 and POSIX for portability::rmdir_r.

[1]: https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shfileoperationa


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9627 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 5dcfb5a9d09f1b2b1509d50f3a3d842d140161d6
Former-commit-id: a19aa1200ed65c285e9649d8050fb1a8ee0d227e
2024-11-29 06:47:28 +00:00
xavi92
a17b60e74c tools/CMakeLists.txt: Propagate CMAKE_BUILD_TYPE
Otherwise, libraries built by the xmlversion target (namely,
portability, tgf and txml) could be built under a different
CMAKE_BUILD_TYPE.

For example, if CMAKE_BUILD_TYPE were assigned to Debug from the
top-level project, these libraries would otherwise under Release and
therefore debugging symbols would not be available.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9626 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: be8c87017665a74a63e2bb22c45a4b23c0c6cd2b
Former-commit-id: b7ef6cacb5b137156815d12304209cbca95d4464
2024-11-24 13:27:49 +00:00
xavi92
fd7b0ff371 Revert "main.cpp: Ignore errors from portability::rmdir_r"
Windows and POSIX had different behaviours for portability::rmdir_r if
a directory did not exist. This commit therefore modifies the Windows
implementation so as to match the same behaviour as in POSIX, and
therefore recover the original implementation in main.cpp.

This reverts commit r9624.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9625 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: c6db7c5141d4a712f7b4240664889caa83b58080
Former-commit-id: 7aac87e5335fce45d5b9b9b2c75e4429d62251b6
2024-11-24 07:24:34 +00:00
xavi92
ed6975a8ca main.cpp: Ignore errors from portability::rmdir_r
Whereas GNU/Linux returns 0 even if the directory does not exist,
on Windows it returns non-zero since SHFileOperation fails in such
circumstances.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9624 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 590a61e5e540a7684bd32fefc4624838ca38188b
Former-commit-id: 789bc137b1fc746afc0a1f136954e385c1b1a727
2024-11-23 22:45:56 +00:00
harunasan
e721a4ad66 SimuV5: Transfer over all developments on SimuV4.1 in order to unify all car physics changes to one module. This includes:
- Fixes for excessive tire wear when cars spawn with wheels below the ground by limiting
- Ability to tweak tire temperature gain depending on 2D axis direction ("lateral mu heat factor" or "longitudinal mu heat factor")
- Ability to tweak tire cool down rates ("tire cooling factor", "tire speed cooling factor")
- Ability to tweak tire's ability to maintain heat in wet conditions ("tread water drain speed" - defaults to 0 for dry tires, 1.5 and 3 for and inter/wet tires). Higher numbers mean tires can retain heat even when track is wet.
- Removed explicit penalties for tire grip and heating for using wet tires on dry track

In addition, "Stiffness" now changes in accordance to tire pressure. This is intended to simulate the tire becoming stiffer as tire temperature - and thus - pressure - increases.

Unfortunately this breaks the parameters for A LOT of cars in some way: cars without tire options will be undrivable in wet conditions by default, and tire compounds must be rebalanced for cars with them.

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9623 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 8ae6c918bbfeab69ce5f3203ffcfa5b5a12fca53
Former-commit-id: e1e21b74aece3205cee9010eb9a092c3392277f1
2024-11-23 20:13:34 +00:00
harunasan
f8043f2ed7 OSGGraph: Lower F3 chase camera target. This brings the car down to the lower half of the camera shot like in most racing games.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9622 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 149531626af29aad4401b7f0c3dbf04ad0f2729b
Former-commit-id: c8176e105913d63be166c3ca9d538543e5a13d4a
2024-11-23 19:56:55 +00:00
xavi92
cbbb2e2f76 tfg: Add GFPARM_RMODE_NOREREAD
Even if GFPARM_RMODE_REREAD was meant as an optional flag for
GfParmReadFile, it is always set by the implementation. This forced
the parameter file to be always opened for reading, which would fail if
the file did not exist. This is undesired when creating new parameter
files from scratch.

Since this behaviour is probably assumed by many parts of the code, a
new flag, namely GFPARM_RMODE_NOREREAD, has been added so as to disable
such behaviour while maintaining backwards compatibility.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9621 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 24339c76e7e53a70400f4e24086d5a5f2550a8d8
Former-commit-id: 5bf59aae2e4ddc4d17f95360d1e521d6d5580eda
2024-11-23 11:22:38 +00:00
xavi92
9e82348cfb cars.cpp: Use entry type to recognise directories
Since the actual motivation behind GfCars::GfCars is to scan for
directories, checking against "CMakeLists.txt" is fragile since other
files could be listed as well, leading to undesired behaviour.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9620 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: ec0e1670abc7c26b065e0225ecb8f9124515343d
Former-commit-id: 3010a5ed07c6b2f7e24f0af83318062e146198e6
2024-11-23 11:21:49 +00:00
xavi92
ad796559ed tgf: Add entry type to tFList
This allows users to distinguish regular files from directories.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9619 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 3a520d361746130e9397ed8fd33a1540080f59ba
Former-commit-id: 92b39e1be91f67772f9420dafe5d7b3b1d488d26
2024-11-23 11:21:24 +00:00
xavi92
501fb0e5a3 asset.cpp: Simplify return value generation
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9618 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: b52a0787494de91fda3a98efb9293bb250907ffc
Former-commit-id: 0ce2644734cf95c7e2c01a71c0f24587af6fdabe
2024-11-23 11:21:03 +00:00
xavi92
736adc8bcb main.cpp: Remove tmp directory on init
The tmp directory is not meant to be reused accross executions, so it is
a good idea to discard any previous data previously stored there.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9616 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: aae630901a7a923783a3abd3a889c56cbcd04d68
Former-commit-id: 8aabf5c730012f09e80f2c279b2419a5fe8022bc
2024-11-23 11:19:37 +00:00
xavi92
c4d61a411f unzip.cpp: Always ensure parent directory
The previous implementation naively assumed that, prior to extracting
a file from a .zip, its parent directory would appear earlier on the
list and, therefore, the directory would be created beforehand.

This naive assumption made the extraction to fail when valid .zip files
listed files before their respective directories.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9615 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: ac45a9481c9a301143d0139e46a6b39d2638bd20
Former-commit-id: 0e2a59d7909aa39f9eeb77c1794088a1bf07a45b
2024-11-23 11:19:02 +00:00
xavi92
8a9f85fd00 unzip.cpp: Add missing checks
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9614 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: f7fa171396ce9d4fff5a5afc807340e0fa271d4a
Former-commit-id: 4d34b42f32cdd52eb6a391d24e4ca831f1feaab9
2024-11-23 11:18:37 +00:00
xavi92
48ed3d6d14 sink.h: Make flush() virtual
Otherwise, the writefile class would be unable to flush() its
std::ofstream, which might cause downloadsmenu.cpp to attempt to extract
an empty or partially written file.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9613 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: c3f5435a045dbbfa74d55ef2c665a324bb72e5b5
Former-commit-id: 1edb27e20333ffd39c0378a390bffde5b74e7a49
2024-11-23 11:18:11 +00:00
xavi92
f996217509 customthirdparty.cmake: Optionally install libwinpthread
Some flavours of MinGW are built with the `posix` thread model, which
require to copy libwinpthread-1.dll to the `bin/` directory, as opposed
to those configured with the `win32` thread model.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9612 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: d1c08685c33951fb150b94a0343e0d46d001ce4e
Former-commit-id: c146217ce9bef791e0cfb41a8ac2bea4e4a07346
2024-10-28 05:56:09 +00:00
xavi92
f38b49394a customthirdparty.cmake: Install freetype
For some unknown reason, this library was missing from the list, but is
required when rendering fonts from OpenSceneGraph.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9611 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 50b82dd90ada1f8a40c50c264f33a342e13e56ae
Former-commit-id: d167abf1e2cbfd4feedbf22b731d0a28947f8194
2024-10-27 08:11:50 +00:00
xavi92
b47e5f5bf3 cJSON: Use CMakePackageConfigHelpers
CMake discourages the use of configure_file() to generate files such as
cJSONConfig.cmake because it might expand variables such as
<project>_INCLUDE_DIR to absolute paths, which might cause issues on
Windows and macOS [1].

Instead, configure_package_config_file() is meant as a drop-in
replacement that generates cJSONConfig.cmake using relative paths. In
the context of this project, this should allow pre-compiled versions of
the `3rdParty` directory to be shared among developers.

[1]: https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9610 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: dc7f18be6bfa6f933909544176af600c48755173
Former-commit-id: 93228e7d1f46efa51dd919c3ce20e4b735c58726
2024-10-27 08:11:24 +00:00
xavi92
846ae9924e 3rdParty-devel: Import upstream cJSON CMakeLists.txt
Future commits will fix build issues related to cJSON.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9609 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: e0b094ab188b57f80fccba2340c3a7b56effb1c3
Former-commit-id: b4140198d20083e3ea069576f1a0d26648ff11b3
2024-10-27 08:10:49 +00:00
xavi92
04be4cf6bc librhash/CMakeLists.txt: Use standard library name
This call to set_target_properties would typically remove the "lib"
prefix from the library name for no reason, causing some systems to not
be able to find it when calling find_package().


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9608 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 542ac1c48c1764c5af5bd7f0901d05add1554e66
Former-commit-id: 654e67eaae7a5386af726da3b9457797a41c2cb1
2024-10-27 08:10:09 +00:00
xavi92
60bc291cf6 Depend on _WIN32 instead of WIN32
Whereas the former is predefined by the compiler [1], the latter is only
defined when including windows.h [2]. Because of the dependency against
windows.h, this had unexpected results where the WIN32 macro was
evaluated before windows.h were included. For example, it caused DLLEXT
to expand to ".so" instead of ".dll", causing unexpected behaviour on
several configuration menus.

In general, the use of the WIN32 macro is considered incorrect [2] and
should be replaced with _WIN32.

[1]: https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170
[2]: https://stackoverflow.com/questions/662084/whats-the-difference-between-the-win32-and-win32-defines-in-c


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9607 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 7ef940a70e854369cd0669c023347ec18c206998
Former-commit-id: e9ae18d818891f977f49b34bdc59e1fd16e54b3f
2024-10-27 08:09:40 +00:00