mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
-fixed codedump on game boot/exit if no banner was playing
before
This commit is contained in:
parent
686c3e8726
commit
b7e4646985
@ -29,19 +29,20 @@ distribution.
|
||||
#include "lz77.h"
|
||||
#include "ash.h"
|
||||
|
||||
AnimatedBanner::AnimatedBanner(u8 *font1, u8 *font2)
|
||||
AnimatedBanner::AnimatedBanner()
|
||||
{
|
||||
first = true;
|
||||
layout_banner = NULL;
|
||||
newBanner = NULL;
|
||||
}
|
||||
|
||||
void AnimatedBanner::LoadFont(u8 *font1, u8 *font2)
|
||||
{
|
||||
sysFont1 = font1;
|
||||
sysFont2 = font2;
|
||||
}
|
||||
|
||||
void AnimatedBanner::Clear()
|
||||
{
|
||||
if(first)
|
||||
return;
|
||||
if(layout_banner)
|
||||
{
|
||||
delete layout_banner;
|
||||
@ -56,9 +57,7 @@ void AnimatedBanner::Clear()
|
||||
|
||||
bool AnimatedBanner::LoadBanner(Banner *banner)
|
||||
{
|
||||
first = false;
|
||||
Clear();
|
||||
|
||||
u32 banner_bin_size;
|
||||
const u8 *banner_bin = banner->GetFile((char*)"banner.bin", &banner_bin_size);
|
||||
if(banner_bin == NULL)
|
||||
|
@ -32,7 +32,8 @@ distribution.
|
||||
class AnimatedBanner
|
||||
{
|
||||
public:
|
||||
AnimatedBanner(u8 *font1, u8 *font2);
|
||||
AnimatedBanner();
|
||||
void LoadFont(u8 *font1, u8 *font2);
|
||||
void Clear();
|
||||
|
||||
bool LoadBanner(Banner *banner);
|
||||
@ -45,7 +46,6 @@ protected:
|
||||
u8 *newBanner;
|
||||
u8 *sysFont1;
|
||||
u8 *sysFont2;
|
||||
bool first;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -55,17 +55,13 @@ BannerWindow::BannerWindow()
|
||||
{
|
||||
AnimStep = 20;
|
||||
gameSelected = 0;
|
||||
firstRun = true;
|
||||
gameBanner = new AnimatedBanner;
|
||||
}
|
||||
|
||||
void BannerWindow::ChangeGame(Banner *banner)
|
||||
{
|
||||
gameSelected = 0;
|
||||
if(firstRun)
|
||||
{
|
||||
gameBanner = new AnimatedBanner(sysFont1, sysFont2);
|
||||
firstRun = false;
|
||||
}
|
||||
gameBanner->LoadFont(sysFont1, sysFont2);
|
||||
gameBanner->LoadBanner(banner);
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,6 @@ class BannerWindow
|
||||
bool AnimZoomOut;
|
||||
bool AnimationRunning;
|
||||
bool oldAnimationRunning;
|
||||
bool firstRun;
|
||||
|
||||
u8 BGAlpha;
|
||||
u8 BannerAlpha;
|
||||
|
Loading…
Reference in New Issue
Block a user