mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-07 22:34:12 +08:00
添加读取hpt文件的功能
This commit is contained in:
parent
7d4cffbec8
commit
6fc6adf703
@ -417,7 +417,26 @@ static u32 fixRomPadding(u32 romFileSize)
|
||||
|
||||
static u32 read_hookpoint_file( void *path, u32 hookpoint[MAX_HOOKPOINT] )
|
||||
{
|
||||
return 0;
|
||||
FILINFO fi;
|
||||
char *file = (char*)path;
|
||||
int len = strlen( file );
|
||||
file[len-1] = 't';
|
||||
file[len-2] = 'p';
|
||||
file[len-3] = 'h';
|
||||
u32 retval = 0;
|
||||
if( fStat(file, &fi) == RES_OK )
|
||||
{
|
||||
if( RES_OK == fsQuickRead(file, hookpoint, sizeof(u32) ) )
|
||||
{
|
||||
retval = 1;
|
||||
}
|
||||
else retval = 0;
|
||||
}
|
||||
else retval = 0;
|
||||
file[len-1] = 'a';
|
||||
file[len-2] = 'b';
|
||||
file[len-3] = 'g';
|
||||
return retval;
|
||||
}
|
||||
|
||||
static Result loadGbaRom(const char *const path, u32 *const romSizeOut)
|
||||
|
Loading…
x
Reference in New Issue
Block a user