-
Notifications
You must be signed in to change notification settings - Fork 786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDL build #346
base: master
Are you sure you want to change the base?
SDL build #346
Conversation
c695edb
to
d24889c
Compare
ok this is towards the direction of what I want to see, but I think it could be done all in Cabbage as a VST audio plugin for DAW and standalone that way, Maybe this should be it's own pulldown request but I want to use this to make music and would love to help |
constexpr is for values known at compile time so there's no reason for these to be extern since they can't be defined externally.
These work on all platforms rather than \ which only works on Windows.
I'm not 100% sure why GCC wants this but it has something to do with aggregate initialisation (= {}) and default values for members.
This is never called and GCC warns that the Type template on the method conflicts with the Type template on the class.
GCC picks up the static_assert(false) even if the template isn't instantiated, and =delete-ing the method has the same effect of notifying the caller if it's not specialised later in this header. Also remove extraneous extern that GCC doesn't like.
These are presumably pulled in by other stdlib headers on Windows.
start() is a function so this check was wrong, however it looks like this method is never called so it's probably not been an issue.
powf() is a C function but std::pow() is the thin C++ wrapper that delegates to pow(), powf(), or powl() dependent on argument type. Most of these are already acting on floats, and those that aren't have been fixed up to do so.
Compiler smart. Usually.
This currently links to a prebuilt Windows library which we can't use on Linux.
Also add missing include.
This is an odd fix, but it works and means that symbols in engine-sim don't disappear.
This will allow us to provide a writeable area for users where custom engines can be placed, while also keeping the shipped data immutable.
This way we can redirect the errors to wherever we want, which in this case is just a different file.
Loading custom files now works!
ENGINESIM_DATA_ROOT was suggested so I'll use that.
This way we can bake in where we expect to look for data.
Also add the platform to it, because why not.
Without this an assert fires in debug and we get a leak.
Most of the big leaks are dealt with now.
This way it'll Just Work on Linux, Mac, and Debug Windows (since the prebuild was only for Release Windows).
DetachErrorHandler() isn't implemented and I cba to add it right now so this probably leaks.
clang complains about these since other methods on these classes have override and it wants you to be consistent.
clang warns about this because a value of 1.1f is assigned to the max, and the code using min and max always appears to compare it against a float anyway.
This can cause an infinite loop when compiling with GCC or clang since the target of the loop can be overwritten due to indexing out of bounds.
This assumes the number of cylinders is 8, which it might not be.
This can cause issues on certain platforms.
Mac may run under Rosetta. Just maybe. Since, I have had luck building OpenGL software on Mac M1 through Rosetta (Also sometimes may work without) |
d24889c
to
3d767af
Compare
This is what I get when trying to make. |
This allows the code to build since it brings in fixes that those submodules need merging.
3d767af
to
e14ed3c
Compare
That doesn't show the error that |
@bobsayshilol that is my bad. I was on your fork but on master branch by accident, not the sdl-build branch. I've updated the submodules too just in case. I was able to compile and it runs, unfortunately the audio is buggy. |
This PR gets
engine-sim
building on both Linuxand MacEdit: Mac isn't fully complete (though Mac doesn't run due to lack of GL support). Windows was tested and still builds and runs (for me).Main changes include:
XDG
support for adding custom engines without having to touch the original dataThis is intended to replace #112 and address #2.
The work couldn't have been done without the help of those on the discord server.
Note: currently in draft since it's blocked waiting on ange-yaghi/delta-studio#37.