Although the ParticleSystem Rewrite is a huge change, it doesn't take that many changes to the code to fit in. Most of the work is just copy-and-pasting the ParticleSystem folder over.
So merging the rewrite in here, is a simple matter of following these five steps.
Before merging, make sure you have downloaded a copy of the latest version of the ParticleSystem Rewrite in a seperate folder.
Removing the old ParticleSystem
This is really simple, just delete the following files in source/T3D/fx from your engine's folder.
Adding the new ParticleSystem
Again, a really simple step, copy the source/T3D/fx/ParticleSystem folder from the ParticleSystem Rewrite folder, and into the source/T3D/fx folder in your engine's folder.
This is the big step, you have to update the references, so they use the new interfaces and include the correct files.
This is the list of the files:
You can find the commit showing all the changes on GitHub
Add support for abstract ConObjects
This has been submitted as a PR, but untill it's accepted (hopefully) you'll have to implement this change:
Making the tsShape's MeshEmitter-ready
This final step is simply to allow the meshEmitter to emit particles on tsShapes.
Changes to T3D/tsStatic.h
First, we want to add an include to the file such that we can get to the psMeshInterface:
Now, we want the TSStatic class to inherit this interface such that the MeshEmitter can interact with it:
The getShapeInstance already matches one of the functions in the interface, so make this function virtual since it's inherited from the interface now.
Finally add declarations for the new functions, inherited from the interface:
Changes to T3D/tsStatic.cpp
Now we just need to implement the transformVertex function in the cpp file, so simply add this function anywhere you want in tsStatic.cpp: