Commit Graph

1045 Commits

Author SHA1 Message Date
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
Louis Gombert
6666798165
Merge pull request #414 from winterheart/search-on-init
Fix segfault on missing critical files
2024-06-03 18:30:20 +00:00
Louis Gombert
aa62c0740b
Merge pull request #410 from winterheart/mono-cleanup
Cleanup mono debugging code
2024-06-03 18:23:28 +00: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
Azamat H. Hackimov
6c5403c232 Make Debug_Log* functions to crossplatform 2024-06-03 01:40:35 +03:00
Azamat H. Hackimov
9416458f9c Cleanup mono debugging code
Remove unused mono debug code.
2024-06-03 01:40:33 +03:00
Azamat H. Hackimov
b37d7b5c4f Fix segfault on missing critical files
If no d3voide1.hog or d3voice2.hog in search path was found, Descent3 fails with segmentation fault after pressing cancel on "Please insert Descent 3 CD" dialogue. Added guard checks which gracefully handle this issue.
2024-06-03 01:19:21 +03:00
Azamat H. Hackimov
2a28c5dd95 Simplify code on search files on init
`CD_inserted` local var is always 0, and some parts of code are unreachable because of it. Related code removed.
Optimizing search loop over file_volumes array.
Removed `-moviedir` option as is only available on DEBUG build and useless in development environment (we can define movies location in many other ways).
Removed `-intro` option as is there a little use to redefine intro.mve location (again, we can control movies location in other ways).
Removed unused headers.
2024-06-03 01:19:21 +03:00
Azamat H. Hackimov
f1a77cfe99 Reactivate mtclient for PXO online support 2024-06-02 23:43:38 +03:00
Azamat H. Hackimov
4795388500
Merge pull request #416 from GravisZro/update/finite
Replace _finite with std::isfinite
2024-06-02 23:26:36 +03:00
Louis Gombert
66923d5bc7
Merge pull request #407 from winterheart/remove-ncurses
Remove ncurses usage dependency
2024-06-02 20:11:39 +00:00
GravisZro
4e599257a0 Replace _finite with std::isfinite
A simple drop in replacement that is multiplatform which means the
defintion in `linux_fix.h` is no longer required.
2024-06-02 14:50:51 -04:00
GravisZro
691dc6487d Remove one unused macro definition and fix another 2024-06-01 22:21:51 -04:00
GravisZro
1c7e3053f2 Replace "PSPATHNAME_LEN" and "MAX_PATH" with "_MAX_PATH" 2024-06-01 22:19:41 -04:00
GravisZro
b889fee6c2 Remove Taoist typedefs 2024-06-01 22:17:44 -04:00
Azamat H. Hackimov
09823f9b40 Cleanup linux console code
Unify all commands into function interface, which simplifies code.
2024-06-02 03:41:50 +03:00
Louis Gombert
97f718047d
Merge pull request #409 from GravisZro/fix/sdlsound
Only close SDL audio if it's open.
2024-06-01 20:54:04 +00:00
Louis Gombert
6d3a4c3e7f
Merge pull request #408 from GravisZro/remove/unusedpredefs
Code cleanup: Add one macro, remove five others
2024-06-01 20:51:41 +00:00
Louis Gombert
638e31864d
Merge pull request #405 from GravisZro/fix/structs
Modernize struct/enum/unions type declarations
2024-06-01 20:02:28 +00:00
Louis Gombert
fd312249bf
Merge pull request #403 from GravisZro/fix/statics
Move global static variables out of headers
2024-06-01 19:57:11 +00:00
GravisZro
d822ae99a7 Only close SDL audio if it's open.
There wasn't anything preventing D3 from trying to close an invalid device id.
2024-05-31 14:13:00 -04:00
GravisZro
bfe52bc983 Add one macro, remove five others
- Add macro PRIMARY_HOG to define the hardcoded hog filename to load.
- Replace instances of "LINUX" with "__LINUX__"
- Remove these macros entirely because they are (now) unused
  - LINUX
  - _REENRANT
  - __32BIT__
- Removed from CMakeFile.txt because they are in linux_fix.h
  - _MAX_PATH=260
  - _MAX_FNAME=256
