prevent setting speed to 0 and update year

This commit is contained in:
tildearrow 2022-01-15 22:38:51 -05:00
parent 3a340b99f4
commit 5666cd3bce
2 changed files with 14 additions and 9 deletions

View file

@ -324,10 +324,16 @@ void FurnaceGUI::drawSongInfo() {
ImGui::Text("Speed"); ImGui::Text("Speed");
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetNextItemWidth(120.0f*dpiScale); ImGui::SetNextItemWidth(120.0f*dpiScale);
ImGui::InputScalar("##Speed1",ImGuiDataType_U8,&e->song.speed1,&_ONE,&_THREE); if (ImGui::InputScalar("##Speed1",ImGuiDataType_U8,&e->song.speed1,&_ONE,&_THREE)) {
if (e->song.speed1<1) e->song.speed1=1;
if (e->isPlaying()) e->play();
}
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetNextItemWidth(120.0f*dpiScale); ImGui::SetNextItemWidth(120.0f*dpiScale);
ImGui::InputScalar("##Speed2",ImGuiDataType_U8,&e->song.speed2,&_ONE,&_THREE); if (ImGui::InputScalar("##Speed2",ImGuiDataType_U8,&e->song.speed2,&_ONE,&_THREE)) {
if (e->song.speed2<1) e->song.speed2=1;
if (e->isPlaying()) e->play();
}
ImGui::Text("Highlight"); ImGui::Text("Highlight");
ImGui::SameLine(); ImGui::SameLine();
@ -1621,15 +1627,14 @@ void FurnaceGUI::drawPattern() {
ImGui::End(); ImGui::End();
} }
const char* aboutLine[55]={ const char* aboutLine[54]={
"tildearrow", "tildearrow",
"is proud to present", "is proud to present",
"", "",
("Furnace " DIV_VERSION), ("Furnace " DIV_VERSION),
"", "",
"the free software chiptune tracker,", "the free software chiptune tracker,",
"and proof of concept of what can be", "compatible with DefleMask modules.",
"done in two months.",
"", "",
"zero disassembly.", "zero disassembly.",
"zero reverse-engineering.", "zero reverse-engineering.",
@ -1657,7 +1662,7 @@ const char* aboutLine[55]={
"ILLUMIDARO", "ILLUMIDARO",
"all members of Deflers of Noice!", "all members of Deflers of Noice!",
"", "",
"copyright © 2021 tildearrow.", "copyright © 2021-2022 tildearrow.",
"licensed under GPLv2! see", "licensed under GPLv2! see",
"LICENSE.txt for more information.", "LICENSE.txt for more information.",
"", "",
@ -1728,7 +1733,7 @@ void FurnaceGUI::drawAbout() {
} }
} }
for (int i=0; i<55; i++) { for (int i=0; i<54; i++) {
double posX=(scrW*dpiScale/2.0)+(sin(double(i)*0.5+double(aboutScroll)/90.0)*120*dpiScale)-(ImGui::CalcTextSize(aboutLine[i]).x*0.5); double posX=(scrW*dpiScale/2.0)+(sin(double(i)*0.5+double(aboutScroll)/90.0)*120*dpiScale)-(ImGui::CalcTextSize(aboutLine[i]).x*0.5);
double posY=(scrH-aboutScroll+42*i)*dpiScale; double posY=(scrH-aboutScroll+42*i)*dpiScale;
if (posY<-80*dpiScale || posY>scrH*dpiScale) continue; if (posY<-80*dpiScale || posY>scrH*dpiScale) continue;
@ -1751,7 +1756,7 @@ void FurnaceGUI::drawAbout() {
ImGui::PopFont(); ImGui::PopFont();
aboutScroll+=2; aboutScroll+=2;
if (++aboutSin>=2400) aboutSin=0; if (++aboutSin>=2400) aboutSin=0;
if (aboutScroll>(42*55+scrH)) aboutScroll=-20; if (aboutScroll>(42*54+scrH)) aboutScroll=-20;
} }
ImGui::End(); ImGui::End();
} }

View file

@ -94,7 +94,7 @@ bool pLogLevel(String val) {
bool pVersion(String) { bool pVersion(String) {
printf("Furnace version " DIV_VERSION ".\n\n"); printf("Furnace version " DIV_VERSION ".\n\n");
printf("developed by tildearrow. copyright (C) 2021.\n"); printf("developed by tildearrow. copyright (C) 2021-2022.\n");
printf("licensed under the GNU General Public License version 2\n"); printf("licensed under the GNU General Public License version 2\n");
printf("<https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>.\n\n"); printf("<https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>.\n\n");
printf("this is free software with ABSOLUTELY NO WARRANTY.\n"); printf("this is free software with ABSOLUTELY NO WARRANTY.\n");