furnace/src/gui/about.cpp

405 lines
11 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",
"is proud to present",
"",
("Furnace " DIV_VERSION),
"",
2022-07-23 19:53:42 -04:00
"the biggest multi-system chiptune tracker!",
"featuring DefleMask song compatibility.",
"",
"> CREDITS <",
"",
"-- program --",
"tildearrow",
2023-02-25 01:54:51 -05:00
"A M 4 N (intro tune)",
"akumanatt",
"cam900",
"djtuBIG-MaliceX",
2023-09-06 19:30:09 -04:00
"Eknous",
2024-01-17 00:39:27 -05:00
"Kagamiin~",
"laoo",
2023-10-29 01:29:11 -04:00
"LTVA1",
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",
"",
"-- 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",
"",
"-- 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",
"",
"-- demo songs --",
"0x5066",
2022-06-18 03:00:10 -04:00
"Abstract 64",
2024-01-31 16:19:36 -05:00
"Aburtos",
"ActualNK358",
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",
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",
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",
2023-09-06 19:30:09 -04:00
"Eknous",
2023-07-30 05:34:24 -04:00
"Electric Keet",
"EntropyAuthor",
"EpicTyphlosion",
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",
2023-11-01 04:13:26 -04:00
"LTVA1",
2022-06-18 03:00:10 -04:00
"LunaMoth",
2022-09-10 22:46:10 -04:00
"Lunathir",
"LVintageNerd",
"Mahbod Karamoozian",
"Marisa Kirisame [DJ MasterSpark]",
"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",
"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",
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-01-31 16:19:36 -05:00
"Spinning Square Waves",
"src3453",
"SuperJet Spade",
"Supper_E1",
2022-11-30 21:59:49 -05:00
"SwapXFO",
"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",
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)",
"",
"-- 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-04-17 18:20:08 -04:00
"-- Metal backend test team --",
"Diggo",
"konard",
"NaxeCode",
"scratchminer",
"",
"powered by:",
"Dear ImGui by Omar Cornut",
"SDL2 by Sam Lantinga",
#ifdef HAVE_FREETYPE
"FreeType",
#endif
"zlib by Jean-loup Gailly",
"and Mark Adler",
"libsndfile by Erik de Castro Lopo",
2022-04-12 05:36:45 -04:00
"Portable File Dialogs by Sam Hocevar",
2022-06-18 03:00:10 -04:00
"Native File Dialog by Frogtoss Games",
2023-08-30 18:38:45 -04:00
"PortAudio",
2023-09-13 21:10:09 -04:00
"Weak-JACK by x42",
2022-04-12 05:36:45 -04:00
"RtMidi by Gary P. Scavone",
"FFTW by Matteo Frigo and Steven G. Johnson",
2022-06-18 03:00:10 -04:00
"backward-cpp by Google",
2022-04-12 05:36:45 -04:00
"adpcm by superctr",
2024-03-17 16:05:07 -04:00
"adpcm-xq by David Bryant",
2023-11-23 18:30:47 -05:00
"Nuked-OPL3/OPLL/OPM/OPN2/PSG by nukeykt",
2024-04-25 20:54:57 -04:00
"YM3812-LLE, YMF262-LLE, YMF276-LLE and YM2608-LLE by nukeykt",
"ESFMu (modified version) by Kagamiin~",
"ymfm by Aaron Giles",
2024-04-06 19:49:43 -04:00
"emu2413 by Digital Sound Antiques",
"MAME SN76496 by Nicola Salmoria",
"MAME AY-3-8910 by Couriersud",
2022-05-15 03:37:39 -04:00
"with AY8930 fixes by Eulous, cam900 and Grauw",
"MAME SAA1099 by Juergen Buchmueller and Manuel Abadia",
2022-06-18 03:00:10 -04:00
"MAME Namco WSG by Nicola Salmoria and Aaron Giles",
"MAME RF5C68 core by Olivier Galibert and Aaron Giles",
2022-10-02 20:12:31 -04:00
"MAME MSM5232 core by Jarek Burczynski and Hiromitsu Shioya",
2022-06-18 03:00:10 -04:00
"MAME MSM6258 core by Barry Rodewald",
"MAME YMZ280B core by Aaron Giles",
2022-12-24 23:39:44 -05:00
"MAME GA20 core by Acho A. Tang and R. Belmont",
2023-02-10 02:01:23 -05:00
"MAME SegaPCM core by Hiromitsu Shioya and Olivier Galibert",
2022-04-12 05:36:45 -04:00
"SAASound by Dave Hooper and Simon Owen",
"SameBoy by Lior Halphon",
2022-10-11 03:23:29 -04:00
"Mednafen PCE, WonderSwan, T6W28 and Virtual Boy audio cores",
2022-10-02 20:12:31 -04:00
"SNES DSP core by Blargg",
2022-04-12 05:36:45 -04:00
"puNES (NES, MMC5 and FDS) by FHorse",
2022-06-18 03:00:10 -04:00
"NSFPlay (NES and FDS) by Brad Smith and Brezza",
"reSID by Dag Lem",
2022-08-28 16:10:16 -04:00
"reSIDfp by Dag Lem, Antti Lankila",
"and Leandro Nini",
2023-07-05 21:38:31 -04:00
"dSID by DefleMask Team based on jsSID",
"Stella by Stella Team",
2022-06-18 03:00:10 -04:00
"QSound emulator by superctr and Valley Bell",
2022-04-12 05:36:45 -04:00
"VICE VIC-20 sound core by Rami Rasanen and viznut",
2023-07-23 06:26:25 -04:00
"VICE TED sound core by Andreas Boose, Tibor Biczo",
"and Marco van den Heuvel",
2022-04-12 05:36:45 -04:00
"VERA sound core by Frank van den Hoef",
2022-12-22 19:25:11 -05:00
"mzpokeysnd POKEY emulator by Michael Borisov",
"ASAP POKEY emulator by Piotr Fusik",
"ported by laoo to C++",
2023-08-08 08:27:12 -04:00
"vgsound_emu (second version, modified version) by cam900",
"SM8521 emulator (modified version) by cam900",
"D65010G031 emulator (modified version) by cam900",
"Namco C140/C219 emulator (modified version) by cam900",
2024-01-25 13:33:22 -05:00
"PowerNoise emulator by scratchminer",
"ep128emu by Istvan Varga",
"NDS sound emulator by cam900",
"",
2022-06-18 03:00:10 -04:00
"greetings to:",
"NEOART Costa Rica",
2023-08-27 05:14:50 -04:00
"Xenium Demoparty",
2022-06-18 03:00:10 -04:00
"all members of Deflers of Noice!",
"",
2024-01-16 21:26:57 -05:00
"copyright © 2021-2024 tildearrow",
"(and contributors).",
"licensed under GPLv2+! see",
"LICENSE for more information.",
"",
"help Furnace grow:",
"https://github.com/tildearrow/furnace",
"",
"contact tildearrow at:",
"https://tildearrow.org/?p=contact",
"",
"disclaimer:",
"despite the fact this program works",
"with the .dmf file format, it is NOT",
"affiliated with Delek or DefleMask in",
"any way, nor it is a replacement for",
"the original program.",
"",
"it also comes with ABSOLUTELY NO WARRANTY.",
"",
"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;
float peakMix=settings.partyTime?0:0.3;
if (settings.partyTime) {
for (int j=0; j<e->getAudioDescGot().outChans; j++) {
peakMix+=peak[j];
}
peakMix/=e->getAudioDescGot().outChans;
}
ImGui::ColorConvertHSVtoRGB(aboutHue,1.0,0.25+MIN(0.75f,peakMix*0.75f),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++) {
double posX=(canvasW/2.0)+(sin(double(i)*0.5+double(aboutScroll)/(90.0*dpiScale))*120*dpiScale)-(ImGui::CalcTextSize(aboutLine[i]).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,aboutLine[i]);
dl->AddText(bigFont,bigFont->FontSize,
ImVec2(posX+dpiScale,posY-dpiScale),
0xff000000,aboutLine[i]);
dl->AddText(bigFont,bigFont->FontSize,
ImVec2(posX-dpiScale,posY+dpiScale),
0xff000000,aboutLine[i]);
dl->AddText(bigFont,bigFont->FontSize,
ImVec2(posX-dpiScale,posY-dpiScale),
0xff000000,aboutLine[i]);
dl->AddText(bigFont,bigFont->FontSize,
ImVec2(posX,posY),
0xffffffff,aboutLine[i]);
}
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) {
showWarning("Unsaved changes! Save changes before playing?",GUI_WARN_CV);
} 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
}