Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
FriskTheFallenHuman committed Oct 11, 2024
2 parents 9b78390 + 7354fff commit 9d53d33
Show file tree
Hide file tree
Showing 69 changed files with 7,022 additions and 2,137 deletions.
13 changes: 11 additions & 2 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ dhewm3 Changelog
Note: Numbers starting with a "#" like #330 refer to the bugreport with that number
at https://github.com/dhewm/dhewm3/issues/

1.5.4 (WIP)
1.5.5 (WIP)
------------------------------------------------------------------------

* Enable/disable Soft Particles when **loading** a graphics quality preset (only enabled in Ultra preset,
though you can still configure it independently as before; #604)

1.5.4 (2024-08-03)
------------------------------------------------------------------------

* A brand new settings menu that uses [Dear ImGui](https://github.com/ocornut/imgui).
Expand All @@ -16,7 +22,10 @@ Note: Numbers starting with a "#" like #330 refer to the bugreport with that num
Needs SDL2 and C++11.
* "Soft" Particles (that don't "cut" into geometry but fade smoothly), based on code from The Dark Mod
2.04. Can be enabled/disabled with `r_useSoftParticles`, is applied automatically for all appropriate
particles (view-aligned, using additive or alpha blending and not too small)
particles (view-aligned, using additive or alpha blending and not too small).
**NOTE** that on some systems Soft Particles noticeably slow down rendering. If dhewm3 doesn't run
as smoothly as you'd expect, try disabling them (`r_useSoftParticles 0` or in the new *Settings Menu*
under *Video Options* -> *Use Soft Particles*)
* `r_enableDepthCapture`: Enable capturing depth buffer to texture, needed for the soft particles.
Can be used in custom materials by using the `"_currentDepth"` texture
* Replaced dependency on (external) zlib with integrated [miniz](https://github.com/richgel999/miniz)
Expand Down
2 changes: 1 addition & 1 deletion neo/framework/miniz/minizconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#endif

// FIXME: why not just set this to int64_t?
#if !defined(_WIN32) && defined(Z_LARGE64)
#if !defined(_WIN32) && defined(__USE_LARGEFILE64)
#define z_off64_t off64_t
#else
#if defined(_WIN32)
Expand Down
20 changes: 12 additions & 8 deletions neo/libs/imgui/backends/imgui_impl_allegro5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2024-08-22: moved some OS/backend related function pointers from ImGuiIO to ImGuiPlatformIO:
// - io.GetClipboardTextFn -> platform_io.Platform_GetClipboardTextFn
// - io.SetClipboardTextFn -> platform_io.Platform_SetClipboardTextFn
// 2022-11-30: Renderer: Restoring using al_draw_indexed_prim() when Allegro version is >= 5.2.5.
// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
// 2022-09-26: Inputs: Renamed ImGuiKey_ModXXX introduced in 1.87 to ImGuiMod_XXX (old names still supported).
Expand Down Expand Up @@ -62,8 +65,8 @@
#ifdef _WIN32
#include <allegro5/allegro_windows.h>
#endif
#define ALLEGRO_HAS_CLIPBOARD (ALLEGRO_VERSION_INT >= ((5 << 24) | (1 << 16) | (12 << 8))) // Clipboard only supported from Allegro 5.1.12
#define ALLEGRO_HAS_DRAW_INDEXED_PRIM (ALLEGRO_VERSION_INT >= ((5 << 24) | (2 << 16) | ( 5 << 8))) // DX9 implementation of al_draw_indexed_prim() got fixed in Allegro 5.2.5
#define ALLEGRO_HAS_CLIPBOARD ((ALLEGRO_VERSION_INT & ~ALLEGRO_UNSTABLE_BIT) >= ((5 << 24) | (1 << 16) | (12 << 8))) // Clipboard only supported from Allegro 5.1.12
#define ALLEGRO_HAS_DRAW_INDEXED_PRIM ((ALLEGRO_VERSION_INT & ~ALLEGRO_UNSTABLE_BIT) >= ((5 << 24) | (2 << 16) | ( 5 << 8))) // DX9 implementation of al_draw_indexed_prim() got fixed in Allegro 5.2.5

// Visual Studio warnings
#ifdef _MSC_VER
Expand Down Expand Up @@ -291,7 +294,7 @@ void ImGui_ImplAllegro5_InvalidateDeviceObjects()
}

#if ALLEGRO_HAS_CLIPBOARD
static const char* ImGui_ImplAllegro5_GetClipboardText(void*)
static const char* ImGui_ImplAllegro5_GetClipboardText(ImGuiContext*)
{
ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
if (bd->ClipboardTextData)
Expand All @@ -300,14 +303,15 @@ static const char* ImGui_ImplAllegro5_GetClipboardText(void*)
return bd->ClipboardTextData;
}

static void ImGui_ImplAllegro5_SetClipboardText(void*, const char* text)
static void ImGui_ImplAllegro5_SetClipboardText(ImGuiContext*, const char* text)
{
ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
al_set_clipboard_text(bd->Display, text);
}
#endif

static ImGuiKey ImGui_ImplAllegro5_KeyCodeToImGuiKey(int key_code)
// Not static to allow third-party code to use that if they want to (but undocumented)
ImGuiKey ImGui_ImplAllegro5_KeyCodeToImGuiKey(int key_code)
{
switch (key_code)
{
Expand Down Expand Up @@ -447,9 +451,9 @@ bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display)
bd->VertexDecl = al_create_vertex_decl(elems, sizeof(ImDrawVertAllegro));

#if ALLEGRO_HAS_CLIPBOARD
io.SetClipboardTextFn = ImGui_ImplAllegro5_SetClipboardText;
io.GetClipboardTextFn = ImGui_ImplAllegro5_GetClipboardText;
io.ClipboardUserData = nullptr;
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
platform_io.Platform_SetClipboardTextFn = ImGui_ImplAllegro5_SetClipboardText;
platform_io.Platform_GetClipboardTextFn = ImGui_ImplAllegro5_GetClipboardText;
#endif

return true;
Expand Down
1 change: 1 addition & 0 deletions neo/libs/imgui/backends/imgui_impl_allegro5.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
struct ALLEGRO_DISPLAY;
union ALLEGRO_EVENT;

// Follow "Getting Started" link and check examples/ folder to learn about using backends!
IMGUI_IMPL_API bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display);
IMGUI_IMPL_API void ImGui_ImplAllegro5_Shutdown();
IMGUI_IMPL_API void ImGui_ImplAllegro5_NewFrame();
Expand Down
1 change: 1 addition & 0 deletions neo/libs/imgui/backends/imgui_impl_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
struct ANativeWindow;
struct AInputEvent;

// Follow "Getting Started" link and check examples/ folder to learn about using backends!
IMGUI_IMPL_API bool ImGui_ImplAndroid_Init(ANativeWindow* window);
IMGUI_IMPL_API int32_t ImGui_ImplAndroid_HandleInputEvent(const AInputEvent* input_event);
IMGUI_IMPL_API void ImGui_ImplAndroid_Shutdown();
Expand Down
1 change: 1 addition & 0 deletions neo/libs/imgui/backends/imgui_impl_dx10.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

struct ID3D10Device;

// Follow "Getting Started" link and check examples/ folder to learn about using backends!
IMGUI_IMPL_API bool ImGui_ImplDX10_Init(ID3D10Device* device);
IMGUI_IMPL_API void ImGui_ImplDX10_Shutdown();
IMGUI_IMPL_API void ImGui_ImplDX10_NewFrame();
Expand Down
1 change: 1 addition & 0 deletions neo/libs/imgui/backends/imgui_impl_dx11.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
struct ID3D11Device;
struct ID3D11DeviceContext;

// Follow "Getting Started" link and check examples/ folder to learn about using backends!
IMGUI_IMPL_API bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context);
IMGUI_IMPL_API void ImGui_ImplDX11_Shutdown();
IMGUI_IMPL_API void ImGui_ImplDX11_NewFrame();
Expand Down
2 changes: 2 additions & 0 deletions neo/libs/imgui/backends/imgui_impl_dx12.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ struct ID3D12GraphicsCommandList;
struct D3D12_CPU_DESCRIPTOR_HANDLE;
struct D3D12_GPU_DESCRIPTOR_HANDLE;

// Follow "Getting Started" link and check examples/ folder to learn about using backends!

// cmd_list is the command list that the implementation will use to render imgui draw lists.
// Before calling the render function, caller must prepare cmd_list by resetting it and setting the appropriate
// render target and descriptor heap that contains font_srv_cpu_desc_handle/font_srv_gpu_desc_handle.
Expand Down
1 change: 1 addition & 0 deletions neo/libs/imgui/backends/imgui_impl_dx9.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

struct IDirect3DDevice9;

// Follow "Getting Started" link and check examples/ folder to learn about using backends!
IMGUI_IMPL_API bool ImGui_ImplDX9_Init(IDirect3DDevice9* device);
IMGUI_IMPL_API void ImGui_ImplDX9_Shutdown();
IMGUI_IMPL_API void ImGui_ImplDX9_NewFrame();
Expand Down
Loading

0 comments on commit 9d53d33

Please sign in to comment.