Commit Graph

684 Commits

Author SHA1 Message Date
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
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
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
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
GravisZro
d0be4f81bb Move _stat macro to linux_fix.h
This is a fix for linux, so move it to correct location.
2024-05-24 08:53:03 -04:00
GravisZro
ec73d3fe1f Remove excess stricmp definitions 2024-05-24 08:53:02 -04:00
GravisZro
6a9ddd8736 Replace _vsnprintf/vsnprintf with std::vsnprintf 2024-05-24 08:52:59 -04:00
GravisZro
13ed05cf6c Remove unused macros 2024-05-24 08:50:59 -04:00
GravisZro
f46a0b642c Move controller macros to Controller.h
Also copy one to winjoy.cpp
2024-05-24 08:50:59 -04:00
GravisZro
582970d9ef Replace SWAP with std::swap 2024-05-24 08:50:59 -04:00
GravisZro
88d1dfa948 Replace SET_MIN with std::min 2024-05-24 08:50:56 -04:00
GravisZro
76e86fed8c Replace strcmpi with stricmp 2024-05-24 08:49:04 -04:00
Louis Gombert
a77fdd7426
Merge pull request #268 from GravisZro/use/stdint
Refactor to fixed width integer types: proven to be free of errors
2024-05-24 11:00:28 +00:00
GravisZro
5e5e0c99c3 Replace "short" with "int16_t" and fix missing headers 2024-05-23 23:49:31 -04:00
GravisZro
aebe1bbbb6 Replace "ushort" with "uint16_t" and fix missing includes 2024-05-23 23:16:40 -04:00