/** * Furnace Tracker - multi-system chiptune tracker * Copyright (C) 2021-2022 tildearrow and contributors * * 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 2 of the License, or * (at your option) 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. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ // guiConst: constants used in the GUI like arrays, strings and other stuff #include "guiConst.h" #include "gui.h" #include "../engine/song.h" const int opOrder[4]={ 0, 2, 1, 3 }; const char* noteNames[180]={ "c_5", "c+5", "d_5", "d+5", "e_5", "f_5", "f+5", "g_5", "g+5", "a_5", "a+5", "b_5", "c_4", "c+4", "d_4", "d+4", "e_4", "f_4", "f+4", "g_4", "g+4", "a_4", "a+4", "b_4", "c_3", "c+3", "d_3", "d+3", "e_3", "f_3", "f+3", "g_3", "g+3", "a_3", "a+3", "b_3", "c_2", "c+2", "d_2", "d+2", "e_2", "f_2", "f+2", "g_2", "g+2", "a_2", "a+2", "b_2", "c_1", "c+1", "d_1", "d+1", "e_1", "f_1", "f+1", "g_1", "g+1", "a_1", "a+1", "b_1", "C-0", "C#0", "D-0", "D#0", "E-0", "F-0", "F#0", "G-0", "G#0", "A-0", "A#0", "B-0", "C-1", "C#1", "D-1", "D#1", "E-1", "F-1", "F#1", "G-1", "G#1", "A-1", "A#1", "B-1", "C-2", "C#2", "D-2", "D#2", "E-2", "F-2", "F#2", "G-2", "G#2", "A-2", "A#2", "B-2", "C-3", "C#3", "D-3", "D#3", "E-3", "F-3", "F#3", "G-3", "G#3", "A-3", "A#3", "B-3", "C-4", "C#4", "D-4", "D#4", "E-4", "F-4", "F#4", "G-4", "G#4", "A-4", "A#4", "B-4", "C-5", "C#5", "D-5", "D#5", "E-5", "F-5", "F#5", "G-5", "G#5", "A-5", "A#5", "B-5", "C-6", "C#6", "D-6", "D#6", "E-6", "F-6", "F#6", "G-6", "G#6", "A-6", "A#6", "B-6", "C-7", "C#7", "D-7", "D#7", "E-7", "F-7", "F#7", "G-7", "G#7", "A-7", "A#7", "B-7", "C-8", "C#8", "D-8", "D#8", "E-8", "F-8", "F#8", "G-8", "G#8", "A-8", "A#8", "B-8", "C-9", "C#9", "D-9", "D#9", "E-9", "F-9", "F#9", "G-9", "G#9", "A-9", "A#9", "B-9" }; const char* noteNamesG[180]={ "c_5", "c+5", "d_5", "d+5", "e_5", "f_5", "f+5", "g_5", "g+5", "a_5", "a+5", "h_5", "c_4", "c+4", "d_4", "d+4", "e_4", "f_4", "f+4", "g_4", "g+4", "a_4", "a+4", "h_4", "c_3", "c+3", "d_3", "d+3", "e_3", "f_3", "f+3", "g_3", "g+3", "a_3", "a+3", "h_3", "c_2", "c+2", "d_2", "d+2", "e_2", "f_2", "f+2", "g_2", "g+2", "a_2", "a+2", "h_2", "c_1", "c+1", "d_1", "d+1", "e_1", "f_1", "f+1", "g_1", "g+1", "a_1", "a+1", "h_1", "C-0", "C#0", "D-0", "D#0", "E-0", "F-0", "F#0", "G-0", "G#0", "A-0", "A#0", "H-0", "C-1", "C#1", "D-1", "D#1", "E-1", "F-1", "F#1", "G-1", "G#1", "A-1", "A#1", "H-1", "C-2", "C#2", "D-2", "D#2", "E-2", "F-2", "F#2", "G-2", "G#2", "A-2", "A#2", "H-2", "C-3", "C#3", "D-3", "D#3", "E-3", "F-3", "F#3", "G-3", "G#3", "A-3", "A#3", "H-3", "C-4", "C#4", "D-4", "D#4", "E-4", "F-4", "F#4", "G-4", "G#4", "A-4", "A#4", "H-4", "C-5", "C#5", "D-5", "D#5", "E-5", "F-5", "F#5", "G-5", "G#5", "A-5", "A#5", "H-5", "C-6", "C#6", "D-6", "D#6", "E-6", "F-6", "F#6", "G-6", "G#6", "A-6", "A#6", "H-6", "C-7", "C#7", "D-7", "D#7", "E-7", "F-7", "F#7", "G-7", "G#7", "A-7", "A#7", "H-7", "C-8", "C#8", "D-8", "D#8", "E-8", "F-8", "F#8", "G-8", "G#8", "A-8", "A#8", "H-8", "C-9", "C#9", "D-9", "D#9", "E-9", "F-9", "F#9", "G-9", "G#9", "A-9", "A#9", "H-9" }; const char* pitchLabel[11]={ "1/6", "1/5", "1/4", "1/3", "1/2", "1x", "2x", "3x", "4x", "5x", "6x" }; const int altValues[24]={ 0, 10, 1, 11, 2, 3, 12, 4, 13, 5, 14, 6, 7, 15, 8, -1, 9, -1, -1, -1, -1, -1, -1, -1 }; const int vgmVersions[6]={ 0x150, 0x151, 0x160, 0x161, 0x170, 0x171 }; const char* insTypes[DIV_INS_MAX]={ "Standard", "FM (4-operator)", "Game Boy", "C64", "Amiga/Sample", "PC Engine", "AY-3-8910/SSG", "AY8930", "TIA", "SAA1099", "VIC", "PET", "VRC6", "FM (OPLL)", "FM (OPL)", "FDS", "Virtual Boy", "Namco 163", "Konami SCC/Bubble System WSG", "FM (OPZ)", "POKEY", "PC Beeper", "WonderSwan", "Atari Lynx", "VERA", "X1-010", "VRC6 (saw)" }; const char* sampleDepths[17]={ "1-bit PCM", "1-bit DPCM", NULL, NULL, "QSound ADPCM", "ADPCM-A", "ADPCM-B", "X68000 ADPCM", "8-bit PCM", NULL, // "BRR", "VOX", NULL, NULL, NULL, NULL, NULL, "16-bit PCM" }; const char* resampleStrats[]={ "none", "linear", "cubic spline", "blep synthesis", "sinc", "best possible" }; const char* guiActions[GUI_ACTION_MAX][2]={ {"GLOBAL_MIN", "---Global"}, {"OPEN", "Open file"}, {"OPEN_BACKUP", "Restore backup"}, {"SAVE", "Save file"}, {"SAVE_AS", "Save as"}, {"UNDO", "Undo"}, {"REDO", "Redo"}, {"PLAY_TOGGLE", "Play/Stop (toggle)"}, {"PLAY", "Play"}, {"STOP", "Stop"}, {"PLAY_REPEAT", "Play (repeat pattern)"}, {"PLAY_CURSOR", "Play from cursor"}, {"STEP_ONE", "Step row"}, {"OCTAVE_UP", "Octave up"}, {"OCTAVE_DOWN", "Octave down"}, {"INS_UP", "Previous instrument"}, {"INS_DOWN", "Next instrument"}, {"STEP_UP", "Increase edit step"}, {"STEP_DOWN", "Decrease edit step"}, {"TOGGLE_EDIT", "Toggle edit mode"}, {"METRONOME", "Metronome"}, {"REPEAT_PATTERN", "Toggle repeat pattern"}, {"FOLLOW_ORDERS", "Follow orders"}, {"FOLLOW_PATTERN", "Follow pattern"}, {"PANIC", "Panic"}, {"WINDOW_EDIT_CONTROLS", "Edit Controls"}, {"WINDOW_ORDERS", "Orders"}, {"WINDOW_INS_LIST", "Instrument List"}, {"WINDOW_INS_EDIT", "Instrument Editor"}, {"WINDOW_SONG_INFO", "Song Information"}, {"WINDOW_PATTERN", "Pattern"}, {"WINDOW_WAVE_LIST", "Wavetable List"}, {"WINDOW_WAVE_EDIT", "Wavetable Editor"}, {"WINDOW_SAMPLE_LIST", "Sample List"}, {"WINDOW_SAMPLE_EDIT", "Sample Editor"}, {"WINDOW_ABOUT", "About"}, {"WINDOW_SETTINGS", "Settings"}, {"WINDOW_MIXER", "Mixer"}, {"WINDOW_DEBUG", "Debug Menu"}, {"WINDOW_OSCILLOSCOPE", "Oscilloscope"}, {"WINDOW_VOL_METER", "Volume Meter"}, {"WINDOW_STATS", "Statistics"}, {"WINDOW_COMPAT_FLAGS", "Compatibility Flags"}, {"WINDOW_PIANO", "Piano"}, {"WINDOW_NOTES", "Song Comments"}, {"WINDOW_CHANNELS", "Channels"}, {"WINDOW_REGISTER_VIEW", "Register View"}, {"COLLAPSE_WINDOW", "Collapse/expand current window"}, {"CLOSE_WINDOW", "Close current window"}, {"GLOBAL_MAX", ""}, {"PAT_MIN", "---Pattern"}, {"PAT_NOTE_UP", "Transpose (+1)"}, {"PAT_NOTE_DOWN", "Transpose (-1)"}, {"PAT_OCTAVE_UP", "Transpose (+1 octave)"}, {"PAT_OCTAVE_DOWN", "Transpose (-1 octave)"}, {"PAT_SELECT_ALL", "Select all"}, {"PAT_CUT", "Cut"}, {"PAT_COPY", "Copy"}, {"PAT_PASTE", "Paste"}, {"PAT_PASTE_MIX", "Paste Mix (foreground)"}, {"PAT_PASTE_MIX_BG", "Paste Mix (background)"}, {"PAT_PASTE_FLOOD", "Paste Flood"}, {"PAT_PASTE_OVERFLOW", "Paste Overflow"}, {"PAT_CURSOR_UP", "Move cursor up"}, {"PAT_CURSOR_DOWN", "Move cursor down"}, {"PAT_CURSOR_LEFT", "Move cursor left"}, {"PAT_CURSOR_RIGHT", "Move cursor right"}, {"PAT_CURSOR_UP_ONE", "Move cursor up by one (override Edit Step)"}, {"PAT_CURSOR_DOWN_ONE", "Move cursor down by one (override Edit Step)"}, {"PAT_CURSOR_LEFT_CHANNEL", "Move cursor to previous channel"}, {"PAT_CURSOR_RIGHT_CHANNEL", "Move cursor to next channel"}, {"PAT_CURSOR_NEXT_CHANNEL", "Move cursor to previous channel (overflow)"}, {"PAT_CURSOR_PREVIOUS_CHANNEL", "Move cursor to next channel (overflow)"}, {"PAT_CURSOR_BEGIN", "Move cursor to beginning of pattern"}, {"PAT_CURSOR_END", "Move cursor to end of pattern"}, {"PAT_CURSOR_UP_COARSE", "Move cursor up (coarse)"}, {"PAT_CURSOR_DOWN_COARSE", "Move cursor down (coarse)"}, {"PAT_SELECTION_UP", "Expand selection upwards"}, {"PAT_SELECTION_DOWN", "Expand selection downwards"}, {"PAT_SELECTION_LEFT", "Expand selection to the left"}, {"PAT_SELECTION_RIGHT", "Expand selection to the right"}, {"PAT_SELECTION_UP_ONE", "Expand selection upwards by one (override Edit Step)"}, {"PAT_SELECTION_DOWN_ONE", "Expand selection downwards by one (override Edit Step)"}, {"PAT_SELECTION_BEGIN", "Expand selection to beginning of pattern"}, {"PAT_SELECTION_END", "Expand selection to end of pattern"}, {"PAT_SELECTION_UP_COARSE", "Expand selection upwards (coarse)"}, {"PAT_SELECTION_DOWN_COARSE", "Expand selection downwards (coarse)"}, {"PAT_DELETE", "Delete"}, {"PAT_PULL_DELETE", "Pull delete"}, {"PAT_INSERT", "Insert"}, {"PAT_MUTE_CURSOR", "Mute channel at cursor"}, {"PAT_SOLO_CURSOR", "Solo channel at cursor"}, {"PAT_UNMUTE_ALL", "Unmute all channels"}, {"PAT_NEXT_ORDER", "Go to next order"}, {"PAT_PREV_ORDER", "Go to previous order"}, {"PAT_COLLAPSE", "Collapse channel at cursor"}, {"PAT_INCREASE_COLUMNS", "Increase effect columns"}, {"PAT_DECREASE_COLUMNS", "Decrease effect columns"}, {"PAT_INTERPOLATE", "Interpolate"}, {"PAT_FADE", "Fade"}, {"PAT_INVERT_VALUES", "Invert values"}, {"PAT_FLIP_SELECTION", "Flip selection"}, {"PAT_COLLAPSE_ROWS", "Collapse rows"}, {"PAT_EXPAND_ROWS", "Expand rows"}, {"PAT_COLLAPSE_PAT", "Collapse pattern"}, {"PAT_EXPAND_PAT", "Expand pattern"}, {"PAT_COLLAPSE_SONG", "Collapse song"}, {"PAT_EXPAND_SONG", "Expand song"}, {"PAT_LATCH", "Set note input latch"}, {"PAT_MAX", ""}, {"INS_LIST_MIN", "---Instrument list"}, {"INS_LIST_ADD", "Add"}, {"INS_LIST_DUPLICATE", "Duplicate"}, {"INS_LIST_OPEN", "Open"}, {"INS_LIST_SAVE", "Save"}, {"INS_LIST_MOVE_UP", "Move up"}, {"INS_LIST_MOVE_DOWN", "Move down"}, {"INS_LIST_DELETE", "Delete"}, {"INS_LIST_EDIT", "Edit"}, {"INS_LIST_UP", "Cursor up"}, {"INS_LIST_DOWN", "Cursor down"}, {"INS_LIST_MAX", ""}, {"WAVE_LIST_MIN", "---Wavetable list"}, {"WAVE_LIST_ADD", "Add"}, {"WAVE_LIST_DUPLICATE", "Duplicate"}, {"WAVE_LIST_OPEN", "Open"}, {"WAVE_LIST_SAVE", "Save"}, {"WAVE_LIST_MOVE_UP", "Move up"}, {"WAVE_LIST_MOVE_DOWN", "Move down"}, {"WAVE_LIST_DELETE", "Delete"}, {"WAVE_LIST_EDIT", "Edit"}, {"WAVE_LIST_UP", "Cursor up"}, {"WAVE_LIST_DOWN", "Cursor down"}, {"WAVE_LIST_MAX", ""}, {"SAMPLE_LIST_MIN", "---Sample list"}, {"SAMPLE_LIST_ADD", "Add"}, {"SAMPLE_LIST_DUPLICATE", "Duplicate"}, {"SAMPLE_LIST_OPEN", "Open"}, {"SAMPLE_LIST_SAVE", "Save"}, {"SAMPLE_LIST_MOVE_UP", "Move up"}, {"SAMPLE_LIST_MOVE_DOWN", "Move down"}, {"SAMPLE_LIST_DELETE", "Delete"}, {"SAMPLE_LIST_EDIT", "Edit"}, {"SAMPLE_LIST_UP", "Cursor up"}, {"SAMPLE_LIST_DOWN", "Cursor down"}, {"SAMPLE_LIST_PREVIEW", "Preview"}, {"SAMPLE_LIST_STOP_PREVIEW", "Stop preview"}, {"SAMPLE_LIST_MAX", ""}, {"SAMPLE_MIN", "---Sample editor"}, {"SAMPLE_SELECT", "Edit mode: Select"}, {"SAMPLE_DRAW", "Edit mode: Draw"}, {"SAMPLE_CUT", "Cut"}, {"SAMPLE_COPY", "Copy"}, {"SAMPLE_PASTE", "Paste"}, {"SAMPLE_PASTE_REPLACE", "Paste replace"}, {"SAMPLE_PASTE_MIX", "Paste mix"}, {"SAMPLE_SELECT_ALL", "Select all"}, {"SAMPLE_RESIZE", "Resize"}, {"SAMPLE_RESAMPLE", "Resample"}, {"SAMPLE_AMPLIFY", "Amplify"}, {"SAMPLE_NORMALIZE", "Normalize"}, {"SAMPLE_FADE_IN", "Fade in"}, {"SAMPLE_FADE_OUT", "Fade out"}, {"SAMPLE_SILENCE", "Apply silence"}, {"SAMPLE_INSERT", "Insert silence"}, {"SAMPLE_DELETE", "Delete"}, {"SAMPLE_TRIM", "Trim"}, {"SAMPLE_REVERSE", "Reverse"}, {"SAMPLE_INVERT", "Invert"}, {"SAMPLE_SIGN", "Signed/unsigned exchange"}, {"SAMPLE_FILTER", "Apply filter"}, {"SAMPLE_PREVIEW", "Preview sample"}, {"SAMPLE_STOP_PREVIEW", "Stop sample preview"}, {"SAMPLE_ZOOM_IN", "Zoom in"}, {"SAMPLE_ZOOM_OUT", "Zoom out"}, {"SAMPLE_ZOOM_AUTO", "Toggle auto-zoom"}, {"SAMPLE_MAX", ""}, {"ORDERS_MIN", "---Orders"}, {"ORDERS_UP", "Previous order"}, {"ORDERS_DOWN", "Next order"}, {"ORDERS_LEFT", "Cursor left"}, {"ORDERS_RIGHT", "Cursor right"}, {"ORDERS_INCREASE", "Increase value"}, {"ORDERS_DECREASE", "Decrease value"}, {"ORDERS_EDIT_MODE", "Switch edit mode"}, {"ORDERS_LINK", "Toggle alter entire row"}, {"ORDERS_ADD", "Add"}, {"ORDERS_DUPLICATE", "Duplicate"}, {"ORDERS_DEEP_CLONE", "Deep clone"}, {"ORDERS_DUPLICATE_END", "Duplicate to end of song"}, {"ORDERS_DEEP_CLONE_END", "Deep clone to end of song"}, {"ORDERS_REMOVE", "Remove"}, {"ORDERS_MOVE_UP", "Move up"}, {"ORDERS_MOVE_DOWN", "Move down"}, {"ORDERS_REPLAY", "Replay"}, {"ORDERS_MAX", ""}, }; // define systems. const int availableSystems[]={ DIV_SYSTEM_YM2612, DIV_SYSTEM_YM2612_EXT, DIV_SYSTEM_SMS, DIV_SYSTEM_GB, DIV_SYSTEM_PCE, DIV_SYSTEM_NES, DIV_SYSTEM_C64_8580, DIV_SYSTEM_C64_6581, DIV_SYSTEM_YM2151, DIV_SYSTEM_SEGAPCM, DIV_SYSTEM_SEGAPCM_COMPAT, DIV_SYSTEM_YM2610, DIV_SYSTEM_YM2610_EXT, DIV_SYSTEM_YM2610_FULL, DIV_SYSTEM_YM2610_FULL_EXT, DIV_SYSTEM_YM2610B, DIV_SYSTEM_YM2610B_EXT, DIV_SYSTEM_AY8910, DIV_SYSTEM_AMIGA, DIV_SYSTEM_PCSPKR, DIV_SYSTEM_OPLL, DIV_SYSTEM_OPLL_DRUMS, DIV_SYSTEM_VRC7, DIV_SYSTEM_OPL, DIV_SYSTEM_OPL_DRUMS, DIV_SYSTEM_OPL2, DIV_SYSTEM_OPL2_DRUMS, DIV_SYSTEM_OPL3, DIV_SYSTEM_OPL3_DRUMS, DIV_SYSTEM_TIA, DIV_SYSTEM_SAA1099, DIV_SYSTEM_AY8930, DIV_SYSTEM_LYNX, DIV_SYSTEM_QSOUND, DIV_SYSTEM_X1_010, DIV_SYSTEM_SWAN, DIV_SYSTEM_VERA, DIV_SYSTEM_BUBSYS_WSG, DIV_SYSTEM_N163, DIV_SYSTEM_PET, DIV_SYSTEM_VIC20, DIV_SYSTEM_VRC6, DIV_SYSTEM_FDS, DIV_SYSTEM_MMC5, 0 // don't remove this last one! };