Commit Graph

866 Commits

Author SHA1 Message Date
Azamat H. Hackimov
8d14ae025c CFILE: migrate more functions to use std::fs::path
Convert cf_IsFileInHog(), cf_OpenFileInLibrary() and cf_GetfileCRC() functions to use std::fs::path.
2024-07-01 12:50:49 +03:00
Azamat H. Hackimov
0ea758084f CFILE: refactor internal paths and extensions
Refactor paths and extensions to use std::map. Rewriting related code in manage.cpp.
2024-07-01 12:50:48 +03:00
Azamat H. Hackimov
33e8802363 CFILE: make path_entry struct using std::fs::path
Simplify related code in `cf_SetSearchPath()`.
2024-07-01 12:50:48 +03:00
Azamat H. Hackimov
82084e9176 Convert some of cfile functions to use std::filesystem
Make cfopen(), open_file_in_directory() and cfexist() use std::filesystem::path arguments.
2024-07-01 12:50:48 +03:00
Thomas Roß
9b8d61d16a [Netgames] Use size_t when catching strlen() return type and other buffer calculations.
This fixes alot of warnings of type C4267 '=': conversion from 'size_t' to 'int', possible loss of data.
2024-06-29 21:58:34 +02:00
Thomas Roß
85dce8bef1 [DMFC] Fixed wrong type in forward declaration.
This fixes alot of warnings of type C4099 'PInfo': type name first seen using 'struct' now seen using 'class'.
2024-06-29 21:55:09 +02:00
Thomas Roß
0f3b449d0b [Multiplayer] Fixed warning C4288 nonstandard extension used: 'i': loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope. 2024-06-29 21:54:01 +02:00
Thomas Roß
285604b7db [Editor] Fixed parameter type for AppendMenu() call.
This fixes alot of warnings of type:
C4311 'type cast': pointer truncation from 'HMENU' to 'uint32_t'
C4302 'type cast': truncation from 'HMENU' to 'uint32_t'
2024-06-29 21:52:50 +02:00
Thomas Roß
d55dc5c321 [Scripts] Fixed 100 warnings of type C4101 'foo': unreferenced local variable, since this cpp file gets included in alot of scripts. 2024-06-29 21:50:50 +02:00
Thomas Roß
1ff9c2c3ba [Multiplayer] Fixed 200 warnings of type C4267 '+=': conversion from 'size_t' to 'int', possible loss of data. 2024-06-29 21:49:13 +02:00
Thomas Roß
e961d7c05d [Misc] Removed cast of assert condition to unsigned int to prevent pointer truncation.
This fixes over one thousand warnings of type:
C4311 'type cast': pointer truncation from 'foo *' to 'unsigned int'
C4302 'type cast': truncation from 'foo *' to 'unsigned int'
2024-06-29 21:47:28 +02:00
Azamat H. Hackimov
e68f270318
Merge pull request #457 from Lgt2x/win-sdl2
Use SDL2 on Windows
2024-06-29 22:24:34 +03:00
Azamat H. Hackimov
7b7ffde4d8 Fix loading OpenGL library on Windows
On loading GL symbols we are using SDL_GL_GetProcAddress(), which only valid if we previously loaded OpenGL library with SDL_GL_LoadLibrary(). We cannot use mod_LoadModule() here, otherwise finding symbols will fail.
2024-06-29 20:53:13 +02:00
Louis Gombert
b394df23cd Update VCPKG builtin-baseline and SDL version to 2.30.3 2024-06-29 18:28:23 +02:00
Louis Gombert
d0a464979b Update Windows README instructions for 64bit win preset 2024-06-29 18:28:23 +02:00
Louis Gombert
74c7b2cb0c Fix bad rebase for sdlmain.cpp 2024-06-29 18:28:23 +02:00
Louis Gombert
78d62aa5b5 Set SDL_OpenAudioDevice allowed_changes flag to 0 for Windows compatibility.
Per the SDL2 doc, the 0 flag means that SDL will handle any difference between the hardware audio data format and the game's
2024-06-29 18:28:22 +02:00
Louis Gombert
ca079d8dd5 Remove unused sound lib files 2024-06-29 18:28:22 +02:00
Louis Gombert
5d413b9f30 Fix bad __LINUX__ checks 2024-06-29 18:28:22 +02:00
Louis Gombert
79a59f25e4 Remove win32 preset, make x64 the default on Windows 2024-06-29 18:21:38 +02:00
Louis Gombert
97540db0ae Fix Linux opengl library load 2024-06-29 18:21:38 +02:00
Louis Gombert
313fb9884f rename lnxmain to sdlmain 2024-06-29 18:21:38 +02:00
Louis Gombert
99a39d645d Remove unused DirectX-related files 2024-06-29 18:21:38 +02:00
Louis Gombert
89515e25c3 Factor CMake platform-specific sources 2024-06-29 18:21:38 +02:00
Louis Gombert
ce852d3a14 Only link necessary libraries to DirectX 2024-06-29 18:21:37 +02:00
Louis Gombert
18c9950b97 SDL2 editor: compile win32 and dd_grwin32 with directX 2024-06-29 18:21:37 +02:00
Louis Gombert
850e3f094d SDL2 Editor compilation fixes 2024-06-29 18:21:37 +02:00
Louis Gombert
6f5a4be1e6 Fix Windows OpenGL dynamic loading 2024-06-29 18:21:37 +02:00
Louis Gombert
635e4fde47 Fix Linux/Windows common main and arguments 2024-06-29 18:21:37 +02:00
Louis Gombert
91c18fefc5 Windows SDL2 compilation 2024-06-29 18:21:37 +02:00
Louis Gombert
d9749b729d
Merge pull request #476 from Jayman2000/documentation-for-building-editor
Document how to build the editor
2024-06-29 10:43:51 +00:00
Jason Yundt
aa213980b8 Document how to build the editor
Technically, users only need to install the “C++ MFC for latest v143
build tools (x86 & x64)” component if they’re going to build the editor.
This commit tells users to install that component regardless of whether
or not they’re going to build the editor. This commit could have added
another step that said “install this component if you’re going to build
the editor”, but I thought that adding an additional step would make
things slightly harder for users with little benefit. After all, users
only need to install the MFC component once, and there’s a chance that
they’ll already have it installed.

