From cefb05bdec70f424c840e022e4cd4540ae4dcc41 Mon Sep 17 00:00:00 2001 From: sbird Date: Wed, 29 Nov 2023 13:19:37 +0100 Subject: [PATCH] [dynmulti] left/top read from variables --- asm/macros/event.inc | 4 ++-- src/scrcmd.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index bc29334894..c78c3140aa 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1731,8 +1731,8 @@ .macro _dynmultichoice left:req, top:req, ignoreBPress:req, maxBeforeScroll:req, shouldSort:req, initialSelected:req, callbacks:req argv:vararg .byte 0xe3 - .byte \left - .byte \top + .2byte \left + .2byte \top .byte \ignoreBPress .byte \maxBeforeScroll .byte \shouldSort diff --git a/src/scrcmd.c b/src/scrcmd.c index 7a094c7bee..47d7d1b7eb 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1376,8 +1376,8 @@ static void DynamicMultichoiceSortList(struct ListMenuItem *items, u32 count) bool8 ScrCmd_dynmultichoice(struct ScriptContext *ctx) { u32 i; - u32 left = ScriptReadByte(ctx); - u32 top = ScriptReadByte(ctx); + u32 left = VarGet(ScriptReadHalfword(ctx)); + u32 top = VarGet(ScriptReadHalfword(ctx)); bool32 ignoreBPress = ScriptReadByte(ctx); u32 maxBeforeScroll = ScriptReadByte(ctx); bool32 shouldSort = ScriptReadByte(ctx);