Requires a general rewrite of the Milkdrop preset code. Previous implementation was tightly integrated into the code parser, so reusing this code wasn't possible. Additional refactoring was done, finished converting custom wave/shape implementations to use the new expression parser code.
Mesh size is currently so deeply burrowed in the whole preset structure that changing it on the fly is basically impossible. For now, we'll reload the idle preset and reset the whole preset factory class tree to make sure all classes are properly reinitialized. If apps want to change the mesh size after startup, they need to reload the last played preset after changing the mesh size. This will be fixed in the future after the parser/equation compiler rewrite.
Lots of interconnected changes in this commit:
- Removed unnecessary name/author/filename members all over the place.
- Started using exceptions to deliver preset loading and rendering errors to the topmost ProjectM class.
- Added stream loading methods to factories and the base Preset class.
- Added new events for requesting preset switch and telling the user about loading errors.
- Consolidated preset switching logic in ProjectM class a bit.
The native presets did not build anymore due to refactorings, cause other build issues on Windows (e.g. require linking to psapi.lib) and would need a complete makeover anyway.
Scanning textures/presets dirs for textures and scanning preset dir for presets.
Scanning is now done recursively, so presets and textures can be organized into subdirectories instead of needing to be flattened into a single directory.
On POSIX systems makes use of [ftw](https://linux.die.net/man/3/ftw) which should be relatively efficient. Otherwise falls back to recursing with `dirent` (for windows).
Probably should have made an autoconf check for `ftw` instead of doing `#ifdef WIN32`.
* Scan subdirectories in presets directory
* remove preset subdir config
* Recursively scan for textures too, add c++-17 compatibility
* Refactor directory scanning code so it's reused by texture loader and preset loader. Make cross-platform (maybe)
* filescanner in makefile
* extension filter for file loader
* make extensions match up'
* need string.h
* Add FileScanner.cpp to win build (maybe)
* scan all dirs
* #ifndef #ifdef is def fun
* bogus comment
* bleh
* bleh
* itunes plugin with c++17
* EyeTunes needs to know about the FileScanner
Co-authored-by: milkdropper.com <milkdropper.com@gmail.com>
Co-authored-by: milkdropper <59471060+milkdropper@users.noreply.github.com>