Browse Source

Cleanup, rebuild CI, add lighter version color util for later

Signed-off-by: falkTX <falktx@falktx.com>
tags/24.04
falkTX 2 years ago
parent
commit
6505acaa75
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 13 additions and 28 deletions
  1. +1
    -1
      .github/workflows/build.yml
  2. +1
    -1
      deps/PawPaw
  3. +0
    -13
      plugins/plugins.cpp
  4. +11
    -13
      src/custom/dep.cpp

+ 1
- 1
.github/workflows/build.yml View File

@@ -3,7 +3,7 @@ name: build
on: [push, pull_request] on: [push, pull_request]


env: env:
CACHE_VERSION: 6
CACHE_VERSION: 7
CARDINAL_UNDER_WINE: 1 CARDINAL_UNDER_WINE: 1
CIBUILD: true CIBUILD: true
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive


+ 1
- 1
deps/PawPaw

@@ -1 +1 @@
Subproject commit 7822bb0ba1deb75b3010d6efab63a4f854174b56
Subproject commit cfa9dc50b32ebdb567d2d86467d3dc58157252c7

+ 0
- 13
plugins/plugins.cpp View File

@@ -18,7 +18,6 @@
// ZamAudio (always enabled) - TODO // ZamAudio (always enabled) - TODO
// #include "ZamAudio/src/plugin.hpp" // #include "ZamAudio/src/plugin.hpp"


#ifndef NOPLUGINS
// 21kHz // 21kHz
#include "21kHz/src/21kHz.hpp" #include "21kHz/src/21kHz.hpp"


@@ -784,12 +783,9 @@ void surgext_rack_update_theme();
#include "ZZC/src/ZZC.hpp" #include "ZZC/src/ZZC.hpp"
#undef modelClock #undef modelClock


#endif // NOPLUGINS

// known terminal modules // known terminal modules
std::vector<Model*> hostTerminalModels; std::vector<Model*> hostTerminalModels;


#ifndef NOPLUGINS
// stuff that reads config files, we don't want that // stuff that reads config files, we don't want that
int loadConsoleType() { return 0; } int loadConsoleType() { return 0; }
bool loadDarkAsDefault() { return settings::preferDarkPanels; } bool loadDarkAsDefault() { return settings::preferDarkPanels; }
@@ -802,13 +798,11 @@ void saveDefaultTheme(ModuleTheme) {}
void saveDirectOutMode(bool) {} void saveDirectOutMode(bool) {}
void saveHighQualityAsDefault(bool) {} void saveHighQualityAsDefault(bool) {}
void writeDefaultTheme() {} void writeDefaultTheme() {}
#endif


// plugin instances // plugin instances
Plugin* pluginInstance__Cardinal; Plugin* pluginInstance__Cardinal;
Plugin* pluginInstance__Fundamental; Plugin* pluginInstance__Fundamental;
// Plugin* pluginInstance__ZamAudio; // Plugin* pluginInstance__ZamAudio;
#ifndef NOPLUGINS
Plugin* pluginInstance__21kHz; Plugin* pluginInstance__21kHz;
Plugin* pluginInstance__8Mode; Plugin* pluginInstance__8Mode;
extern Plugin* pluginInstance__AaronStatic; extern Plugin* pluginInstance__AaronStatic;
@@ -881,7 +875,6 @@ Plugin* pluginInstance__Voxglitch;
Plugin* pluginInstance__WhatTheRack; Plugin* pluginInstance__WhatTheRack;
Plugin* pluginInstance__ZetaCarinaeModules; Plugin* pluginInstance__ZetaCarinaeModules;
Plugin* pluginInstance__ZZC; Plugin* pluginInstance__ZZC;
#endif // NOPLUGINS


namespace rack { namespace rack {


@@ -1103,7 +1096,6 @@ static void initStatic__ZamAudio()
} }
*/ */


#ifndef NOPLUGINS
static void initStatic__21kHz() static void initStatic__21kHz()
{ {
Plugin* const p = new Plugin; Plugin* const p = new Plugin;
@@ -3123,14 +3115,12 @@ static void initStatic__ZZC()
#undef modelClock #undef modelClock
} }
} }
#endif // NOPLUGINS


void initStaticPlugins() void initStaticPlugins()
{ {
initStatic__Cardinal(); initStatic__Cardinal();
initStatic__Fundamental(); initStatic__Fundamental();
// initStatic__ZamAudio(); // initStatic__ZamAudio();
#ifndef NOPLUGINS
initStatic__21kHz(); initStatic__21kHz();
initStatic__8Mode(); initStatic__8Mode();
initStatic__AaronStatic(); initStatic__AaronStatic();
@@ -3203,7 +3193,6 @@ void initStaticPlugins()
initStatic__WhatTheRack(); initStatic__WhatTheRack();
initStatic__ZetaCarinaeModules(); initStatic__ZetaCarinaeModules();
initStatic__ZZC(); initStatic__ZZC();
#endif // NOPLUGINS
} }


void destroyStaticPlugins() void destroyStaticPlugins()
@@ -3215,7 +3204,6 @@ void destroyStaticPlugins()


void updateStaticPluginsDarkMode() void updateStaticPluginsDarkMode()
{ {
#ifndef NOPLUGINS
const bool darkMode = settings::preferDarkPanels; const bool darkMode = settings::preferDarkPanels;
// bogaudio // bogaudio
{ {
@@ -3239,7 +3227,6 @@ void updateStaticPluginsDarkMode()
{ {
surgext_rack_update_theme(); surgext_rack_update_theme();
} }
#endif
} }


} }


+ 11
- 13
src/custom/dep.cpp View File

@@ -1,18 +1,7 @@
/* /*
* DISTRHO Cardinal Plugin * DISTRHO Cardinal Plugin
* Copyright (C) 2021-2022 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the LICENSE file.
* Copyright (C) 2021-2024 Filipe Coelho <falktx@falktx.com>
* SPDX-License-Identifier: GPL-3.0-or-later
*/ */


#define STDIO_OVERRIDE Rackdep #define STDIO_OVERRIDE Rackdep
@@ -650,6 +639,15 @@ unsigned int darkerColor(const unsigned int color) noexcept
| (std::max<int>(0, (color & 0xff) - 0x80)); | (std::max<int>(0, (color & 0xff) - 0x80));
} }


static inline
unsigned int lighterColor(const unsigned int color) noexcept
{
return (color & 0xff000000)
| (std::min<int>(0xff, ((color & 0xff0000) >> 16) + 0x80) << 16)
| (std::min<int>(0xff, ((color & 0xff00) >> 8) + 0x80) << 8)
| (std::min<int>(0xff, (color & 0xff) + 0x80));
}

static inline static inline
unsigned int invertColor(const unsigned int color) noexcept unsigned int invertColor(const unsigned int color) noexcept
{ {


Loading…
Cancel
Save