mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-23 19:59:16 +01:00
-added basic emulator support into a new coverflow view, "EMULATOR", you can disable it via wiiflow.ini see
"http://gbatemp.net/topic/204106-wiiflow-an-open-source-gui-usb-loader/page__view__findpost__p__4176145" for the nes, snes and gb,gbc and gba emulator mod needed for it. The games are read from the default path of the emulators, that would be "fceugx/roms" for nes for example. To display the games, place the emulator dol from the link above into wiiflow/plugins. -using miigotus way for homebrew and emulator coverflow now, thanks for that, makes things shorter
This commit is contained in:
parent
c97818c8aa
commit
3092a1aa2a
BIN
data/images/btnemu.png
Normal file
BIN
data/images/btnemu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
BIN
data/images/btnemus.png
Normal file
BIN
data/images/btnemus.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
BIN
data/images/checkbox.png
Normal file
BIN
data/images/checkbox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
BIN
data/images/checkboxs.png
Normal file
BIN
data/images/checkboxs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
@ -112,7 +112,18 @@ u32 fsop_GetFreeSpaceKb (char *path) // Return free kb on the device passed
|
||||
return ret ;
|
||||
}
|
||||
|
||||
|
||||
bool fsop_FileExist(const char *fn)
|
||||
{
|
||||
FILE * f;
|
||||
f = fopen(fn, "rb");
|
||||
if (f)
|
||||
{
|
||||
fclose(f);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool fsop_DirExist (char *path)
|
||||
{
|
||||
DIR *dir;
|
||||
|
@ -12,6 +12,7 @@ bool fsop_GetFileSizeBytes (char *path, size_t *filesize);
|
||||
u64 fsop_GetFolderBytes (char *source);
|
||||
u32 fsop_GetFolderKb (char *source);
|
||||
u32 fsop_GetFreeSpaceKb (char *path);
|
||||
bool fsop_FileExist(const char *fn);
|
||||
bool fsop_DirExist (char *path);
|
||||
bool fsop_CopyFile (char *source, char *target, progress_callback_t spinner, void *spinner_data);
|
||||
bool fsop_CopyFolder (char *source, char *target, progress_callback_t spinner, void *spinner_data);
|
||||
|
@ -1,186 +0,0 @@
|
||||
#include "boxmesh_hb.hpp"
|
||||
|
||||
// Quick and dirty hardcoded DVD box mesh
|
||||
|
||||
static const guVector g_coverBL_HB = { -0.65f, -0.315f, 0.f };
|
||||
static const guVector g_coverTR_HB = { 0.65f, 0.315f, 0.f };
|
||||
static const float g_boxCoverY_HB = 0.1f;
|
||||
static const float g_boxBorderWidth_HB = 0.025f;
|
||||
static const guVector g_frontCoverBL_HB = { g_coverBL_HB.x, g_coverBL_HB.y + g_boxCoverY_HB, g_coverBL_HB.z };
|
||||
static const guVector g_frontCoverTR_HB = { g_coverTR_HB.x, g_coverTR_HB.y + g_boxCoverY_HB, g_coverTR_HB.z };
|
||||
static const guVector g_backCoverBL_HB = { g_frontCoverBL_HB.x, g_frontCoverBL_HB.y, g_frontCoverBL_HB.z - 0.16f };
|
||||
static const guVector g_backCoverTR_HB = { g_frontCoverTR_HB.x, g_frontCoverTR_HB.y, g_frontCoverTR_HB.z - 0.16f };
|
||||
const float g_boxCoverY_HBCenter_HB = (g_frontCoverTR_HB.y - g_frontCoverBL_HB.y) * 0.5f;
|
||||
const float g_coverYCenter_HB = (g_coverTR_HB.y - g_coverBL_HB.y) * 0.5f;
|
||||
const Vector3D g_boxSize_HB(
|
||||
g_coverTR_HB.x - g_coverBL_HB.x + 2 * g_boxBorderWidth_HB,
|
||||
g_coverTR_HB.y - g_coverBL_HB.y + 2 * g_boxBorderWidth_HB,
|
||||
g_coverTR_HB.z - g_coverBL_HB.z + 2 * g_boxBorderWidth_HB);
|
||||
|
||||
#define w(x) ((float)x / 64.0f)
|
||||
#define h(y) ((float)y / 256.0f)
|
||||
|
||||
|
||||
const SMeshVert g_boxMeshQ_HB[] = { // Quads
|
||||
// Bordure du bas devant
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverBL_HB.y, g_frontCoverBL_HB.z }, CTexCoord(w(0), h(256)) },
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverBL_HB.y - g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(256)) },
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverBL_HB.y - g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(224)) },
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverBL_HB.y, g_frontCoverBL_HB.z }, CTexCoord(w(0), h(224)) },
|
||||
|
||||
// Bordure du haut devant
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverTR_HB.y + g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(0)) },
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverTR_HB.y, g_frontCoverBL_HB.z }, CTexCoord(w(0), h(0)) },
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverTR_HB.y, g_frontCoverBL_HB.z }, CTexCoord(w(0), h(32)) },
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverTR_HB.y + g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(32)) },
|
||||
|
||||
// Bordure du bas derrière
|
||||
{ { g_backCoverBL_HB.x, g_backCoverBL_HB.y - g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(256)) },
|
||||
{ { g_backCoverBL_HB.x, g_backCoverBL_HB.y, g_backCoverBL_HB.z }, CTexCoord(w(64), h(256)) },
|
||||
{ { g_backCoverTR_HB.x, g_backCoverBL_HB.y, g_backCoverBL_HB.z }, CTexCoord(w(64), h(224)) },
|
||||
{ { g_backCoverTR_HB.x, g_backCoverBL_HB.y - g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(224)) },
|
||||
|
||||
// Bordure du haut derrière
|
||||
{ { g_backCoverBL_HB.x, g_backCoverTR_HB.y, g_backCoverBL_HB.z }, CTexCoord(w(64), h(0)) },
|
||||
{ { g_backCoverBL_HB.x, g_backCoverTR_HB.y + g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(0)) },
|
||||
{ { g_backCoverTR_HB.x, g_backCoverTR_HB.y + g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(32)) },
|
||||
{ { g_backCoverTR_HB.x, g_backCoverTR_HB.y, g_backCoverBL_HB.z }, CTexCoord(w(64), h(32)) },
|
||||
|
||||
// Bordure de droite devant
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverBL_HB.y, g_frontCoverBL_HB.z }, CTexCoord(w(0), h(256)) },
|
||||
{ { g_frontCoverTR_HB.x + g_boxBorderWidth_HB, g_frontCoverBL_HB.y, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(256)) },
|
||||
{ { g_frontCoverTR_HB.x + g_boxBorderWidth_HB, g_frontCoverTR_HB.y, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(0)) },
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverTR_HB.y, g_frontCoverBL_HB.z }, CTexCoord(w(0), h(0)) },
|
||||
|
||||
// Bordure de droite derrière
|
||||
{ { g_backCoverTR_HB.x + g_boxBorderWidth_HB, g_backCoverBL_HB.y, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(256)) },
|
||||
{ { g_backCoverTR_HB.x, g_backCoverBL_HB.y, g_backCoverBL_HB.z }, CTexCoord(w(64), h(256)) },
|
||||
{ { g_backCoverTR_HB.x, g_backCoverTR_HB.y, g_backCoverBL_HB.z }, CTexCoord(w(64), h(0)) },
|
||||
{ { g_backCoverTR_HB.x + g_boxBorderWidth_HB, g_backCoverTR_HB.y, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(0)) },
|
||||
|
||||
// Face du haut
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverTR_HB.y + g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(0)) },
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverTR_HB.y + g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(32)) },
|
||||
{ { g_backCoverTR_HB.x, g_backCoverTR_HB.y + g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(32)) },
|
||||
{ { g_backCoverBL_HB.x, g_backCoverTR_HB.y + g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(0)) },
|
||||
|
||||
// Angle face du haut / face de droite
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverTR_HB.y + g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(32)) },
|
||||
{ { g_frontCoverTR_HB.x + g_boxBorderWidth_HB, g_frontCoverTR_HB.y, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(0)) },
|
||||
{ { g_backCoverTR_HB.x + g_boxBorderWidth_HB, g_backCoverTR_HB.y, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(0)) },
|
||||
{ { g_backCoverTR_HB.x, g_backCoverTR_HB.y + g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(32)) },
|
||||
|
||||
// Face de droite
|
||||
{ { g_frontCoverTR_HB.x + g_boxBorderWidth_HB, g_frontCoverTR_HB.y, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(0)) },
|
||||
{ { g_frontCoverTR_HB.x + g_boxBorderWidth_HB, g_frontCoverBL_HB.y, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(256)) },
|
||||
{ { g_backCoverTR_HB.x + g_boxBorderWidth_HB, g_backCoverBL_HB.y, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(256)) },
|
||||
{ { g_backCoverTR_HB.x + g_boxBorderWidth_HB, g_backCoverTR_HB.y, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(0)) },
|
||||
|
||||
// Angle face de droite / face du bas
|
||||
{ { g_frontCoverTR_HB.x + g_boxBorderWidth_HB, g_frontCoverBL_HB.y, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(256)) },
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverBL_HB.y - g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(224)) },
|
||||
{ { g_backCoverTR_HB.x, g_backCoverBL_HB.y - g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(224)) },
|
||||
{ { g_backCoverTR_HB.x + g_boxBorderWidth_HB, g_backCoverBL_HB.y, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(256)) },
|
||||
|
||||
// Face du bas
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverBL_HB.y - g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(224)) },
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverBL_HB.y - g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(256)) },
|
||||
{ { g_backCoverBL_HB.x, g_backCoverBL_HB.y - g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(256)) },
|
||||
{ { g_backCoverTR_HB.x, g_backCoverBL_HB.y - g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(224)) },
|
||||
|
||||
// Face de gauche en haut
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverTR_HB.y, g_frontCoverBL_HB.z }, CTexCoord(w(0), h(0)) },
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverTR_HB.y + g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(0), h(0)) },
|
||||
{ { g_backCoverBL_HB.x, g_backCoverTR_HB.y + g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(0), h(0)) },
|
||||
{ { g_backCoverBL_HB.x, g_backCoverTR_HB.y, g_backCoverBL_HB.z}, CTexCoord(w(0), h(0)) },
|
||||
|
||||
// Face de gauche en bas
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverBL_HB.y - g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(0), h(0)) },
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverBL_HB.y, g_frontCoverBL_HB.z }, CTexCoord(w(0), h(0)) },
|
||||
{ { g_backCoverBL_HB.x, g_backCoverBL_HB.y, g_backCoverBL_HB.z }, CTexCoord(w(0), h(0)) },
|
||||
{ { g_backCoverBL_HB.x, g_backCoverBL_HB.y - g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(0), h(0)) }
|
||||
};
|
||||
|
||||
const SMeshVert g_boxMeshT_HB[] = { // Triangles
|
||||
// Haut devant
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverTR_HB.y, g_frontCoverBL_HB.z }, CTexCoord(w(0), h(16)) },
|
||||
{ { g_frontCoverTR_HB.x + g_boxBorderWidth_HB, g_frontCoverTR_HB.y, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(0)) },
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverTR_HB.y + g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(32)) },
|
||||
|
||||
// Haut derrière
|
||||
{ { g_backCoverTR_HB.x, g_backCoverTR_HB.y, g_backCoverBL_HB.z }, CTexCoord(w(64), h(16)) },
|
||||
{ { g_backCoverTR_HB.x, g_backCoverTR_HB.y + g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(32)) },
|
||||
{ { g_backCoverTR_HB.x + g_boxBorderWidth_HB, g_backCoverTR_HB.y, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(0)) },
|
||||
|
||||
// Bas devant
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverBL_HB.y, g_frontCoverBL_HB.z }, CTexCoord(w(0), h(240)) },
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverBL_HB.y - g_boxBorderWidth_HB, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(224)) },
|
||||
{ { g_frontCoverTR_HB.x + g_boxBorderWidth_HB, g_frontCoverBL_HB.y, g_frontCoverBL_HB.z - g_boxBorderWidth_HB }, CTexCoord(w(10), h(256)) },
|
||||
|
||||
// Bas derrière
|
||||
{ { g_backCoverTR_HB.x, g_backCoverBL_HB.y, g_backCoverBL_HB.z }, CTexCoord(w(64), h(240)) },
|
||||
{ { g_backCoverTR_HB.x + g_boxBorderWidth_HB, g_backCoverBL_HB.y, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(256)) },
|
||||
{ { g_backCoverTR_HB.x, g_backCoverBL_HB.y - g_boxBorderWidth_HB, g_backCoverBL_HB.z + g_boxBorderWidth_HB }, CTexCoord(w(54), h(224)) }
|
||||
};
|
||||
|
||||
#undef h
|
||||
#undef w
|
||||
|
||||
const SMeshVert g_flatCoverMesh_HB[] = {
|
||||
{ { g_coverBL_HB.x, g_coverBL_HB.y, g_coverBL_HB.z }, CTexCoord(0.f, 1.f) },
|
||||
{ { g_coverTR_HB.x, g_coverBL_HB.y, g_coverBL_HB.z }, CTexCoord(1.f, 1.f) },
|
||||
{ { g_coverTR_HB.x, g_coverTR_HB.y, g_coverBL_HB.z }, CTexCoord(1.f, 0.f) },
|
||||
{ { g_coverBL_HB.x, g_coverTR_HB.y, g_coverBL_HB.z }, CTexCoord(0.f, 0.f) }
|
||||
};
|
||||
|
||||
const CTexCoord g_flatCoverBoxTex_HB[sizeof g_flatCoverMesh_HB / sizeof g_flatCoverMesh_HB[0]] = {
|
||||
CTexCoord(1.46f / 2.76f, 1.f),
|
||||
CTexCoord(1.f, 1.f),
|
||||
CTexCoord(1.f, 0.f),
|
||||
CTexCoord(1.46f / 2.76f, 0.f)
|
||||
};
|
||||
|
||||
const SMeshVert g_boxBackCoverMesh_HB[] = {
|
||||
{ { g_backCoverTR_HB.x, g_backCoverBL_HB.y, g_backCoverBL_HB.z }, CTexCoord(0.f, 1.f) },
|
||||
{ { g_backCoverBL_HB.x, g_backCoverBL_HB.y, g_backCoverBL_HB.z }, CTexCoord(1.3f / 2.76f, 1.f) },
|
||||
{ { g_backCoverBL_HB.x, g_backCoverTR_HB.y, g_backCoverBL_HB.z }, CTexCoord(1.3f / 2.76f, 0.f) },
|
||||
{ { g_backCoverTR_HB.x, g_backCoverTR_HB.y, g_backCoverBL_HB.z }, CTexCoord(0.f, 0.f) },
|
||||
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverBL_HB.y, g_frontCoverBL_HB.z }, CTexCoord(1.46f / 2.76f, 1.f) },
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverTR_HB.y, g_frontCoverBL_HB.z }, CTexCoord(1.46f / 2.76f, 0.f) },
|
||||
{ { g_backCoverBL_HB.x, g_backCoverTR_HB.y, g_backCoverBL_HB.z }, CTexCoord(1.3f / 2.76f, 0.f) },
|
||||
{ { g_backCoverBL_HB.x, g_backCoverBL_HB.y, g_backCoverBL_HB.z }, CTexCoord(1.3f / 2.76f, 1.f) },
|
||||
};
|
||||
|
||||
const SMeshVert g_boxCoverMesh_HB[] = {
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverBL_HB.y, g_frontCoverBL_HB.z }, CTexCoord(1.46f / 2.76f, 1.f) },
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverBL_HB.y, g_frontCoverBL_HB.z }, CTexCoord(1.f, 1.f) },
|
||||
{ { g_frontCoverTR_HB.x, g_frontCoverTR_HB.y, g_frontCoverBL_HB.z }, CTexCoord(1.f, 0.f) },
|
||||
{ { g_frontCoverBL_HB.x, g_frontCoverTR_HB.y, g_frontCoverBL_HB.z }, CTexCoord(1.46f / 2.76f, 0.f) }
|
||||
};
|
||||
|
||||
const CTexCoord g_boxCoverFlatTex_HB[sizeof g_boxCoverMesh_HB / sizeof g_boxCoverMesh_HB[0]] = {
|
||||
CTexCoord(0.f, 1.f),
|
||||
CTexCoord(1.f, 1.f),
|
||||
CTexCoord(1.f, 0.f),
|
||||
CTexCoord(0.f, 0.f)
|
||||
};
|
||||
|
||||
const CTexCoord g_boxCoverBackTex_HB[sizeof g_boxBackCoverMesh_HB / sizeof g_boxBackCoverMesh_HB[0]] =
|
||||
{
|
||||
CTexCoord(0.f, 1.f),
|
||||
CTexCoord(1.3f / 1.46f, 1.f),
|
||||
CTexCoord(1.3f / 1.46f, 0.f),
|
||||
CTexCoord(0.f, 0.f),
|
||||
|
||||
CTexCoord(1.f, 1.f),
|
||||
CTexCoord(1.f, 0.f),
|
||||
CTexCoord(1.3f / 1.46f, 0.f),
|
||||
CTexCoord(1.3f / 1.46f, 1.f)
|
||||
};
|
||||
|
||||
const u32 g_flatCoverMesh_HBSize = sizeof g_flatCoverMesh_HB / sizeof g_flatCoverMesh_HB[0];
|
||||
const u32 g_boxMeshQ_HBSize = sizeof g_boxMeshQ_HB / sizeof g_boxMeshQ_HB[0];
|
||||
const u32 g_boxMeshT_HBSize = sizeof g_boxMeshT_HB / sizeof g_boxMeshT_HB[0];
|
||||
const u32 g_boxCoverMesh_HBSize = sizeof g_boxCoverMesh_HB / sizeof g_boxCoverMesh_HB[0];
|
||||
const u32 g_boxBackCoverMesh_HBSize = sizeof g_boxBackCoverMesh_HB / sizeof g_boxBackCoverMesh_HB[0];
|
@ -1,36 +0,0 @@
|
||||
|
||||
#ifndef __BOXMESH_HB_HPP
|
||||
#define __BOXMESH_HB_HPP
|
||||
|
||||
#include "video.hpp"
|
||||
#include "boxmesh.hpp"
|
||||
|
||||
// Quick and dirty hardcoded DVD box mesh
|
||||
// Should be replaced by a true mesh loader
|
||||
// Lacks normals
|
||||
|
||||
// Flat cover
|
||||
extern const SMeshVert g_flatCoverMesh_HB[];
|
||||
extern const u32 g_flatCoverMesh_HBSize;
|
||||
extern const CTexCoord g_flatCoverBoxTex_HB[];
|
||||
|
||||
// Box
|
||||
extern const SMeshVert g_boxMeshQ_HB[]; // Quads
|
||||
extern const u32 g_boxMeshQ_HBSize;
|
||||
extern const SMeshVert g_boxMeshT_HB[]; // Triangles
|
||||
extern const u32 g_boxMeshT_HBSize;
|
||||
// Box cover
|
||||
extern const SMeshVert g_boxBackCoverMesh_HB[];
|
||||
extern const u32 g_boxBackCoverMesh_HBSize;
|
||||
extern const SMeshVert g_boxCoverMesh_HB[];
|
||||
extern const u32 g_boxCoverMesh_HBSize;
|
||||
extern const CTexCoord g_boxCoverFlatTex_HB[];
|
||||
extern const CTexCoord g_boxCoverBackTex_HB[];
|
||||
//
|
||||
extern const float g_boxCoverYCenter_HB;
|
||||
extern const float g_coverYCenter_HB;
|
||||
|
||||
// Bounding box size
|
||||
extern const Vector3D g_boxSize_HB;
|
||||
|
||||
#endif // !defined(__BOXMESH_HB_HPP)
|
@ -13,7 +13,6 @@
|
||||
#include "coverflow.hpp"
|
||||
#include "pngu.h"
|
||||
#include "boxmesh.hpp"
|
||||
#include "boxmesh_hb.hpp"
|
||||
#include "wstringEx.hpp"
|
||||
#include "lockMutex.hpp"
|
||||
#include "fonts.h"
|
||||
@ -1277,38 +1276,20 @@ void CCoverFlow::_drawCoverFlat(int i, bool mirror, CCoverFlow::DrawMode dm)
|
||||
GX_InitTexObjLOD(&texObj, GX_LIN_MIP_LIN, GX_LINEAR, 0.f, (float)tex.maxLOD, mirror ? 1.f : m_lodBias, GX_FALSE, m_edgeLOD ? GX_TRUE : GX_FALSE, m_aniso);
|
||||
GX_LoadTexObj(&texObj, GX_TEXMAP0);
|
||||
}
|
||||
if(strstr(m_items[m_covers[i].index].picPath.c_str(),"/apps") == NULL && strstr(m_items[m_covers[i].index].boxPicPath.c_str(),"/apps") == NULL)
|
||||
|
||||
GX_Begin(GX_QUADS, GX_VTXFMT0, g_flatCoverMeshSize);
|
||||
for (u32 j = 0; j < g_flatCoverMeshSize; ++j)
|
||||
{
|
||||
GX_Begin(GX_QUADS, GX_VTXFMT0, g_flatCoverMeshSize);
|
||||
for (u32 j = 0; j < g_flatCoverMeshSize; ++j)
|
||||
GX_Position3f32(g_flatCoverMesh[j].pos.x, g_flatCoverMesh[j].pos.y, g_flatCoverMesh[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
{
|
||||
GX_Position3f32(g_flatCoverMesh[j].pos.x, g_flatCoverMesh[j].pos.y, g_flatCoverMesh[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
{
|
||||
if (boxTex)
|
||||
GX_TexCoord2f32(g_flatCoverBoxTex[j].x, g_flatCoverBoxTex[j].y);
|
||||
else
|
||||
GX_TexCoord2f32(g_flatCoverMesh[j].texCoord.x, g_flatCoverMesh[j].texCoord.y);
|
||||
}
|
||||
if (boxTex)
|
||||
GX_TexCoord2f32(g_flatCoverBoxTex[j].x, g_flatCoverBoxTex[j].y);
|
||||
else
|
||||
GX_TexCoord2f32(g_flatCoverMesh[j].texCoord.x, g_flatCoverMesh[j].texCoord.y);
|
||||
}
|
||||
GX_End();
|
||||
}
|
||||
else
|
||||
{
|
||||
GX_Begin(GX_QUADS, GX_VTXFMT0, g_flatCoverMesh_HBSize);
|
||||
for (u32 j = 0; j < g_flatCoverMesh_HBSize; ++j)
|
||||
{
|
||||
GX_Position3f32(g_flatCoverMesh_HB[j].pos.x, g_flatCoverMesh_HB[j].pos.y, g_flatCoverMesh_HB[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
{
|
||||
if (boxTex)
|
||||
GX_TexCoord2f32(g_flatCoverBoxTex_HB[j].x, g_flatCoverBoxTex_HB[j].y);
|
||||
else
|
||||
GX_TexCoord2f32(g_flatCoverMesh_HB[j].texCoord.x, g_flatCoverMesh_HB[j].texCoord.y);
|
||||
}
|
||||
}
|
||||
GX_End();
|
||||
}
|
||||
GX_End();
|
||||
}
|
||||
|
||||
bool CCoverFlow::_checkCoverColor(char* gameID, const char* checkID[], int len)
|
||||
@ -1395,120 +1376,61 @@ void CCoverFlow::_drawCoverBox(int i, bool mirror, CCoverFlow::DrawMode dm)
|
||||
}
|
||||
GX_LoadTexObj(&texObj, GX_TEXMAP0);
|
||||
}
|
||||
if(strstr(m_items[m_covers[i].index].picPath.c_str(),"/apps") == NULL && strstr(m_items[m_covers[i].index].boxPicPath.c_str(),"/apps") == NULL)
|
||||
|
||||
GX_Begin(GX_QUADS, GX_VTXFMT0, g_boxMeshQSize);
|
||||
for (u32 j = 0; j < g_boxMeshQSize; ++j)
|
||||
{
|
||||
GX_Begin(GX_QUADS, GX_VTXFMT0, g_boxMeshQSize);
|
||||
for (u32 j = 0; j < g_boxMeshQSize; ++j)
|
||||
{
|
||||
GX_Position3f32(g_boxMeshQ[j].pos.x, g_boxMeshQ[j].pos.y, g_boxMeshQ[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
GX_TexCoord2f32(g_boxMeshQ[j].texCoord.x, g_boxMeshQ[j].texCoord.y);
|
||||
}
|
||||
GX_End();
|
||||
GX_Begin(GX_TRIANGLES, GX_VTXFMT0, g_boxMeshTSize);
|
||||
for (u32 j = 0; j < g_boxMeshTSize; ++j)
|
||||
{
|
||||
GX_Position3f32(g_boxMeshT[j].pos.x, g_boxMeshT[j].pos.y, g_boxMeshT[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
GX_TexCoord2f32(g_boxMeshT[j].texCoord.x, g_boxMeshT[j].texCoord.y);
|
||||
}
|
||||
GX_End();
|
||||
GX_Position3f32(g_boxMeshQ[j].pos.x, g_boxMeshQ[j].pos.y, g_boxMeshQ[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
GX_TexCoord2f32(g_boxMeshQ[j].texCoord.x, g_boxMeshQ[j].texCoord.y);
|
||||
}
|
||||
GX_End();
|
||||
GX_Begin(GX_TRIANGLES, GX_VTXFMT0, g_boxMeshTSize);
|
||||
for (u32 j = 0; j < g_boxMeshTSize; ++j)
|
||||
{
|
||||
GX_Position3f32(g_boxMeshT[j].pos.x, g_boxMeshT[j].pos.y, g_boxMeshT[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
GX_TexCoord2f32(g_boxMeshT[j].texCoord.x, g_boxMeshT[j].texCoord.y);
|
||||
}
|
||||
GX_End();
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
{
|
||||
STexture *myTex = &tex;
|
||||
if (flatTex)
|
||||
myTex = &m_noCoverTexture;
|
||||
GX_InitTexObj(&texObj, myTex->data.get(), myTex->width, myTex->height, myTex->format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
if (myTex->maxLOD > 0)
|
||||
GX_InitTexObjLOD(&texObj, GX_LIN_MIP_LIN, GX_LINEAR, 0.f, (float)myTex->maxLOD, mirror ? 1.f : m_lodBias, GX_FALSE, m_edgeLOD ? GX_TRUE : GX_FALSE, m_aniso);
|
||||
GX_LoadTexObj(&texObj, GX_TEXMAP0);
|
||||
}
|
||||
GX_Begin(GX_QUADS, GX_VTXFMT0, g_boxBackCoverMeshSize);
|
||||
for (u32 j = 0; j < g_boxBackCoverMeshSize; ++j)
|
||||
{
|
||||
GX_Position3f32(g_boxBackCoverMesh[j].pos.x, g_boxBackCoverMesh[j].pos.y, g_boxBackCoverMesh[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
GX_TexCoord2f32(g_boxBackCoverMesh[j].texCoord.x, g_boxBackCoverMesh[j].texCoord.y);
|
||||
}
|
||||
GX_End();
|
||||
if (dm == CCoverFlow::CFDR_NORMAL && flatTex)
|
||||
{
|
||||
GX_InitTexObj(&texObj, tex.data.get(), tex.width, tex.height, tex.format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
if (tex.maxLOD > 0)
|
||||
GX_InitTexObjLOD(&texObj, GX_LIN_MIP_LIN, GX_LINEAR, 0.f, (float)tex.maxLOD, mirror ? 1.f : m_lodBias, GX_FALSE, m_edgeLOD ? GX_TRUE : GX_FALSE, m_aniso);
|
||||
GX_LoadTexObj(&texObj, GX_TEXMAP0);
|
||||
}
|
||||
GX_Begin(GX_QUADS, GX_VTXFMT0, g_boxCoverMeshSize);
|
||||
for (u32 j = 0; j < g_boxCoverMeshSize; ++j)
|
||||
{
|
||||
GX_Position3f32(g_boxCoverMesh[j].pos.x, g_boxCoverMesh[j].pos.y, g_boxCoverMesh[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
{
|
||||
STexture *myTex = &tex;
|
||||
if (flatTex)
|
||||
myTex = &m_noCoverTexture;
|
||||
GX_InitTexObj(&texObj, myTex->data.get(), myTex->width, myTex->height, myTex->format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
if (myTex->maxLOD > 0)
|
||||
GX_InitTexObjLOD(&texObj, GX_LIN_MIP_LIN, GX_LINEAR, 0.f, (float)myTex->maxLOD, mirror ? 1.f : m_lodBias, GX_FALSE, m_edgeLOD ? GX_TRUE : GX_FALSE, m_aniso);
|
||||
GX_LoadTexObj(&texObj, GX_TEXMAP0);
|
||||
GX_TexCoord2f32(g_boxCoverFlatTex[j].x, g_boxCoverFlatTex[j].y);
|
||||
else
|
||||
GX_TexCoord2f32(g_boxCoverMesh[j].texCoord.x, g_boxCoverMesh[j].texCoord.y);
|
||||
}
|
||||
GX_Begin(GX_QUADS, GX_VTXFMT0, g_boxBackCoverMeshSize);
|
||||
for (u32 j = 0; j < g_boxBackCoverMeshSize; ++j)
|
||||
{
|
||||
GX_Position3f32(g_boxBackCoverMesh[j].pos.x, g_boxBackCoverMesh[j].pos.y, g_boxBackCoverMesh[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
GX_TexCoord2f32(g_boxBackCoverMesh[j].texCoord.x, g_boxBackCoverMesh[j].texCoord.y);
|
||||
}
|
||||
GX_End();
|
||||
if (dm == CCoverFlow::CFDR_NORMAL && flatTex)
|
||||
{
|
||||
GX_InitTexObj(&texObj, tex.data.get(), tex.width, tex.height, tex.format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
if (tex.maxLOD > 0)
|
||||
GX_InitTexObjLOD(&texObj, GX_LIN_MIP_LIN, GX_LINEAR, 0.f, (float)tex.maxLOD, mirror ? 1.f : m_lodBias, GX_FALSE, m_edgeLOD ? GX_TRUE : GX_FALSE, m_aniso);
|
||||
GX_LoadTexObj(&texObj, GX_TEXMAP0);
|
||||
}
|
||||
GX_Begin(GX_QUADS, GX_VTXFMT0, g_boxCoverMeshSize);
|
||||
for (u32 j = 0; j < g_boxCoverMeshSize; ++j)
|
||||
{
|
||||
GX_Position3f32(g_boxCoverMesh[j].pos.x, g_boxCoverMesh[j].pos.y, g_boxCoverMesh[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
{
|
||||
if (flatTex)
|
||||
GX_TexCoord2f32(g_boxCoverFlatTex[j].x, g_boxCoverFlatTex[j].y);
|
||||
else
|
||||
GX_TexCoord2f32(g_boxCoverMesh[j].texCoord.x, g_boxCoverMesh[j].texCoord.y);
|
||||
}
|
||||
}
|
||||
GX_End();
|
||||
}
|
||||
else
|
||||
{
|
||||
GX_Begin(GX_QUADS, GX_VTXFMT0, g_boxMeshQ_HBSize);
|
||||
for (u32 j = 0; j < g_boxMeshQ_HBSize; ++j)
|
||||
{
|
||||
GX_Position3f32(g_boxMeshQ_HB[j].pos.x, g_boxMeshQ_HB[j].pos.y, g_boxMeshQ_HB[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
GX_TexCoord2f32(g_boxMeshQ_HB[j].texCoord.x, g_boxMeshQ_HB[j].texCoord.y);
|
||||
}
|
||||
GX_End();
|
||||
GX_Begin(GX_TRIANGLES, GX_VTXFMT0, g_boxMeshT_HBSize);
|
||||
for (u32 j = 0; j < g_boxMeshT_HBSize; ++j)
|
||||
{
|
||||
GX_Position3f32(g_boxMeshT_HB[j].pos.x, g_boxMeshT_HB[j].pos.y, g_boxMeshT_HB[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
GX_TexCoord2f32(g_boxMeshT_HB[j].texCoord.x, g_boxMeshT_HB[j].texCoord.y);
|
||||
}
|
||||
GX_End();
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
{
|
||||
STexture *myTex = &tex;
|
||||
if (flatTex)
|
||||
myTex = &m_noCoverTexture;
|
||||
GX_InitTexObj(&texObj, myTex->data.get(), myTex->width, myTex->height, myTex->format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
if (myTex->maxLOD > 0)
|
||||
GX_InitTexObjLOD(&texObj, GX_LIN_MIP_LIN, GX_LINEAR, 0.f, (float)myTex->maxLOD, mirror ? 1.f : m_lodBias, GX_FALSE, m_edgeLOD ? GX_TRUE : GX_FALSE, m_aniso);
|
||||
GX_LoadTexObj(&texObj, GX_TEXMAP0);
|
||||
}
|
||||
GX_Begin(GX_QUADS, GX_VTXFMT0, g_boxBackCoverMesh_HBSize);
|
||||
for (u32 j = 0; j < g_boxBackCoverMesh_HBSize; ++j)
|
||||
{
|
||||
GX_Position3f32(g_boxBackCoverMesh_HB[j].pos.x, g_boxBackCoverMesh_HB[j].pos.y, g_boxBackCoverMesh_HB[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
GX_TexCoord2f32(g_boxBackCoverMesh_HB[j].texCoord.x, g_boxBackCoverMesh_HB[j].texCoord.y);
|
||||
}
|
||||
GX_End();
|
||||
if (dm == CCoverFlow::CFDR_NORMAL && flatTex)
|
||||
{
|
||||
GX_InitTexObj(&texObj, tex.data.get(), tex.width, tex.height, tex.format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
if (tex.maxLOD > 0)
|
||||
GX_InitTexObjLOD(&texObj, GX_LIN_MIP_LIN, GX_LINEAR, 0.f, (float)tex.maxLOD, mirror ? 1.f : m_lodBias, GX_FALSE, m_edgeLOD ? GX_TRUE : GX_FALSE, m_aniso);
|
||||
GX_LoadTexObj(&texObj, GX_TEXMAP0);
|
||||
}
|
||||
GX_Begin(GX_QUADS, GX_VTXFMT0, g_boxCoverMesh_HBSize);
|
||||
for (u32 j = 0; j < g_boxCoverMeshSize; ++j)
|
||||
{
|
||||
GX_Position3f32(g_boxCoverMesh_HB[j].pos.x, g_boxCoverMesh_HB[j].pos.y, g_boxCoverMesh_HB[j].pos.z);
|
||||
if (dm == CCoverFlow::CFDR_NORMAL)
|
||||
{
|
||||
if (flatTex)
|
||||
GX_TexCoord2f32(g_boxCoverFlatTex_HB[j].x, g_boxCoverFlatTex_HB[j].y);
|
||||
else
|
||||
GX_TexCoord2f32(g_boxCoverMesh_HB[j].texCoord.x, g_boxCoverMesh_HB[j].texCoord.y);
|
||||
}
|
||||
}
|
||||
GX_End();
|
||||
}
|
||||
GX_End();
|
||||
}
|
||||
|
||||
void CCoverFlow::_loadCover(int i, int item)
|
||||
@ -2075,6 +1997,8 @@ bool CCoverFlow::findId(const char *id, bool instant)
|
||||
for (i = 0; i < m_items.size(); ++i)
|
||||
if (memcmp(&m_items[i].hdr->hdr.id, id, strlen(id)) == 0)
|
||||
break;
|
||||
else if (strlen(id) > 6 && memcmp(&m_items[i].hdr->path[std::string(m_items[i].hdr->path).find_last_of("/")], id, strlen(id)) == 0)
|
||||
break;
|
||||
if (i >= m_items.size())
|
||||
return false;
|
||||
m_jump = 0;
|
||||
@ -2611,7 +2535,7 @@ bool CCoverFlow::_loadCoverTexPNG(u32 i, bool box, bool hq)
|
||||
SmartBuf zBuffer = m_compressCache ? smartMem2Alloc(zBufferSize) : tex.data;
|
||||
if (!!zBuffer && (!m_compressCache || compress(zBuffer.get(), &zBufferSize, tex.data.get(), bufSize) == Z_OK))
|
||||
{
|
||||
FILE *file = fopen(sfmt("%s/%s.wfc", m_cachePath.c_str(), m_items[i].hdr->hdr.id).c_str(), "wb");
|
||||
FILE *file = fopen(sfmt("%s/%s.wfc", m_cachePath.c_str(), (m_items[i].hdr->hdr.gc_magic == 0x4c4f4c4f ? &m_items[i].hdr->path[std::string(m_items[i].hdr->path).find_last_of("/")] : (char*)m_items[i].hdr->hdr.id)).c_str(), "wb");
|
||||
if (file != 0)
|
||||
{
|
||||
SWFCHeader header(tex, box, m_compressCache);
|
||||
@ -2670,14 +2594,15 @@ void CCoverFlow::_dropHQLOD(int i)
|
||||
|
||||
CCoverFlow::CLRet CCoverFlow::_loadCoverTex(u32 i, bool box, bool hq)
|
||||
{
|
||||
if (!m_loadingCovers) return CL_ERROR;
|
||||
if (!m_loadingCovers)
|
||||
return CL_ERROR;
|
||||
|
||||
bool allocFailed = false;
|
||||
|
||||
// Try to find the texture in the cache
|
||||
if (!m_cachePath.empty())
|
||||
{
|
||||
FILE *file = fopen(sfmt("%s/%s.wfc", m_cachePath.c_str(), m_items[i].hdr->hdr.id).c_str(), "rb");
|
||||
FILE *file = fopen(sfmt("%s/%s.wfc", m_cachePath.c_str(), (m_items[i].hdr->hdr.gc_magic == 0x4c4f4c4f ? &m_items[i].hdr->path[std::string(m_items[i].hdr->path).find_last_of("/")] : (char*)m_items[i].hdr->hdr.id)).c_str(), "rb");
|
||||
if (file != 0)
|
||||
{
|
||||
bool success = false;
|
||||
|
@ -13,10 +13,13 @@ void CachedList<T>::Load(string path, string containing, string m_lastLanguage)
|
||||
bool update_games = false;
|
||||
bool update_homebrew = false;
|
||||
bool update_dml = false;
|
||||
bool update_emu = strcasestr(containing.c_str(), ".zip") != NULL;
|
||||
bool ditimes = false;
|
||||
bool music = typeid(T) == typeid(std::string);
|
||||
if(music)
|
||||
gprintf("Loading music list from path: %s\n",path.c_str());
|
||||
else if(update_emu)
|
||||
gprintf("Loading emulator gamelist from path: %s\n",path.c_str());
|
||||
else if(!m_wbfsFS)
|
||||
{
|
||||
gprintf("Database file: %s\n", m_database.c_str());
|
||||
@ -27,8 +30,8 @@ void CachedList<T>::Load(string path, string containing, string m_lastLanguage)
|
||||
const char* partition = DeviceName[DeviceHandler::Instance()->PathToDriveType(path.c_str())];
|
||||
update_dml = strcasestr(path.c_str(), sfmt(strncmp(partition, "sd", 2) != 0 ? m_DMLgameDir.c_str() : "%s:/games", partition).c_str()) != NULL && force_update[COVERFLOW_DML];
|
||||
|
||||
gprintf("update_games=%d update_homebrew=%d update_dml=%d\n", update_games, update_homebrew, update_dml);
|
||||
if(update_games || update_homebrew || update_dml)
|
||||
gprintf("update_games=%d update_homebrew=%d update_dml=%d, update_emu=%d\n", update_games, update_homebrew, update_dml, update_emu);
|
||||
if(update_games || update_homebrew || update_dml || update_emu)
|
||||
remove(m_database.c_str());
|
||||
|
||||
m_discinf = sfmt("%s/disc.info", path.c_str());
|
||||
@ -71,7 +74,7 @@ void CachedList<T>::Load(string path, string containing, string m_lastLanguage)
|
||||
if(update_homebrew) force_update[COVERFLOW_HOMEBREW] = false;
|
||||
if(update_dml) force_update[COVERFLOW_DML] = false;
|
||||
|
||||
if(m_update || m_wbfsFS || music)
|
||||
if(m_update || m_wbfsFS || music || update_emu)
|
||||
{
|
||||
gprintf("Calling list to update filelist\n");
|
||||
|
||||
@ -87,7 +90,7 @@ void CachedList<T>::Load(string path, string containing, string m_lastLanguage)
|
||||
m_loaded = true;
|
||||
m_update = false;
|
||||
|
||||
if(!music && pathlist.size() > 0)
|
||||
if(!music && !update_emu && pathlist.size() > 0)
|
||||
{
|
||||
Save();
|
||||
pathlist.clear();
|
||||
|
@ -10,9 +10,10 @@ using namespace std;
|
||||
|
||||
enum {
|
||||
COVERFLOW_USB,
|
||||
COVERFLOW_CHANNEL,
|
||||
COVERFLOW_HOMEBREW,
|
||||
COVERFLOW_DML,
|
||||
COVERFLOW_CHANNEL,
|
||||
COVERFLOW_EMU,
|
||||
COVERFLOW_HOMEBREW,
|
||||
COVERFLOW_MAX
|
||||
};
|
||||
|
||||
|
@ -341,17 +341,17 @@ void CList<dir_discHdr>::GetHeaders(safe_vector<string> pathlist, safe_vector<di
|
||||
count++;
|
||||
if(ret != 0)
|
||||
continue;
|
||||
|
||||
|
||||
GTitle = custom_titles.getString("TITLES", (const char *) tmp.hdr.id);
|
||||
int ccolor = custom_titles.getColor("COVERS", (const char *) tmp.hdr.id, 1).intVal();
|
||||
|
||||
|
||||
if(GTitle.size() > 0 || (gameTDB.IsLoaded() && gameTDB.GetTitle((char *)tmp.hdr.id, GTitle)))
|
||||
{
|
||||
mbstowcs(tmp.title, GTitle.c_str(), sizeof(tmp.title));
|
||||
tmp.hdr.casecolor = ccolor != 1 ? ccolor : gameTDB.GetCaseColor((char *)tmp.hdr.id);
|
||||
tmp.hdr.wifi = gameTDB.GetWifiPlayers((char *)tmp.hdr.id);
|
||||
tmp.hdr.players = gameTDB.GetPlayers((char *)tmp.hdr.id);
|
||||
|
||||
|
||||
//tmp.hdr.controllers = gameTDB.GetAccessories((char *)tmp.hdr.id);
|
||||
if (tmp.hdr.magic == 0x5D1C9EA3)
|
||||
{
|
||||
@ -370,6 +370,108 @@ void CList<dir_discHdr>::GetHeaders(safe_vector<string> pathlist, safe_vector<di
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else if(lowerCase(*itr).rfind(".nes") != string::npos || lowerCase(*itr).rfind(".fds") != string::npos
|
||||
|| lowerCase(*itr).rfind(".nsf") != string::npos || lowerCase(*itr).rfind(".unf") != string::npos
|
||||
|| lowerCase(*itr).rfind(".nez") != string::npos || lowerCase(*itr).rfind(".unif") != string::npos)
|
||||
{
|
||||
strncpy(tmp.path, (*itr).c_str(), sizeof(tmp.path));
|
||||
|
||||
(*itr).assign(&(*itr)[(*itr).find_last_of('/') + 1]);
|
||||
|
||||
char filename[64];
|
||||
strncpy(filename, (*itr).c_str(), sizeof(filename));
|
||||
|
||||
int ccolor = custom_titles.getColor("COVERS", (const char *) tmp.hdr.id, 0xff0000).intVal();
|
||||
tmp.hdr.casecolor = ccolor != 0xff0000 ? ccolor : 0xff0000;
|
||||
|
||||
mbstowcs(tmp.title, filename, sizeof(tmp.title));
|
||||
Asciify(tmp.title);
|
||||
gprintf("Found: %s\n", tmp.path);
|
||||
tmp.hdr.magic = 0x46434555 ; //FCEU
|
||||
tmp.hdr.gc_magic = 0x4c4f4c4f; //Abusing gc_magic for general emu detection ;)
|
||||
headerlist.push_back(tmp);
|
||||
continue;
|
||||
}
|
||||
else if(lowerCase(*itr).rfind(".smc") != string::npos || lowerCase(*itr).rfind(".fig") != string::npos
|
||||
|| lowerCase(*itr).rfind(".sfc") != string::npos || lowerCase(*itr).rfind(".swc") != string::npos)
|
||||
{
|
||||
strncpy(tmp.path, (*itr).c_str(), sizeof(tmp.path));
|
||||
|
||||
(*itr).assign(&(*itr)[(*itr).find_last_of('/') + 1]);
|
||||
|
||||
char filename[64];
|
||||
strncpy(filename, (*itr).c_str(), sizeof(filename));
|
||||
|
||||
int ccolor = custom_titles.getColor("COVERS", (const char *) tmp.hdr.id, 0x01A300).intVal();
|
||||
tmp.hdr.casecolor = ccolor != 0x01A300 ? ccolor : 0x01A300;
|
||||
|
||||
mbstowcs(tmp.title, filename, sizeof(tmp.title));
|
||||
Asciify(tmp.title);
|
||||
gprintf("Found: %s\n", tmp.path);
|
||||
tmp.hdr.magic = 0x534e4553; //SNES
|
||||
tmp.hdr.gc_magic = 0x4c4f4c4f; //Abusing gc_magic for general emu detection ;)
|
||||
headerlist.push_back(tmp);
|
||||
continue;
|
||||
}
|
||||
else if(lowerCase(*itr).rfind(".agb") != string::npos || lowerCase(*itr).rfind(".gba") != string::npos
|
||||
|| lowerCase(*itr).rfind(".bin") != string::npos || lowerCase(*itr).rfind(".elf") != string::npos
|
||||
|| lowerCase(*itr).rfind(".mb") != string::npos || lowerCase(*itr).rfind(".dmg") != string::npos
|
||||
|| lowerCase(*itr).rfind(".gb") != string::npos || lowerCase(*itr).rfind(".gbc") != string::npos
|
||||
|| lowerCase(*itr).rfind(".cgb") != string::npos || lowerCase(*itr).rfind(".sgb") != string::npos)
|
||||
{
|
||||
strncpy(tmp.path, (*itr).c_str(), sizeof(tmp.path));
|
||||
|
||||
(*itr).assign(&(*itr)[(*itr).find_last_of('/') + 1]);
|
||||
|
||||
char filename[64];
|
||||
strncpy(filename, (*itr).c_str(), sizeof(filename));
|
||||
|
||||
int ccolor = custom_titles.getColor("COVERS", (const char *) tmp.hdr.id, 0xfcff00).intVal();
|
||||
tmp.hdr.casecolor = ccolor != 0xfcff00 ? ccolor : 0xfcff00;
|
||||
|
||||
mbstowcs(tmp.title, filename, sizeof(tmp.title));
|
||||
Asciify(tmp.title);
|
||||
gprintf("Found: %s\n", tmp.path);
|
||||
tmp.hdr.magic = 0x56424158 ; //VBAX
|
||||
tmp.hdr.gc_magic = 0x4c4f4c4f; //Abusing gc_magic for general emu detection ;)
|
||||
headerlist.push_back(tmp);
|
||||
continue;
|
||||
}
|
||||
else if(lowerCase(*itr).rfind(".zip") != string::npos || lowerCase(*itr).rfind(".7z") != string::npos)
|
||||
{
|
||||
strncpy(tmp.path, (*itr).c_str(), sizeof(tmp.path));
|
||||
|
||||
(*itr).assign(&(*itr)[(*itr).find_last_of('/') + 1]);
|
||||
|
||||
char filename[64];
|
||||
strncpy(filename, (*itr).c_str(), sizeof(filename));
|
||||
|
||||
if(lowerCase(tmp.path).rfind("fceugx") != string::npos)
|
||||
{
|
||||
int ccolor = custom_titles.getColor("COVERS", (const char *) tmp.hdr.id, 0xff0000).intVal();
|
||||
tmp.hdr.casecolor = ccolor != 0xff0000 ? ccolor : 0xff0000;
|
||||
tmp.hdr.magic = 0x46434555 ; //FCEU
|
||||
}
|
||||
else if(lowerCase(tmp.path).rfind("snes9xgx") != string::npos)
|
||||
{
|
||||
int ccolor = custom_titles.getColor("COVERS", (const char *) tmp.hdr.id, 0x01A300).intVal();
|
||||
tmp.hdr.casecolor = ccolor != 0x01A300 ? ccolor : 0x01A300;
|
||||
tmp.hdr.magic = 0x534e4553; //SNES
|
||||
}
|
||||
else if(lowerCase(tmp.path).rfind("vbagx") != string::npos)
|
||||
{
|
||||
int ccolor = custom_titles.getColor("COVERS", (const char *) tmp.hdr.id, 0xfcff00).intVal();
|
||||
tmp.hdr.casecolor = ccolor != 0xfcff00 ? ccolor : 0xfcff00;
|
||||
tmp.hdr.magic = 0x56424158; //VBAX
|
||||
}
|
||||
mbstowcs(tmp.title, filename, sizeof(tmp.title));
|
||||
Asciify(tmp.title);
|
||||
gprintf("Found: %s\n", tmp.path);
|
||||
|
||||
tmp.hdr.gc_magic = 0x4c4f4c4f; //Abusing gc_magic for general emu detection ;)
|
||||
headerlist.push_back(tmp);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(gameTDB.IsLoaded())
|
||||
|
@ -28,13 +28,14 @@ int main(int argc, char **argv)
|
||||
{
|
||||
geckoinit = InitGecko();
|
||||
__exception_setreload(5);
|
||||
|
||||
|
||||
gprintf(" \nWelcome to %s (%s-r%s)!\nThis is the debug output.\n", APP_NAME, APP_VERSION, SVN_REV);
|
||||
|
||||
SYS_SetArena1Hi(APPLOADER_START);
|
||||
CVideo vid;
|
||||
|
||||
char *gameid = NULL;
|
||||
bool Emulator_boot = false;
|
||||
|
||||
for (int i = 0; i < argc; i++)
|
||||
{
|
||||
@ -51,6 +52,8 @@ int main(int argc, char **argv)
|
||||
if (!isalnum(gameid[i]))
|
||||
gameid = NULL;
|
||||
}
|
||||
else if (argv[i] != NULL && strcasestr(argv[i], "EMULATOR_MAGIC") != NULL)
|
||||
Emulator_boot = true;
|
||||
}
|
||||
gprintf("Loading cIOS: %d\n", mainIOS);
|
||||
|
||||
@ -98,9 +101,9 @@ int main(int argc, char **argv)
|
||||
|
||||
CMenu menu(vid);
|
||||
menu.init();
|
||||
|
||||
|
||||
//Open_Inputs(); //we should init inputs as last point
|
||||
|
||||
|
||||
mainMenu = &menu;
|
||||
if (!iosOK)
|
||||
{
|
||||
@ -117,7 +120,11 @@ int main(int argc, char **argv)
|
||||
if (gameid != NULL && strlen(gameid) == 6)
|
||||
menu._directlaunch(gameid);
|
||||
else
|
||||
{
|
||||
if(Emulator_boot)
|
||||
menu.m_Emulator_boot = true;
|
||||
ret = menu.main();
|
||||
}
|
||||
}
|
||||
vid.cleanup();
|
||||
if (bootHB)
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "nand.hpp"
|
||||
#include "cios.hpp"
|
||||
#include "loader/playlog.h"
|
||||
#include "gc/fileOps.h"
|
||||
|
||||
// Sounds
|
||||
extern const u8 click_wav[];
|
||||
@ -135,6 +136,7 @@ CMenu::CMenu(CVideo &vid) :
|
||||
m_gamesound_changed = false;
|
||||
m_base_font_size = 0;
|
||||
m_current_view = COVERFLOW_USB;
|
||||
m_Emulator_boot = false;
|
||||
}
|
||||
|
||||
extern "C" { int makedir(char *newdir); }
|
||||
@ -267,6 +269,7 @@ void CMenu::init(void)
|
||||
m_app_update_zip = sfmt("%s/update.zip", m_appDir.c_str());
|
||||
m_data_update_zip = sfmt("%s/update.zip", m_dataDir.c_str());
|
||||
|
||||
m_pluginsDir = m_cfg.getString("GENERAL", "dir_plugins", sfmt("%s/plugins", m_dataDir.c_str()));
|
||||
m_cacheDir = m_cfg.getString("GENERAL", "dir_cache", sfmt("%s/cache", m_dataDir.c_str()));
|
||||
m_settingsDir = m_cfg.getString("GENERAL", "dir_settings", sfmt("%s/settings", m_dataDir.c_str()));
|
||||
m_languagesDir = m_cfg.getString("GENERAL", "dir_languages", sfmt("%s/languages", m_dataDir.c_str()));
|
||||
@ -577,20 +580,20 @@ float CMenu::_getCFFloat(const string &domain, const string &key, float def, boo
|
||||
|
||||
void CMenu::_loadCFLayout(int version, bool forceAA, bool otherScrnFmt)
|
||||
{
|
||||
string domain(sfmt("_COVERFLOW_%i", version).c_str());
|
||||
string domainSel(sfmt("_COVERFLOW_%i_S", version).c_str());
|
||||
bool homebrew = m_current_view == COVERFLOW_HOMEBREW;
|
||||
bool smallbox = (homebrew || m_current_view == COVERFLOW_EMU) && m_cfg.getBool(_domainFromView(), "smallbox", true);
|
||||
string domain(smallbox ? (homebrew ? sfmt("_BREWFLOW_%i", version).c_str() : sfmt("_EMUFLOW_%i", version).c_str()) : sfmt("_COVERFLOW_%i", version).c_str());
|
||||
string domainSel(smallbox ? (homebrew ? sfmt("_BREWFLOW_%i_S", version).c_str() : sfmt("_EMUFLOW_%i_S", version).c_str()) : sfmt("_COVERFLOW_%i_S", version).c_str());
|
||||
bool sf = otherScrnFmt;
|
||||
|
||||
if (forceAA)
|
||||
_setAA(m_theme.getInt(domain, "max_fsaa", 3));
|
||||
else
|
||||
_setAA(min(m_theme.getInt(domain, "max_fsaa", 3), m_cfg.getInt("GENERAL", "max_fsaa", 3)));
|
||||
int max_fsaa = m_theme.getInt(domain, "max_fsaa", 3);
|
||||
_setAA(forceAA ? max_fsaa : min(max_fsaa, m_cfg.getInt("GENERAL", "max_fsaa", 3)));
|
||||
|
||||
m_cf.setTextureQuality(m_theme.getFloat(domain, "tex_lod_bias", -3.f),
|
||||
m_theme.getInt(domain, "tex_aniso", 2),
|
||||
m_theme.getBool(domain, "tex_edge_lod", true));
|
||||
|
||||
m_cf.setRange(_getCFInt(domain, "rows", 1, sf), _getCFInt(domain, "columns", 9, sf));
|
||||
m_cf.setRange(_getCFInt(domain, "rows", (smallbox && homebrew) ? 5 : 1, sf), _getCFInt(domain, "columns", 9, sf));
|
||||
|
||||
m_cf.setCameraPos(false,
|
||||
_getCFV3D(domain, "camera_pos", Vector3D(0.f, 1.5f, 5.f), sf),
|
||||
@ -599,178 +602,197 @@ void CMenu::_loadCFLayout(int version, bool forceAA, bool otherScrnFmt)
|
||||
m_cf.setCameraPos(true,
|
||||
_getCFV3D(domainSel, "camera_pos", Vector3D(0.f, 1.5f, 5.f), sf),
|
||||
_getCFV3D(domainSel, "camera_aim", Vector3D(0.f, 0.f, -1.f), sf));
|
||||
|
||||
|
||||
m_cf.setCameraOsc(false,
|
||||
_getCFV3D(domain, "camera_osc_speed", Vector3D(2.f, 1.1f, 1.3f), sf),
|
||||
_getCFV3D(domain, "camera_osc_amp", Vector3D(0.1f, 0.2f, 0.1f), sf));
|
||||
|
||||
|
||||
m_cf.setCameraOsc(true,
|
||||
_getCFV3D(domainSel, "camera_osc_speed", Vector3D(0.f, 0.f, 0.f), sf),
|
||||
_getCFV3D(domainSel, "camera_osc_amp", Vector3D(0.f, 0.f, 0.f), sf));
|
||||
|
||||
_getCFV3D(domainSel, "camera_osc_speed", Vector3D(), sf),
|
||||
_getCFV3D(domainSel, "camera_osc_amp", Vector3D(), sf));
|
||||
|
||||
float def_cvr_posX = (smallbox && homebrew) ? 1.f : 1.6f;
|
||||
float def_cvr_posY = (smallbox && homebrew) ? -0.6f : 0.f;
|
||||
m_cf.setCoverPos(false,
|
||||
_getCFV3D(domain, "left_pos", Vector3D(-1.6f, 0.f, 0.f), sf),
|
||||
_getCFV3D(domain, "right_pos", Vector3D(1.6f, 0.f, 0.f), sf),
|
||||
_getCFV3D(domain, "center_pos", Vector3D(0.f, 0.f, 1.f), sf),
|
||||
_getCFV3D(domain, "row_center_pos", Vector3D(0.f, 0.f, 0.f), sf));
|
||||
|
||||
_getCFV3D(domain, "left_pos", Vector3D(-def_cvr_posX, def_cvr_posY, 0.f), sf),
|
||||
_getCFV3D(domain, "right_pos", Vector3D(def_cvr_posX, def_cvr_posY, 0.f), sf),
|
||||
_getCFV3D(domain, "center_pos", Vector3D(0.f, def_cvr_posY, 1.f), sf),
|
||||
_getCFV3D(domain, "row_center_pos", Vector3D(0.f, def_cvr_posY, 0.f), sf));
|
||||
|
||||
def_cvr_posX = (smallbox && homebrew) ? 1.f : 4.6f;
|
||||
float def_cvr_posX1 = (smallbox && homebrew) ? 0.f : -0.6f;
|
||||
m_cf.setCoverPos(true,
|
||||
_getCFV3D(domainSel, "left_pos", Vector3D(-4.6f, 2.f, 0.f), sf),
|
||||
_getCFV3D(domainSel, "right_pos", Vector3D(4.6f, 2.f, 0.f), sf),
|
||||
_getCFV3D(domainSel, "center_pos", Vector3D(-0.6f, 0.f, 2.6f), sf),
|
||||
_getCFV3D(domainSel, "row_center_pos", Vector3D(0.f, 2.f, 0.f), sf));
|
||||
|
||||
_getCFV3D(domainSel, "left_pos", Vector3D(-def_cvr_posX, def_cvr_posY, 0.f), sf),
|
||||
_getCFV3D(domainSel, "right_pos", Vector3D(def_cvr_posX, def_cvr_posY, 0.f), sf),
|
||||
_getCFV3D(domainSel, "center_pos", Vector3D(def_cvr_posX1, 0.f, 2.6f), sf),
|
||||
_getCFV3D(domainSel, "row_center_pos", Vector3D(0.f, def_cvr_posY, 0.f), sf));
|
||||
|
||||
m_cf.setCoverAngleOsc(false,
|
||||
m_theme.getVector3D(domain, "cover_osc_speed", Vector3D(2.f, 2.f, 0.f)),
|
||||
m_theme.getVector3D(domain, "cover_osc_amp", Vector3D(5.f, 10.f, 0.f)));
|
||||
|
||||
|
||||
m_cf.setCoverAngleOsc(true,
|
||||
m_theme.getVector3D(domainSel, "cover_osc_speed", Vector3D(2.1f, 2.1f, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "cover_osc_amp", Vector3D(2.f, 5.f, 0.f)));
|
||||
|
||||
|
||||
m_cf.setCoverPosOsc(false,
|
||||
m_theme.getVector3D(domain, "cover_pos_osc_speed", Vector3D(0.f, 0.f, 0.f)),
|
||||
m_theme.getVector3D(domain, "cover_pos_osc_amp", Vector3D(0.f, 0.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domain, "cover_pos_osc_speed"),
|
||||
m_theme.getVector3D(domain, "cover_pos_osc_amp"));
|
||||
|
||||
m_cf.setCoverPosOsc(true,
|
||||
m_theme.getVector3D(domainSel, "cover_pos_osc_speed", Vector3D(0.f, 0.f, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "cover_pos_osc_amp", Vector3D(0.f, 0.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domainSel, "cover_pos_osc_speed"),
|
||||
m_theme.getVector3D(domainSel, "cover_pos_osc_amp"));
|
||||
|
||||
float spacerX = (smallbox && homebrew) ? 1.f : 0.35f;
|
||||
m_cf.setSpacers(false,
|
||||
m_theme.getVector3D(domain, "left_spacer", Vector3D(-0.35f, 0.f, 0.f)),
|
||||
m_theme.getVector3D(domain, "right_spacer", Vector3D(0.35f, 0.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domain, "left_spacer", Vector3D(-spacerX, 0.f, 0.f)),
|
||||
m_theme.getVector3D(domain, "right_spacer", Vector3D(spacerX, 0.f, 0.f)));
|
||||
|
||||
m_cf.setSpacers(true,
|
||||
m_theme.getVector3D(domainSel, "left_spacer", Vector3D(-0.35f, 0.f, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "right_spacer", Vector3D(0.35f, 0.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domainSel, "left_spacer", Vector3D(-spacerX, 0.f, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "right_spacer", Vector3D(spacerX, 0.f, 0.f)));
|
||||
|
||||
m_cf.setDeltaAngles(false,
|
||||
m_theme.getVector3D(domain, "left_delta_angle", Vector3D(0.f, 0.f, 0.f)),
|
||||
m_theme.getVector3D(domain, "right_delta_angle", Vector3D(0.f, 0.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domain, "left_delta_angle"),
|
||||
m_theme.getVector3D(domain, "right_delta_angle"));
|
||||
|
||||
m_cf.setDeltaAngles(true,
|
||||
m_theme.getVector3D(domainSel, "left_delta_angle", Vector3D(0.f, 0.f, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "right_delta_angle", Vector3D(0.f, 0.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domainSel, "left_delta_angle"),
|
||||
m_theme.getVector3D(domainSel, "right_delta_angle"));
|
||||
|
||||
float angleY = (smallbox && homebrew) ? 0.f : 70.f;
|
||||
m_cf.setAngles(false,
|
||||
m_theme.getVector3D(domain, "left_angle", Vector3D(0.f, 70.f, 0.f)),
|
||||
m_theme.getVector3D(domain, "right_angle", Vector3D(0.f, -70.f, 0.f)),
|
||||
m_theme.getVector3D(domain, "center_angle", Vector3D(0.f, 0.f, 0.f)),
|
||||
m_theme.getVector3D(domain, "row_center_angle", Vector3D(0.f, 0.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domain, "left_angle", Vector3D(0.f, angleY, 0.f)),
|
||||
m_theme.getVector3D(domain, "right_angle", Vector3D(0.f, -angleY, 0.f)),
|
||||
m_theme.getVector3D(domain, "center_angle"),
|
||||
m_theme.getVector3D(domain, "row_center_angle"));
|
||||
|
||||
angleY = (smallbox && homebrew) ? 0.f : 90.f;
|
||||
float angleY1 = (smallbox && homebrew) ? 0.f : 380.f;
|
||||
float angleX = (smallbox && homebrew) ? 0.f : -45.f;
|
||||
m_cf.setAngles(true,
|
||||
m_theme.getVector3D(domainSel, "left_angle", Vector3D(-45.f, 90.f, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "right_angle", Vector3D(-45.f, -90.f, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "center_angle", Vector3D(0.f, 380.f, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "row_center_angle", Vector3D(0.f, 0.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domainSel, "left_angle", Vector3D(angleX, angleY, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "right_angle", Vector3D(angleX, -angleY, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "center_angle", Vector3D(0.f, angleY1, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "row_center_angle"));
|
||||
|
||||
angleX = smallbox ? 0.f : 55.f;
|
||||
m_cf.setTitleAngles(false,
|
||||
_getCFFloat(domain, "text_left_angle", -55.f, sf),
|
||||
_getCFFloat(domain, "text_right_angle", 55.f, sf),
|
||||
_getCFFloat(domain, "text_left_angle", -angleX, sf),
|
||||
_getCFFloat(domain, "text_right_angle", angleX, sf),
|
||||
_getCFFloat(domain, "text_center_angle", 0.f, sf));
|
||||
|
||||
|
||||
m_cf.setTitleAngles(true,
|
||||
_getCFFloat(domainSel, "text_left_angle", -55.f, sf),
|
||||
_getCFFloat(domainSel, "text_right_angle", 55.f, sf),
|
||||
_getCFFloat(domainSel, "text_left_angle", -angleX, sf),
|
||||
_getCFFloat(domainSel, "text_right_angle", angleX, sf),
|
||||
_getCFFloat(domainSel, "text_center_angle", 0.f, sf));
|
||||
|
||||
|
||||
m_cf.setTitlePos(false,
|
||||
_getCFV3D(domain, "text_left_pos", Vector3D(-4.f, 0.f, 1.3f), sf),
|
||||
_getCFV3D(domain, "text_right_pos", Vector3D(4.f, 0.f, 1.3f), sf),
|
||||
_getCFV3D(domain, "text_center_pos", Vector3D(0.f, 0.f, 2.6f), sf));
|
||||
|
||||
|
||||
m_cf.setTitlePos(true,
|
||||
_getCFV3D(domainSel, "text_left_pos", Vector3D(-4.f, 0.f, 1.3f), sf),
|
||||
_getCFV3D(domainSel, "text_right_pos", Vector3D(4.f, 0.f, 1.3f), sf),
|
||||
_getCFV3D(domainSel, "text_center_pos", Vector3D(1.7f, 1.8f, 1.6f), sf));
|
||||
|
||||
|
||||
m_cf.setTitleWidth(false,
|
||||
_getCFFloat(domain, "text_side_wrap_width", 500.f, sf),
|
||||
_getCFFloat(domain, "text_center_wrap_width", 500.f, sf));
|
||||
|
||||
|
||||
m_cf.setTitleWidth(true,
|
||||
_getCFFloat(domainSel, "text_side_wrap_width", 500.f, sf),
|
||||
_getCFFloat(domainSel, "text_center_wrap_width", 310.f, sf));
|
||||
|
||||
|
||||
m_cf.setTitleStyle(false,
|
||||
_textStyle(domain.c_str(), "text_side_style", FTGX_ALIGN_BOTTOM | FTGX_JUSTIFY_CENTER),
|
||||
_textStyle(domain.c_str(), "text_center_style", FTGX_ALIGN_BOTTOM | FTGX_JUSTIFY_CENTER));
|
||||
|
||||
_textStyle(domain.c_str(), "text_side_style", FTGX_ALIGN_MIDDLE | FTGX_JUSTIFY_CENTER),
|
||||
_textStyle(domain.c_str(), "text_center_style", FTGX_ALIGN_MIDDLE | FTGX_JUSTIFY_CENTER));
|
||||
|
||||
m_cf.setTitleStyle(true,
|
||||
_textStyle(domainSel.c_str(), "text_side_style", FTGX_ALIGN_BOTTOM | FTGX_JUSTIFY_CENTER),
|
||||
_textStyle(domainSel.c_str(), "text_side_style", FTGX_ALIGN_MIDDLE | FTGX_JUSTIFY_CENTER),
|
||||
_textStyle(domainSel.c_str(), "text_center_style", FTGX_ALIGN_TOP | FTGX_JUSTIFY_RIGHT));
|
||||
|
||||
|
||||
m_cf.setColors(false,
|
||||
m_theme.getColor(domain, "color_beg", 0xCFFFFFFF),
|
||||
m_theme.getColor(domain, "color_end", 0x3FFFFFFF),
|
||||
m_theme.getColor(domain, "color_off", 0x7FFFFFFF));
|
||||
|
||||
|
||||
m_cf.setColors(true,
|
||||
m_theme.getColor(domainSel, "color_beg", 0x7FFFFFFF),
|
||||
m_theme.getColor(domainSel, "color_end", 0x1FFFFFFF),
|
||||
m_theme.getColor(domain, "color_off", 0x7FFFFFFF)); // Mouse not used once a selection has been made
|
||||
|
||||
|
||||
m_cf.setMirrorAlpha(m_theme.getFloat(domain, "mirror_alpha", 0.25f), m_theme.getFloat(domain, "title_mirror_alpha", 0.2f)); // Doesn't depend on selection
|
||||
|
||||
|
||||
m_cf.setMirrorBlur(m_theme.getBool(domain, "mirror_blur", true)); // Doesn't depend on selection
|
||||
|
||||
|
||||
m_cf.setShadowColors(false,
|
||||
m_theme.getColor(domain, "color_shadow_center", 0x00000000),
|
||||
m_theme.getColor(domain, "color_shadow_beg", 0x00000000),
|
||||
m_theme.getColor(domain, "color_shadow_end", 0x00000000),
|
||||
m_theme.getColor(domain, "color_shadow_off", 0x00000000));
|
||||
|
||||
|
||||
m_cf.setShadowColors(true,
|
||||
m_theme.getColor(domainSel, "color_shadow_center", 0x0000007F),
|
||||
m_theme.getColor(domainSel, "color_shadow_beg", 0x0000007F),
|
||||
m_theme.getColor(domainSel, "color_shadow_end", 0x0000007F),
|
||||
m_theme.getColor(domainSel, "color_shadow_off", 0x0000007F));
|
||||
|
||||
|
||||
m_cf.setShadowPos(m_theme.getFloat(domain, "shadow_scale", 1.1f),
|
||||
m_theme.getFloat(domain, "shadow_x", 0.f),
|
||||
m_theme.getFloat(domain, "shadow_y", 0.f));
|
||||
|
||||
m_theme.getFloat(domain, "shadow_x"),
|
||||
m_theme.getFloat(domain, "shadow_y"));
|
||||
|
||||
float spacerY = (smallbox && homebrew) ? 0.60f : 2.f;
|
||||
m_cf.setRowSpacers(false,
|
||||
m_theme.getVector3D(domain, "top_spacer", Vector3D(0.f, 2.f, 0.f)),
|
||||
m_theme.getVector3D(domain, "bottom_spacer", Vector3D(0.f, -2.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domain, "top_spacer", Vector3D(0.f, spacerY, 0.f)),
|
||||
m_theme.getVector3D(domain, "bottom_spacer", Vector3D(0.f, -spacerY, 0.f)));
|
||||
|
||||
m_cf.setRowSpacers(true,
|
||||
m_theme.getVector3D(domainSel, "top_spacer", Vector3D(0.f, 2.f, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "bottom_spacer", Vector3D(0.f, -2.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domainSel, "top_spacer", Vector3D(0.f, spacerY, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "bottom_spacer", Vector3D(0.f, -spacerY, 0.f)));
|
||||
|
||||
m_cf.setRowDeltaAngles(false,
|
||||
m_theme.getVector3D(domain, "top_delta_angle", Vector3D(0.f, 0.f, 0.f)),
|
||||
m_theme.getVector3D(domain, "bottom_delta_angle", Vector3D(0.f, 0.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domain, "top_delta_angle"),
|
||||
m_theme.getVector3D(domain, "bottom_delta_angle"));
|
||||
|
||||
m_cf.setRowDeltaAngles(true,
|
||||
m_theme.getVector3D(domainSel, "top_delta_angle", Vector3D(0.f, 0.f, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "bottom_delta_angle", Vector3D(0.f, 0.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domainSel, "top_delta_angle"),
|
||||
m_theme.getVector3D(domainSel, "bottom_delta_angle"));
|
||||
|
||||
m_cf.setRowAngles(false,
|
||||
m_theme.getVector3D(domain, "top_angle", Vector3D(0.f, 0.f, 0.f)),
|
||||
m_theme.getVector3D(domain, "bottom_angle", Vector3D(0.f, 0.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domain, "top_angle"),
|
||||
m_theme.getVector3D(domain, "bottom_angle"));
|
||||
|
||||
m_cf.setRowAngles(true,
|
||||
m_theme.getVector3D(domainSel, "top_angle", Vector3D(0.f, 0.f, 0.f)),
|
||||
m_theme.getVector3D(domainSel, "bottom_angle", Vector3D(0.f, 0.f, 0.f)));
|
||||
|
||||
m_theme.getVector3D(domainSel, "top_angle"),
|
||||
m_theme.getVector3D(domainSel, "bottom_angle"));
|
||||
|
||||
Vector3D def_cvr_scale =
|
||||
smallbox
|
||||
? (homebrew
|
||||
? Vector3D(0.667f, 0.25f, 1.f)
|
||||
: Vector3D(1.f, 0.5f, 1.f))
|
||||
: Vector3D(1.f, 1.f, 1.f);
|
||||
|
||||
m_cf.setCoverScale(false,
|
||||
m_theme.getVector3D(domain, "left_scale", Vector3D(1.f, 1.f, 1.f)),
|
||||
m_theme.getVector3D(domain, "right_scale", Vector3D(1.f, 1.f, 1.f)),
|
||||
m_theme.getVector3D(domain, "center_scale", Vector3D(1.f, 1.f, 1.f)),
|
||||
m_theme.getVector3D(domain, "row_center_scale", Vector3D(1.f, 1.f, 1.f)));
|
||||
|
||||
m_theme.getVector3D(domain, "left_scale", def_cvr_scale),
|
||||
m_theme.getVector3D(domain, "right_scale", def_cvr_scale),
|
||||
m_theme.getVector3D(domain, "center_scale", def_cvr_scale),
|
||||
m_theme.getVector3D(domain, "row_center_scale", def_cvr_scale));
|
||||
|
||||
m_cf.setCoverScale(true,
|
||||
m_theme.getVector3D(domainSel, "left_scale", Vector3D(1.f, 1.f, 1.f)),
|
||||
m_theme.getVector3D(domainSel, "right_scale", Vector3D(1.f, 1.f, 1.f)),
|
||||
m_theme.getVector3D(domainSel, "center_scale", Vector3D(1.f, 1.f, 1.f)),
|
||||
m_theme.getVector3D(domainSel, "row_center_scale", Vector3D(1.f, 1.f, 1.f)));
|
||||
|
||||
m_theme.getVector3D(domainSel, "left_scale", def_cvr_scale),
|
||||
m_theme.getVector3D(domainSel, "right_scale", def_cvr_scale),
|
||||
m_theme.getVector3D(domainSel, "center_scale", def_cvr_scale),
|
||||
m_theme.getVector3D(domainSel, "row_center_scale", def_cvr_scale));
|
||||
|
||||
float flipX = (smallbox && homebrew) ? 359.f : 180.f;
|
||||
m_cf.setCoverFlipping(
|
||||
_getCFV3D(domainSel, "flip_pos", Vector3D(0.f, 0.f, 0.f), sf),
|
||||
_getCFV3D(domainSel, "flip_angle", Vector3D(0.f, 180.f, 0.f), sf),
|
||||
_getCFV3D(domainSel, "flip_scale", Vector3D(1.f, 1.f, 1.f), sf));
|
||||
|
||||
_getCFV3D(domainSel, "flip_pos", Vector3D(), sf),
|
||||
_getCFV3D(domainSel, "flip_angle", Vector3D(0.f, flipX, 0.f), sf),
|
||||
_getCFV3D(domainSel, "flip_scale", def_cvr_scale, sf));
|
||||
|
||||
m_cf.setBlur(
|
||||
m_theme.getInt(domain, "blur_resolution", 1),
|
||||
m_theme.getInt(domain, "blur_radius", 2),
|
||||
@ -1455,12 +1477,14 @@ void CMenu::_initCF(void)
|
||||
if(m_gamelistdump)
|
||||
m_dump.setWString(domain, id, m_gameList[i].title);
|
||||
|
||||
if (m_current_view != COVERFLOW_HOMEBREW)
|
||||
if (m_current_view == COVERFLOW_EMU)
|
||||
m_cf.addItem(&m_gameList[i], sfmt("%s/%s.png", m_picDir.c_str(), &m_gameList[i].path[std::string(m_gameList[i].path).find_last_of("/")]).c_str(), sfmt("%s/%s.png", m_boxPicDir.c_str(), &m_gameList[i].path[std::string(m_gameList[i].path).find_last_of("/")]).c_str(), playcount, lastPlayed);
|
||||
else if (m_current_view != COVERFLOW_HOMEBREW)
|
||||
m_cf.addItem(&m_gameList[i], sfmt("%s/%s.png", m_picDir.c_str(), id.c_str()).c_str(), sfmt("%s/%s.png", m_boxPicDir.c_str(), id.c_str()).c_str(), playcount, lastPlayed);
|
||||
else {
|
||||
else
|
||||
{
|
||||
string s = sfmt("%s", m_gameList[i].path);
|
||||
string f = s.substr(0, s.find_last_of("/"));
|
||||
|
||||
m_cf.addItem(&m_gameList[i], sfmt("%s/icon.png", f.c_str()).c_str(), sfmt("%s/%s.png", m_boxPicDir.c_str(), id.c_str()).c_str(), playcount, lastPlayed);
|
||||
}
|
||||
|
||||
@ -1858,6 +1882,10 @@ bool CMenu::_loadList(void)
|
||||
gprintf("dml view from ");
|
||||
retval = _loadDmlList();
|
||||
break;
|
||||
case COVERFLOW_EMU:
|
||||
gprintf("emu view from ");
|
||||
retval = _loadEmuList();
|
||||
break;
|
||||
default:
|
||||
gprintf("usb view from ");
|
||||
retval = _loadGameList();
|
||||
@ -1914,6 +1942,26 @@ bool CMenu::_loadDmlList()
|
||||
return m_gameList.size() > 0 ? true : false;
|
||||
}
|
||||
|
||||
bool CMenu::_loadEmuList()
|
||||
{
|
||||
currentPartition = m_cfg.getInt("EMULATOR", "partition", 0);
|
||||
if(!DeviceHandler::Instance()->IsInserted(currentPartition))
|
||||
return false;
|
||||
|
||||
gprintf("%s\n", DeviceName[currentPartition]);
|
||||
DeviceHandler::Instance()->Open_WBFS(currentPartition);
|
||||
if(fsop_FileExist(fmt("%s/fceugx.dol", m_pluginsDir.c_str())))
|
||||
m_gameList.Load(sfmt("%s:/fceugx/roms", DeviceName[currentPartition]), ".nes|.fds|.nsf|.unf|.nez|.unif|.zip|.7z", "EN");
|
||||
if(fsop_FileExist(fmt("%s/snes9x-gx.dol", m_pluginsDir.c_str())))
|
||||
m_gameList.Load(sfmt("%s:/snes9xgx/roms", DeviceName[currentPartition]), ".smc|.fig|.sfc|.swc|.zip|.7z", "EN");
|
||||
if(fsop_FileExist(fmt("%s/vbagx.dol", m_pluginsDir.c_str())))
|
||||
m_gameList.Load(sfmt("%s:/vbagx/roms", DeviceName[currentPartition]), ".agb|.gba|.bin|.elf|.mb|.dmg||.gb|.gbc|.cgb|.sgb|.zip|.7z", "EN");
|
||||
m_cfg.setString("EMULATOR", "lastlanguage", m_loc.getString(m_curLanguage, "gametdb_code", "EN"));
|
||||
m_cfg.save();
|
||||
|
||||
return m_gameList.size() > 0 ? true : false;
|
||||
}
|
||||
|
||||
void CMenu::_stopSounds(void)
|
||||
{
|
||||
// Fade out sounds
|
||||
@ -2072,6 +2120,8 @@ const char *CMenu::_domainFromView()
|
||||
return "HOMEBREW";
|
||||
case COVERFLOW_DML:
|
||||
return "DML";
|
||||
case COVERFLOW_EMU:
|
||||
return "EMULATOR";
|
||||
default:
|
||||
return "GAMES";
|
||||
}
|
||||
@ -2086,6 +2136,7 @@ void CMenu::UpdateCache(u32 view)
|
||||
UpdateCache(COVERFLOW_USB);
|
||||
UpdateCache(COVERFLOW_HOMEBREW);
|
||||
UpdateCache(COVERFLOW_DML);
|
||||
UpdateCache(COVERFLOW_EMU);
|
||||
UpdateCache(COVERFLOW_CHANNEL);
|
||||
return;
|
||||
}
|
||||
@ -2102,6 +2153,9 @@ void CMenu::UpdateCache(u32 view)
|
||||
case COVERFLOW_DML:
|
||||
domain = "DML";
|
||||
break;
|
||||
case COVERFLOW_EMU:
|
||||
domain = "EMULATOR";
|
||||
break;
|
||||
default:
|
||||
domain = "GAMES";
|
||||
}
|
||||
|
@ -85,6 +85,7 @@ private:
|
||||
std::string m_themeDataDir;
|
||||
std::string m_appDir;
|
||||
std::string m_dataDir;
|
||||
std::string m_pluginsDir;
|
||||
std::string m_picDir;
|
||||
std::string m_boxPicDir;
|
||||
std::string m_cpicDir;
|
||||
@ -163,6 +164,7 @@ private:
|
||||
u32 m_mainBtnQuit;
|
||||
u32 m_mainBtnDVD;
|
||||
u32 m_mainBtnDML;
|
||||
u32 m_mainBtnEmu;
|
||||
u32 m_mainBtnUsb;
|
||||
u32 m_mainBtnChannel;
|
||||
u32 m_mainBtnHomebrew;
|
||||
@ -770,11 +772,12 @@ private:
|
||||
float minMaxVal[4][2];
|
||||
};
|
||||
//
|
||||
bool _loadChannelList(void);
|
||||
bool _loadList(void);
|
||||
bool _loadHomebrewList(void);
|
||||
bool _loadDmlList(void);
|
||||
bool _loadGameList(void);
|
||||
bool _loadDmlList(void);
|
||||
bool _loadChannelList(void);
|
||||
bool _loadEmuList(void);
|
||||
bool _loadHomebrewList(void);
|
||||
void _initCF(void);
|
||||
//
|
||||
void _initMainMenu(SThemeData &theme);
|
||||
@ -922,6 +925,7 @@ private:
|
||||
void _showWaitMessage();
|
||||
public:
|
||||
void _hideWaitMessage();
|
||||
bool m_Emulator_boot;
|
||||
private:
|
||||
SmartGuiSound _sound(CMenu::SoundSet &soundSet, const char *domain, const char *key, const u8 * snd, u32 len, string name, bool isAllocated);
|
||||
SmartGuiSound _sound(CMenu::SoundSet &soundSet, const char *domain, const char *key, string name);
|
||||
|
@ -39,7 +39,7 @@ void CMenu::_enableNandEmu(bool fromconfig)
|
||||
direction = 0;
|
||||
currentPartition = loopNum(currentPartition + direction, (int)USB8);
|
||||
while(!DeviceHandler::Instance()->IsInserted(currentPartition) ||
|
||||
(m_current_view == COVERFLOW_CHANNEL && (DeviceHandler::Instance()->GetFSType(currentPartition) != PART_FS_FAT ||
|
||||
((m_current_view == COVERFLOW_CHANNEL || m_current_view == COVERFLOW_EMU) && (DeviceHandler::Instance()->GetFSType(currentPartition) != PART_FS_FAT ||
|
||||
(!isD2XnewerThanV6 && DeviceHandler::Instance()->PathToDriveType(m_appDir.c_str()) == currentPartition) ||
|
||||
(!isD2XnewerThanV6 && DeviceHandler::Instance()->PathToDriveType(m_dataDir.c_str()) == currentPartition))) ||
|
||||
((m_current_view == COVERFLOW_HOMEBREW || m_current_view == COVERFLOW_DML) && DeviceHandler::Instance()->GetFSType(currentPartition) == PART_FS_WBFS))
|
||||
|
@ -311,7 +311,7 @@ void CMenu::_showGameSettings(void)
|
||||
m_btnMgr.show(m_gameSettingsLblIOS);
|
||||
m_btnMgr.show(m_gameSettingsBtnIOSP);
|
||||
m_btnMgr.show(m_gameSettingsBtnIOSM);
|
||||
|
||||
|
||||
if (m_current_view != COVERFLOW_HOMEBREW)
|
||||
{
|
||||
m_btnMgr.show(m_gameSettingsLblIOSreloadBlock);
|
||||
|
@ -48,10 +48,19 @@ extern const u8 favoritesoffs_png[];
|
||||
extern const u8 delete_png[];
|
||||
extern const u8 deletes_png[];
|
||||
|
||||
//gc sound
|
||||
//sounds
|
||||
extern const u8 gc_ogg[];
|
||||
extern const u32 gc_ogg_size;
|
||||
|
||||
extern const u8 nes_ogg[];
|
||||
extern const u32 nes_ogg_size;
|
||||
|
||||
extern const u8 snes_ogg[];
|
||||
extern const u32 snes_ogg_size;
|
||||
|
||||
extern const u8 gba_ogg[];
|
||||
extern const u32 gba_ogg_size;
|
||||
|
||||
extern u32 sector_size;
|
||||
extern int mainIOS;
|
||||
static u64 sm_title_id[8] ATTRIBUTE_ALIGN(32);
|
||||
@ -492,7 +501,7 @@ void CMenu::_game(bool launch)
|
||||
m_cf.clear();
|
||||
_showWaitMessage();
|
||||
|
||||
if (m_current_view != COVERFLOW_HOMEBREW)
|
||||
if (m_current_view != COVERFLOW_HOMEBREW && m_current_view != COVERFLOW_EMU)
|
||||
{
|
||||
// Get banner_title
|
||||
Banner * banner = m_current_view == COVERFLOW_CHANNEL ? _extractChannelBnr(chantitle) : (m_current_view == COVERFLOW_USB && hdr->hdr.gc_magic != 0xc2339f3d) ? _extractBnr(hdr) : NULL;
|
||||
@ -627,7 +636,29 @@ void CMenu::_directlaunch(const string &id)
|
||||
void CMenu::_launch(dir_discHdr *hdr)
|
||||
{
|
||||
m_gcfg2.load(sfmt("%s/gameconfig2.ini", m_settingsDir.c_str()).c_str());
|
||||
if(hdr->hdr.gc_magic == 0xc2339f3d)
|
||||
if(hdr->hdr.gc_magic == 0x4c4f4c4f)
|
||||
{
|
||||
string title(&hdr->path[std::string(hdr->path).find_last_of("/")]);
|
||||
m_cfg.setString("EMULATOR", "current_item", title);
|
||||
string wiiflow_dol(m_dol);
|
||||
if(strstr(wiiflow_dol.c_str(), "sd:/") == NULL)
|
||||
wiiflow_dol.erase(3,1);
|
||||
string path((char*)hdr->path, size_t(strlen((char*)hdr->path) - title.size()));
|
||||
safe_vector<std::string> arguments;
|
||||
if(strstr(path.c_str(), "sd:/") == NULL)
|
||||
path.erase(3,1);
|
||||
arguments.push_back(path);
|
||||
arguments.push_back(title);
|
||||
arguments.push_back(wiiflow_dol);
|
||||
if(hdr->hdr.magic == 0x534e4553)
|
||||
_launchHomebrew(fmt("%s/snes9x-gx.dol", m_pluginsDir.c_str()), arguments);
|
||||
else if(hdr->hdr.magic == 0x46434555)
|
||||
_launchHomebrew(fmt("%s/fceugx.dol", m_pluginsDir.c_str()), arguments);
|
||||
else if(hdr->hdr.magic == 0x56424158)
|
||||
_launchHomebrew(fmt("%s/vbagx.dol", m_pluginsDir.c_str()), arguments);
|
||||
return;
|
||||
}
|
||||
else if(hdr->hdr.gc_magic == 0xc2339f3d)
|
||||
{
|
||||
_launchGC(hdr, true);
|
||||
return;
|
||||
@ -643,6 +674,9 @@ void CMenu::_launch(dir_discHdr *hdr)
|
||||
case COVERFLOW_DML:
|
||||
_launchGC(hdr, true);
|
||||
break;
|
||||
case COVERFLOW_EMU:
|
||||
_launchHomebrew((char *)hdr->path, m_homebrewArgs);
|
||||
break;
|
||||
case COVERFLOW_USB:
|
||||
default:
|
||||
_launchGame(hdr, false);
|
||||
@ -1352,7 +1386,25 @@ void CMenu::_gameSoundThread(CMenu *m)
|
||||
m->m_gamesound_changed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
else if(m->m_cf.getHdr()->hdr.magic == 0x46434555)
|
||||
{
|
||||
m->m_gameSound.Load(nes_ogg, nes_ogg_size, false);
|
||||
m->m_gamesound_changed = true;
|
||||
return;
|
||||
}
|
||||
else if(m->m_cf.getHdr()->hdr.magic == 0x534e4553)
|
||||
{
|
||||
m->m_gameSound.Load(snes_ogg, snes_ogg_size, false);
|
||||
m->m_gamesound_changed = true;
|
||||
return;
|
||||
}
|
||||
else if(m->m_cf.getHdr()->hdr.magic == 0x56424158)
|
||||
{
|
||||
m->m_gameSound.Load(gba_ogg, gba_ogg_size, false);
|
||||
m->m_gamesound_changed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
m->m_gamesound_changed = false;
|
||||
u32 sndSize = 0;
|
||||
m->m_gameSoundHdr = m->m_cf.getHdr();
|
||||
|
@ -34,6 +34,8 @@ extern const u8 btnusb_png[];
|
||||
extern const u8 btnusbs_png[];
|
||||
extern const u8 btndml_png[];
|
||||
extern const u8 btndmls_png[];
|
||||
extern const u8 btnemu_png[];
|
||||
extern const u8 btnemus_png[];
|
||||
extern const u8 btndvd_png[];
|
||||
extern const u8 btndvds_png[];
|
||||
extern const u8 favoriteson_png[];
|
||||
@ -60,6 +62,7 @@ void CMenu::_hideMain(bool instant)
|
||||
m_btnMgr.hide(m_mainBtnChannel, instant);
|
||||
m_btnMgr.hide(m_mainBtnUsb, instant);
|
||||
m_btnMgr.hide(m_mainBtnDML, instant);
|
||||
m_btnMgr.hide(m_mainBtnEmu, instant);
|
||||
m_btnMgr.hide(m_mainBtnDVD, instant);
|
||||
m_btnMgr.hide(m_mainBtnInit, instant);
|
||||
m_btnMgr.hide(m_mainBtnInit2, instant);
|
||||
@ -76,6 +79,7 @@ void CMenu::_hideMain(bool instant)
|
||||
static bool show_homebrew = true;
|
||||
static bool parental_homebrew = false;
|
||||
static bool show_channel = true;
|
||||
static bool show_emu = true;
|
||||
|
||||
void CMenu::_showMain(void)
|
||||
{
|
||||
@ -95,13 +99,17 @@ void CMenu::_showMain(void)
|
||||
case COVERFLOW_DML:
|
||||
if(show_channel)
|
||||
m_btnMgr.show(m_mainBtnChannel);
|
||||
else if(show_emu)
|
||||
m_btnMgr.show(m_mainBtnEmu);
|
||||
else if(show_homebrew)
|
||||
m_btnMgr.show(m_mainBtnHomebrew);
|
||||
else
|
||||
else
|
||||
m_btnMgr.show(m_mainBtnUsb);
|
||||
break;
|
||||
case COVERFLOW_CHANNEL:
|
||||
if (show_homebrew && (parental_homebrew || !m_locked))
|
||||
if(show_emu)
|
||||
m_btnMgr.show(m_mainBtnEmu);
|
||||
else if (show_homebrew && (parental_homebrew || !m_locked))
|
||||
m_btnMgr.show(m_mainBtnHomebrew);
|
||||
else
|
||||
m_btnMgr.show(m_mainBtnUsb);
|
||||
@ -109,12 +117,20 @@ void CMenu::_showMain(void)
|
||||
case COVERFLOW_HOMEBREW:
|
||||
m_btnMgr.show(m_mainBtnUsb);
|
||||
break;
|
||||
case COVERFLOW_EMU:
|
||||
if (show_homebrew && (parental_homebrew || !m_locked))
|
||||
m_btnMgr.show(m_mainBtnHomebrew);
|
||||
else
|
||||
m_btnMgr.show(m_mainBtnUsb);
|
||||
break;
|
||||
default:
|
||||
if(m_show_dml)
|
||||
m_btnMgr.show(m_mainBtnDML);
|
||||
else if (show_channel)
|
||||
m_btnMgr.show(m_mainBtnChannel);
|
||||
else if (show_homebrew && (parental_homebrew || !m_locked))
|
||||
else if(show_emu)
|
||||
m_btnMgr.show(m_mainBtnEmu);
|
||||
else if(show_homebrew && (parental_homebrew || !m_locked))
|
||||
m_btnMgr.show(m_mainBtnHomebrew);
|
||||
else
|
||||
m_btnMgr.show(m_mainBtnUsb);
|
||||
@ -175,11 +191,15 @@ int CMenu::main(void)
|
||||
bool use_grab = m_cfg.getBool("GENERAL", "use_grab", false);
|
||||
show_homebrew = !m_cfg.getBool("HOMEBREW", "disable", false);
|
||||
show_channel = !m_cfg.getBool("GENERAL", "hidechannel", false);
|
||||
show_emu = !m_cfg.getBool("EMULATOR", "disable", false);
|
||||
bool dpad_mode = m_cfg.getBool("GENERAL", "dpad_mode", false);
|
||||
bool b_lr_mode = m_cfg.getBool("GENERAL", "b_lr_mode", false);
|
||||
parental_homebrew = m_cfg.getBool("HOMEBREW", "parental", false);
|
||||
|
||||
u32 cv=m_current_view;
|
||||
if(m_Emulator_boot)
|
||||
m_current_view = COVERFLOW_EMU;
|
||||
|
||||
u32 cv = m_current_view;
|
||||
m_reload = false;
|
||||
static u32 disc_check = 0;
|
||||
int done = 0;
|
||||
@ -209,6 +229,8 @@ int CMenu::main(void)
|
||||
_showMain();
|
||||
m_curGameId.clear();
|
||||
_initCF();
|
||||
if(m_Emulator_boot)
|
||||
LoadView();
|
||||
|
||||
lwp_t coverStatus = LWP_THREAD_NULL;
|
||||
unsigned int stack_size = (unsigned int)32768;
|
||||
@ -261,7 +283,7 @@ int CMenu::main(void)
|
||||
}
|
||||
m_btnMgr.noClick(true);
|
||||
cv = m_current_view;
|
||||
if ((m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnUsb) || m_btnMgr.selected(m_mainBtnDML) || m_btnMgr.selected(m_mainBtnHomebrew)) && dpad_mode && (BTN_UP_PRESSED || BTN_DOWN_PRESSED || BTN_LEFT_PRESSED || BTN_RIGHT_PRESSED))
|
||||
if ((m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnUsb) || m_btnMgr.selected(m_mainBtnDML) || m_btnMgr.selected(m_mainBtnHomebrew) || m_btnMgr.selected(m_mainBtnEmu)) && dpad_mode && (BTN_UP_PRESSED || BTN_DOWN_PRESSED || BTN_LEFT_PRESSED || BTN_RIGHT_PRESSED))
|
||||
{
|
||||
if (BTN_UP_PRESSED)
|
||||
m_current_view = COVERFLOW_USB;
|
||||
@ -392,7 +414,7 @@ int CMenu::main(void)
|
||||
u8 limiter = 0;
|
||||
currentPartition = loopNum(currentPartition + 1, (int)USB8);
|
||||
while(!DeviceHandler::Instance()->IsInserted(currentPartition) ||
|
||||
(m_current_view == COVERFLOW_CHANNEL && (DeviceHandler::Instance()->GetFSType(currentPartition) != PART_FS_FAT ||
|
||||
((m_current_view == COVERFLOW_CHANNEL || m_current_view == COVERFLOW_EMU) && (DeviceHandler::Instance()->GetFSType(currentPartition) != PART_FS_FAT ||
|
||||
(!isD2XnewerThanV6 && DeviceHandler::Instance()->PathToDriveType(m_appDir.c_str()) == currentPartition) ||
|
||||
(!isD2XnewerThanV6 && DeviceHandler::Instance()->PathToDriveType(m_dataDir.c_str()) == currentPartition))) ||
|
||||
((m_current_view == COVERFLOW_HOMEBREW || m_current_view == COVERFLOW_DML) && DeviceHandler::Instance()->GetFSType(currentPartition) == PART_FS_WBFS))
|
||||
@ -480,7 +502,7 @@ int CMenu::main(void)
|
||||
else if(m_btnMgr.selected(m_mainBtnConfig))
|
||||
{
|
||||
m_gameList.SetLanguage(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str());
|
||||
|
||||
|
||||
UpdateCache(m_current_view);
|
||||
LoadView();
|
||||
}
|
||||
@ -522,13 +544,15 @@ int CMenu::main(void)
|
||||
m_reload = (BTN_B_HELD || m_disable_exit);
|
||||
break;
|
||||
}
|
||||
else if (m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnUsb) || m_btnMgr.selected(m_mainBtnDML) || m_btnMgr.selected(m_mainBtnHomebrew))
|
||||
else if (m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnUsb) || m_btnMgr.selected(m_mainBtnDML) || m_btnMgr.selected(m_mainBtnHomebrew) || m_btnMgr.selected(m_mainBtnEmu))
|
||||
{
|
||||
if (m_current_view == COVERFLOW_USB)
|
||||
m_current_view = m_show_dml ? COVERFLOW_DML : (show_channel ? COVERFLOW_CHANNEL : ((show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_USB));
|
||||
m_current_view = m_show_dml ? COVERFLOW_DML : (show_channel ? COVERFLOW_CHANNEL : (show_emu ? COVERFLOW_EMU : ((show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_USB)));
|
||||
else if (m_current_view == COVERFLOW_DML)
|
||||
m_current_view = show_channel ? COVERFLOW_CHANNEL : ((show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_USB);
|
||||
m_current_view = show_channel ? COVERFLOW_CHANNEL : ((show_emu ? COVERFLOW_EMU : (show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_USB));
|
||||
else if (m_current_view == COVERFLOW_CHANNEL)
|
||||
m_current_view = (show_emu ? COVERFLOW_EMU : (show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_USB);
|
||||
else if (m_current_view == COVERFLOW_EMU)
|
||||
m_current_view = (show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_USB;
|
||||
else if (m_current_view == COVERFLOW_HOMEBREW)
|
||||
m_current_view = COVERFLOW_USB;
|
||||
@ -652,12 +676,22 @@ int CMenu::main(void)
|
||||
case COVERFLOW_DML:
|
||||
if(show_channel)
|
||||
m_btnMgr.show(m_mainBtnChannel);
|
||||
else if(show_emu)
|
||||
m_btnMgr.show(m_mainBtnEmu);
|
||||
else if(show_homebrew)
|
||||
m_btnMgr.show(m_mainBtnHomebrew);
|
||||
else
|
||||
m_btnMgr.show(m_mainBtnUsb);
|
||||
break;
|
||||
case COVERFLOW_CHANNEL:
|
||||
if(show_emu)
|
||||
m_btnMgr.show(m_mainBtnEmu);
|
||||
else if (show_homebrew && (parental_homebrew || !m_locked))
|
||||
m_btnMgr.show(m_mainBtnHomebrew);
|
||||
else
|
||||
m_btnMgr.show(m_mainBtnUsb);
|
||||
break;
|
||||
case COVERFLOW_EMU:
|
||||
if (show_homebrew && (parental_homebrew || !m_locked))
|
||||
m_btnMgr.show(m_mainBtnHomebrew);
|
||||
else
|
||||
@ -671,6 +705,8 @@ int CMenu::main(void)
|
||||
m_btnMgr.show(m_mainBtnDML);
|
||||
else if (show_channel)
|
||||
m_btnMgr.show(m_mainBtnChannel);
|
||||
else if(show_emu)
|
||||
m_btnMgr.show(m_mainBtnEmu);
|
||||
else if (show_homebrew && (parental_homebrew || !m_locked))
|
||||
m_btnMgr.show(m_mainBtnHomebrew);
|
||||
else
|
||||
@ -686,6 +722,7 @@ int CMenu::main(void)
|
||||
m_btnMgr.hide(m_mainBtnChannel);
|
||||
m_btnMgr.hide(m_mainBtnUsb);
|
||||
m_btnMgr.hide(m_mainBtnDML);
|
||||
m_btnMgr.hide(m_mainBtnEmu);
|
||||
m_btnMgr.hide(m_mainLblUser[2]);
|
||||
m_btnMgr.hide(m_mainLblUser[3]);
|
||||
}
|
||||
@ -738,6 +775,8 @@ void CMenu::_initMainMenu(CMenu::SThemeData &theme)
|
||||
STexture texConfigS;
|
||||
STexture texDML;
|
||||
STexture texDMLs;
|
||||
STexture texEmu;
|
||||
STexture texEmus;
|
||||
STexture texDVD;
|
||||
STexture texDVDs;
|
||||
STexture texUsb;
|
||||
@ -773,6 +812,8 @@ void CMenu::_initMainMenu(CMenu::SThemeData &theme)
|
||||
texUsbs.fromPNG(btnusbs_png);
|
||||
texDML.fromPNG(btndml_png);
|
||||
texDMLs.fromPNG(btndmls_png);
|
||||
texEmu.fromPNG(btnemu_png);
|
||||
texEmus.fromPNG(btnemus_png);
|
||||
texChannel.fromPNG(btnchannel_png);
|
||||
texChannels.fromPNG(btnchannels_png);
|
||||
texHomebrew.fromPNG(btnhomebrew_png);
|
||||
@ -795,6 +836,7 @@ void CMenu::_initMainMenu(CMenu::SThemeData &theme)
|
||||
m_mainBtnHomebrew = _addPicButton(theme, "MAIN/HOMEBREW_BTN", texHomebrew, texHomebrews, 520, 400, 48, 48);
|
||||
m_mainBtnUsb = _addPicButton(theme, "MAIN/USB_BTN", texUsb, texUsbs, 520, 400, 48, 48);
|
||||
m_mainBtnDML = _addPicButton(theme, "MAIN/DML_BTN", texDML, texDMLs, 520, 400, 48, 48);
|
||||
m_mainBtnEmu = _addPicButton(theme, "MAIN/EMU_BTN", texEmu, texEmus, 520, 400, 48, 48);
|
||||
m_mainBtnDVD = _addPicButton(theme, "MAIN/DVD_BTN", texDVD, texDVDs, 470, 400, 48, 48);
|
||||
m_mainBtnNext = _addPicButton(theme, "MAIN/NEXT_BTN", texNext, texNextS, 540, 146, 80, 80);
|
||||
m_mainBtnPrev = _addPicButton(theme, "MAIN/PREV_BTN", texPrev, texPrevS, 20, 146, 80, 80);
|
||||
@ -848,6 +890,7 @@ void CMenu::_initMainMenu(CMenu::SThemeData &theme)
|
||||
_setHideAnim(m_mainBtnHomebrew, "MAIN/HOMEBREW_BTN", 0, 40, 0.f, 0.f);
|
||||
_setHideAnim(m_mainBtnUsb, "MAIN/USB_BTN", 0, 40, 0.f, 0.f);
|
||||
_setHideAnim(m_mainBtnDML, "MAIN/DML_BTN", 0, 40, 0.f, 0.f);
|
||||
_setHideAnim(m_mainBtnEmu, "MAIN/EMU_BTN", 0, 40, 0.f, 0.f);
|
||||
_setHideAnim(m_mainBtnDVD, "MAIN/DVD_BTN", 0, 40, 0.f, 0.f);
|
||||
_setHideAnim(m_mainBtnFavoritesOn, "MAIN/FAVORITES_ON", 0, 40, 0.f, 0.f);
|
||||
_setHideAnim(m_mainBtnFavoritesOff, "MAIN/FAVORITES_OFF", 0, 40, 0.f, 0.f);
|
||||
|
Loading…
Reference in New Issue
Block a user