usbloadergx/source/utils/rockout.cpp
dimok321 8943592d0e *Fixed several theme images being not loaded. Made all recourses from SVN now themable (sounds/fonts/images). They only have to be in the same folder as the theme images.
*Ignore sector size of wbfs partitions in MBR (some lazy Partition Manager don't change it). Reading it from the partition header now.
*Several small bug fixes and cleanups
*Fixed "Bannersound + BG Music after it" mode
*Updated language files
2011-01-08 12:35:41 +00:00

41 lines
1.3 KiB
C++

#include "libwiigui/gui.h"
#include "themes/CTheme.h"
#include "usbloader/GameList.h"
#include "settings/GameTitles.h"
#include "menu/menus.h"
extern GuiImageData * pointer[4];
void rockout(int gameSelected, int f)
{
static bool rockoutSet = false;
HaltGui();
if (gameSelected >= 0 && gameSelected < gameList.size() && !rockoutSet && (strcasestr(GameTitles.GetTitle(gameList[gameSelected]), "guitar")
|| strcasestr(GameTitles.GetTitle(gameList[gameSelected]), "band") || strcasestr(GameTitles.GetTitle(gameList[gameSelected]),
"rock")))
{
for (int i = 0; i < 4; i++)
delete pointer[i];
pointer[0] = Resources::GetImageData("rplayer1_point.png");
pointer[1] = Resources::GetImageData("rplayer2_point.png");
pointer[2] = Resources::GetImageData("rplayer3_point.png");
pointer[3] = Resources::GetImageData("rplayer4_point.png");
rockoutSet = true;
}
else if(rockoutSet)
{
for (int i = 0; i < 4; i++)
delete pointer[i];
pointer[0] = Resources::GetImageData("player1_point.png");
pointer[1] = Resources::GetImageData("player2_point.png");
pointer[2] = Resources::GetImageData("player3_point.png");
pointer[3] = Resources::GetImageData("player4_point.png");
rockoutSet = false;
}
ResumeGui();
}