From 66a148af9fea2a7029f5aae362e80b440686064e Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Sat, 9 Sep 2017 18:33:29 -0500 Subject: let's not mess around with typedefs now --- src/scrcmd.c | 10 +++++----- src/script.c | 2 +- src/script_menu.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') 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); -- cgit v1.2.3