1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-10 13:09:43 +01:00

De-duplicate editor music name printing

No need to copy-paste the graphics.Print() for every single case.
This commit is contained in:
Misa 2020-06-30 18:40:18 -07:00 committed by Ethan Lee
parent ee20067fc2
commit 6c19a38e9f

View file

@ -2382,52 +2382,56 @@ void editormenurender(int tr, int tg, int tb)
} }
break; break;
case Menu::ed_music: case Menu::ed_music:
{
graphics.bigprint( -1, 65, "Map Music", tr, tg, tb, true); graphics.bigprint( -1, 65, "Map Music", tr, tg, tb, true);
graphics.Print( -1, 85, "Current map music:", tr, tg, tb, true); graphics.Print( -1, 85, "Current map music:", tr, tg, tb, true);
std::string songname;
switch(ed.levmusic) switch(ed.levmusic)
{ {
case 0: case 0:
graphics.Print( -1, 120, "No background music", tr, tg, tb, true); songname = "No background music";
break; break;
case 1: case 1:
graphics.Print( -1, 120, "1: Pushing Onwards", tr, tg, tb, true); songname = "1: Pushing Onwards";
break; break;
case 2: case 2:
graphics.Print( -1, 120, "2: Positive Force", tr, tg, tb, true); songname = "2: Positive Force";
break; break;
case 3: case 3:
graphics.Print( -1, 120, "3: Potential for Anything", tr, tg, tb, true); songname = "3: Potential for Anything";
break; break;
case 4: case 4:
graphics.Print( -1, 120, "4: Passion for Exploring", tr, tg, tb, true); songname = "4: Passion for Exploring";
break; break;
case 6: case 6:
graphics.Print( -1, 120, "5: Presenting VVVVVV", tr, tg, tb, true); songname = "5: Presenting VVVVVV";
break; break;
case 8: case 8:
graphics.Print( -1, 120, "6: Predestined Fate", tr, tg, tb, true); songname = "6: Predestined Fate";
break; break;
case 10: case 10:
graphics.Print( -1, 120, "7: Popular Potpourri", tr, tg, tb, true); songname = "7: Popular Potpourri";
break; break;
case 11: case 11:
graphics.Print( -1, 120, "8: Pipe Dream", tr, tg, tb, true); songname = "8: Pipe Dream";
break; break;
case 12: case 12:
graphics.Print( -1, 120, "9: Pressure Cooker", tr, tg, tb, true); songname = "9: Pressure Cooker";
break; break;
case 13: case 13:
graphics.Print( -1, 120, "10: Paced Energy", tr, tg, tb, true); songname = "10: Paced Energy";
break; break;
case 14: case 14:
graphics.Print( -1, 120, "11: Piercing the Sky", tr, tg, tb, true); songname = "11: Piercing the Sky";
break; break;
default: default:
graphics.Print( -1, 120, "?: something else", tr, tg, tb, true); songname = "?: something else";
break; break;
} }
graphics.Print( -1, 120, songname, tr, tg, tb, true);
break; break;
}
case Menu::ed_quit: case Menu::ed_quit:
graphics.bigprint( -1, 90, "Save before", tr, tg, tb, true); graphics.bigprint( -1, 90, "Save before", tr, tg, tb, true);
graphics.bigprint( -1, 110, "quitting?", tr, tg, tb, true); graphics.bigprint( -1, 110, "quitting?", tr, tg, tb, true);