Commit Graph

928 Commits

Author SHA1 Message Date
Thomas Roß
12ec7c50c7 [CMake] Enabled the CMake property USE_FOLDERS to provide a more structured project list in IDEs with the help of set(CMAKE_FOLDER "...") calls. 2024-07-03 19:55:04 +02:00
Azamat H. Hackimov
4c574bf198
Merge pull request #481 from MaddTheSane/iffSafe
Fix endian issues with iff importer.
2024-07-03 12:22:05 +03:00
C.W. Betts
21e1384a3c Create an overloaded cf_ReadInt and cf_ReadShort that takes a bool to indicate little endian reads.
As suggested by @winterheart
2024-07-02 18:34:45 -06:00
C.W. Betts
d817c1930e Fix endian issues with iff importer.
It should now work on big-endian machines.
2024-07-02 15:48:18 -06:00
Louis Gombert
7695296ca0
Merge pull request #478 from pzychotic/fix-warnings
Fix compiler warnings
2024-07-02 08:58:42 +00:00
Azamat H. Hackimov
de49da0e9a DDIO: Remove unused platform-dependent functions
Remove ddio_CreateDir(), ddio_RemoveDir(), ddio_SaveWorkingDir(), ddio_RestoreWorkingDir(), ddio_DirExists(). Replace them in code with std::fs alternatives.
2024-07-01 12:50:49 +03:00
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
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