Skip to content
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

[WIP] Add Mojo #285

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,6 @@
[submodule "plugins/myth-modules"]
path = plugins/myth-modules
url = https://github.com/Ahineya/vcv-myth-plugin.git
[submodule "plugins/Mojo"]
path = plugins/Mojo
url = https://github.com/TheGuyWhoo/Mojo
17 changes: 15 additions & 2 deletions plugins/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ ifneq ($(HEADLESS),true)
PLUGIN_FILES += Cardinal/src/ImGuiWidget.cpp
PLUGIN_FILES += Cardinal/src/ImGuiTextEditor.cpp
PLUGIN_FILES += Cardinal/src/SassyScope.cpp
PLUGIN_FILES += Cardinal/src/DearImGui.cpp
PLUGIN_FILES += Cardinal/src/DearImGuiColorTextEditor.cpp
PLUGIN_FILES += $(wildcard Cardinal/src/DearImGui/*.cpp)
PLUGIN_FILES += $(wildcard Cardinal/src/DearImGuiColorTextEditor/*.cpp)
endif

ifeq ($(shell pkg-config --exists fftw3f && echo true),true)
Expand Down Expand Up @@ -713,6 +713,11 @@ MOCKBAMODULAR_CUSTOM = Blank Comparator
PLUGIN_FILES += Mog/src/Network.cpp
PLUGIN_FILES += Mog/src/Nexus.cpp

# --------------------------------------------------------------
# Mojo

PLUGIN_FILES += $(filter-out Mojo/src/plugin.cpp,$(wildcard Mojo/src/*.cpp))

# --------------------------------------------------------------
# mscHack

Expand Down Expand Up @@ -1701,6 +1706,14 @@ $(BUILD_DIR)/Mog/%.cpp.o: Mog/%.cpp
$(foreach m,$(MOG_CUSTOM),$(call custom_module_names,$(m),Mog)) \
-DpluginInstance=pluginInstance__Mog

$(BUILD_DIR)/Mojo/src/%.cpp.o: Mojo/src/%.cpp
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \
$(foreach m,$(MOJO_CUSTOM),$(call custom_module_names,$(m),Mojo)) \
-DpluginInstance=pluginInstance__Mojo \
-Wno-misleading-indentation

$(BUILD_DIR)/mscHack/%.cpp.o: mscHack/%.cpp
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
@echo "Compiling $<"
Expand Down
1 change: 1 addition & 0 deletions plugins/Mojo
Submodule Mojo added at 7b0146
19 changes: 19 additions & 0 deletions plugins/plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,9 @@ std::string loadBack(int) { return "res/Empty_gray.svg"; }
// Mog
#include "Mog/src/plugin.hpp"

// Mojo
#include "Mojo/src/plugin.hpp"

// mscHack
/* NOTE too much noise in original include, do this a different way
// #include "mscHack/src/mscHack.hpp"
Expand Down Expand Up @@ -760,6 +763,7 @@ extern Plugin* pluginInstance__MindMeld;
Plugin* pluginInstance__ML;
Plugin* pluginInstance__MockbaModular;
Plugin* pluginInstance__Mog;
Plugin* pluginInstance__Mojo;
extern Plugin* pluginInstance__mscHack;
Plugin* pluginInstance__MSM;
Plugin* pluginInstance__myth_modules;
Expand Down Expand Up @@ -2265,6 +2269,20 @@ static void initStatic__Mog()
}
}

static void initStatic__Mojo()
{
Plugin* const p = new Plugin;
pluginInstance__Mojo = p;

const StaticPluginLoader spl(p, "Mojo");
if (spl.ok())
{
p->addModel(modelDogs);
p->addModel(modelPigs);
p->addModel(modelSheep);
}
}

static void initStatic__mscHack()
{
Plugin* const p = new Plugin;
Expand Down Expand Up @@ -2741,6 +2759,7 @@ void initStaticPlugins()
initStatic__ML();
initStatic__MockbaModular();
initStatic__Mog();
initStatic__Mojo();
initStatic__mscHack();
initStatic__MSM();
initStatic__myth_modules();
Expand Down