furnace/src/gui/about.cpp

438 lines
12 KiB
C++
Raw Normal View History

/**
* Furnace Tracker - multi-system chiptune tracker
2024-01-16 21:26:57 -05:00
* Copyright (C) 2021-2024 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.
*/
2022-03-21 18:38:11 -04:00
#define _USE_MATH_DEFINES
#include "gui.h"
2022-03-21 18:38:11 -04:00
#include <math.h>
const char* aboutLine[]={
"tildearrow",
2024-05-28 16:15:56 -04:00
_N("is proud to present"),
"",
("Furnace " DIV_VERSION),
"",
2024-05-28 16:15:56 -04:00
_N("the biggest multi-system chiptune tracker!"),
_N("featuring DefleMask song compatibility."),
"",
2024-05-28 16:15:56 -04:00
_N("> CREDITS <"),
"",
2024-05-28 16:15:56 -04:00
_N("-- program --"),
"tildearrow",
2024-05-28 16:15:56 -04:00
_N("A M 4 N (intro tune)"),
2024-08-24 04:08:46 -04:00
"Adam Lederer",
"akumanatt",
"cam900",
"djtuBIG-MaliceX",
2023-09-06 19:30:09 -04:00
"Eknous",
2024-01-17 00:39:27 -05:00
"Kagamiin~",
"laoo",
"LTVA",
2023-07-07 16:01:19 -04:00
"MooingLemur",
2022-04-12 05:36:45 -04:00
"OPNA2608",
2024-01-25 13:33:22 -05:00
"scratchminer",
"superctr",
2022-10-12 16:14:28 -04:00
"System64",
2024-04-23 16:04:38 -04:00
"techmetx11",
"",
2024-05-28 16:15:56 -04:00
_N("-- graphics/UI design --"),
"tildearrow",
"BlastBrothers",
2023-08-14 21:02:48 -04:00
"Electric Keet",
2022-06-18 03:00:10 -04:00
"Mahbod Karamoozian",
"Raijin",
"",
2024-05-28 16:15:56 -04:00
_N("-- documentation --"),
2023-09-24 18:56:33 -04:00
"brickblock369",
"cam900",
2023-09-24 18:56:33 -04:00
"DeMOSic",
2023-07-07 16:01:19 -04:00
"Electric Keet",
2023-09-24 18:56:33 -04:00
"freq-mod",
"host12prog",
"Lunathir",
"tildearrow",
"",
_N("-- localization/translation team --"),
2024-06-14 04:10:19 -04:00
"Bahasa Indonesia: ZoomTen (Zumi)",
2024-06-13 17:40:32 -04:00
"Español: CrimsonZN, ThaCuber, tildearrow",
"Հայերեն: Eknous",
2024-06-05 04:17:10 -04:00
"한국어: Heemin, leejh20",
"Nederlands: Lunathir",
"Polski: freq-mod, PoznańskiSzybkowiec",
"Português (Brasil): Kagamiin~",
"Русский: Background2982, LTVA",
"Slovenčina: Wegfrei",
"Svenska: RevvoBolt",
"ไทย: akumanatt",
"",
2024-05-28 16:15:56 -04:00
_N("-- demo songs --"),
"0x5066",
2022-06-18 03:00:10 -04:00
"Abstract 64",
2024-01-31 16:19:36 -05:00
"Aburtos",
"ActualNK358",
2024-06-25 12:58:46 -04:00
"Aishi Tsukumo",
2022-06-18 03:00:10 -04:00
"akumanatt",
2024-04-12 15:38:44 -04:00
"aloelucidity",
2022-06-18 03:00:10 -04:00
"AmigaX",
"AquaDoesStuff",
2024-09-27 04:32:42 -04:00
"AstralBlue",
2022-06-18 03:00:10 -04:00
"AURORA*FIELDS",
2024-01-31 16:19:36 -05:00
"Background2982",
"battybeats",
2024-01-31 16:19:36 -05:00
"bbqzzd",
"Bernie",
"billimanmcjonnson",
2024-01-31 16:19:36 -05:00
"BlastBrothers",
2023-12-06 03:19:00 -05:00
"Blaze Weednix",
2022-06-18 03:00:10 -04:00
"BlueElectric05",
"breakthetargets",
2022-08-13 16:53:47 -04:00
"brickblock369",
"Brightonic",
2022-11-09 23:32:56 -05:00
"Burnt Fishy",
"CaptainMalware",
2023-01-17 18:12:58 -05:00
"Clingojam",
2023-11-25 16:32:29 -05:00
"ControlleronaHanger",
2023-09-01 19:33:08 -04:00
"Crisps",
2022-06-18 03:00:10 -04:00
"DeMOSic",
"DevEd",
"Dippy",
2023-01-12 16:04:18 -05:00
"djtuBIG-MaliceX",
"dmKaltsit",
"Dolce",
2022-12-19 13:50:39 -05:00
"dumbut",
2024-07-08 06:21:44 -04:00
"Eggo1423",
2023-09-06 19:30:09 -04:00
"Eknous",
2023-07-30 05:34:24 -04:00
"Electric Keet",
"EntropyAuthor",
"EpicTyphlosion",
2024-06-16 20:11:49 -04:00
"Ether Egg",
2022-11-02 04:52:49 -04:00
"FΛDE",
2022-06-18 03:00:10 -04:00
"Forte",
"Fragmare",
"freq-mod",
2023-05-05 02:26:12 -04:00
"gtr3qq",
2024-02-19 18:29:30 -05:00
"Heemin",
2023-06-01 16:51:39 -04:00
"Hortus",
2023-08-16 17:14:28 -04:00
"ifrit05",
2022-06-18 03:00:10 -04:00
"iyatemu",
2022-11-28 03:24:35 -05:00
"JayBOB18",
2022-12-09 02:37:18 -05:00
"Jimmy-DS",
"Kagamiin~",
2024-01-31 16:19:36 -05:00
"Kaoru",
"kleeder",
2023-03-06 03:44:11 -05:00
"Korbo",
2022-06-18 03:00:10 -04:00
"jaezu",
"Laggy",
2024-01-18 00:44:06 -05:00
"leejh20",
2022-07-23 19:53:42 -04:00
"LovelyA72",
"LTVA",
2022-06-18 03:00:10 -04:00
"LunaMoth",
2022-09-10 22:46:10 -04:00
"Lunathir",
"LVintageNerd",
"Mahbod Karamoozian",
"Martin Demsky",
"masicbemester",
2023-01-24 13:45:20 -05:00
"MelonadeM",
2022-06-18 03:00:10 -04:00
"Miker",
2024-01-30 02:47:17 -05:00
"Molkirill",
"MrCoolDude",
"NeoWar",
2024-01-31 16:19:36 -05:00
"Nerreave",
2023-06-01 16:55:01 -04:00
"niffuM",
2024-04-15 04:45:18 -04:00
"Nikku4211",
2022-12-09 03:25:49 -05:00
"<nk>",
"Notakin",
2024-01-31 16:19:36 -05:00
"nwcr",
2023-03-08 01:41:26 -05:00
"NyaongI",
"Pale Moon",
"PeyPey",
"PichuMario",
"pixelated",
2024-01-31 16:19:36 -05:00
"Poltvick",
"PotaJoe",
2022-10-28 16:05:59 -04:00
"potatoTeto",
2022-09-10 22:21:08 -04:00
"psxdominator",
2022-08-21 17:53:45 -04:00
"Raijin",
2023-07-24 18:48:05 -04:00
"railzen7",
2024-05-24 03:25:55 -04:00
"Rancastor",
2024-01-31 16:19:36 -05:00
"Rei8bit",
2023-12-05 16:23:22 -05:00
"RepellantMold",
"RetroCarrot",
2023-09-24 19:07:47 -04:00
"RevvoBolt",
2024-02-02 14:31:46 -05:00
"Rockyfan75000",
2024-05-02 15:17:23 -04:00
"Roostersox",
"scooblee",
2024-03-17 18:35:42 -04:00
"sheffield^2",
"sillygoose",
2024-05-01 16:16:55 -04:00
"Slightly Large NC",
2024-01-31 16:19:36 -05:00
"smaybius",
2022-09-10 22:21:08 -04:00
"SnugglyBun",
2024-08-12 05:10:44 -04:00
"Someone64",
2024-01-31 16:19:36 -05:00
"Spinning Square Waves",
"src3453",
"SuperJet Spade",
"Supper_E1",
2022-11-30 21:59:49 -05:00
"SwapXFO",
"Swirly",
"System64",
2022-11-07 03:47:27 -05:00
"TakuikaNinja",
"tapekeep",
2024-03-03 02:54:05 -05:00
"TapeStone",
2023-01-12 16:04:18 -05:00
"TCORPStudios",
2023-07-27 02:12:50 -04:00
"Teuthida",
2023-09-05 06:33:23 -04:00
"ThaCuber",
2022-11-26 01:13:32 -05:00
"The Blender Fiddler",
"TheDuccinator",
2022-06-18 03:00:10 -04:00
"theloredev",
"The Beesh-Spweesh!",
"TheRealHedgehogSonic",
"tildearrow",
2024-01-31 16:19:36 -05:00
"tom_atom",
2024-01-30 02:41:43 -05:00
"traumatized",
"Tytanium654",
"Ultraprogramer",
2022-10-27 16:52:28 -04:00
"UserSniper",
2022-06-18 03:00:10 -04:00
"Weeppiko",
"Wegfrei",
2023-06-16 19:43:33 -04:00
"Xan",
2023-03-06 03:44:11 -05:00
"Yuzu4K",
2024-01-31 16:19:36 -05:00
"Zabir",
2023-02-11 18:14:38 -05:00
"Zaxolotl",
2022-06-18 03:00:10 -04:00
"ZoomTen (Zumi)",
"",
2024-05-28 16:15:56 -04:00
_N("-- additional feedback/fixes --"),
2023-07-30 05:34:24 -04:00
"Electric Keet",
"fd",
2022-04-13 01:37:48 -04:00
"GENATARi",
2022-07-23 22:19:43 -04:00
"host12prog",
"jvsTSX",
2022-11-05 20:27:46 -04:00
"Lumigado",
2022-09-11 06:14:15 -04:00
"Lunathir",
"plane",
"TheEssem",
"",
2024-05-28 16:15:56 -04:00
_N("-- Metal backend test team --"),
2024-04-17 18:20:08 -04:00
"Diggo",
"konard",
"NaxeCode",
"scratchminer",
"",
2024-05-28 16:15:56 -04:00
_N("-- DirectX 9 backend test team --"),
"EpicTyphlosion",
"Lunathir",
"Mr. Hassium",
"wbcbz7",
"Yuzu4K",
2024-04-17 18:20:08 -04:00
"",
2024-05-28 16:15:56 -04:00
_N("powered by:"),
_N("Dear ImGui by Omar Cornut"),
_N("SDL2 by Sam Lantinga"),
#ifdef HAVE_FREETYPE
"FreeType",
#endif
2024-05-28 16:15:56 -04:00
_N("zlib by Jean-loup Gailly"),
_N("and Mark Adler"),
_N("libsndfile by Erik de Castro Lopo"),
_N("Portable File Dialogs by Sam Hocevar"),
_N("Native File Dialog by Frogtoss Games"),
2023-08-30 18:38:45 -04:00
"PortAudio",
2024-05-28 16:15:56 -04:00
_N("Weak-JACK by x42"),
_N("RtMidi by Gary P. Scavone"),
_N("FFTW by Matteo Frigo and Steven G. Johnson"),
_N("backward-cpp by Google"),
_N("adpcm by superctr"),
_N("adpcm-xq by David Bryant"),
_N("Nuked-OPL3/OPLL/OPM/OPN2/PSG by nukeykt"),
_N("YM3812-LLE, YMF262-LLE, YMF276-LLE and YM2608-LLE by nukeykt"),
_N("ESFMu (modified version) by Kagamiin~"),
_N("ymfm by Aaron Giles"),
_N("emu2413 by Digital Sound Antiques"),
_N("MAME SN76496 by Nicola Salmoria"),
_N("MAME AY-3-8910 by Couriersud"),
_N("with AY8930 fixes by Eulous, cam900 and Grauw"),
_N("MAME SAA1099 by Juergen Buchmueller and Manuel Abadia"),
_N("MAME Namco WSG by Nicola Salmoria and Aaron Giles"),
_N("MAME RF5C68 core by Olivier Galibert and Aaron Giles"),
_N("MAME MSM5232 core by Jarek Burczynski and Hiromitsu Shioya"),
_N("MAME MSM6258 core by Barry Rodewald"),
_N("MAME YMZ280B core by Aaron Giles"),
_N("MAME GA20 core by Acho A. Tang and R. Belmont"),
_N("MAME SegaPCM core by Hiromitsu Shioya and Olivier Galibert"),
_N("SAASound by Dave Hooper and Simon Owen"),
_N("SameBoy by Lior Halphon"),
_N("Mednafen PCE, WonderSwan, T6W28 and Virtual Boy audio cores"),
_N("SNES DSP core by Blargg"),
_N("puNES (NES, MMC5 and FDS) by FHorse"),
_N("NSFPlay (NES and FDS) by Brad Smith and Brezza"),
_N("reSID by Dag Lem"),
_N("reSIDfp by Dag Lem, Antti Lankila"),
_N("and Leandro Nini"),
_N("dSID by DefleMask Team based on jsSID"),
_N("Stella by Stella Team"),
_N("QSound emulator by superctr and Valley Bell"),
_N("VICE VIC-20 sound core by Rami Rasanen and viznut"),
_N("VICE TED sound core by Andreas Boose, Tibor Biczo"),
_N("and Marco van den Heuvel"),
_N("VERA sound core by Frank van den Hoef"),
_N("mzpokeysnd POKEY emulator by Michael Borisov"),
_N("ASAP POKEY emulator by Piotr Fusik"),
_N("ported by laoo to C++"),
_N("vgsound_emu (second version, modified version) by cam900"),
2024-06-23 20:38:03 -04:00
_N("Impulse Tracker GUS volume table by Jeffrey Lim"),
_N("Schism Tracker IT sample decompression"),
2024-05-28 16:15:56 -04:00
_N("SM8521 emulator (modified version) by cam900"),
_N("D65010G031 emulator (modified version) by cam900"),
_N("Namco C140/C219 emulator (modified version) by cam900"),
_N("PowerNoise emulator by scratchminer"),
_N("ep128emu by Istvan Varga"),
_N("NDS sound emulator by cam900"),
2024-07-13 00:18:17 -04:00
_N("openMSX YMF278 emulator (modified version) by the openMSX developers"),
_N("SID2 emulator by LTVA (modification of reSID emulator)"),
_N("SID3 emulator by LTVA"),
"",
2024-05-28 16:15:56 -04:00
_N("greetings to:"),
2024-08-24 17:43:15 -04:00
"floxy!",
2022-06-18 03:00:10 -04:00
"NEOART Costa Rica",
2023-08-27 05:14:50 -04:00
"Xenium Demoparty",
2024-06-15 15:28:04 -04:00
"@party",
2024-05-28 16:15:56 -04:00
_N("all members of Deflers of Noice!"),
"",
2024-05-28 16:15:56 -04:00
_N("copyright © 2021-2024 tildearrow"),
_N("(and contributors)."),
_N("licensed under GPLv2+! see"),
_N("LICENSE for more information."),
"",
2024-05-28 16:15:56 -04:00
_N("help Furnace grow:"),
"https://github.com/tildearrow/furnace",
"",
2024-05-28 16:15:56 -04:00
_N("contact tildearrow at:"),
"https://tildearrow.org/?p=contact",
"",
2024-05-28 16:15:56 -04:00
_N("disclaimer:"),
_N("despite the fact this program works"),
_N("with the .dmf file format, it is NOT"),
_N("affiliated with Delek or DefleMask in"),
_N("any way, nor it is a replacement for"),
_N("the original program."),
"",
2024-05-28 16:15:56 -04:00
_N("it also comes with ABSOLUTELY NO WARRANTY."),
"",
2024-05-28 16:15:56 -04:00
_N("thanks to all contributors/bug reporters!")
};
const size_t aboutCount=sizeof(aboutLine)/sizeof(aboutLine[0]);
void FurnaceGUI::drawAbout() {
// do stuff
2024-05-27 18:53:46 -04:00
if (ImGui::Begin("About Furnace",NULL,ImGuiWindowFlags_Modal|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoDocking|ImGuiWindowFlags_NoTitleBar,_("About Furnace"))) {
ImGui::SetWindowPos(ImVec2(0,0));
ImGui::SetWindowSize(ImVec2(canvasW,canvasH));
ImGui::PushFont(bigFont);
ImDrawList* dl=ImGui::GetWindowDrawList();
float r=0;
float g=0;
float b=0;
2024-09-22 14:55:44 -04:00
float peakMix=0.3;
ImGui::ColorConvertHSVtoRGB(aboutHue,1.0,0.475,r,g,b);
dl->AddRectFilled(ImVec2(0,0),ImVec2(canvasW,canvasH),0xff000000);
bool skip=false;
bool skip2=false;
for (int i=(-80-sin(double(aboutSin)*2*M_PI/120.0)*80.0)*2*dpiScale; i<canvasW; i+=160*dpiScale) {
skip2=!skip2;
skip=skip2;
for (int j=(-80-cos(double(aboutSin)*2*M_PI/150.0)*80.0)*2*dpiScale; j<canvasH; j+=160*dpiScale) {
skip=!skip;
if (skip) continue;
dl->AddRectFilled(ImVec2(i,j),ImVec2(i+160*dpiScale,j+160*dpiScale),ImGui::GetColorU32(ImVec4(r*0.25,g*0.25,b*0.25,1.0)));
}
}
skip=false;
skip2=false;
for (int i=(-80-cos(double(aboutSin)*2*M_PI/120.0)*80.0)*2*dpiScale; i<canvasW; i+=160*dpiScale) {
skip2=!skip2;
skip=skip2;
for (int j=(-80-sin(double(aboutSin)*2*M_PI/150.0)*80.0)*2*dpiScale; j<canvasH; j+=160*dpiScale) {
skip=!skip;
if (skip) continue;
dl->AddRectFilled(ImVec2(i,j),ImVec2(i+160*dpiScale,j+160*dpiScale),ImGui::GetColorU32(ImVec4(r*0.5,g*0.5,b*0.5,1.0)));
}
}
skip=false;
skip2=false;
for (int i=(-160+fmod(aboutSin*2,160))*2*dpiScale; i<canvasW; i+=160*dpiScale) {
skip2=!skip2;
skip=skip2;
for (int j=(-240-cos(double(aboutSin*M_PI/300.0))*240.0)*2*dpiScale; j<canvasH; j+=160*dpiScale) {
skip=!skip;
if (skip) continue;
dl->AddRectFilled(ImVec2(i,j),ImVec2(i+160*dpiScale,j+160*dpiScale),ImGui::GetColorU32(ImVec4(r*0.75,g*0.75,b*0.75,1.0)));
}
}
for (size_t i=0; i<aboutCount; i++) {
// don't localize tildearrow, the version or an empty line
const char* nextLine=(i==0 || i==3 || aboutLine[i][0]==0)?aboutLine[i]:_(aboutLine[i]);
double posX=(canvasW/2.0)+(sin(double(i)*0.5+double(aboutScroll)/(90.0*dpiScale))*120*dpiScale)-(ImGui::CalcTextSize(nextLine).x*0.5);
double posY=(canvasH-aboutScroll+42*i*dpiScale);
if (posY<-80*dpiScale || posY>canvasH) continue;
dl->AddText(bigFont,bigFont->FontSize,
ImVec2(posX+dpiScale,posY+dpiScale),
0xff000000,nextLine);
dl->AddText(bigFont,bigFont->FontSize,
ImVec2(posX+dpiScale,posY-dpiScale),
0xff000000,nextLine);
dl->AddText(bigFont,bigFont->FontSize,
ImVec2(posX-dpiScale,posY+dpiScale),
0xff000000,nextLine);
dl->AddText(bigFont,bigFont->FontSize,
ImVec2(posX-dpiScale,posY-dpiScale),
0xff000000,nextLine);
dl->AddText(bigFont,bigFont->FontSize,
ImVec2(posX,posY),
0xffffffff,nextLine);
}
ImGui::PopFont();
float timeScale=60.0f*ImGui::GetIO().DeltaTime;
aboutHue+=(0.001+peakMix*0.004)*timeScale;
aboutScroll+=(2+(peakMix>0.78)*3)*timeScale*dpiScale;
aboutSin+=(1+(peakMix>0.75)*2)*timeScale;
while (aboutHue>1) aboutHue--;
while (aboutSin>=2400) aboutSin-=2400;
if (aboutScroll>(42*dpiScale*aboutCount+canvasH)) aboutScroll=-20*dpiScale;
if (ImGui::IsKeyPressed(ImGuiKey_Space)) {
2024-04-01 00:35:59 -04:00
aboutOpen=false;
if (modified) {
2024-05-28 16:15:56 -04:00
showWarning(_("Unsaved changes! Save changes before playing?"),GUI_WARN_CV);
2024-04-01 00:35:59 -04:00
} else {
cvOpen=true;
cvNotSerious=true;
}
}
WAKE_UP;
}
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_ABOUT;
ImGui::End();
2022-03-21 18:38:11 -04:00
}