Commit Graph

815 Commits

Author SHA1 Message Date
Azamat H. Hackimov
3af18dadc3 MANAGE: convert some global path variables to std::fs::path
Simplifies code related to UpdatePrimitive().
2024-07-01 12:50:49 +03:00
Azamat H. Hackimov
a00be9f71a MANAGE: refactor UpdatePrimitive() related code
Use std::fs::path on path construction, simplify code.
2024-07-01 12:50:49 +03:00
Azamat H. Hackimov
c33d99a5db MANAGE: convert UpdatePrimitive() to use std::fs::path 2024-07-01 12:50:49 +03:00
Azamat H. Hackimov
81555afd15 CFILE: convert cf_Diff() to use std::fs::path
Convert cf_Diff() and underlying functions to use std::filesystem::path
2024-07-01 12:50:49 +03:00
Azamat H. Hackimov
c47210be75 CFILE: convert cf_CopyFile() cf_CopyFileTime() to use std::fs::path
Convert cf_CopyFile() cf_CopyFileTime() and underlying functions to use std::filesystem::path
2024-07-01 12:50:49 +03:00
Azamat H. Hackimov
d1f0ddf888 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:49 +03:00
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
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
Azamat H. Hackimov
743f782815
Merge pull request #453 from Lgt2x/remove-intellivibe
Remove intellivibe interface
2024-06-23 18:06:25 +03:00