2024-05-31 12:05:12 -04:00
Azamat H. Hackimov
95caa7b6c3 Remove ncurses enabled console
This type of console is enabled only with `-svgalib` and `-dedicated` options. Since there no svgalib direct support (which is pretty old and too specific to Linux tech), it's better completely remove this code for simplicity and reducing external dependencies.
Removed `-svgalib` option as unused now.
2024-05-31 13:12:28 +03:00
Louis Gombert
5932087645
Merge pull request #400 from Jayman2000/remove-unnecessary-find-package
Remove unnecessary `find_package(OpenGL)`
2024-05-30 20:17:05 +00:00
GravisZro
f7ae658fe2 Modernize struct/enum/unions type declarations 2024-05-30 03:35:17 -04:00
Louis Gombert
0ff98a7d07
Merge pull request #402 from GravisZro/fix/whitespace
Fix whitespace issues in Descent3/object_external_struct.h
2024-05-29 07:12:56 +00:00
Louis Gombert
81951a121e
Merge pull request #401 from GravisZro/fix/flags
Fix -nomousegrab flag
2024-05-29 07:12:27 +00:00
GravisZro
b66821cfd6 Move global static variables out of headers
A few headers had some global static varaibles declared in their headers which
is very bad.
2024-05-28 17:46:31 -04:00
GravisZro
a1732014bd Fix whitespace issues 2024-05-28 17:27:17 -04:00
GravisZro
a6f4b5c115 Fix -nomousegrab flag
HardwareOpenGL incorrectly has "-nomousecap" instead of "-nomousegrab"
2024-05-28 17:13:06 -04:00
Louis Gombert
e74ba03986
Merge pull request #394 from winterheart/ddio-update-crossplatform
Use chrono steady_clock for time measurement
2024-05-28 17:13:43 +00:00
Azamat H. Hackimov
599c1f759e
Merge pull request #399 from Lgt2x/socket-fix
Fix non-blocking socket creation on Linux
2024-05-28 00:33:51 +03:00
Louis Gombert
5f6c9f599d Fix non-blocking socket creation on Linux 2024-05-28 01:18:23 +02:00
Jason Yundt
26a4d125a0 Remove unnecessary find_package(OpenGL)
Before this change, CMakeLists.txt would run find_package(OpenGL), but
it would never use any of the targets or variables that calling
find_package(OpenGL) produces [1]. As a result, the call to
find_package(OpenGL) didn’t really do anything.

[1]: <https://cmake.org/cmake/help/latest/module/FindOpenGL.html>
2024-05-27 17:19:37 -04:00
Azamat H. Hackimov
683cac5ea5 Remove unused lorestimer arg option
lorestimer was required only for Windows (9x, I guess?), and now with chrono library, that can provide any resolution, it's redundant. Removing related field of ddio_init_info struct.
2024-05-27 10:31:45 +03:00
Azamat H. Hackimov
24e0c315e1 Use chrono steady_clock for time measurement
Implementing static ChronoTimer class based on C++11 chrono library that replaces platform dependent time measurement implementation.
2024-05-27 10:31:42 +03:00
Louis Gombert
baab65b6b3
Merge pull request #388 from GravisZro/fix/mprintf
Make mprintf and mprintf_at a proper variadic macro
2024-05-27 06:40:36 +00:00
bperris
cf02a763db
Merge pull request #356 from GravisZro/fix/ioctl
Replace ioctl with fcntl, fix ioctlsocket calls (64-bit fix)
2024-05-26 20:27:38 -04:00
GravisZro
644cb177ce Clean up mono functions 2024-05-24 20:58:35 -04:00
GravisZro
9cf9781369 Properly format/use variadic macros 2024-05-24 20:57:17 -04:00
GravisZro
4ac9b9c22f Replace ioctl with fcntl, fix ioctlsocket calls (64-bit fix)
`ioctl` and `ioctlsocket` take two different types of arguments but worked in the past due to
long being 32-bit. However, ioctl functionality is non-standard and should not be used in
code written after **1997** in order to make sockets non-blocking. This functionality was
standardized as part of fcntl.

* Using the new function `make_nonblocking` to make socket nonblocking
2024-05-24 18:24:40 -04:00
Azamat H. Hackimov
8485cb0c4d
Merge pull request #383 from winterheart/ddio-merge
Merging ddio modules
2024-05-24 22:30:28 +03:00
Azamat H. Hackimov
a0929aefe2 Rename ddio_common to ddio 2024-05-24 22:18:14 +03:00
Azamat H. Hackimov
01c43cc0b4 ddio_common: cleanup headers 2024-05-24 22:18:12 +03:00
Azamat H. Hackimov
6bc3c71a83 Reordering ddio_common module
Merge ddio_lnx and ddio_win into ddio_common module.
2024-05-24 22:17:44 +03:00
Louis Gombert
4723d363ff
Merge pull request #378 from GravisZro/cleanup
Several small cleanups
2024-05-24 19:16:36 +00:00
GravisZro
dc91b22635 Fix rebase breakage 2024-05-24 09:13:36 -04:00
GravisZro
22ab0c6d37 Fix include statements using '\' deliminator 2024-05-24 08:53:03 -04:00