From 3e2be87d4498d108b75b532ed3bf26c1d455dd20 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 8 Dec 2017 06:47:05 -0500 Subject: [PATCH] Split tags into tags.{hpp,cpp} --- dep/glfw | 2 +- include/app.hpp | 1 - include/plugin.hpp | 50 +--------------------------------------------- src/plugin.cpp | 47 +------------------------------------------ 4 files changed, 3 insertions(+), 97 deletions(-) diff --git a/dep/glfw b/dep/glfw index 30489c5a..682f1cf2 160000 --- a/dep/glfw +++ b/dep/glfw @@ -1 +1 @@ -Subproject commit 30489c5aa1392f698e904c6aced1d7a486634c40 +Subproject commit 682f1cf203707f21c2eed4fa3f89c23c52accc49 diff --git a/include/app.hpp b/include/app.hpp index 4b795dd3..88d74b86 100644 --- a/include/app.hpp +++ b/include/app.hpp @@ -23,7 +23,6 @@ struct SVGPanel; // A 1U module should be 15x380. Thus the width of a module should be a factor of 15. #define RACK_GRID_WIDTH 15 #define RACK_GRID_HEIGHT 380 - static const Vec RACK_GRID_SIZE = Vec(15, 380); diff --git a/include/plugin.hpp b/include/plugin.hpp index bd243473..8e9f612b 100644 --- a/include/plugin.hpp +++ b/include/plugin.hpp @@ -1,59 +1,12 @@ #pragma once #include #include +#include "tags.hpp" namespace rack { -enum ModelTag { - AMPLIFIER_TAG, - ATTENUATOR_TAG, - BLANK_TAG, - CLOCK_TAG, - CONTROLLER_TAG, - DELAY_TAG, - DIGITAL_TAG, - DISTORTION_TAG, - DRUM_TAG, - DUAL_TAG, - DYNAMICS_TAG, - EFFECT_TAG, - ENVELOPE_FOLLOWER_TAG, - ENVELOPE_GENERATOR_TAG, - EQUALIZER_TAG, - EXTERNAL_TAG, - FILTER_TAG, - FUNCTION_GENERATOR_TAG, - GRANULAR_TAG, - LFO_TAG, - LOGIC_TAG, - LOW_PASS_GATE_TAG, - MIDI_TAG, - MIXER_TAG, - MULTIPLE_TAG, - NOISE_TAG, - OSCILLATOR_TAG, - PANNING_TAG, - QUAD_TAG, - QUANTIZER_TAG, - RANDOM_TAG, - REVERB_TAG, - RING_MODULATOR_TAG, - SAMPLE_AND_HOLD_TAG, - SAMPLER_TAG, - SEQUENCER_TAG, - SLEW_LIMITER_TAG, - SWITCH_TAG, - SYNTH_VOICE_TAG, - TUNER_TAG, - UTILITY_TAG, - VISUAL_TAG, - WAVESHAPER_TAG, - NUM_TAGS -}; - - struct ModuleWidget; struct Model; @@ -118,7 +71,6 @@ std::string pluginGetLoginStatus(); extern std::list gPlugins; extern std::string gToken; -extern std::string gTagNames[NUM_TAGS]; } // namespace rack diff --git a/src/plugin.cpp b/src/plugin.cpp index d63b962f..3b0b1b51 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -31,52 +31,6 @@ namespace rack { std::list gPlugins; std::string gToken; -std::string gTagNames[NUM_TAGS] = { - "Amplifier/VCA", - "Attenuator", - "Blank", - "Clock", - "Controller", - "Delay", - "Digital", - "Distortion", - "Drum", - "Dual/Stereo", - "Dynamics", - "Effect", - "Envelope Follower", - "Envelope Generator", - "Equalizer", - "External", - "Filter/VCF", - "Function Generator", - "Granular", - "LFO", - "Logic", - "Low Pass Gate", - "MIDI", - "Mixer", - "Multiple", - "Noise", - "Oscillator/VCO", - "Panning", - "Quad", - "Quantizer", - "Random", - "Reverb", - "Ring Modulator", - "Sample and Hold", - "Sampler", - "Sequencer", - "Slew Limiter", - "Switch", - "Synth Voice", - "Tuner", - "Utility", - "Visual", - "Waveshaper", -}; - static bool isDownloading = false; static float downloadProgress = 0.0; @@ -293,6 +247,7 @@ static void refreshPurchase(json_t *pluginJ) { //////////////////// void pluginInit() { + tagsInit(); // Load core // This function is defined in core.cpp Plugin *coreManufacturer = new Plugin();