diff --git a/.github/workflows/editor_build.yml b/.github/workflows/editor_build.yml new file mode 100644 index 0000000..7963705 --- /dev/null +++ b/.github/workflows/editor_build.yml @@ -0,0 +1,62 @@ +name: Editor Build and Release + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build-editor: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + with: + ref: 'daniel/engine_desktop_build' + - name: Checkout Vortex Engine + uses: actions/checkout@v3 + with: + repository: 'StoneOrbits/VortexEngine' + path: 'VortexEditor/VortexEngine' + ref: 'desktop' + - name: Set up MSBuild path + uses: microsoft/setup-msbuild@v1 + - name: Build + run: msbuild VortexEditor.sln /p:Configuration=Release /p:Platform=x64 + - name: Upload Artifacts + uses: actions/upload-artifact@v2 + with: + name: Binaries + path: x64/Release/VortexEditor.exe + + create-release: + runs-on: windows-latest + needs: build-editor + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v3 + - name: Download Artifact + uses: actions/download-artifact@v2 + with: + name: Binaries + path: x64/Release/ + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./x64/Release/VortexEditor.exe + asset_name: VortexEditor.exe + asset_content_type: application/octet-stream + diff --git a/VortexEditor/VortexEditor.cpp b/VortexEditor/VortexEditor.cpp index a03a518..526f9cb 100644 --- a/VortexEditor/VortexEditor.cpp +++ b/VortexEditor/VortexEditor.cpp @@ -55,6 +55,8 @@ using namespace std; VortexEditor *g_pEditor = nullptr; VortexEditor::VortexEditor() : + m_vortex(), + m_engine(m_vortex.engine()), m_hInstance(NULL), m_hIcon(NULL), m_consoleHandle(nullptr), @@ -88,13 +90,13 @@ VortexEditor::~VortexEditor() class VortexEditorCallbacks : public VortexCallbacks { public: - VortexEditorCallbacks() {} + VortexEditorCallbacks(Vortex &vortex) : VortexCallbacks(vortex) {} virtual ~VortexEditorCallbacks() {} // called when engine reads digital pins, use this to feed button presses to the engine virtual long checkPinHook(uint32_t pin) { return 1; } // called when engine writes to ir, use this to read data from the vortex engine // the data received will be in timings of milliseconds - // NOTE: to send data to IR use Vortex::IRDeliver at any time + // NOTE: to send data to IR use m_vortex.IRDeliver at any time virtual void infraredWrite(bool mark, uint32_t amount) { } // called when engine checks for Serial, use this to indicate serial is connected virtual bool serialCheck() { return false; } @@ -133,7 +135,10 @@ bool VortexEditor::init(HINSTANCE hInst) #endif // initialize the system that wraps the vortex engine - Vortex::init(); + m_vortex.initEx(); + + // idk why not + m_vortex.setLedCount(1); // initialize the window accordingly m_window.init(hInst, EDITOR_TITLE, BACK_COL, EDITOR_WIDTH, EDITOR_HEIGHT, g_pEditor, "VortexEditor"); @@ -207,6 +212,8 @@ bool VortexEditor::init(HINSTANCE hInst) m_window.addCallback(ID_EDIT_COPY_COLORSET, handleMenusCallback); m_window.addCallback(ID_EDIT_PASTE_COLORSET, handleMenusCallback); m_window.addCallback(ID_EDIT_CLEAR_PATTERN, handleMenusCallback); + m_window.addCallback(ID_OPTIONS_TRANSMIT_DUO, handleMenusCallback); + m_window.addCallback(ID_OPTIONS_TRANSMIT_INFRARED, handleMenusCallback); m_window.addCallback(ID_EDIT_UNDO, handleMenusCallback); m_window.addCallback(ID_EDIT_REDO, handleMenusCallback); m_window.addCallback(ID_FILE_PULL, handleMenusCallback); @@ -245,11 +252,11 @@ bool VortexEditor::init(HINSTANCE hInst) { FCONTROL | FVIRTKEY, 'C', ID_EDIT_COPY_LED }, // ctrl + v paste led { FCONTROL | FVIRTKEY, 'V', ID_EDIT_PASTE_LED }, - // ctrl + shift + c clear colorset + // ctrl + shift + D clear colorset { FCONTROL | FSHIFT | FVIRTKEY, 'D', ID_EDIT_CLEAR_COLORSET }, - // ctrl + shift + c copy colorset + // ctrl + shift + C copy colorset { FCONTROL | FSHIFT | FVIRTKEY, 'C', ID_EDIT_COPY_COLORSET }, - // ctrl + shift + v paste colorset + // ctrl + shift + V paste colorset { FCONTROL | FSHIFT | FVIRTKEY, 'V', ID_EDIT_PASTE_COLORSET }, // ctrl + e pull { FCONTROL | FVIRTKEY, 'E', ID_FILE_PULL }, @@ -259,12 +266,16 @@ bool VortexEditor::init(HINSTANCE hInst) { FCONTROL | FVIRTKEY, 'S', ID_FILE_SAVE }, // ctrl + o open { FCONTROL | FVIRTKEY, 'O', ID_FILE_LOAD }, - // ctrl + shift + s save + // ctrl + shift + S save { FCONTROL | FSHIFT | FVIRTKEY, 'S', ID_FILE_EXPORT }, - // ctrl + shift + o open + // ctrl + shift + O open { FCONTROL | FSHIFT | FVIRTKEY, 'O', ID_FILE_IMPORT }, // ctrl + d { FCONTROL | FVIRTKEY, 'D', ID_EDIT_CLEAR_PATTERN }, + // ctrl + u + { FCONTROL | FVIRTKEY, 'U', ID_OPTIONS_TRANSMIT_DUO }, + // ctrl + i + { FCONTROL | FVIRTKEY, 'I', ID_OPTIONS_TRANSMIT_INFRARED }, }; m_accelTable = CreateAcceleratorTable(accelerators, sizeof(accelerators) / sizeof(accelerators[0])); if (!m_accelTable) { @@ -359,11 +370,11 @@ void VortexEditor::handleMenus(uintptr_t hMenu) clearLED(); return; case ID_EDIT_UNDO: - Vortex::undo(); + m_vortex.undo(); refreshModeList(); return; case ID_EDIT_REDO: - Vortex::redo(); + m_vortex.redo(); refreshModeList(); return; case ID_FILE_PULL: @@ -384,6 +395,12 @@ void VortexEditor::handleMenus(uintptr_t hMenu) case ID_FILE_EXPORT: exportMode(nullptr); return; + case ID_OPTIONS_TRANSMIT_DUO: + transmitVL(nullptr); + return; + case ID_OPTIONS_TRANSMIT_INFRARED: + transmitIR(nullptr); + return; case ID_TOOLS_COLOR_PICKER: m_colorPicker.show(); return; @@ -433,18 +450,18 @@ void VortexEditor::handleMenus(uintptr_t hMenu) // when applying a single led pattern we must use the 'setPattern' api // to properly convert the mode to all-same-single if it's a multi to // begin with, otherwise we can just apply the single to whichever we select - if (isMultiLedPatternID(Vortex::getPatternID())) { - Vortex::setPattern((PatternID)ctx.next16(PATTERN_FIRST, PATTERN_SINGLE_LAST)); + if (isMultiLedPatternID(m_vortex.getPatternID(LED_ANY))) { + m_vortex.setPattern((PatternID)ctx.next16(PATTERN_FIRST, PATTERN_SINGLE_LAST)); } else { for (uint32_t i = 0; i < sels.size(); ++i) { - Vortex::setPatternAt((LedPos)sels[i], (PatternID)ctx.next16(PATTERN_FIRST, PATTERN_SINGLE_LAST)); + m_vortex.setPatternAt((LedPos)sels[i], (PatternID)ctx.next16(PATTERN_FIRST, PATTERN_SINGLE_LAST)); } } refreshModeList(); demoCurMode(); break; case ID_PATTERN_RANDOM_MULTI_LED_PATTERN: - Vortex::setPattern((PatternID)ctx.next16(PATTERN_MULTI_FIRST, PATTERN_MULTI_LAST)); + m_vortex.setPattern((PatternID)ctx.next16(PATTERN_MULTI_FIRST, PATTERN_MULTI_LAST)); refreshModeList(); demoCurMode(); break; @@ -458,14 +475,14 @@ void VortexEditor::handleMenus(uintptr_t hMenu) if (sels.size() != 1) { break; } - Vortex::getColorset((LedPos)sels[0], newSet); + m_vortex.getColorset((LedPos)sels[0], newSet); applyColorsetToAll(newSet); break; case ID_EDIT_COPY_PATTERN_TO_ALL: if (sels.size() != 1) { break; } - applyPatternToAll(Vortex::getPatternID((LedPos)sels[0])); + applyPatternToAll(m_vortex.getPatternID((LedPos)sels[0])); break; #endif } @@ -513,10 +530,10 @@ void VortexEditor::updateSelectedColor(VColorSelect *colSelect, uint32_t rawCol, colSelect->setColor(rawCol); Colorset newSet; // TODO: put multi-led in a separate position in UI so this is more elegant - if (Vortex::isCurModeMulti()) { + if (m_vortex.isCurModeMulti()) { pos = LED_MULTI; } - Vortex::getColorset((LedPos)pos, newSet); + m_vortex.getColorset((LedPos)pos, newSet); // if the color select was made inactive if (!colSelect->isActive()) { debug("Disabled color slot"); @@ -532,11 +549,11 @@ void VortexEditor::updateSelectedColor(VColorSelect *colSelect, uint32_t rawCol, return; } // TODO: put multi-led in a separate position in UI so this is more elegant - if (Vortex::isCurModeMulti()) { - Vortex::setColorset(LED_MULTI, newSet); + if (m_vortex.isCurModeMulti()) { + m_vortex.setColorset(LED_MULTI, newSet); } else { for (uint32_t i = 0; i < sels.size(); ++i) { - Vortex::setColorset((LedPos)sels[i], newSet); + m_vortex.setColorset((LedPos)sels[i], newSet); } } if (demo) { @@ -549,11 +566,11 @@ void VortexEditor::updateSelectedColor(VColorSelect *colSelect, uint32_t rawCol, void VortexEditor::applyColorset(const Colorset &set, const vector &selections) { // TODO: put multi-led in a separate position in UI so this is more elegant - if (Vortex::isCurModeMulti()) { - Vortex::setColorset(LED_MULTI, set); + if (m_vortex.isCurModeMulti()) { + m_vortex.setColorset(LED_MULTI, set); } else { for (uint32_t i = 0; i < selections.size(); ++i) { - Vortex::setColorset((LedPos)selections[i], set); + m_vortex.setColorset((LedPos)selections[i], set); } } refreshModeList(); @@ -564,7 +581,7 @@ void VortexEditor::applyColorset(const Colorset &set, const vector &selecti void VortexEditor::applyPattern(PatternID id, const vector &selections) { for (uint32_t i = 0; i < selections.size(); ++i) { - Vortex::setPatternAt((LedPos)selections[i], id); + m_vortex.setPatternAt((LedPos)selections[i], id); } refreshModeList(); // update the demo @@ -574,11 +591,11 @@ void VortexEditor::applyPattern(PatternID id, const vector &selections) void VortexEditor::applyColorsetToAll(const Colorset &set) { // TODO: put multi-led in a separate position in UI so this is more elegant - if (Vortex::isCurModeMulti()) { - Vortex::setColorset(LED_MULTI, set); + if (m_vortex.isCurModeMulti()) { + m_vortex.setColorset(LED_MULTI, set); } else { - for (uint32_t i = 0; i < Vortex::numLedsInMode(); ++i) { - Vortex::setColorset((LedPos)i, set); + for (uint32_t i = 0; i < m_vortex.numLedsInMode(); ++i) { + m_vortex.setColorset((LedPos)i, set); } } refreshColorSelect(); @@ -588,8 +605,8 @@ void VortexEditor::applyColorsetToAll(const Colorset &set) void VortexEditor::applyPatternToAll(PatternID id) { - for (LedPos i = LED_FIRST; i < Vortex::numLedsInMode(); ++i) { - Vortex::setPatternAt(i, id); + for (LedPos i = LED_FIRST; i < m_vortex.numLedsInMode(); ++i) { + m_vortex.setPatternAt(i, id); } refreshLedList(); // update the demo @@ -636,11 +653,11 @@ void VortexEditor::pasteColorset() } } // TODO: put multi-led in a separate position in UI so this is more elegant - if (Vortex::isCurModeMulti()) { - Vortex::setColorset(LED_MULTI, newSet); + if (m_vortex.isCurModeMulti()) { + m_vortex.setColorset(LED_MULTI, newSet); } else { for (uint32_t i = 0; i < sels.size(); ++i) { - Vortex::setColorset((LedPos)sels[i], newSet); + m_vortex.setColorset((LedPos)sels[i], newSet); } } refreshColorSelect(); @@ -658,10 +675,10 @@ void VortexEditor::copyLED() led += to_string(patternSelection()) + ";"; PatternArgs args; // TODO: put multi-led in a separate position in UI so this is more elegant - if (Vortex::isCurModeMulti()) { + if (m_vortex.isCurModeMulti()) { pos = LED_MULTI; } - Vortex::getPatternArgs((LedPos)pos, args); + m_vortex.getPatternArgs((LedPos)pos, args); led += to_string(args.arg1) + ","; led += to_string(args.arg2) + ","; led += to_string(args.arg3) + ","; @@ -739,13 +756,13 @@ void VortexEditor::pasteLED() } } // if applying multi-led, or changing multi-to single - if (isMultiLedPatternID(id) || isMultiLedPatternID(Vortex::getPatternID())) { + if (isMultiLedPatternID(id) || isMultiLedPatternID(m_vortex.getPatternID(LED_ANY))) { // then just set-all - Vortex::setPattern(id, &args, &newSet); + m_vortex.setPattern(id, &args, &newSet); } else { // otherwise set single for (uint32_t i = 0; i < sels.size(); ++i) { - Vortex::setPatternAt((LedPos)sels[i], id, &args, &newSet); + m_vortex.setPatternAt((LedPos)sels[i], id, &args, &newSet); } } refreshModeList(); @@ -761,7 +778,7 @@ void VortexEditor::clearLED() } // clear pattern at each position for (uint32_t i = 0; i < sels.size(); ++i) { - Vortex::setPatternAt((LedPos)sels[i], PATTERN_NONE); + m_vortex.setPatternAt((LedPos)sels[i], PATTERN_NONE); } refreshModeList(); demoCurMode(); @@ -847,10 +864,7 @@ void VortexEditor::disconnectPort(uint32_t portNum) } // are we deleting the one we have selected? int sel = getPortListIndex(); - if (sel < 0) { - continue; - } - if ((uint32_t)sel >= i) { + if (sel != -1 && (uint32_t)sel >= i) { m_portSelection.setSelection(sel - 1); } m_portList.erase(m_portList.begin() + i); @@ -884,7 +898,7 @@ void VortexEditor::push(VWindow *window) port->expectData(EDITOR_VERB_READY); // now unserialize the stream of data that was read ByteStream modes; - Vortex::getModes(modes); + m_vortex.getModes(modes); // send the modes port->writeData(modes); // wait for the done response @@ -905,14 +919,14 @@ void VortexEditor::pull(VWindow *window) debug("Couldn't read anything"); return; } - Vortex::matchLedCount(stream); - Vortex::setModes(stream); + m_vortex.matchLedCount(stream, false); + m_vortex.setModes(stream); // now send the done message port->writeData(EDITOR_VERB_PULL_MODES_DONE); // wait for the ack from the gloves port->expectData(EDITOR_VERB_PULL_MODES_ACK); // unserialized all our modes - debug("Unserialized %u modes", Vortex::numModes()); + debug("Unserialized %u modes", m_vortex.numModes()); // refresh the mode list refreshModeList(); // demo the current mode @@ -948,7 +962,7 @@ void VortexEditor::load(VWindow *window) // error } CloseHandle(hFile); - Vortex::setModes(stream); + m_vortex.setModes(stream); debug("Loaded from [%s]", szFile); refreshModeList(); demoCurMode(); @@ -986,7 +1000,7 @@ void VortexEditor::save(VWindow *window) } DWORD written = 0; ByteStream stream; - Vortex::getModes(stream); + m_vortex.getModes(stream); if (!WriteFile(hFile, stream.rawData(), stream.rawSize(), &written, NULL)) { // error } @@ -1024,7 +1038,7 @@ void VortexEditor::importMode(VWindow *window) // error } CloseHandle(hFile); - if (!Vortex::addNewMode(stream)) { + if (!m_vortex.addNewMode(stream)) { // error } debug("Loaded from [%s]", szFile); @@ -1034,14 +1048,14 @@ void VortexEditor::importMode(VWindow *window) void VortexEditor::exportMode(VWindow *window) { - if (!Vortex::numModes()) { + if (!m_vortex.numModes()) { return; } OPENFILENAME ofn; memset(&ofn, 0, sizeof(ofn)); ofn.lStructSize = sizeof(ofn); ofn.hwndOwner = NULL; - string modeName = "Mode_" + to_string(Vortex::curModeIndex()) + "_" + Vortex::getModeName(); + string modeName = "Mode_" + to_string(m_vortex.curModeIndex()) + "_" + m_vortex.getModeName(); replace(modeName.begin(), modeName.end(), ' ', '_'); modeName += VORTEX_MODE_EXTENSION; char szFile[MAX_PATH] = {0}; @@ -1071,7 +1085,7 @@ void VortexEditor::exportMode(VWindow *window) } DWORD written = 0; ByteStream stream; - Vortex::getCurMode(stream); + m_vortex.getCurMode(stream); if (!WriteFile(hFile, stream.rawData(), stream.rawSize(), &written, NULL)) { // error } @@ -1079,10 +1093,37 @@ void VortexEditor::exportMode(VWindow *window) debug("Saved to [%s]", filename.c_str()); } +void VortexEditor::transmitVL(VWindow *window) +{ + VortexPort *port = nullptr; + if (!isConnected() || !getCurPort(&port)) { + return; + } + int sel = m_modeListBox.getSelection(); + if (sel < 0 || !isConnected()) { + return; + } + // now unserialize the stream of data that was read + ByteStream curMode; + if (!m_vortex.getCurMode(curMode) || curMode.size() <= 4) { + // error! + // TODO: abort + return; + } + // now immediately tell it what to do + port->writeData(EDITOR_VERB_TRANSMIT_VL); + // read data again + port->expectData(EDITOR_VERB_TRANSMIT_VL_ACK); +} + +void VortexEditor::transmitIR(VWindow *window) +{ +} + void VortexEditor::selectMode(VWindow *window) { int sel = m_modeListBox.getSelection(); - if (sel == Vortex::curModeIndex()) { + if (sel == m_vortex.curModeIndex()) { // trigger demo again w/e demoCurMode(); return; @@ -1090,7 +1131,7 @@ void VortexEditor::selectMode(VWindow *window) if (sel < 0) { return; } - if (!Vortex::setCurMode(sel)) { + if (!m_vortex.setCurMode(sel)) { // error! return; } @@ -1113,7 +1154,7 @@ void VortexEditor::demoCurMode() } // now unserialize the stream of data that was read ByteStream curMode; - if (!Vortex::getCurMode(curMode) || curMode.size() <= 4) { + if (!m_vortex.getCurMode(curMode) || curMode.size() <= 4) { // error! // TODO: abort return; @@ -1126,7 +1167,7 @@ void VortexEditor::demoCurMode() port->writeData(curMode); // wait for the done response port->expectData(EDITOR_VERB_DEMO_MODE_ACK); - string modeName = "Mode_" + to_string(Vortex::curModeIndex()) + "_" + Vortex::getModeName(); + string modeName = "Mode_" + to_string(m_vortex.curModeIndex()) + "_" + m_vortex.getModeName(); // Set status? maybe soon //m_statusBar.setStatus(RGB(0, 255, 255), ("Demoing " + modeName).c_str()); } @@ -1146,15 +1187,15 @@ void VortexEditor::clearDemo() void VortexEditor::addMode(VWindow *window) { #if MAX_MODES != 0 - if (Vortex::numModes() >= MAX_MODES) { + if (m_vortex.numModes() >= MAX_MODES) { return; } #endif - debug("Adding mode %u", Vortex::numModes() + 1); - Vortex::addNewMode(); - m_modeListBox.setSelection(Vortex::curModeIndex()); + debug("Adding mode %u", m_vortex.numModes() + 1); + m_vortex.addNewMode(); + m_modeListBox.setSelection(m_vortex.curModeIndex()); refreshModeList(); - if (Vortex::numModes() == 1) { + if (m_vortex.numModes() == 1) { m_ledsMultiListBox.setSelection(0); refreshModeList(); demoCurMode(); @@ -1163,11 +1204,11 @@ void VortexEditor::addMode(VWindow *window) void VortexEditor::delMode(VWindow *window) { - debug("Deleting mode %u", Vortex::curModeIndex()); - uint32_t cur = Vortex::curModeIndex(); - Vortex::delCurMode(); + debug("Deleting mode %u", m_vortex.curModeIndex()); + uint32_t cur = m_vortex.curModeIndex(); + m_vortex.delCurMode(); refreshModeList(); - if (!Vortex::numModes()) { + if (!m_vortex.numModes()) { clearDemo(); } else { demoCurMode(); @@ -1176,29 +1217,29 @@ void VortexEditor::delMode(VWindow *window) void VortexEditor::copyMode(VWindow *window) { - if (!Vortex::numModes()) { + if (!m_vortex.numModes()) { return; } int sel = m_modeListBox.getSelection(); if (sel < 0) { return; } - debug("Copying mode %u", Vortex::curModeIndex()); + debug("Copying mode %u", m_vortex.curModeIndex()); ByteStream stream; - Vortex::getCurMode(stream); - Vortex::addNewMode(stream); + m_vortex.getCurMode(stream); + m_vortex.addNewMode(stream); refreshModeList(); } void VortexEditor::moveModeUp(VWindow *window) { - Vortex::shiftCurMode(-1); + m_vortex.shiftCurMode(-1); refreshModeList(); } void VortexEditor::moveModeDown(VWindow *window) { - Vortex::shiftCurMode(1); + m_vortex.shiftCurMode(1); refreshModeList(); } @@ -1220,18 +1261,18 @@ void VortexEditor::selectPattern(VWindow *window) // if we ONLY selected the first led if (sels.size() == 1 && sels[0] == 0) { // and if we are switching from a multi-led or to a multi-led - if (Vortex::isCurModeMulti() || isMultiLedPatternID(pat)) { + if (m_vortex.isCurModeMulti() || isMultiLedPatternID(pat)) { // then set the pattern on the entire mode - Vortex::setPattern(pat); + m_vortex.setPattern(pat); } else { // otherwise we are switching from single to single to just // apply the pattern change to this slot - Vortex::setPatternAt(LED_FIRST, pat); + m_vortex.setPatternAt(LED_FIRST, pat); } } else { for (uint32_t i = 0; i < sels.size(); ++i) { // only set the pattern on a single position - Vortex::setPatternAt((LedPos)sels[i], pat); + m_vortex.setPatternAt((LedPos)sels[i], pat); } } refreshModeList(); @@ -1256,17 +1297,17 @@ void VortexEditor::copyToAll(VWindow *window) } PatternArgs args; // TODO: put multi-led in a separate position in UI so this is more elegant - if (Vortex::isCurModeMulti()) { + if (m_vortex.isCurModeMulti()) { pos = LED_MULTI; } - Vortex::getPatternArgs((LedPos)pos, args); + m_vortex.getPatternArgs((LedPos)pos, args); Colorset set; - Vortex::getColorset((LedPos)pos, set); - for (LedPos i = LED_FIRST; i < Vortex::numLedsInMode(); ++i) { + m_vortex.getColorset((LedPos)pos, set); + for (LedPos i = LED_FIRST; i < m_vortex.numLedsInMode(); ++i) { if (pos == i) { continue; } - Vortex::setPatternAt(i, pat, &args, &set); + m_vortex.setPatternAt(i, pat, &args, &set); } refreshModeList(); // update the demo @@ -1285,12 +1326,12 @@ void VortexEditor::paramEdit(VWindow *window) uint32_t paramIndex = (uint32_t)((uintptr_t)window->menu() - PARAM_EDIT_ID); PatternArgs args; // TODO: put multi-led in a separate position in UI so this is more elegant - if (Vortex::isCurModeMulti()) { + if (m_vortex.isCurModeMulti()) { pos = LED_MULTI; } - Vortex::getPatternArgs((LedPos)pos, args); + m_vortex.getPatternArgs((LedPos)pos, args); // get the number of params for the current pattern selection - uint32_t numParams = Vortex::numCustomParams(patternSelection()); + uint32_t numParams = m_vortex.numCustomParams(patternSelection()); // store the target param args.args[paramIndex] = m_paramTextBoxes[paramIndex].getValue(); vector sels; @@ -1300,15 +1341,15 @@ void VortexEditor::paramEdit(VWindow *window) return; } // TODO: put multi-led in a separate position in UI so this is more elegant - if (Vortex::isCurModeMulti()) { - Vortex::setPatternArgs(LED_MULTI, args); + if (m_vortex.isCurModeMulti()) { + m_vortex.setPatternArgs(LED_MULTI, args); } else { if (sels.size() == 1) { - Vortex::setPatternArgs((LedPos)sels[0], args); + m_vortex.setPatternArgs((LedPos)sels[0], args); } else { // set the param on all patterns, which may require changing the pattern id for (uint32_t i = 0; i < sels.size(); ++i) { - Vortex::setPatternAt((LedPos)sels[i], Vortex::getPatternID((LedPos)pos), &args); + m_vortex.setPatternAt((LedPos)sels[i], m_vortex.getPatternID((LedPos)pos), &args); } refreshLedList(false); } @@ -1336,10 +1377,10 @@ void VortexEditor::selectColor(VColorSelect *colSelect, VColorSelect::SelectEven } Colorset newSet; // TODO: put multi-led in a separate position in UI so this is more elegant - if (Vortex::isCurModeMulti()) { - Vortex::getColorset(LED_MULTI, newSet); + if (m_vortex.isCurModeMulti()) { + m_vortex.getColorset(LED_MULTI, newSet); } else { - Vortex::getColorset((LedPos)sels[0], newSet); + m_vortex.getColorset((LedPos)sels[0], newSet); } // if the color select was made inactive if (!target->isActive()) { @@ -1397,11 +1438,11 @@ void VortexEditor::selectColor(VColorSelect *colSelect, VColorSelect::SelectEven m_lastClickedColor = colorIndex; } // TODO: put multi-led in a separate position in UI so this is more elegant - if (Vortex::isCurModeMulti()) { - Vortex::setColorset(LED_MULTI, newSet); + if (m_vortex.isCurModeMulti()) { + m_vortex.setColorset(LED_MULTI, newSet); } else { for (uint32_t i = 0; i < sels.size(); ++i) { - Vortex::setColorset((LedPos)sels[i], newSet); + m_vortex.setColorset((LedPos)sels[i], newSet); } } refreshModeList(); @@ -1423,14 +1464,14 @@ void VortexEditor::demoColor(uint32_t rawCol) ByteStream curMode; PatternArgs args(1, 0, 0); Colorset newSet(rawCol); - Mode tmpMode(PATTERN_STROBE, &args, &newSet); + Mode tmpMode(m_engine, PATTERN_STROBE, &args, &newSet); tmpMode.init(); tmpMode.saveToBuffer(curMode); // send, the, mode port->writeData(curMode); // wait for the done response port->expectData(EDITOR_VERB_DEMO_MODE_ACK); - string modeName = "Mode_" + to_string(Vortex::curModeIndex()) + "_" + Vortex::getModeName(); + string modeName = "Mode_" + to_string(m_vortex.curModeIndex()) + "_" + m_vortex.getModeName(); // Set status? maybe soon //m_statusBar.setStatus(RGB(0, 255, 255), ("Demoing " + modeName).c_str()); } @@ -1485,7 +1526,7 @@ void VortexEditor::refreshStorageBar() { uint32_t total = 0; uint32_t used = 0; - Vortex::getStorageStats(&total, &used); + m_vortex.getStorageStats(&total, &used); float percent = (float)used / (float)total; // integer percent from 0 - 280 uint32_t intPct = (uint32_t)(percent * 280.0); @@ -1544,20 +1585,20 @@ PatternID VortexEditor::patternSelection() const void VortexEditor::refreshModeList(bool recursive) { m_modeListBox.clearItems(); - int curSel = (int)Vortex::curModeIndex(); + int curSel = (int)m_vortex.curModeIndex(); // We have to actually iterate the modes with nextmode because Vortex can't just // instantiate one and return it which is kinda dumb but just how it works for now - Vortex::setCurMode(0, false); - for (uint32_t i = 0; i < Vortex::numModes(); ++i) { + m_vortex.setCurMode(0, false); + for (uint32_t i = 0; i < m_vortex.numModes(); ++i) { // just use the pattern name from the first pattern - string modeName = "Mode " + to_string(i) + " (" + Vortex::getModeName() + ")"; + string modeName = "Mode " + to_string(i) + " (" + m_vortex.getModeName() + ")"; m_modeListBox.addItem(modeName); // go to next mode - Vortex::nextMode(false); + m_vortex.nextMode(false); } // restore the selection m_modeListBox.setSelection(curSel); - Vortex::setCurMode(curSel, false); + m_vortex.setCurMode(curSel, false); if (recursive) { refreshLedList(recursive); } @@ -1571,13 +1612,13 @@ void VortexEditor::refreshLedList(bool recursive) vector sels; m_ledsMultiListBox.getSelections(sels); m_ledsMultiListBox.clearItems(); - if (Vortex::getPatternID(LED_MULTI) == PATTERN_NONE) { - for (LedPos pos = LED_FIRST; pos < Vortex::numLedsInMode(); ++pos) { - string ledName = Vortex::ledToString(pos) + " (" + Vortex::getPatternName(pos) + ")"; + if (m_vortex.getPatternID(LED_MULTI) == PATTERN_NONE) { + for (LedPos pos = LED_FIRST; pos < m_vortex.numLedsInMode(); ++pos) { + string ledName = m_vortex.ledToString(pos) + " (" + m_vortex.getPatternName(pos) + ")"; m_ledsMultiListBox.addItem(ledName); } } else { - string ledName = "Multi led (" + Vortex::getPatternName(LED_MULTI) + ")"; + string ledName = "Multi led (" + m_vortex.getPatternName(LED_MULTI) + ")"; m_ledsMultiListBox.addItem(ledName); // TODO: support both rendering multi and single at same time... not for now } @@ -1608,7 +1649,7 @@ void VortexEditor::refreshPatternSelect(bool recursive) // whether to allow multi-led patterns to appear in the dropdown bool allow_multi = (sel == 0); // whether we are currently selecting a multi - if (Vortex::isCurModeMulti()) { + if (m_vortex.isCurModeMulti()) { // so that we can use getPatternID(sel) sel = LED_MULTI; } @@ -1618,13 +1659,13 @@ void VortexEditor::refreshPatternSelect(bool recursive) if (!allow_multi && isMulti) { continue; } - string patternName = Vortex::patternToString(id); + string patternName = m_vortex.patternToString(id); if (isMulti) { patternName += " *"; } m_patternSelectComboBox.addItem(patternName); // TODO: put multi-led in a separate position in UI so this is more elegant - if (id == Vortex::getPatternID((LedPos)sel)) { + if (id == m_vortex.getPatternID((LedPos)sel)) { m_patternSelectComboBox.setSelection(id + 1); } } @@ -1651,10 +1692,10 @@ void VortexEditor::refreshColorSelect(bool recursive) // get the colorset Colorset set; // TODO: put multi-led in a separate position in UI so this is more elegant - if (Vortex::isCurModeMulti()) { + if (m_vortex.isCurModeMulti()) { pos = LED_MULTI; } - Vortex::getColorset((LedPos)pos, set); + m_vortex.getColorset((LedPos)pos, set); // iterate all active colors and set them for (uint32_t i = 0; i < set.numColors(); ++i) { m_colorSelects[i].setColor(set.get(i).raw()); @@ -1689,12 +1730,12 @@ void VortexEditor::refreshParams(bool recursive) } return; } - vector tips = Vortex::getCustomParams(sel); + vector tips = m_vortex.getCustomParams(sel); if (sels.size() > 1) { bool all_same = true; - PatternID base = Vortex::getPatternID((LedPos)sels[0]); + PatternID base = m_vortex.getPatternID((LedPos)sels[0]); for (uint32_t i = 1; i < sels.size(); ++i) { - if (Vortex::getPatternID((LedPos)sels[i]) != base) { + if (m_vortex.getPatternID((LedPos)sels[i]) != base) { all_same = false; } } @@ -1709,13 +1750,13 @@ void VortexEditor::refreshParams(bool recursive) } PatternArgs args; // TODO: put multi-led in a separate position in UI so this is more elegant - if (Vortex::isCurModeMulti()) { + if (m_vortex.isCurModeMulti()) { pos = LED_MULTI; } - Vortex::getPatternArgs((LedPos)pos, args); + m_vortex.getPatternArgs((LedPos)pos, args); uint8_t *pArgs = (uint8_t *)&args.arg1; // get the number of params for the current pattern selection - uint32_t numParams = Vortex::numCustomParams(sel); + uint32_t numParams = m_vortex.numCustomParams(sel); // iterate all active params and activate for (uint32_t i = 0; i < numParams; ++i) { m_paramTextBoxes[i].setText(to_string(pArgs[i]).c_str(), false); diff --git a/VortexEditor/VortexEditor.h b/VortexEditor/VortexEditor.h index 2264d94..b11e3ca 100644 --- a/VortexEditor/VortexEditor.h +++ b/VortexEditor/VortexEditor.h @@ -61,14 +61,6 @@ class VortexEditor HINSTANCE hInst() const { return m_hInstance; } private: - class VortexEditorCallbacks : public VortexCallbacks - { - public: - VortexEditorCallbacks() {} - virtual ~VortexEditorCallbacks() {} - // Editor does not utilize any engine callbacks at this time - }; - // print to the log static void printlog(const char *file, const char *func, int line, const char *msg, ...); @@ -120,6 +112,8 @@ class VortexEditor void save(VWindow *window); void importMode(VWindow *window); void exportMode(VWindow *window); + void transmitVL(VWindow *window); + void transmitIR(VWindow *window); void selectMode(VWindow *window); void demoCurMode(); void clearDemo(); @@ -195,6 +189,11 @@ class VortexEditor // ================================== // Member data + // vortex lib + Vortex m_vortex; + // engine reference for LED_ constants + VortexEngine &m_engine; + // main instance HINSTANCE m_hInstance; // icon diff --git a/VortexEditor/VortexEditor.rc b/VortexEditor/VortexEditor.rc index 3d9953a..a2ab9bb 100644 --- a/VortexEditor/VortexEditor.rc +++ b/VortexEditor/VortexEditor.rc @@ -1,170 +1,175 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United Kingdom) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK -#pragma code_page(1252) - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MENU1 MENU -BEGIN - POPUP "File" - BEGIN - MENUITEM "Pull\tctrl+e", ID_FILE_PULL - MENUITEM "Push\tctrl+t", ID_FILE_PUSH - MENUITEM SEPARATOR - MENUITEM "Load Savefile\tctrl+o", ID_FILE_LOAD - MENUITEM "Save Savefile\tctrl+s", ID_FILE_SAVE - MENUITEM SEPARATOR - MENUITEM "Import Mode\tctrl+shift+o", ID_FILE_IMPORT - MENUITEM "Export Mode\tctrl+shift+s", ID_FILE_EXPORT - MENUITEM SEPARATOR - MENUITEM "Quit", ID_FILE_QUIT - END - POPUP "Edit" - BEGIN - MENUITEM "Undo\tctrl+z", ID_EDIT_UNDO - MENUITEM "Redo\tctrl+r / ctrl+y", ID_EDIT_REDO - MENUITEM SEPARATOR - MENUITEM "Copy LED\tctrl+c", ID_EDIT_COPY_LED - MENUITEM "Paste LED\tctrl+v", ID_EDIT_PASTE_LED - MENUITEM SEPARATOR - MENUITEM "Clear Pattern\tctrl+d", ID_EDIT_CLEAR_PATTERN - MENUITEM "Clear Colorset\tctrl+shift+d", ID_EDIT_CLEAR_COLORSET - MENUITEM "Copy Colorset\tctrl+shift+c", ID_EDIT_COPY_COLORSET - MENUITEM "Paste Colorset\tctrl+shift+v", ID_EDIT_PASTE_COLORSET - MENUITEM SEPARATOR - POPUP "Random Pattern" - BEGIN - MENUITEM "Single Led Pattern", ID_PATTERN_RANDOM_SINGLE_LED_PATTERN - MENUITEM "Multi Led Pattern", ID_PATTERN_RANDOM_MULTI_LED_PATTERN - END - POPUP "Random Colorset" - BEGIN - MENUITEM "Monochromatic", ID_COLORSET_RANDOM_MONOCHROMATIC - MENUITEM "Complimentary", ID_COLORSET_RANDOM_COMPLIMENTARY - MENUITEM "Triadic", ID_COLORSET_RANDOM_TRIADIC - MENUITEM "Square", ID_COLORSET_RANDOM_SQUARE - MENUITEM "Pentadic", ID_COLORSET_RANDOM_PENTADIC - MENUITEM "Rainbow", ID_COLORSET_RANDOM_RAINBOW - END - END - POPUP "Tools" - BEGIN - MENUITEM "Color Picker", ID_TOOLS_COLOR_PICKER - END - POPUP "Help" - BEGIN - MENUITEM "About", ID_HELP_ABOUT - MENUITEM "Help", ID_HELP_HELP - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON1 ICON "icon.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -1 VERSIONINFO - FILEVERSION 1,0,0,0 - PRODUCTVERSION 1,0,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "080904b0" - BEGIN - VALUE "CompanyName", "StoneOrbits" - VALUE "FileDescription", "Vortex Editor" - VALUE "FileVersion", "1.0.0.0" - VALUE "InternalName", "VortexEditor.exe" - VALUE "LegalCopyright", "Copyright (C) 2022" - VALUE "OriginalFilename", "VortexEditor.exe" - VALUE "ProductName", "Vortex Editor" - VALUE "ProductVersion", "1.0.0.0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x809, 1200 - END -END - -#endif // English (United Kingdom) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United Kingdom) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MENU1 MENU +BEGIN + POPUP "File" + BEGIN + MENUITEM "Pull\tctrl+e", ID_FILE_PULL + MENUITEM "Push\tctrl+t", ID_FILE_PUSH + MENUITEM SEPARATOR + MENUITEM "Load Savefile\tctrl+o", ID_FILE_LOAD + MENUITEM "Save Savefile\tctrl+s", ID_FILE_SAVE + MENUITEM SEPARATOR + MENUITEM "Import Mode\tctrl+shift+o", ID_FILE_IMPORT + MENUITEM "Export Mode\tctrl+shift+s", ID_FILE_EXPORT + MENUITEM SEPARATOR + MENUITEM "Quit", ID_FILE_QUIT + END + POPUP "Edit" + BEGIN + MENUITEM "Undo\tctrl+z", ID_EDIT_UNDO + MENUITEM "Redo\tctrl+r / ctrl+y", ID_EDIT_REDO + MENUITEM SEPARATOR + MENUITEM "Copy LED\tctrl+c", ID_EDIT_COPY_LED + MENUITEM "Paste LED\tctrl+v", ID_EDIT_PASTE_LED + MENUITEM SEPARATOR + MENUITEM "Clear Pattern\tctrl+d", ID_EDIT_CLEAR_PATTERN + MENUITEM "Clear Colorset\tctrl+shift+d", ID_EDIT_CLEAR_COLORSET + MENUITEM "Copy Colorset\tctrl+shift+c", ID_EDIT_COPY_COLORSET + MENUITEM "Paste Colorset\tctrl+shift+v", ID_EDIT_PASTE_COLORSET + MENUITEM SEPARATOR + POPUP "Random Pattern" + BEGIN + MENUITEM "Single Led Pattern", ID_PATTERN_RANDOM_SINGLE_LED_PATTERN + MENUITEM "Multi Led Pattern", ID_PATTERN_RANDOM_MULTI_LED_PATTERN + END + POPUP "Random Colorset" + BEGIN + MENUITEM "Monochromatic", ID_COLORSET_RANDOM_MONOCHROMATIC + MENUITEM "Complimentary", ID_COLORSET_RANDOM_COMPLIMENTARY + MENUITEM "Triadic", ID_COLORSET_RANDOM_TRIADIC + MENUITEM "Square", ID_COLORSET_RANDOM_SQUARE + MENUITEM "Pentadic", ID_COLORSET_RANDOM_PENTADIC + MENUITEM "Rainbow", ID_COLORSET_RANDOM_RAINBOW + END + END + POPUP "Tools" + BEGIN + MENUITEM "Color Picker", ID_TOOLS_COLOR_PICKER + END + POPUP "Options" + BEGIN + MENUITEM "Transmit to Duo\tctrl+u", ID_OPTIONS_TRANSMIT_DUO + MENUITEM "Transmit Infrared\tctrl+i", ID_OPTIONS_TRANSMIT_INFRARED + END + POPUP "Help" + BEGIN + MENUITEM "About", ID_HELP_ABOUT + MENUITEM "Help", ID_HELP_HELP + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "icon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +1 VERSIONINFO + FILEVERSION 1,0,0,0 + PRODUCTVERSION 1,0,0,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "080904b0" + BEGIN + VALUE "CompanyName", "StoneOrbits" + VALUE "FileDescription", "Vortex Editor" + VALUE "FileVersion", "1.0.0.0" + VALUE "InternalName", "VortexEditor.exe" + VALUE "LegalCopyright", "Copyright (C) 2022" + VALUE "OriginalFilename", "VortexEditor.exe" + VALUE "ProductName", "Vortex Editor" + VALUE "ProductVersion", "1.0.0.0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x809, 1200 + END +END + +#endif // English (United Kingdom) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/VortexEditor/VortexEngine b/VortexEditor/VortexEngine index 5bad8c4..6e6017b 160000 --- a/VortexEditor/VortexEngine +++ b/VortexEditor/VortexEngine @@ -1 +1 @@ -Subproject commit 5bad8c479cee20452c867eaaf9dce2c8a891c932 +Subproject commit 6e6017b4174498217fd67cc95c0026c904a7398d diff --git a/VortexEditor/resource.h b/VortexEditor/resource.h index f987bc0..dbe9323 100644 --- a/VortexEditor/resource.h +++ b/VortexEditor/resource.h @@ -1,55 +1,59 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by VortexEditor.rc -// -#define IDR_MENU1 101 -#define IDI_ICON1 104 -#define ID_FILE_PUSH 40001 -#define ID_FILE_PULL 40002 -#define ID_FILE_LOAD 40003 -#define ID_FILE_SAVE 40004 -#define ID_FILE_QUIT 40005 -#define ID_Menu 40006 -#define ID_EDIT_IDK 40007 -#define ID_TOOLS_VARIOUSTOOLS 40008 -#define ID_HELP_ABOUT 40009 -#define ID_HELP_HELP 40010 -#define ID_FILE_CONNECT 40011 -#define ID_FILE_REFRESH 40012 -#define ID_COLORSET_RANDOMIZETRIADIC 40016 -#define ID_COLORSET_RANDOMIZE 40017 -#define ID_COLORSET_RANDOMIZE_TRIADIC 40028 -#define ID_COLORSET_RANDOMIZE_COMPLIMENTARY 40029 -#define ID_COLORSET_RANDOM_COMPLIMENTARY 40030 -#define ID_COLORSET_RANDOM_MONOCHROMATIC 40031 -#define ID_COLORSET_RANDOM_TRIADIC 40032 -#define ID_COLORSET_RANDOM_SQUARE 40033 -#define ID_COLORSET_RANDOM_PENTADIC 40034 -#define ID_COLORSET_RANDOM_RAINBOW 40035 -#define ID_PATTERN_RANDOM_SINGLE_LED_PATTERN 40036 -#define ID_PATTERN_RANDOM_MULTI_LED_PATTERN 40037 -#define ID_EDIT_CLEAR_COLORSET 40038 -#define ID_EDIT_COPY_COLOR_SET_TO_ALL 40039 -#define ID_EDIT_COPY_PATTERN_TO_ALL 40040 -#define ID_FILE_EXPORT 40042 -#define ID_FILE_IMPORT 40043 -#define ID_FILE_REFRESH_CONNECTIONS 40044 -#define ID_EDIT_COPY_COLORSET 40045 -#define ID_EDIT_PASTE_COLORSET 40046 -#define ID_EDIT_COPY_LED 40047 -#define ID_EDIT_PASTE_LED 40048 -#define ID_EDIT_UNDO 40049 -#define ID_EDIT_REDO 40050 -#define ID_TOOLS_COLOR_PICKER 40051 -#define ID_EDIT_CLEAR_PATTERN 40052 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 109 -#define _APS_NEXT_COMMAND_VALUE 40053 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by VortexEditor.rc +// +#define IDR_MENU1 101 +#define IDI_ICON1 104 +#define ID_FILE_PUSH 40001 +#define ID_FILE_PULL 40002 +#define ID_FILE_LOAD 40003 +#define ID_FILE_SAVE 40004 +#define ID_FILE_QUIT 40005 +#define ID_Menu 40006 +#define ID_EDIT_IDK 40007 +#define ID_TOOLS_VARIOUSTOOLS 40008 +#define ID_HELP_ABOUT 40009 +#define ID_HELP_HELP 40010 +#define ID_FILE_CONNECT 40011 +#define ID_FILE_REFRESH 40012 +#define ID_COLORSET_RANDOMIZETRIADIC 40016 +#define ID_COLORSET_RANDOMIZE 40017 +#define ID_COLORSET_RANDOMIZE_TRIADIC 40028 +#define ID_COLORSET_RANDOMIZE_COMPLIMENTARY 40029 +#define ID_COLORSET_RANDOM_COMPLIMENTARY 40030 +#define ID_COLORSET_RANDOM_MONOCHROMATIC 40031 +#define ID_COLORSET_RANDOM_TRIADIC 40032 +#define ID_COLORSET_RANDOM_SQUARE 40033 +#define ID_COLORSET_RANDOM_PENTADIC 40034 +#define ID_COLORSET_RANDOM_RAINBOW 40035 +#define ID_PATTERN_RANDOM_SINGLE_LED_PATTERN 40036 +#define ID_PATTERN_RANDOM_MULTI_LED_PATTERN 40037 +#define ID_EDIT_CLEAR_COLORSET 40038 +#define ID_EDIT_COPY_COLOR_SET_TO_ALL 40039 +#define ID_EDIT_COPY_PATTERN_TO_ALL 40040 +#define ID_FILE_EXPORT 40042 +#define ID_FILE_IMPORT 40043 +#define ID_FILE_REFRESH_CONNECTIONS 40044 +#define ID_EDIT_COPY_COLORSET 40045 +#define ID_EDIT_PASTE_COLORSET 40046 +#define ID_EDIT_COPY_LED 40047 +#define ID_EDIT_PASTE_LED 40048 +#define ID_EDIT_UNDO 40049 +#define ID_EDIT_REDO 40050 +#define ID_TOOLS_COLOR_PICKER 40051 +#define ID_EDIT_CLEAR_PATTERN 40052 +#define ID_OPTIONS_TRANSMITMODE 40053 +#define ID_OPTIONS_TRANSMITMODEIR 40054 +#define ID_OPTIONS_TRANSMIT_DUO 40055 +#define ID_OPTIONS_TRANSMIT_INFRARED 40056 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 109 +#define _APS_NEXT_COMMAND_VALUE 40057 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif