diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3dffc1d1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +autosave.json +build +Rack +Rack.exe + diff --git a/.gitmodules b/.gitmodules index 1657af82..41290656 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,9 @@ [submodule "ext/dr_libs"] path = ext/dr_libs url = https://github.com/mackron/dr_libs.git +[submodule "ext/oui"] + path = ext/oui + url = git://github.com/IceDragon200/oui-blendish +[submodule "ext/noc"] + path = ext/noc + url = git@github.com:guillaumechereau/noc.git diff --git a/Makefile b/Makefile index 88b21f7d..c5d85d09 100644 --- a/Makefile +++ b/Makefile @@ -8,16 +8,17 @@ SOURCES = $(wildcard src/*.cpp src/*/*.cpp) \ ifeq ($(ARCH), lin) -SOURCES += ext/noc/noc_file_dialog.c +SOURCES += ext/noc_file_dialog.c CFLAGS += -DNOC_FILE_DIALOG_GTK $(shell pkg-config --cflags gtk+-2.0) +CXXFLAGS += $(shell pkg-config --cflags glew glfw3 jansson samplerate libcurl libzip) LDFLAGS += -rdynamic \ - -lpthread -lGL -lGLEW -lglfw -ldl -ljansson -lportaudio -lportmidi -lsamplerate -lcurl -lzip \ - $(shell pkg-config --libs gtk+-2.0) + -lpthread -lGL -ldl -lportaudio -lportmidi \ + $(shell pkg-config --libs gtk+-2.0 glew glfw3 jansson samplerate libcurl libzip) TARGET = Rack endif ifeq ($(ARCH), mac) -SOURCES += ext/noc/noc_file_dialog.m +SOURCES += ext/noc_file_dialog.m CFLAGS += -DNOC_FILE_DIALOG_OSX CXXFLAGS += -DAPPLE -stdlib=libc++ -I$(HOME)/local/include -I/usr/local/lib/libzip/include LDFLAGS += -stdlib=libc++ -L$(HOME)/local/lib -lpthread -lglew -lglfw3 -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -ldl -ljansson -lportaudio -lportmidi -lsamplerate -lcurl -lzip @@ -25,7 +26,7 @@ TARGET = Rack endif ifeq ($(ARCH), win) -SOURCES += ext/noc/noc_file_dialog.c +SOURCES += ext/noc_file_dialog.c CFLAGS += -DNOC_FILE_DIALOG_WIN32 CXXFLAGS += -DGLEW_STATIC \ -I$(HOME)/pkg/portaudio-r1891-build/include -I/mingw64/lib/libzip/include -I$(HOME)/local/include diff --git a/ext/nanovg b/ext/nanovg index c629efbf..a2784bad 160000 --- a/ext/nanovg +++ b/ext/nanovg @@ -1 +1 @@ -Subproject commit c629efbfa6ca90035d6625dfa3586048a9c3201f +Subproject commit a2784bad3a077ced36ee9b57cda64860edfc38e3 diff --git a/ext/noc b/ext/noc new file mode 160000 index 00000000..3064cdf6 --- /dev/null +++ b/ext/noc @@ -0,0 +1 @@ +Subproject commit 3064cdf6cbdc33b2a352e342e03025757c523f7a diff --git a/ext/noc_file_dialog.c b/ext/noc_file_dialog.c new file mode 100644 index 00000000..fff18698 --- /dev/null +++ b/ext/noc_file_dialog.c @@ -0,0 +1,2 @@ +#define NOC_FILE_DIALOG_IMPLEMENTATION +#include "noc/noc_file_dialog.h" diff --git a/ext/oui b/ext/oui new file mode 160000 index 00000000..761e0478 --- /dev/null +++ b/ext/oui @@ -0,0 +1 @@ +Subproject commit 761e0478409b5e380f476093fc9323e4f75c4327 diff --git a/include/math.hpp b/include/math.hpp index ca83a664..bdeb7990 100644 --- a/include/math.hpp +++ b/include/math.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace rack { @@ -180,7 +180,7 @@ struct Vec { return Vec(roundf(x), roundf(y)); } bool isFinite() { - return isfinite(x) && isfinite(y); + return std::isfinite(x) && std::isfinite(y); } bool isZero() { return x == 0.0 && y == 0.0; diff --git a/res/ComponentLibrary/BefacoBigKnob.svg b/res/ComponentLibrary/BefacoBigKnob.svg new file mode 100644 index 00000000..86b9987f --- /dev/null +++ b/res/ComponentLibrary/BefacoBigKnob.svg @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/res/ComponentLibrary/BefacoSlidePot.png b/res/ComponentLibrary/BefacoSlidePot.png new file mode 100644 index 00000000..6b17195c Binary files /dev/null and b/res/ComponentLibrary/BefacoSlidePot.png differ diff --git a/res/ComponentLibrary/BefacoSlidePot@2x.png b/res/ComponentLibrary/BefacoSlidePot@2x.png new file mode 100644 index 00000000..e46f03ab Binary files /dev/null and b/res/ComponentLibrary/BefacoSlidePot@2x.png differ diff --git a/res/ComponentLibrary/BefacoTinyKnob.svg b/res/ComponentLibrary/BefacoTinyKnob.svg new file mode 100644 index 00000000..fbad0534 --- /dev/null +++ b/res/ComponentLibrary/BefacoTinyKnob.svg @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/res/ComponentLibrary/CL1362.png b/res/ComponentLibrary/CL1362.png new file mode 100644 index 00000000..da803e11 Binary files /dev/null and b/res/ComponentLibrary/CL1362.png differ diff --git a/res/ComponentLibrary/CL1362.svg b/res/ComponentLibrary/CL1362.svg new file mode 100644 index 00000000..3c929f8c --- /dev/null +++ b/res/ComponentLibrary/CL1362.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/CL1362@2x.png b/res/ComponentLibrary/CL1362@2x.png new file mode 100644 index 00000000..218e511c Binary files /dev/null and b/res/ComponentLibrary/CL1362@2x.png differ diff --git a/res/ComponentLibrary/Davies1900hBlack.svg b/res/ComponentLibrary/Davies1900hBlack.svg new file mode 100644 index 00000000..7f74d784 --- /dev/null +++ b/res/ComponentLibrary/Davies1900hBlack.svg @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/res/ComponentLibrary/Davies1900hRed.svg b/res/ComponentLibrary/Davies1900hRed.svg new file mode 100644 index 00000000..cac0338b --- /dev/null +++ b/res/ComponentLibrary/Davies1900hRed.svg @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/res/ComponentLibrary/Davies1900hWhite.svg b/res/ComponentLibrary/Davies1900hWhite.svg new file mode 100644 index 00000000..e887c160 --- /dev/null +++ b/res/ComponentLibrary/Davies1900hWhite.svg @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/res/ComponentLibrary/LICENSE.txt b/res/ComponentLibrary/LICENSE.txt new file mode 100644 index 00000000..253419ff --- /dev/null +++ b/res/ComponentLibrary/LICENSE.txt @@ -0,0 +1,2 @@ +Component Library graphics by Grayscale (http://grayscale.info/) +Licensed under CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/) \ No newline at end of file diff --git a/res/ComponentLibrary/PJ301M.png b/res/ComponentLibrary/PJ301M.png new file mode 100644 index 00000000..00a9d855 Binary files /dev/null and b/res/ComponentLibrary/PJ301M.png differ diff --git a/res/ComponentLibrary/PJ301M.svg b/res/ComponentLibrary/PJ301M.svg new file mode 100644 index 00000000..5c6483e0 --- /dev/null +++ b/res/ComponentLibrary/PJ301M.svg @@ -0,0 +1,18 @@ + + + + + + + + + + diff --git a/res/ComponentLibrary/PJ301M@2x.png b/res/ComponentLibrary/PJ301M@2x.png new file mode 100644 index 00000000..8f8ad28c Binary files /dev/null and b/res/ComponentLibrary/PJ301M@2x.png differ diff --git a/res/ComponentLibrary/PJ3410.png b/res/ComponentLibrary/PJ3410.png new file mode 100644 index 00000000..84809c19 Binary files /dev/null and b/res/ComponentLibrary/PJ3410.png differ diff --git a/res/ComponentLibrary/PJ3410.svg b/res/ComponentLibrary/PJ3410.svg new file mode 100644 index 00000000..c0c4352d --- /dev/null +++ b/res/ComponentLibrary/PJ3410.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/PJ3410@2x.png b/res/ComponentLibrary/PJ3410@2x.png new file mode 100644 index 00000000..58f2cb7b Binary files /dev/null and b/res/ComponentLibrary/PJ3410@2x.png differ diff --git a/res/ComponentLibrary/Rogan1PBlue.svg b/res/ComponentLibrary/Rogan1PBlue.svg new file mode 100644 index 00000000..88751dbb --- /dev/null +++ b/res/ComponentLibrary/Rogan1PBlue.svg @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/res/ComponentLibrary/Rogan1PGreen.svg b/res/ComponentLibrary/Rogan1PGreen.svg new file mode 100644 index 00000000..d630b329 --- /dev/null +++ b/res/ComponentLibrary/Rogan1PGreen.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan1PRed.svg b/res/ComponentLibrary/Rogan1PRed.svg new file mode 100644 index 00000000..1ce0eb05 --- /dev/null +++ b/res/ComponentLibrary/Rogan1PRed.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan1PSBlue.svg b/res/ComponentLibrary/Rogan1PSBlue.svg new file mode 100644 index 00000000..55c40f34 --- /dev/null +++ b/res/ComponentLibrary/Rogan1PSBlue.svg @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan1PSGreen.svg b/res/ComponentLibrary/Rogan1PSGreen.svg new file mode 100644 index 00000000..322c1cce --- /dev/null +++ b/res/ComponentLibrary/Rogan1PSGreen.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan1PSRed.svg b/res/ComponentLibrary/Rogan1PSRed.svg new file mode 100644 index 00000000..ebfa4d55 --- /dev/null +++ b/res/ComponentLibrary/Rogan1PSRed.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan1PSWhite.svg b/res/ComponentLibrary/Rogan1PSWhite.svg new file mode 100644 index 00000000..9631a588 --- /dev/null +++ b/res/ComponentLibrary/Rogan1PSWhite.svg @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan1PWhite.svg b/res/ComponentLibrary/Rogan1PWhite.svg new file mode 100644 index 00000000..f0169eaa --- /dev/null +++ b/res/ComponentLibrary/Rogan1PWhite.svg @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/res/ComponentLibrary/Rogan2PBlue.svg b/res/ComponentLibrary/Rogan2PBlue.svg new file mode 100644 index 00000000..56920b66 --- /dev/null +++ b/res/ComponentLibrary/Rogan2PBlue.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/res/ComponentLibrary/Rogan2PGreen.svg b/res/ComponentLibrary/Rogan2PGreen.svg new file mode 100644 index 00000000..d84b9537 --- /dev/null +++ b/res/ComponentLibrary/Rogan2PGreen.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan2PRed.svg b/res/ComponentLibrary/Rogan2PRed.svg new file mode 100644 index 00000000..3e30964f --- /dev/null +++ b/res/ComponentLibrary/Rogan2PRed.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan2PSBlue.svg b/res/ComponentLibrary/Rogan2PSBlue.svg new file mode 100644 index 00000000..ab2e88eb --- /dev/null +++ b/res/ComponentLibrary/Rogan2PSBlue.svg @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan2PSGreen.svg b/res/ComponentLibrary/Rogan2PSGreen.svg new file mode 100644 index 00000000..9b59e087 --- /dev/null +++ b/res/ComponentLibrary/Rogan2PSGreen.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan2PSRed.svg b/res/ComponentLibrary/Rogan2PSRed.svg new file mode 100644 index 00000000..064ee4ee --- /dev/null +++ b/res/ComponentLibrary/Rogan2PSRed.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan2PSWhite.svg b/res/ComponentLibrary/Rogan2PSWhite.svg new file mode 100644 index 00000000..8bf4f22c --- /dev/null +++ b/res/ComponentLibrary/Rogan2PSWhite.svg @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan2PWhite.svg b/res/ComponentLibrary/Rogan2PWhite.svg new file mode 100644 index 00000000..86eb8354 --- /dev/null +++ b/res/ComponentLibrary/Rogan2PWhite.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/res/ComponentLibrary/Rogan2SGray.svg b/res/ComponentLibrary/Rogan2SGray.svg new file mode 100644 index 00000000..997d299b --- /dev/null +++ b/res/ComponentLibrary/Rogan2SGray.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/res/ComponentLibrary/Rogan3PBlue.svg b/res/ComponentLibrary/Rogan3PBlue.svg new file mode 100644 index 00000000..51efbdb0 --- /dev/null +++ b/res/ComponentLibrary/Rogan3PBlue.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/res/ComponentLibrary/Rogan3PGreen.svg b/res/ComponentLibrary/Rogan3PGreen.svg new file mode 100644 index 00000000..9baa2efd --- /dev/null +++ b/res/ComponentLibrary/Rogan3PGreen.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan3PRed.svg b/res/ComponentLibrary/Rogan3PRed.svg new file mode 100644 index 00000000..664701d5 --- /dev/null +++ b/res/ComponentLibrary/Rogan3PRed.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan3PSBlue.svg b/res/ComponentLibrary/Rogan3PSBlue.svg new file mode 100644 index 00000000..7aa3a74c --- /dev/null +++ b/res/ComponentLibrary/Rogan3PSBlue.svg @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan3PSGreen.svg b/res/ComponentLibrary/Rogan3PSGreen.svg new file mode 100644 index 00000000..e406e915 --- /dev/null +++ b/res/ComponentLibrary/Rogan3PSGreen.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan3PSRed.svg b/res/ComponentLibrary/Rogan3PSRed.svg new file mode 100644 index 00000000..f28061c3 --- /dev/null +++ b/res/ComponentLibrary/Rogan3PSRed.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan3PSWhite.svg b/res/ComponentLibrary/Rogan3PSWhite.svg new file mode 100644 index 00000000..0453d9fc --- /dev/null +++ b/res/ComponentLibrary/Rogan3PSWhite.svg @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan3PWhite.svg b/res/ComponentLibrary/Rogan3PWhite.svg new file mode 100644 index 00000000..204a1cc9 --- /dev/null +++ b/res/ComponentLibrary/Rogan3PWhite.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/res/ComponentLibrary/Rogan5PSGray.svg b/res/ComponentLibrary/Rogan5PSGray.svg new file mode 100644 index 00000000..ebba9186 --- /dev/null +++ b/res/ComponentLibrary/Rogan5PSGray.svg @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/res/ComponentLibrary/Rogan6PSWhite.svg b/res/ComponentLibrary/Rogan6PSWhite.svg new file mode 100644 index 00000000..4b8e4f5f --- /dev/null +++ b/res/ComponentLibrary/Rogan6PSWhite.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + diff --git a/res/ComponentLibrary/ScrewBlack.png b/res/ComponentLibrary/ScrewBlack.png new file mode 100644 index 00000000..ef23fbb0 Binary files /dev/null and b/res/ComponentLibrary/ScrewBlack.png differ diff --git a/res/ComponentLibrary/ScrewBlack@2x.png b/res/ComponentLibrary/ScrewBlack@2x.png new file mode 100644 index 00000000..7a2975ce Binary files /dev/null and b/res/ComponentLibrary/ScrewBlack@2x.png differ diff --git a/res/ComponentLibrary/ScrewSilver.png b/res/ComponentLibrary/ScrewSilver.png new file mode 100644 index 00000000..dbde8694 Binary files /dev/null and b/res/ComponentLibrary/ScrewSilver.png differ diff --git a/res/ComponentLibrary/ScrewSilver@2x.png b/res/ComponentLibrary/ScrewSilver@2x.png new file mode 100644 index 00000000..30fecebf Binary files /dev/null and b/res/ComponentLibrary/ScrewSilver@2x.png differ diff --git a/res/ComponentLibrary/SynthTechAlco.svg b/res/ComponentLibrary/SynthTechAlco.svg new file mode 100644 index 00000000..95625876 --- /dev/null +++ b/res/ComponentLibrary/SynthTechAlco.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/res/ComponentLibrary/Trimpot.svg b/res/ComponentLibrary/Trimpot.svg new file mode 100644 index 00000000..4d070ba1 --- /dev/null +++ b/res/ComponentLibrary/Trimpot.svg @@ -0,0 +1,8 @@ + + + + + + + diff --git a/res/ComponentLibrary/convert2.sh b/res/ComponentLibrary/convert2.sh new file mode 100755 index 00000000..d015e076 --- /dev/null +++ b/res/ComponentLibrary/convert2.sh @@ -0,0 +1,6 @@ + +for f in "$@"; do + f2=${f/.png/@2x.png} + mv $f $f2 + convert $f2 -resize 50% $f +done diff --git a/res/DejaVuSans.ttf b/res/DejaVuSans.ttf new file mode 100644 index 00000000..2db9bdee Binary files /dev/null and b/res/DejaVuSans.ttf differ diff --git a/res/LICENSE-DejaVuSans.txt b/res/LICENSE-DejaVuSans.txt new file mode 100644 index 00000000..254e2cc4 --- /dev/null +++ b/res/LICENSE-DejaVuSans.txt @@ -0,0 +1,99 @@ +Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. +Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below) + +Bitstream Vera Fonts Copyright +------------------------------ + +Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is +a trademark of Bitstream, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of the fonts accompanying this license ("Fonts") and associated +documentation files (the "Font Software"), to reproduce and distribute the +Font Software, including without limitation the rights to use, copy, merge, +publish, distribute, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to the +following conditions: + +The above copyright and trademark notices and this permission notice shall +be included in all copies of one or more of the Font Software typefaces. + +The Font Software may be modified, altered, or added to, and in particular +the designs of glyphs or characters in the Fonts may be modified and +additional glyphs or characters may be added to the Fonts, only if the fonts +are renamed to names not containing either the words "Bitstream" or the word +"Vera". + +This License becomes null and void to the extent applicable to Fonts or Font +Software that has been modified and is distributed under the "Bitstream +Vera" names. + +The Font Software may be sold as part of a larger software package but no +copy of one or more of the Font Software typefaces may be sold by itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME +FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING +ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE +FONT SOFTWARE. + +Except as contained in this notice, the names of Gnome, the Gnome +Foundation, and Bitstream Inc., shall not be used in advertising or +otherwise to promote the sale, use or other dealings in this Font Software +without prior written authorization from the Gnome Foundation or Bitstream +Inc., respectively. For further information, contact: fonts at gnome dot +org. + +Arev Fonts Copyright +------------------------------ + +Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the fonts accompanying this license ("Fonts") and +associated documentation files (the "Font Software"), to reproduce +and distribute the modifications to the Bitstream Vera Font Software, +including without limitation the rights to use, copy, merge, publish, +distribute, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to +the following conditions: + +The above copyright and trademark notices and this permission notice +shall be included in all copies of one or more of the Font Software +typefaces. + +The Font Software may be modified, altered, or added to, and in +particular the designs of glyphs or characters in the Fonts may be +modified and additional glyphs or characters may be added to the +Fonts, only if the fonts are renamed to names not containing either +the words "Tavmjong Bah" or the word "Arev". + +This License becomes null and void to the extent applicable to Fonts +or Font Software that has been modified and is distributed under the +"Tavmjong Bah Arev" names. + +The Font Software may be sold as part of a larger software package but +no copy of one or more of the Font Software typefaces may be sold by +itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL +TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +Except as contained in this notice, the name of Tavmjong Bah shall not +be used in advertising or otherwise to promote the sale, use or other +dealings in this Font Software without prior written authorization +from Tavmjong Bah. For further information, contact: tavmjong @ free +. fr. + +$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $ diff --git a/res/rails.png b/res/rails.png new file mode 100644 index 00000000..4cc97f71 Binary files /dev/null and b/res/rails.png differ diff --git a/src/gui.cpp b/src/gui.cpp index 74822456..6774b8df 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -21,6 +21,9 @@ extern "C" { #include "../ext/noc/noc_file_dialog.h" } +#if GLFW_VERSION_MINOR == 0 && GLFW_VERSION_REVISION <= 4 +#define OLD_GLFW_VERSION +#endif namespace rack { @@ -140,6 +143,7 @@ static int lastWindowX, lastWindowY, lastWindowWidth, lastWindowHeight; void keyCallback(GLFWwindow* window, int key, int scancode, int action, int mods) { if (action == GLFW_PRESS || action == GLFW_REPEAT) { if (key == GLFW_KEY_F11 || key == GLFW_KEY_ESCAPE) { +#ifndef OLD_GLFW_VERSION // Toggle fullscreen GLFWmonitor *monitor = glfwGetWindowMonitor(window); if (monitor) { @@ -155,6 +159,7 @@ void keyCallback(GLFWwindow* window, int key, int scancode, int action, int mods const GLFWvidmode *mode = glfwGetVideoMode(monitor); glfwSetWindowMonitor(window, monitor, 0, 0, mode->width, mode->height, mode->refreshRate); } +#endif } else { if (gSelectedWidget) { @@ -197,7 +202,9 @@ void guiInit() { // glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); // glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); +#ifndef OLD_GLFW_VERSION glfwWindowHint(GLFW_MAXIMIZED, GLFW_TRUE); +#endif std::string title = gApplicationName + " " + gApplicationVersion; window = glfwCreateWindow(1000, 750, title.c_str(), NULL, NULL); assert(window); @@ -224,7 +231,9 @@ void guiInit() { // GLEW generates GL error because it calls glGetString(GL_EXTENSIONS), we'll consume it here. glGetError(); +#ifndef OLD_GLFW_VERSION glfwSetWindowSizeLimits(window, 240, 160, GLFW_DONT_CARE, GLFW_DONT_CARE); +#endif // Set up NanoVG gVg = nvgCreateGL2(NVG_ANTIALIAS); diff --git a/src/plugin.cpp b/src/plugin.cpp index f9eb09c5..228fcac8 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -23,6 +23,12 @@ #include "plugin.hpp" +#if LIBZIP_VERSION_MAJOR == 0 && LIBZIP_VERSION_MINOR <= 10 +typedef zip zip_t; +typedef zip_file zip_file_t; +typedef struct zip_stat zip_stat_t; +#endif + namespace rack { @@ -167,7 +173,7 @@ static void extract_zip(const char *dir, int zipfd) { if (!za) return; if (err) goto cleanup; - for (int i = 0; i < zip_get_num_entries(za, 0); i++) { + for (zip_uint64_t i = 0; i < zip_get_num_entries(za, 0); i++) { zip_stat_t zs; err = zip_stat_index(za, i, 0, &zs); if (err) goto cleanup;