Commit Graph

1344 Commits

Author SHA1 Message Date
Jan Engelhardt
ab0e1c7f5b scripts: delete empty function bodies 2024-11-03 23:39:38 +01:00
Jan Engelhardt
7fa31b3aa3 scripts: consistent initialization of memory member
Some classes did set it to nullptr and others did not.
For the sake of consistency, initialize it explicitly everywhere.
2024-11-03 23:39:38 +01:00
Jan Engelhardt
46fcae00a2 d3: replace in-constructor assignments by initializations 2024-11-03 23:39:38 +01:00
Jan Engelhardt
a6d37b68e5 ui: replace in-constructor assignments by initializations 2024-11-03 23:39:37 +01:00
Jan Engelhardt
b7838c1a85 scripts: replace in-constructor assignments by initializations 2024-11-03 23:39:37 +01:00
Jan Engelhardt
71772b9c9c Add "final" marker to a number of classes
Devirtualization is an optimization in the generated assembly: when a
class C is polymorphic but also final, ``((C *)ptr)->func()`` can be
turned from an indirect into a static call.
2024-11-03 23:39:37 +01:00
Jan Engelhardt
a58c2752e5 build: resolve 2107 instances of -Wdelete-non-virtual-dtor
scripts/Y2K.cpp:467:5: warning: deleting object of polymorphic class type
"LevelScript_0000" which has non-virtual destructor might cause undefined
behavior [-Wdelete-non-virtual-dtor]
  467 |     delete ((LevelScript_0000 *)ptr);
2024-11-03 23:39:37 +01:00
Louis Gombert
d51ce964c7
Merge pull request #640 from pzychotic/fix-win-x86-build
Fix Windows x86 build
2024-10-29 20:20:07 +00:00
Louis Gombert
b0b7eee859
Merge pull request #641 from pzychotic/log-to-vs-output
Enable logging to VS output window
2024-10-29 20:15:52 +00:00
Louis Gombert
f6faeaacb7
Merge pull request #637 from winterheart/cmake-makehogs
Optimize making HOG files
2024-10-29 20:05:57 +00:00
Azamat H. Hackimov
44806e77f0 Restore proper module names for netgames
Using names as defined in Steam installation.
2024-10-27 22:04:00 +03:00
Azamat H. Hackimov
72e8347fe1 Move Descent3 built targets into "${CMAKE_BINARY_DIR}/build" directory
This solves problem of inability determine generated output directory of libraries targets. Now `add_custom_command()`, used on HOG generation, correctly locates all needed paths and not depends on generated variables.
2024-10-27 22:04:00 +03:00
Thomas Roß
09a961988d [Renderer] Added missing calling convention in FnPtr template declaration
This fixes compilation of Windows x86 builds when creating template instantiations of FnPtr with functions using __stdcall.
2024-10-27 16:28:50 +01:00
Thomas Roß
e88fe1845a [Logger] Enable logging to VS output window 2024-10-27 16:09:06 +01:00
Azamat H. Hackimov
73d2764573
Merge pull request #639 from Lgt2x/audio-messages
Do no try opening audio streams when the '-nosound' option is specified
2024-10-27 12:52:39 +03:00
Louis Gombert
a8e88b624d Do no try opening audio streams when the '-nosound' option is specified
When the option was specified, many messages were spamming the console in debug mode "Error opening stream X.osf on channel Y."
2024-10-26 18:46:41 +02:00
Azamat H. Hackimov
cc7fbd46ed Don't rebuild HogMaker on each commit
Remove configure-time dependency get_git_hash that cause to rebuild whole graph of dependencies (like HOG files).
2024-10-21 18:20:32 +03:00
Azamat H. Hackimov
46c6b55f5c Enable cross-compile environment for HogMaker
Add CMAKE_CROSSCOMPILING conditional for HogMaker that makes it "external" tool in cross-compile environment, so we can use native HogMaker for cross-compiled targets.
2024-10-21 18:13:49 +03:00
Azamat H. Hackimov
39b205b957 Optimize building of HOG files and netgames libraries
Don't force building HOG files if dependency files are up-to-date.
Simplify building libraries by copying them into Descent3 directory.
2024-10-21 16:56:40 +03:00
Louis Gombert
496b2ed7c9
Merge pull request #613 from winterheart/mission-list
Enhance mission levels select window
2024-10-20 21:00:03 +02:00
Louis Gombert
33edddde80
Merge pull request #636 from sebholt/renderer_fixes
Fix some compiler warnings in the renderer
2024-10-20 19:49:09 +02:00
Sebastian Holtermann
9a536021aa renderer/HardwareBaseGPU: Fix compiler warnings 2024-10-20 00:04:13 +02:00
Sebastian Holtermann
19c7611ce5 renderer/HardwareOpenGL: Use mem_rmalloc instead of mem_malloc 2024-10-19 23:23:19 +02:00
Sebastian Holtermann
2c7a0e98a8 renderer/HardwareOpenGL: Fix compiler warnings 2024-10-19 23:15:35 +02:00
Sebastian Holtermann
7fef91e709 renderer/ShaderProgram: Fix compiler warning 2024-10-19 23:15:18 +02:00
Azamat H. Hackimov
83886a2ec7 Deduplicate code for header and CHUNK_LEVEL_INFO reading 2024-10-18 03:30:51 +03:00
Azamat H. Hackimov
b8ff1b4a2d Reworking of DisplayLevelWarpDlg()
Now level loading screen shows level name, and user can choose level from list instead of manually entering level number.
2024-10-18 03:30:51 +03:00
Azamat H. Hackimov
52b3402374 Implementing LoadLevelInfo()
This function may be used for fast information accessing such as level name or description.
2024-10-18 03:30:51 +03:00
Azamat H. Hackimov
80dc4135f6 Minor cleanups to menu.cpp 2024-10-18 02:06:52 +03:00
Azamat H. Hackimov
1f1b0d2d88 Convert some functions of Mission.cpp to std::fs::path 2024-10-18 02:06:52 +03:00
Louis Gombert
652e31f442
Merge pull request #590 from ccfly42/ui-network-settings
Add ui network settings
2024-10-15 22:48:51 +02:00
Louis Gombert
8e638e73e5
Merge pull request #630 from winterheart/filedlg-fix
Fix DoPathFileDialog() issues
2024-10-15 22:29:59 +02:00
Azamat H. Hackimov
74ac445ca6
Merge pull request #629 from pzychotic/build-editor
Re-enable building the editor
2024-10-15 12:52:56 +03:00
Azamat H. Hackimov
89be842092 Fix DoPathFileDialog() issues
Fix issue when user can select file only in LocalD3Dir. Remove listbox callback function as useless. General cleanup global and local variables.
2024-10-13 05:05:37 +03:00
Thomas Roß
eaa44aff12 [Build] Re-enable building the editor
CMAKE_SYSTEM_NAME isn't defined before the 'project' call, so moved the option below it.
2024-10-12 18:48:00 +02:00
Thomas Roß
512d441d9c
Merge pull request #626 from sebholt/mem_rmalloc_fix
Fix undefined behavior in memory allocation
2024-10-12 18:44:03 +02:00
Thomas Roß
89b5a800c8
Merge pull request #627 from sebholt/fix_pilot_cpp
Fix uninitialized string buffer access in pilot cpp
2024-10-09 19:19:58 +02:00
Sebastian Holtermann
8345055fd1 Fix another uninitialized string buffer access in pilot.cpp
The string buffer was used to obtain the file name but that was later replaced
by a std::string.  What remained was the uninitialized buffer that was fed
to logging functions where the std::string should have been used instead.

