diff --git a/Makefile b/Makefile index 624851f7..38b04792 100644 --- a/Makefile +++ b/Makefile @@ -199,5 +199,5 @@ cmdplugins: include compile.mk -.PHONY: all dep run debug clean dist allplugins cleanplugins distplugins plugins +.PHONY: all dep run debug clean dist plugins cleanplugins distplugins cmdplugins .DEFAULT_GOAL := all diff --git a/include/component.hpp b/include/componentlibrary.hpp similarity index 93% rename from include/component.hpp rename to include/componentlibrary.hpp index ebd2a3d8..3c712a2d 100644 --- a/include/component.hpp +++ b/include/componentlibrary.hpp @@ -19,25 +19,25 @@ You may not freely sell plugins using Component Library graphics. However, a free commercial license is available for plugins sold through the [VCV Store](https://vcvrack.com/plugins.html). Email contact@vcvrack.com for more information about licensing or the VCV Store. */ -namespace component { +namespace componentlibrary { //////////////////// // Color scheme //////////////////// -static const NVGcolor BLACK_TRANSPARENT = nvgRGBA(0x00, 0x00, 0x00, 0x00); -static const NVGcolor BLACK = nvgRGB(0x00, 0x00, 0x00); -static const NVGcolor WHITE = nvgRGB(0xff, 0xff, 0xff); -static const NVGcolor RED = nvgRGB(0xed, 0x2c, 0x24); -static const NVGcolor ORANGE = nvgRGB(0xf2, 0xb1, 0x20); -static const NVGcolor YELLOW = nvgRGB(0xf9, 0xdf, 0x1c); -static const NVGcolor GREEN = nvgRGB(0x90, 0xc7, 0x3e); -static const NVGcolor CYAN = nvgRGB(0x22, 0xe6, 0xef); -static const NVGcolor BLUE = nvgRGB(0x29, 0xb2, 0xef); -static const NVGcolor PURPLE = nvgRGB(0xd5, 0x2b, 0xed); -static const NVGcolor LIGHT_GRAY = nvgRGB(0xe6, 0xe6, 0xe6); -static const NVGcolor DARK_GRAY = nvgRGB(0x17, 0x17, 0x17); +static const NVGcolor SCHEME_BLACK_TRANSPARENT = nvgRGBA(0x00, 0x00, 0x00, 0x00); +static const NVGcolor SCHEME_BLACK = nvgRGB(0x00, 0x00, 0x00); +static const NVGcolor SCHEME_WHITE = nvgRGB(0xff, 0xff, 0xff); +static const NVGcolor SCHEME_RED = nvgRGB(0xed, 0x2c, 0x24); +static const NVGcolor SCHEME_ORANGE = nvgRGB(0xf2, 0xb1, 0x20); +static const NVGcolor SCHEME_YELLOW = nvgRGB(0xf9, 0xdf, 0x1c); +static const NVGcolor SCHEME_GREEN = nvgRGB(0x90, 0xc7, 0x3e); +static const NVGcolor SCHEME_CYAN = nvgRGB(0x22, 0xe6, 0xef); +static const NVGcolor SCHEME_BLUE = nvgRGB(0x29, 0xb2, 0xef); +static const NVGcolor SCHEME_PURPLE = nvgRGB(0xd5, 0x2b, 0xed); +static const NVGcolor SCHEME_LIGHT_GRAY = nvgRGB(0xe6, 0xe6, 0xe6); +static const NVGcolor SCHEME_DARK_GRAY = nvgRGB(0x17, 0x17, 0x17); //////////////////// // Knobs @@ -422,41 +422,41 @@ struct GrayModuleLightWidget : app::ModuleLightWidget { struct RedLight : GrayModuleLightWidget { RedLight() { - addBaseColor(RED); + addBaseColor(SCHEME_RED); } }; struct GreenLight : GrayModuleLightWidget { GreenLight() { - addBaseColor(GREEN); + addBaseColor(SCHEME_GREEN); } }; struct YellowLight : GrayModuleLightWidget { YellowLight() { - addBaseColor(YELLOW); + addBaseColor(SCHEME_YELLOW); } }; struct BlueLight : GrayModuleLightWidget { BlueLight() { - addBaseColor(BLUE); + addBaseColor(SCHEME_BLUE); } }; /** Reads two adjacent lightIds, so `lightId` and `lightId + 1` must be defined */ struct GreenRedLight : GrayModuleLightWidget { GreenRedLight() { - addBaseColor(GREEN); - addBaseColor(RED); + addBaseColor(SCHEME_GREEN); + addBaseColor(SCHEME_RED); } }; struct RedGreenBlueLight : GrayModuleLightWidget { RedGreenBlueLight() { - addBaseColor(RED); - addBaseColor(GREEN); - addBaseColor(BLUE); + addBaseColor(SCHEME_RED); + addBaseColor(SCHEME_GREEN); + addBaseColor(SCHEME_BLUE); } }; @@ -621,5 +621,5 @@ struct ScrewBlack : app::SvgScrew { }; -} // namespace component +} // namespace componentlibrary } // namespace rack diff --git a/include/rack.hpp b/include/rack.hpp index 3a4f83fc..8d134873 100644 --- a/include/rack.hpp +++ b/include/rack.hpp @@ -12,7 +12,7 @@ #include "app.hpp" #include "midi.hpp" #include "helpers.hpp" -#include "component.hpp" +#include "componentlibrary.hpp" #include "widget/Widget.hpp" #include "widget/TransparentWidget.hpp" @@ -106,7 +106,7 @@ using namespace app; using plugin::Plugin; using plugin::Model; using namespace engine; -using namespace component; +using namespace componentlibrary; #endif diff --git a/include/rack0.hpp b/include/rack0.hpp index 54c0947e..40797144 100644 --- a/include/rack0.hpp +++ b/include/rack0.hpp @@ -1,6 +1,5 @@ #pragma once #include "rack.hpp" -#include "componentlibrary.hpp" namespace rack { @@ -79,7 +78,7 @@ DEPRECATED inline std::string assetPlugin(Plugin *plugin, std::string filename) // color //////////////////// -DEPRECATED inline NVGcolor colorClip(NVGcolor a) {return color::clip(a);} +DEPRECATED inline NVGcolor colorClip(NVGcolor a) {return color::clamp(a);} DEPRECATED inline NVGcolor colorMinus(NVGcolor a, NVGcolor b) {return color::minus(a, b);} DEPRECATED inline NVGcolor colorPlus(NVGcolor a, NVGcolor b) {return color::plus(a, b);} DEPRECATED inline NVGcolor colorMult(NVGcolor a, NVGcolor b) {return color::mult(a, b);} @@ -93,18 +92,18 @@ DEPRECATED inline std::string colorToHexString(NVGcolor c) {return color::toHexS // componentlibrary //////////////////// -DEPRECATED static const NVGcolor COLOR_BLACK_TRANSPARENT = SCHEME_BLACK_TRANSPARENT; -DEPRECATED static const NVGcolor COLOR_BLACK = SCHEME_BLACK; -DEPRECATED static const NVGcolor COLOR_WHITE = SCHEME_WHITE; -DEPRECATED static const NVGcolor COLOR_RED = SCHEME_RED; -DEPRECATED static const NVGcolor COLOR_ORANGE = SCHEME_ORANGE; -DEPRECATED static const NVGcolor COLOR_YELLOW = SCHEME_YELLOW; -DEPRECATED static const NVGcolor COLOR_GREEN = SCHEME_GREEN; -DEPRECATED static const NVGcolor COLOR_CYAN = SCHEME_CYAN; -DEPRECATED static const NVGcolor COLOR_BLUE = SCHEME_BLUE; -DEPRECATED static const NVGcolor COLOR_PURPLE = SCHEME_PURPLE; -DEPRECATED static const NVGcolor COLOR_LIGHT_PANEL = SCHEME_LIGHT_PANEL; -DEPRECATED static const NVGcolor COLOR_DARK_PANEL = SCHEME_DARK_PANEL; +DEPRECATED static const NVGcolor COLOR_BLACK_TRANSPARENT = componentlibrary::SCHEME_BLACK_TRANSPARENT; +DEPRECATED static const NVGcolor COLOR_BLACK = componentlibrary::SCHEME_BLACK; +DEPRECATED static const NVGcolor COLOR_WHITE = componentlibrary::SCHEME_WHITE; +DEPRECATED static const NVGcolor COLOR_RED = componentlibrary::SCHEME_RED; +DEPRECATED static const NVGcolor COLOR_ORANGE = componentlibrary::SCHEME_ORANGE; +DEPRECATED static const NVGcolor COLOR_YELLOW = componentlibrary::SCHEME_YELLOW; +DEPRECATED static const NVGcolor COLOR_GREEN = componentlibrary::SCHEME_GREEN; +DEPRECATED static const NVGcolor COLOR_CYAN = componentlibrary::SCHEME_CYAN; +DEPRECATED static const NVGcolor COLOR_BLUE = componentlibrary::SCHEME_BLUE; +DEPRECATED static const NVGcolor COLOR_PURPLE = componentlibrary::SCHEME_PURPLE; +DEPRECATED static const NVGcolor COLOR_LIGHT_PANEL = componentlibrary::SCHEME_LIGHT_GRAY; +DEPRECATED static const NVGcolor COLOR_DARK_PANEL = componentlibrary::SCHEME_DARK_GRAY; //////////////////// // helpers diff --git a/src/Core/plugin.hpp b/src/Core/plugin.hpp index db4a8cbe..359bfed2 100644 --- a/src/Core/plugin.hpp +++ b/src/Core/plugin.hpp @@ -1,5 +1,4 @@ #include "rack.hpp" -#include "component.hpp" using namespace rack; diff --git a/src/app/CableWidget.cpp b/src/app/CableWidget.cpp index f40fa2ec..7a3e821f 100644 --- a/src/app/CableWidget.cpp +++ b/src/app/CableWidget.cpp @@ -1,6 +1,5 @@ #include "app/CableWidget.hpp" #include "app/Scene.hpp" -#include "component.hpp" #include "window.hpp" #include "event.hpp" #include "app.hpp" diff --git a/src/app/PortWidget.cpp b/src/app/PortWidget.cpp index 2dabea65..f67ef2d7 100644 --- a/src/app/PortWidget.cpp +++ b/src/app/PortWidget.cpp @@ -3,7 +3,7 @@ #include "window.hpp" #include "app.hpp" #include "history.hpp" -#include "component.hpp" +#include "componentlibrary.hpp" namespace rack { @@ -12,11 +12,11 @@ namespace app { struct PlugLight : MultiLightWidget { PlugLight() { - addBaseColor(component::GREEN); - addBaseColor(component::RED); - addBaseColor(component::BLUE); + addBaseColor(componentlibrary::SCHEME_GREEN); + addBaseColor(componentlibrary::SCHEME_RED); + addBaseColor(componentlibrary::SCHEME_BLUE); box.size = math::Vec(8, 8); - bgColor = component::BLACK_TRANSPARENT; + bgColor = componentlibrary::SCHEME_BLACK_TRANSPARENT; } };