Commit Graph

104 Commits

Author SHA1 Message Date
Louis Gombert
b33cc21dce
Merge pull request #587 from winterheart/module-fixes
Update module, add logger module
2024-09-18 22:18:13 +02:00
Azamat H. Hackimov
4f4ab3bd20 Isolate module submodule 2024-09-17 23:16:58 +03:00
Jan Engelhardt
6fbc86efec mem_malloc type triviality checks (1/8)
git grep -l mem_malloc | xargs perl -i -lpe 's{\((\w+) \*\)mem_malloc\(sizeof\(\1\)\)}{mem_rmalloc<$1>()}'
2024-09-16 21:57:41 +02:00
Azamat H. Hackimov
9ac702dcda
Merge pull request #569 from ccfly42/online-directip-netcon
Add Descent3 Online netcon
2024-09-15 23:07:38 +03:00
Christian Baumann
7501a5bcdc rename netcon 2024-09-15 13:19:26 +02:00
Christian Baumann
5b3c444032 fix memory corruption & change temp path 2024-09-15 12:38:41 +02:00
Louis Gombert
76ddbefb09
Merge pull request #570 from notimaginative/pxo_hole_punch
add support for PXO's NAT hole punch
2024-09-09 21:42:42 +02:00
Christian Baumann
0fa2b0f154 code cleanup 2024-09-09 18:51:14 +02:00
Jan Engelhardt
b9fbee0e25 Resolve out-of-bounds accesses in DLLMultiInit
vp[26] is `int *`, so it tries to read 4 bytes on amd64, even though
TCP_Active, which is behind vp[26] is just a bool and 1 byte.

==95927==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000004734f40 at pc 0x7f4f8d93b952 bp 0x7ffc57f191b0 sp 0x7ffc57f191a8
READ of size 4 at 0x000004734f40 thread T0
    f0 DLLMultiInit $GIT/netcon/includes/mdllinit.h:314
    f1 LoadMultiDLL(char const*) $GIT/Descent3/multi_dll_mgr.cpp:690
    f2 RunServerConfigs $GIT/Descent3/dedicated_server.cpp:236
    f3 LoadServerConfigFile() $GIT/Descent3/dedicated_server.cpp:357
    f4 InitDedicatedServer $GIT/Descent3/init.cpp:1778
    f5 InitD3Systems2(bool) $GIT/Descent3/init.cpp:1952
    f6 Descent3() $GIT/Descent3/descent.cpp:504
    f7 oeD3LnxApp::run() $GIT/Descent3/sdlmain.cpp:151

