Also added Milkdrop's wave smoothing algorithm to make the waveforms look less pointy.
Now very closely matches Milkdrop's math and rendering style except some very minor scaling issues.
Will now render wave mode 8 (spectrum) even if not finished/enabled in the original Milkdrop. Also, Milkdrop does for some reason not use the "mystery" parameter to rotate linear waveforms (modes 6-8) even if the source suggests it. projectM will do it, but there are probably no presets that use it purposely.
Also worth noting: The wave_a parameter has no effect in both Milkdrop and projectM. The wave is always drawn fully opaque.
Mainly two problems:
- MilkdropPresetFactory deleted a private reference-typed member in MilkdropPreset. Changed this into a plain pointer which is now checked and properly cleaned up.
- In the library interface class, projectM, the active preset pointers were not deleted before the factors, which lead to a use-after-free when the presets tried to dereference the factory pointer.
* default params closer to milkdrop behavior
also avoid div-by-zero in PresetFrameIO using default values
* default params closer to milkdrop behavior
also avoid div-by-zero in PresetFrameIO using default values
* comments
Co-authored-by: Matthew Bellew <matthewb@labkey.com>
* Param refactor
collected all the code that reached inside Param (InitCond, Per*Eqn, Expr, Parser) to read/write and stuffed it all back into Param.cpp
made Param extend Expr to avoid any perf penalty (I actually think eval() is a tiny bit faster now)
* presets/tests
* ALWAYS_MATRIX is used with PER_POINT
* use SSE2 to impove initialize_PerPixelMeshes() performance
* TestRunner
very, very simple test framework, but it's better than no framework
(consider investigating adopting something)
* ProgramExpr