Commit Graph

59 Commits

Author SHA1 Message Date
Jan Engelhardt
9b2675b1f7 Fix spello "~full" 2024-11-04 10:20:15 +01:00
Azamat H. Hackimov
51da6aaae8 Remove HEAPCHECK() macro as unused 2024-10-05 05:21:41 +03:00
Azamat H. Hackimov
0e959cb4de Change error message for Int3() 2024-10-05 05:18:51 +03:00
Azamat H. Hackimov
f7b7f18e0d Replace debugbreak with SDL_assert()
Reworked ASSERT() and Int3() macros to use SDL_assert(). SDL_assert() allows to debug break from user decision.

Major reorganizing platform-dependent code to make it platform-independent.
2024-09-24 23:03:02 +03:00
Azamat H. Hackimov
cc9e054509 Avoid using ASSERT in interface headers 2024-09-24 23:03:02 +03:00
Azamat H. Hackimov
a59503f881 Move pserror.h to ddebug module 2024-09-24 23:00:53 +03:00
Azamat H. Hackimov
c3b1225c6e Remove mprintf_at() usage
This function is stubbed and does nothing.
2024-09-24 23:00:53 +03:00
Azamat H. Hackimov
21576c86a5 Unify Debug_Init() for all platforms 2024-09-24 23:00:53 +03:00
Jan Engelhardt
a23c6a42a3 mem_malloc type triviality checks (7/8)
```
git grep -l mem_malloc | xargs perl -i -lpe 's{\((char) \*\)mem_malloc\((\S+)\)}{mem_rmalloc<$1>($2)}'
```
2024-09-16 22:12:14 +02:00
Azamat H. Hackimov
b1f9b61d44 Cleanup ddebug submodule
Remove unused functions.
2024-09-10 03:00:26 +03:00
Thomas Roß
7b71873a69 [Cleanup] Removed function declarations that are not implemented. 2024-08-20 20:03:02 +02:00
thfrwn
35bcbe8bf0 build on OpenBSD via Linux pathways 2024-08-20 10:03:24 -04:00
Louis Gombert
bda97fc57a
Merge pull request #523 from DescentDevelopers/windows-fix
Fixes for Windows build
2024-08-12 22:49:09 +02: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
Azamat H. Hackimov
ba1020ef70 Fix compilation on Windows
SetUnhandledExceptionFilter requires WINAPI macros on RecordExceptionInfo() declaration, otherwise it fails to compile on x86 arch.
2024-08-11 20:40:19 +03:00
Thomas Roß
1809f48ca9 [Misc] Removed some leftover debug stuff that does nothing anymore. 2024-08-10 18:44:29 +02:00
Thomas Roß
33288916c2 Replaced the old and now unused code for manunal callstack parsing with the creation of a crashdump file aka MiniDump. Together with the matching debug symbols from the previous commit, we can analyse these crashdumps to fix the problem. 2024-08-10 18:41:48 +02: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
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
59487976f6 Isolate misc module
Isolate misc module for better dependency handling.
2024-06-27 01:26:35 +03:00
Thomas Roß
bd7294162c [Win,Debug] Fixed crash introduced in c41c3a7 by #436.
SetClipboardData() expects its second parameter to be allocated with the GMEM_MOVEABLE flag and will call GlobalSize() on it internally, so we can't replace it with a plain malloc.
Also the assignment of h_text to ptr was missing, and GlobalUnlock() was still called on h_text even after the change to malloc.
2024-06-23 15:28:56 +02: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
Azamat H. Hackimov
c41c3a7cb1 Replace Global* memory functions
Replace Global* memory functions with mem_* equivalents from mem.h, remove compatibility functions on Linux / macOS platforms.
2024-06-15 22:07:45 +03:00
Louis Gombert
15dce81bd1
Merge pull request #396 from GravisZro/cleanup
More clean up
2024-06-04 07:25:15 +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
GravisZro
1c7e3053f2 Replace "PSPATHNAME_LEN" and "MAX_PATH" with "_MAX_PATH" 2024-06-01 22:19:41 -04: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
GravisZro
f7ae658fe2 Modernize struct/enum/unions type declarations 2024-05-30 03:35:17 -04: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
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
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
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
6a9ddd8736 Replace _vsnprintf/vsnprintf with std::vsnprintf 2024-05-24 08:52:59 -04:00
GravisZro
76e86fed8c Replace strcmpi with stricmp 2024-05-24 08:49:04 -04:00
GravisZro
5e5e0c99c3 Replace "short" with "int16_t" and fix missing headers 2024-05-23 23:49:31 -04:00
GravisZro
26b7776f43 Replace "ubyte" with "uint8_t" 2024-05-23 23:07:26 -04:00
GravisZro
3dcd21b717 Replace "unsigned short" with "uint16_t" 2024-05-23 23:03:29 -04:00
GravisZro
1618040db5 Replace "unsigned char" with "uint8_t" 2024-05-23 22:58:46 -04:00
GravisZro
a3a3797067 Replace "uint" with "uint32_t" 2024-05-23 22:57:25 -04:00
GravisZro
2147cfa68b Replace "unsigned int" with "uint32_t" 2024-05-23 22:51:16 -04:00
Louis Gombert
a1a8056afc
Merge pull request #355 from GravisZro/fix/64bit
64-bit fixes
2024-05-23 07:21:36 +00:00
GravisZro
9ebd567178 Utilize Windows types
For whatever reason they decided to switch a bunch of Windows types to their
underlying types which causes problems when replacing possibly problematic
32-bit long types. This restores the use of the Windows defined types.
2024-05-22 18:30:56 -04:00
GravisZro
dec9de7456 64-bit fixes
Switch all the (u)long types to (u)int32_t where appropriate.
2024-05-22 18:14:45 -04:00
Thomas Roß
bac882c7d6 [Win,x64] Disabled some 'mono' debugger stuff due to compile errors in x64. 2024-05-15 19:46:01 +02:00
Thomas Roß
caf1981015 [Win,x64] Disabled callstack and exception info logging due to compile errors in x64. 2024-05-15 19:44:41 +02:00
Louis Gombert
196c155895 Remove Gamegauge and -timetest command-line argument
Gamegauge is an outdated 3D performance benchmark tool. The -timetest command was used to activate it. Read more about about it here: https://www.gamespot.com/articles/3d-gamegauge-explained/1100-2463688/
2024-05-12 18:32:46 +02:00