mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-02-25 00:03:33 +01:00
-shorter way for included cover detection, still not finished for everything ;)
This commit is contained in:
parent
5e70b1e13a
commit
930a398d62
@ -16,7 +16,7 @@
|
|||||||
#include "wstringEx.hpp"
|
#include "wstringEx.hpp"
|
||||||
#include "lockMutex.hpp"
|
#include "lockMutex.hpp"
|
||||||
#include "fonts.h"
|
#include "fonts.h"
|
||||||
//#include "gecko.h"
|
#include "gecko.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -31,6 +31,9 @@ extern const u8 loading_png[];
|
|||||||
extern const u8 flatnopic_png[];
|
extern const u8 flatnopic_png[];
|
||||||
extern const u8 flatloading_png[];
|
extern const u8 flatloading_png[];
|
||||||
|
|
||||||
|
const char* black[14] = {"RZZJEL","RZNJ01","SEKJ99","SX3J01","SX3P01","R5WJA4","RUYJ99","S3HJ08","SJBJ01","CKBE88","CCPE01","SMMP01","MDUE01","APRP"};
|
||||||
|
static int black_len = 14;
|
||||||
|
|
||||||
static lwp_t coverLoaderThread = LWP_THREAD_NULL;
|
static lwp_t coverLoaderThread = LWP_THREAD_NULL;
|
||||||
SmartBuf coverLoaderThreadStack;
|
SmartBuf coverLoaderThreadStack;
|
||||||
|
|
||||||
@ -1276,6 +1279,17 @@ void CCoverFlow::_drawCoverFlat(int i, bool mirror, CCoverFlow::DrawMode dm)
|
|||||||
GX_End();
|
GX_End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CCoverFlow::_checkCoverColor(char* gameID, const char* checkID[], int len)
|
||||||
|
{
|
||||||
|
int num;
|
||||||
|
for (num = 0; num < len; num++)
|
||||||
|
{
|
||||||
|
if (strncmp(gameID, checkID[num], strlen(checkID[num])) == 0)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void CCoverFlow::_drawCoverBox(int i, bool mirror, CCoverFlow::DrawMode dm)
|
void CCoverFlow::_drawCoverBox(int i, bool mirror, CCoverFlow::DrawMode dm)
|
||||||
{
|
{
|
||||||
GXTexObj texObj;
|
GXTexObj texObj;
|
||||||
@ -1312,20 +1326,7 @@ void CCoverFlow::_drawCoverBox(int i, bool mirror, CCoverFlow::DrawMode dm)
|
|||||||
}
|
}
|
||||||
else if (m_items[m_covers[i].index].hdr->hdr.casecolor == 0x000000 ||
|
else if (m_items[m_covers[i].index].hdr->hdr.casecolor == 0x000000 ||
|
||||||
m_items[m_covers[i].index].hdr->hdr.casecolor == 0x181919 ||
|
m_items[m_covers[i].index].hdr->hdr.casecolor == 0x181919 ||
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "RZZJEL", 6) == 0 ||
|
_checkCoverColor((char *)m_items[m_covers[i].index].hdr->hdr.id,black,black_len))
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "RZNJ01", 6) == 0 ||
|
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "SEKJ99", 6) == 0 ||
|
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "SX3J01", 6) == 0 ||
|
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "SX3P01", 6) == 0 ||
|
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "R5WJA4", 6) == 0 ||
|
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "RUYJ99", 6) == 0 ||
|
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "S3HJ08", 6) == 0 ||
|
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "SJBJ01", 6) == 0 ||
|
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "CKBE88", 6) == 0 ||
|
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "CCPE01", 6) == 0 ||
|
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "SMMP01", 6) == 0 ||
|
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "APRPxx", 4) == 0 ||
|
|
||||||
strncmp((char *) m_items[m_covers[i].index].hdr->hdr.id, "MDUE01", 6) == 0)
|
|
||||||
{
|
{
|
||||||
GX_InitTexObj(&texObj, m_dvdSkin_Black.data.get(), m_dvdSkin_Black.width, m_dvdSkin_Black.height, m_dvdSkin_Black.format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
GX_InitTexObj(&texObj, m_dvdSkin_Black.data.get(), m_dvdSkin_Black.width, m_dvdSkin_Black.height, m_dvdSkin_Black.format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||||
}
|
}
|
||||||
@ -1821,7 +1822,7 @@ void CCoverFlow::right(void)
|
|||||||
LockMutex lock(m_mutex);
|
LockMutex lock(m_mutex);
|
||||||
_right(m_minDelay, m_rows >= 3 ? m_rows - 2 : 1);
|
_right(m_minDelay, m_rows >= 3 ? m_rows - 2 : 1);
|
||||||
}
|
}
|
||||||
#include "gecko.h"
|
|
||||||
void CCoverFlow::_playSound(void)
|
void CCoverFlow::_playSound(void)
|
||||||
{
|
{
|
||||||
if (m_soundVolume > 0)
|
if (m_soundVolume > 0)
|
||||||
|
@ -300,6 +300,7 @@ private:
|
|||||||
void _drawCover(int i, bool mirror, CCoverFlow::DrawMode dm);
|
void _drawCover(int i, bool mirror, CCoverFlow::DrawMode dm);
|
||||||
void _drawCoverFlat(int i, bool mirror, CCoverFlow::DrawMode dm);
|
void _drawCoverFlat(int i, bool mirror, CCoverFlow::DrawMode dm);
|
||||||
void _drawCoverBox(int i, bool mirror, CCoverFlow::DrawMode dm);
|
void _drawCoverBox(int i, bool mirror, CCoverFlow::DrawMode dm);
|
||||||
|
bool _checkCoverColor(char* gameID, const char* checkID[], int len);
|
||||||
void _updateTarget(int i, bool instant = false);
|
void _updateTarget(int i, bool instant = false);
|
||||||
void _updateAllTargets(bool instant = false);
|
void _updateAllTargets(bool instant = false);
|
||||||
void _loadCover(int i, int item);
|
void _loadCover(int i, int item);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user