computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit 6c5b10b34377651218cff12736f3b8d48f11a5cc
parent f25b1fda8bf4c82a319ec1b5c6e87f97ba4368bc
Author: Adam M <aemalone@gmail.com>
Date:   Tue, 12 Feb 2019 12:34:40 -0600

Functioning with v1 api

Diffstat:
MMakefile | 1+
Msrc/Computerscare.cpp | 4++--
Msrc/Computerscare.hpp | 8+++++---
Msrc/ComputerscareIso.cpp | 7+------
4 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile @@ -13,6 +13,7 @@ LDFLAGS += # Add .cpp and .c files to the build #SOURCES += $(wildcard src/*.cpp) SOURCES += $(wildcard src/ComputerscareIso.cpp) +SOURCES += $(wildcard src/Computerscare.cpp) # Add files to the ZIP package when running `make dist` # The compiled plugin is automatically added. diff --git a/src/Computerscare.cpp b/src/Computerscare.cpp @@ -1,10 +1,10 @@ #include "Computerscare.hpp" -Plugin *computerscarePluginInstance; +Plugin *pluginInstance; void init(Plugin *p) { - computerscarePluginInstance = p; + pluginInstance = p; //p->addModel(modelComputerscareDebug); //p->addModel(modelComputerscarePatchSequencer); diff --git a/src/Computerscare.hpp b/src/Computerscare.hpp @@ -1,10 +1,12 @@ -#pragma once #include "rack.hpp" +#include "component.hpp" using namespace rack; // Forward-declare the Plugin, defined in Template.cpp -extern Plugin *computerscarePluginInstance; +extern Plugin *pluginInstance; + +extern Model *modelComputerscareIso; /*#ifndef COLOR_MAGENTA #define COLOR_MAGENTA nvgRGB(240, 50, 230) @@ -31,7 +33,7 @@ static const NVGcolor COLOR_COMPUTERSCARE_TRANSPARENT = nvgRGBA(0x00, 0x00,0x00, //extern Model *modelComputerscareLaundrySoup; //extern Model *modelComputerscareILoveCookies; //extern Model *modelComputerscareOhPeas; -extern Model *modelComputerscareIso; + //struct ComputerscareSVGPanel; diff --git a/src/ComputerscareIso.cpp b/src/ComputerscareIso.cpp @@ -1,10 +1,5 @@ #include "Computerscare.hpp" -#include <string> -#include <sstream> -#include <iomanip> - - struct ComputerscareIso; @@ -39,7 +34,7 @@ struct ComputerscareIsoWidget : ModuleWidget { ComputerscareIsoWidget(ComputerscareIso *module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(computerscarePluginInstance, "res/ComputerscareIsoPanel.svg"))); + setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/ComputerscareIsoPanel.svg"))); /*box.size = Vec(15*9, 380);