This removes the obsolete buffer and feeds the std::string to the logging
functions.
2024-10-09 10:35:49 +02:00
Sebastian Holtermann
19e6575fee Fix uninitialized string buffer access in pilot.cpp
The string buffer was used to obtain the file name but that was later replaced
by a std::string.  What remained was the uninitialized buffer that was fed
to logging functions where the std::string should have been used instead.

This removes the obsolete buffer and feeds the std::string to the logging
functions.
2024-10-09 10:32:08 +02:00
Sebastian Holtermann
15095f8763 Let mem_rmalloc call mem_malloc instead of std::malloc
`mem_rmalloc` should use `mem_malloc` instead of `std::malloc`
to match the `mem_free` deallocation call.
2024-10-07 21:05:22 +02:00
Christian Baumann
4bc1b4c7a0 Merge branch 'main' into ui-network-settings 2024-10-06 19:23:40 +02:00
Louis Gombert
48c87750f4
Merge pull request #617 from pzychotic/fix-508
Remove scaling of terrain fog ranges based on zoom
2024-10-06 13:28:14 +02:00
Louis Gombert
10c10fb1bf
Merge pull request #616 from pzychotic/fix-442
Fix crash when loading multiplayer level
2024-10-06 13:19:13 +02:00
Louis Gombert
7ca92bd1bd
Merge pull request #614 from winterheart/ddebug-update
ddebug submodule update
2024-10-05 17:21:19 +02:00
Thomas Roß
e30af1f3df [Terrain] Removed scaling of fog ranges based on zoom
This fixes visibility range decreasing massively on maximum weapon zoom of e.g. Mass Driver.
This also brings it in line with the 'non-terrain' rendering.
2024-10-05 17:20:02 +02:00
Azamat H. Hackimov
ac04ec2cda
Merge pull request #615 from pzychotic/fix-365
Fix level cutscenes sometimes not filling the screen
2024-10-05 11:47:11 +03:00
Thomas Roß
7ff05cfd27 [Player] Fixed crash when loading multiplayer level with outside player spawn position
player::start_roomnum and object::roomnum encode a terrain cell number with the highest bit set. So when accessing Terrain_seg[] we need to remove that bit to get a valid index.
2024-10-05 08:49:50 +02:00
Thomas Roß
301959d947 [Movie] Fixed level cutscenes sometimes not filling the screen 2024-10-05 08:48:50 +02: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