From da91e6a392d96030a954f14c09a3f8bf1a37788f Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 2 Jun 2024 10:53:45 -0400 Subject: [PATCH] Remove unused callfunc --- asm/macros/event.inc | 7 ------- data/script_cmd_table.inc | 1 - src/scrcmd.c | 6 ------ 3 files changed, 14 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 8a4301160331..a518b7be2c26 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1813,13 +1813,6 @@ _dynmultichoice \left, \top, \ignoreBPress, \maxBeforeScroll, \shouldSort, \initialSelected, \callbacks, NULL .endm - @ Like callnative, but can return a value. TODO: Replace uses with callnative. - .macro callfunc func:req - .byte 0xe5 - .4byte \func - .endm - - @ Supplementary .macro goto_if_unset flag:req, dest:req diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index d1cc651d7a46..711b118cc6ef 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -229,7 +229,6 @@ gScriptCmdTable:: .4byte ScrCmd_bufferitemnameplural @ 0xe2 .4byte ScrCmd_dynmultichoice @ 0xe3 .4byte ScrCmd_dynmultipush @ 0xe4 - .4byte ScrCmd_callfunc @ 0xe5 gScriptCmdTableEnd:: .4byte ScrCmd_nop diff --git a/src/scrcmd.c b/src/scrcmd.c index fceea306f01b..b060fa944d78 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -145,12 +145,6 @@ bool8 ScrCmd_callnative(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_callfunc(struct ScriptContext *ctx) -{ - u32 func = ScriptReadWord(ctx); - return ((ScrCmdFunc) func)(ctx); -} - bool8 ScrCmd_waitstate(struct ScriptContext *ctx) { ScriptContext_Stop();