0x000004734f41 is located 0 bytes after global variable 'TCP_active' defined in '$GIT/networking/networking.cpp:383:6' (0x4734f40) of size 1
SUMMARY: AddressSanitizer: global-buffer-overflow $GIT/netcon/includes/mdllinit.h:314 in DLLMultiInit
2024-09-09 12:15:05 +02:00
Taylor Richards
43b691dbc5
add support for PXO's NAT hole punch 2024-09-06 13:28:50 -04:00
Christian Baumann
daebe15442 fix wrong type 2024-09-05 23:36:20 +02:00
Christian Baumann
7ff07b137a init 2024-09-05 17:48:42 +02:00
Jan Engelhardt
5f0bdf8184 Fix spello "it's" 2024-09-03 13:26:51 +02:00
Azamat H. Hackimov
79db9aa3e2 Move platform-specific defines and macros to own file crossplat.h 2024-08-20 23:09:27 +03:00
Azamat H. Hackimov
22829e5e43 netcon: replace DLLddio_MakePath with std::fs::path 2024-08-20 23:09:27 +03:00
Azamat H. Hackimov
58fe55605d netcon: remove Mastertracker update check
This part of code unreachable - we don't have mtav.dll anymore, and MTUpdateURL is empty. Simplify code related version check.
2024-08-20 23:09:27 +03:00
Azamat H. Hackimov
c6d31f3820 MODULE: rewrite mod_LoadModule() to use std::fs::path 2024-08-20 23:09:27 +03:00
Azamat H. Hackimov
54f9d75e62 Reduce linux_fix.h usage in project 2024-08-20 23:08:10 +03:00
Azamat H. Hackimov
16a6866885 DDIO: new crossplatform SleepMS() function
Use C++ chrono and thread for crossplatform sleep function.
2024-08-20 23:08:10 +03:00
Azamat H. Hackimov
306db747cc Change signature of ddio_DoForeachFile()
There no return value usage across the project, change return type of function to void.
2024-08-15 11:50:36 +03:00
Azamat H. Hackimov
7c4a4d2566 DDIO: remove DLLddio_FindFileStart functions as unused
Cleanup code in core and netcon.
2024-08-15 11:50:36 +03:00
Azamat H. Hackimov
c76fc45fda NETCON: replace DLLddio_FindFileStart() with DLLddio_DoForeachFile()
Refactor code, related to game type and mission file discovery and UI representation.
2024-08-15 11:50:36 +03:00
Azamat H. Hackimov
b30597ae90 Change Multi*Settings() to use std::fs::path 2024-08-15 11:48:16 +03:00
Azamat H. Hackimov
73373205e5
Merge pull request #517 from Lgt2x/cmake-headers
CMake: add all headers to target sources
2024-08-12 15:58:05 +03:00
Louis Gombert
60c5dbf1fe CMake: add all headers to target sources
This can help with CMake IDE integration and file indexing.
2024-08-09 17:09:14 +02:00
C.W. Betts
7d5b51e8f8 macOS: Make sure the netcon modules end with dylib. 2024-08-05 15:54:38 -06:00
C.W. Betts
1384aa62af Quiet warnings about uninitialized values. 2024-07-31 15:40:16 -06:00
Azamat H. Hackimov
87882c9976 Isolate ui submodule
Isolate ui from rest of the project, minor cleanups.
2024-07-28 16:50:41 +03:00
Azamat H. Hackimov
91354d5b9a
Merge pull request #492 from tophyr/pr/posix-defines
Use `POSIX` instead of `__LINUX__` for general OS checks
2024-07-15 23:33:10 +03:00
Chris Sarbora
d6c43610fc
Fixup platform defines to be positive tests instead of negative ones 2024-07-12 18:31:05 -05:00
Chris Sarbora
3da53e567f
Programmatically replace all __LINUX__ with POSIX
Steps:
```sh
srcs=$(mktemp)
find . -name "*.cpp" -or -name "*.c" -or -name "*.h" -or -name "*.hpp" -or -name "*.cc" -or -name "*.hh" > $srcs
xargs sed -i 's/ifndef __LINUX__/if !defined(POSIX)/' < $srcs
xargs sed -i 's/ifdef __LINUX__/if defined(POSIX)/' < $srcs
xargs sed -i 's/defined(__LINUX__)/defined(POSIX)/' < $srcs
```
2024-07-12 18:11:54 -05:00
Azamat H. Hackimov
1ae023a13b Enumerate all DLL functions manually
Enumerate DLL functions to ease tying functions in main and DLL sides in code.
2024-07-09 02:08:25 +03:00
Thomas Roß
12ec7c50c7 [CMake] Enabled the CMake property USE_FOLDERS to provide a more structured project list in IDEs with the help of set(CMAKE_FOLDER "...") calls. 2024-07-03 19:55:04 +02:00
Azamat H. Hackimov
59487976f6 Isolate misc module
Isolate misc module for better dependency handling.
2024-06-27 01:26:35 +03:00
Louis Gombert
e6a2774a06
Merge pull request #463 from tophyr/single-line-genex
keep windows-specific generator expressions on one line
2024-06-24 19:24:34 +00:00
Chris Sarbora
94a0c52cdf
keep windows-specific generator expressions on one line 2024-06-24 02:07:48 -05:00
Azamat H. Hackimov
db8aa64d2f Make mem module isolated from project
Properly define MEM_USE_RTL definition only for mem library. Link other dependant modules with mem.
2024-06-20 00:43:51 +03:00
C.W. Betts
90c34c8006 Better fix for pcount. 2024-06-16 16:09:23 -06:00
C.W. Betts
2122d719e1 Remove some unused variables. 2024-06-13 14:38:17 -06:00
C.W. Betts
33b2030364 Fix compile failure. 2024-06-13 14:38:17 -06:00
C.W. Betts
f79e6cfe50 More const char* conversion. 2024-06-13 14:38:17 -06:00
Taylor Richards
ed0ff23cee
remove unnecessary return value test 2024-06-11 14:58:45 -04:00
Taylor Richards
03b729e318
fix PXO chat lobby connection failure on Linux/Mac 2024-06-10 21:55:35 -04:00
C.W. Betts
09b91fb6df Fix 64-to-32 integer truncating.
This is a bit more of a problem with byte-swapping than just reading/writing.
2024-06-04 15:08:36 -06:00
C.W. Betts
7f2091db1b Quiet most const char* warnings. 2024-06-04 15:05:31 -06:00
C.W. Betts
8a678822a3 Add snprintfs to the PXO module. 2024-06-04 15:03:29 -06:00
Azamat H. Hackimov
a295b047f0 Fix compilation on Windows 2024-06-03 22:45:51 +03:00
Azamat H. Hackimov
6057694b56 Replace non-functional PXO server with new one
Replacing ut.parallaxonline.com with tracker.pxo.nottheeye.com.
2024-06-03 22:45:51 +03:00
Azamat H. Hackimov
7a9f2e2e19 Minor fixes to PXO module
Removing unused headers, code cleanup and enhancements.
2024-06-03 16:20:42 +03:00
Azamat H. Hackimov
6972b649bb Make PXO module buildable and runnable
Fix compilation and runtime errors.
2024-06-03 14:08:45 +03:00