mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-06 22:04:10 +08:00
继续试验金手指开启
This commit is contained in:
parent
53560f025d
commit
73942c4e78
@ -18,7 +18,7 @@ typedef int cheat_error_t;
|
|||||||
#define CHEAT_MODE_FULLTIME 1
|
#define CHEAT_MODE_FULLTIME 1
|
||||||
#define CHEAT_MODE_ENABYKEY 2
|
#define CHEAT_MODE_ENABYKEY 2
|
||||||
#define CHEAT_MODE_KEYONOFF 3
|
#define CHEAT_MODE_KEYONOFF 3
|
||||||
#define CHEAT_MODE_SIZE 3
|
#define CHEAT_MODE_SIZE 4
|
||||||
|
|
||||||
#define MAKE_ENTID(hole, key) (((key)+1)<<16|((hole)+1))
|
#define MAKE_ENTID(hole, key) (((key)+1)<<16|((hole)+1))
|
||||||
#define ENT_USING(entid) ((entid) > 0xffff)
|
#define ENT_USING(entid) ((entid) > 0xffff)
|
||||||
|
@ -390,9 +390,12 @@ static Result loadGbaRom(const char *const path, u32 *const romSizeOut)
|
|||||||
while((res = fRead(f, ptr, 0x100000u, &read)) == RES_OK && read == 0x100000u)
|
while((res = fRead(f, ptr, 0x100000u, &read)) == RES_OK && read == 0x100000u)
|
||||||
ptr += 0x100000u;
|
ptr += 0x100000u;
|
||||||
|
|
||||||
|
// use the gbaatm cheat
|
||||||
if( g_oafConfig.cheatMode != CHEAT_MODE_DISABLED )
|
if( g_oafConfig.cheatMode != CHEAT_MODE_DISABLED )
|
||||||
{
|
{
|
||||||
apply_cheat( g_oafConfig.cheatMode, fileSize, g_oafConfig.cheatKeys, CHEAT_INUSE_ADDR, &fileSize );
|
apply_cheat( g_oafConfig.cheatMode, fileSize, g_oafConfig.cheatKeys, CHEAT_INUSE_ADDR, &fileSize );
|
||||||
|
fini_current_cheat();
|
||||||
|
acl_close_lib();
|
||||||
}
|
}
|
||||||
*romSizeOut = fixRomPadding(fileSize);
|
*romSizeOut = fixRomPadding(fileSize);
|
||||||
}
|
}
|
||||||
@ -847,7 +850,7 @@ static int cfgIniCallback(void* user, const char* section, const char* name, con
|
|||||||
{
|
{
|
||||||
if( strcmp(name, "cheatMode") == 0 )
|
if( strcmp(name, "cheatMode") == 0 )
|
||||||
config->cheatMode = (u8)strtoul(value, NULL, 10);
|
config->cheatMode = (u8)strtoul(value, NULL, 10);
|
||||||
if( config->cheatMode > CHEAT_MODE_SIZE ) config->cheatMode = CHEAT_MODE_DISABLED;
|
if( config->cheatMode >= CHEAT_MODE_SIZE ) config->cheatMode = CHEAT_MODE_DISABLED;
|
||||||
}
|
}
|
||||||
else return 0; // Error.
|
else return 0; // Error.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user