Fixes #472.
2024-06-29 06:06:14 -04:00
Louis Gombert
b1caee7c29
Merge pull request #470 from winterheart/misc-isolate
Isolate misc module
2024-06-28 22:27:39 +00: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
1ed931ff60
Merge pull request #461 from tophyr/outrage-message-box
Define OutrageMessageBox regardless of DEBUG
2024-06-25 21:03:23 +00:00
Louis Gombert
95f3efe11a
Merge pull request #460 from tophyr/compile_commands
Create compile_commands.json
2024-06-25 06:38:43 +00:00
Chris Sarbora
6953a76ad5
Define OutrageMessageBox regardless of DEBUG 2024-06-24 22:27:55 -05:00
Chris Sarbora
d20ec81834
Create compile_commands.json 2024-06-24 22:17:30 -05:00
Louis Gombert
c5d5037180
Merge pull request #455 from winterheart/remove-getmultcdpath
Remove redundant GetMultiCDPath()
2024-06-24 20:18:31 +00:00
Louis Gombert
ed79350a13
Merge pull request #462 from tophyr/gno-gnu-glob
Remove GLOB_PERIOD from ddio_FindFileStart
2024-06-24 19:59:51 +00:00
Louis Gombert
3b7a6cc17c
Merge pull request #467 from JeodC/upstream
Set default BPP to 32
2024-06-24 19:48:11 +00: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
Louis Gombert
35615b1f4e
Merge pull request #464 from tophyr/type-defs
Add <cstdint> for type definitions
2024-06-24 19:07:59 +00:00
Louis Gombert
53759c5dbb
Merge pull request #454 from pzychotic/fix-ship-select-screen
Fix ship select screen
2024-06-24 19:06:11 +00:00
JeodC
310412a360 Set default BPP to 32
In windows x64, on trying to run the game, ChangeDisplaySettings will fail because the game does not use the new windows api to change these settings. Since Win95 compatibility mode is not an option for Win64, instead change the default BPP to 32.

There may be a more proper way to handle this, and make it more uniform to remove BPP 16 entirely, but this has worked for me since putting it in a fork over a month ago.
2024-06-24 11:04:02 -04:00
Chris Sarbora
652ef55f9a
Remove GLOB_PERIOD from ddio_FindFileStart
GLOB_PERIOD is a GNU extension and is not supported on non-glibc
2024-06-24 02:08:36 -05:00
Chris Sarbora
94a0c52cdf
keep windows-specific generator expressions on one line 2024-06-24 02:07:48 -05:00
Chris Sarbora
ab819b8018
Add <cstdint> for type definitions 2024-06-24 02:05:22 -05:00
Louis Gombert
dd219e95d2
Merge pull request #458 from pzychotic/fix-win-debug-crash
Fix crash in DumpTextToClipboard()
2024-06-23 20:48:31 +00:00
Azamat H. Hackimov
6423504919
Merge pull request #456 from winterheart/mem-use-rtl-win-fix
Fix mem_size_sub() for WIN32 in MEM_USE_RTL mode
2024-06-23 23:10:19 +03:00