Use opaque white instead of just opaque for the marker pixel, so transparent GIFs aren't needed when markers aren't being used.

This commit is contained in:
Glenn Maynard 2019-02-05 18:09:07 -06:00
parent 501b297c8f
commit 63e76f29cc

View File

@ -303,10 +303,11 @@ void SMXPanelAnimation::Load(const vector<SMXGif::SMXGifFrame> &frames, int pane
{
const SMXGif::SMXGifFrame &gif_frame = frames[frame_no];
// If the bottom-left pixel is opaque, this is the loop frame, which marks the
// If the bottom-left pixel is white, this is the loop frame, which marks the
// frame the animation should start at after a loop. This is global to the
// animation, not specific to each panel.
if(gif_frame.frame.get(0, gif_frame.frame.height-1).color[3] != 0)
SMXGif::Color marker = gif_frame.frame.get(0, gif_frame.frame.height-1);
if(marker.color[3] == 0xFF && marker.color[0] >= 0x80)
{
// We shouldn't see more than one of these. If we do, use the first.
if(m_iLoopFrame != -1)