4 Commits
2.3.2 ... 2.3.3

Author SHA1 Message Date
Ethan Lee
ca35c53c1a 2.3.3 2021-09-04 16:31:56 -04:00
Misa
b667e44bcf Don't use map.extrarow for menu animations
This fixes all the headaches about map.extrarow having to be the correct
value and which way it should be and whatnot. The latest headache was
the detection that prevent user-initiated menu animations while an
animation was already happening being tripped because
graphics.menuoffset would be 230 (due to closing the menu while being in
a room without a room name), but then going to a room with a room name
would check for 240 instead, and 230 is less than 240. (The numbers are
the wrong way round because I got the ternaries the wrong way round, but
even if the numbers are the correct way round, the bug would still
happen, but it would just be reversed.)

So instead, I've just made it 240 for both. This doesn't change the
duration of the menu animation (because the animation moves in
increments of 25, and 230 / 25 == 240 / 25 under integer division). It
might change the animation slightly, but it was already inconsistent
anyway because map.extrarow was always set to be 1 in custom levels, and
I legitimately would not be able to tell the difference without
recording the animations and nitpicking it frame-by-frame.

Fixes #841.
2021-09-03 17:18:17 -07:00
Misa
70d3c999be Only reset fade booleans when music is actually played
Otherwise, the block that fades existing music out if m_doFadeOutVol is
true will never execute, because m_doFadeOutVol would always be false!
2021-09-03 16:44:19 -07:00
Ethan Lee
6f315af42d Updated .ico 2021-09-03 15:57:30 -04:00
5 changed files with 7 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -6896,7 +6896,7 @@ void Game::mapmenuchange(const int newgamestate, const bool user_initiated)
{ {
if (user_initiated if (user_initiated
&& graphics.menuoffset > 0 && graphics.menuoffset > 0
&& graphics.menuoffset < (map.extrarow ? 230 : 240)) && graphics.menuoffset < 240)
{ {
return; return;
} }

View File

@@ -202,9 +202,6 @@ void musicclass::play(int t)
return; return;
} }
m_doFadeInVol = false;
m_doFadeOutVol = false;
if (currentsong == 0 || currentsong == 7 || (!map.custommode && (currentsong == 0+num_mmmmmm_tracks || currentsong == 7+num_mmmmmm_tracks))) if (currentsong == 0 || currentsong == 7 || (!map.custommode && (currentsong == 0+num_mmmmmm_tracks || currentsong == 7+num_mmmmmm_tracks)))
{ {
// Level Complete theme, no fade in or repeat // Level Complete theme, no fade in or repeat
@@ -214,6 +211,8 @@ void musicclass::play(int t)
} }
else else
{ {
m_doFadeInVol = false;
m_doFadeOutVol = false;
musicVolume = MIX_MAX_VOLUME; musicVolume = MIX_MAX_VOLUME;
Mix_VolumeMusic(musicVolume); Mix_VolumeMusic(musicVolume);
} }
@@ -242,6 +241,8 @@ void musicclass::play(int t)
} }
else else
{ {
m_doFadeInVol = false;
m_doFadeOutVol = false;
fadeMusicVolumeIn(3000); fadeMusicVolumeIn(3000);
} }
} }

View File

@@ -159,7 +159,7 @@ static void menurender(void)
#ifdef INTERIM_COMMIT #ifdef INTERIM_COMMIT
graphics.Print( 310 - (SDL_arraysize(INTERIM_COMMIT) - 1) * 8, 220, INTERIM_COMMIT, tr/2, tg/2, tb/2); graphics.Print( 310 - (SDL_arraysize(INTERIM_COMMIT) - 1) * 8, 220, INTERIM_COMMIT, tr/2, tg/2, tb/2);
#endif #endif
graphics.Print( 310 - (6*8), 230, "v2.3.2", tr/2, tg/2, tb/2); graphics.Print( 310 - (6*8), 230, "v2.3.3", tr/2, tg/2, tb/2);
if(music.mmmmmm){ if(music.mmmmmm){
graphics.Print( 10, 230, "[MMMMMM Mod Installed]", tr/2, tg/2, tb/2); graphics.Print( 10, 230, "[MMMMMM Mod Installed]", tr/2, tg/2, tb/2);

View File

@@ -205,7 +205,7 @@ void maprenderfixed(void)
|| !script.running) || !script.running)
{ {
graphics.menuoffset += 25; graphics.menuoffset += 25;
int threshold = map.extrarow ? 230 : 240; int threshold = 240;
if (graphics.menuoffset >= threshold) if (graphics.menuoffset >= threshold)
{ {
graphics.menuoffset = threshold; graphics.menuoffset = threshold;