diff options
author | camthesaxman <cameronghall@cox.net> | 2017-09-09 18:33:29 -0500 |
---|---|---|
committer | camthesaxman <cameronghall@cox.net> | 2017-09-09 18:33:29 -0500 |
commit | 66a148af9fea2a7029f5aae362e80b440686064e (patch) | |
tree | a171d88817ae2c079df672df08b9d94126b210da /src | |
parent | 95f856c39e81e2b723065e757b4dcf577441c558 (diff) |
let's not mess around with typedefs now
Diffstat (limited to 'src')
-rw-r--r-- | src/scrcmd.c | 10 | ||||
-rw-r--r-- | src/script.c | 2 | ||||
-rw-r--r-- | src/script_menu.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/scrcmd.c b/src/scrcmd.c index ace15c056..28379d2f2 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -109,8 +109,8 @@ bool8 ScrCmd_end(struct ScriptContext *ctx) bool8 ScrCmd_jumpasm(struct ScriptContext *ctx) { - u32 addr = ScriptReadWord(ctx); - SetupNativeScript(ctx, (void *)addr); + bool8 (*addr)(void) = (bool8 (*)(void))ScriptReadWord(ctx); + SetupNativeScript(ctx, addr); return TRUE; } @@ -1313,10 +1313,10 @@ bool8 ScrCmd_showpokepic(struct ScriptContext *ctx) bool8 ScrCmd_hidepokepic(struct ScriptContext *ctx) { - void *func = ScriptMenu_GetPicboxWaitFunc(); - if (!func) - return FALSE; + bool8 (*func)(void) = ScriptMenu_GetPicboxWaitFunc(); + if (func == NULL) + return FALSE; SetupNativeScript(ctx, func); return TRUE; } diff --git a/src/script.c b/src/script.c index 18abb6e84..394085d4a 100644 --- a/src/script.c +++ b/src/script.c @@ -40,7 +40,7 @@ u8 SetupBytecodeScript(struct ScriptContext *ctx, const u8 *ptr) return 1; } -void SetupNativeScript(struct ScriptContext *ctx, NativeScriptFunc ptr) +void SetupNativeScript(struct ScriptContext *ctx, bool8 (*ptr)(void)) { ctx->mode = 2; ctx->nativePtr = ptr; diff --git a/src/script_menu.c b/src/script_menu.c index dc63f9f4a..253157b47 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -1153,7 +1153,7 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y) } } -NativeScriptFunc ScriptMenu_GetPicboxWaitFunc(void) +bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void) { u8 taskId = FindTaskIdByFunc(Task_PokemonPicWindow); |