mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-23 18:31:56 +01:00
928020b32f
*Added Browser for AlternateDOL from disc feature NOTE: Right now the browser isn't working right and crashing from time to time so you i would not recommend to use it yet. It's also showing all files on the disc for test purpose. I'll try to fix it later right now i don't have time for it. *Changed some minor codes and moved cheats to its own folder
47 lines
848 B
C
47 lines
848 B
C
#include <gccore.h>
|
|
|
|
#include "fstfile.h"
|
|
|
|
|
|
char *fstfiles(FST_ENTRY *fst, u32 index)
|
|
{
|
|
u32 count = fst[0].filelen;
|
|
u32 stringoffset;
|
|
if (index < count)
|
|
{
|
|
stringoffset = *(u32 *)&(fst[index]) % (256*256*256);
|
|
return (char *)((u32)fst + count*12 + stringoffset);
|
|
} else
|
|
{
|
|
return NULL;
|
|
}
|
|
}
|
|
|
|
char *fstfilename(u32 index)
|
|
{
|
|
FST_ENTRY *fst = (FST_ENTRY *)*(u32 *)0x80000038;
|
|
u32 count = fst[0].filelen;
|
|
u32 stringoffset;
|
|
if (index < count)
|
|
{
|
|
stringoffset = *(u32 *)&(fst[index]) % (256*256*256);
|
|
return (char *)(*(u32 *)0x80000038 + count*12 + stringoffset);
|
|
} else
|
|
{
|
|
return NULL;
|
|
}
|
|
}
|
|
|
|
u32 fstfileoffset(u32 index)
|
|
{
|
|
FST_ENTRY *fst = (FST_ENTRY *)*(u32 *)0x80000038;
|
|
u32 count = fst[0].filelen;
|
|
if (index < count)
|
|
{
|
|
return fst[index].fileoffset;
|
|
} else
|
|
{
|
|
return 0;
|
|
}
|
|
}
|