Closed postm1 closed 5 years ago
How would you want to use gothic's engine code? There is no source code for it. If you want to re-implement it go ahead. But fixing flaws would probably be easier.
I mean, Does dx11 hook PFX functions of gothic engine so it can be easily turned off, or dx11 renders it in one common function?
Using word "PFX" I mean visual of spells. (zCParticleFX)
See:
void GothicAPI::DrawParticlesSimple()
at
https://github.com/ataulien/GD3D11/blob/master/D3D11Engine/GothicAPI.cpp#L851
This (i think) renders zCParticleFX if it is inside ParticleEffectVobs
list and near camera.
In the same file you can find
void GothicAPI::OnAddVob(zCVob * vob, zCWorld * world)
and
void GothicAPI::OnRemovedVob(zCVob * vob, zCWorld * world)
which add and remove particles to/from ParticleEffectVobs
.
Here is class for interaction with particle data through hooks:
https://github.com/ataulien/GD3D11/blob/master/D3D11Engine/zCParticleFX.h
It seems like calling its destructor also leads to removal of pfx from ParticleEffectVobs
.
So yes, if you make void GothicAPI::DrawParticlesSimple()
(or some render function it calls) not do anything it won't render. But then pfx will not render at all.
Thanks, I will try.
How can I turn off DX11 PFX render and use gothic's engine one? There are many flaws in DX11 pfx renderer. I mean only PFX, is it easy to drop in the code?