From 66f2e4ed4df708280904a21e4a92558e7fcc5866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Mon, 15 Mar 2021 21:17:31 +0100 Subject: decomp MOD52_021D74F8 --- arm9/global.inc | 1 + arm9/modules/52/asm/module_52.s | 11 ----------- arm9/modules/52/src/module_52_c.c | 13 +++++++++++-- 3 files changed, 12 insertions(+), 13 deletions(-) (limited to 'arm9') diff --git a/arm9/global.inc b/arm9/global.inc index 999a0e6d..15f291a0 100644 --- a/arm9/global.inc +++ b/arm9/global.inc @@ -8520,3 +8520,4 @@ .extern MonNotFaintedOrEgg .extern CountAlivePokemon .extern MOD52_021D74E0 +.extern MOD52_021D74F8 diff --git a/arm9/modules/52/asm/module_52.s b/arm9/modules/52/asm/module_52.s index 4d85bb58..457373a1 100644 --- a/arm9/modules/52/asm/module_52.s +++ b/arm9/modules/52/asm/module_52.s @@ -3,17 +3,6 @@ .section .text .balign 4, 0 - thumb_func_start MOD52_021D74F8 -MOD52_021D74F8: ; 0x021D74F8 - push {r3, lr} - bl OverlayManager_GetField18 - ldr r1, [r0, #8] - mov r0, #0x4d - bl MOD52_021D769C - mov r0, #1 - pop {r3, pc} - .align 2, 0 - thumb_func_end MOD52_021D74F8 thumb_func_start MOD52_021D750C MOD52_021D750C: ; 0x021D750C diff --git a/arm9/modules/52/src/module_52_c.c b/arm9/modules/52/src/module_52_c.c index 5835255f..61877176 100644 --- a/arm9/modules/52/src/module_52_c.c +++ b/arm9/modules/52/src/module_52_c.c @@ -1,13 +1,22 @@ #include "global.h" #include "main.h" +#include "overlay_manager.h" extern void FUN_0201681C(u32 param0, u32 heap_id, u32 param2); -extern void MOD52_021D769C(u32 heap_id, u32 param1); +extern void MOD52_021D769C(u32 heap_id, int param1); THUMB_FUNC int MOD52_021D74E0() { FUN_0201681C(3, 0x4d, 2 << 16); InitializeMainRNG(); return 1; -} \ No newline at end of file +} + +THUMB_FUNC int MOD52_021D74F8(struct UnkStruct_02006234 *param0) { + int res = OverlayManager_GetField18(param0)[2]; + + MOD52_021D769C(0x4d, res); + + return 1; +} -- cgit v1.2.3