From fced13e62319c9d728a9513d8969c1afb3006e74 Mon Sep 17 00:00:00 2001 From: dnblank123 Date: Wed, 19 Jun 2024 21:51:35 +0800 Subject: [PATCH] Update README --- README.md | 3 +++ impl.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d3584bb..f71cd4f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +# D-fix [Dragon Nest-Fix] +You can download the file [here](https://github.com/dnblank123/D-fix/releases), or nightly release [here](https://github.com/dnblank123/D-fix/actions). + ## The main issue in Dragon Nest The game has a particle bug on the AMD CPU after the 64-bit release. This fork fixes it. Additionally, removing unnecessary calculation on low graphics. diff --git a/impl.cpp b/impl.cpp index 728181d..915a582 100644 --- a/impl.cpp +++ b/impl.cpp @@ -75,8 +75,8 @@ HRESULT STDMETHODCALLTYPE ID3D11Device_CreateVertexShader( static constexpr std::array PlayerShader = { 0xe8462ec7, 0xd4f1f7cc, 0x68fe051f, 0xe00219ea }; const auto* hash = std::bit_cast(std::bit_cast(pShaderBytecode) + 4); - const bool AMD = IsAMD(); + if (std::equal(ParticleShader1.begin(), ParticleShader1.end(), hash)) { if (!Particle1B) { Particle1B = true; @@ -265,6 +265,7 @@ HRESULT STDMETHODCALLTYPE ID3D11Device_CreatePixelShader( #define HOOK_PROC(iface, object, table, index, proc) \ hookProc(object, #iface "::" #proc, &table->proc, &iface ## _ ## proc, index) + template void hookProc(void* pObject, const char* pName, T** ppOrig, T* pHook, uint32_t index) { void** vtbl = *std::bit_cast(pObject);