From 5d30f28cd66d7df34744b69bca9955cfd4fa08b2 Mon Sep 17 00:00:00 2001 From: Zur3l <90565581+Zur3l@users.noreply.github.com> Date: Sat, 11 Jul 2026 16:00:23 -0400 Subject: [PATCH] Decomp IsNot2TurnsMoveOrSketch --- .../{main_02014E38.inc => main_02014E64.inc} | 1 - asm/{main_02014E38.s => main_02014E64.s} | 17 +---------------- include/main_02014CEC.h | 3 +++ main.lsf | 2 +- src/main_02014CEC.c | 8 ++++++++ 5 files changed, 13 insertions(+), 18 deletions(-) rename asm/include/{main_02014E38.inc => main_02014E64.inc} (99%) rename asm/{main_02014E38.s => main_02014E64.s} (99%) diff --git a/asm/include/main_02014E38.inc b/asm/include/main_02014E64.inc similarity index 99% rename from asm/include/main_02014E38.inc rename to asm/include/main_02014E64.inc index 65f4629c..cc74c7bf 100644 --- a/asm/include/main_02014E38.inc +++ b/asm/include/main_02014E64.inc @@ -95,7 +95,6 @@ .public GroupOamObjs .public InitOamInfo .public IqSkillFlagTest -.public Is2TurnsMove .public LANGUAGE_INFO_DATA .public LoadFileFromRom .public LoadScriptVariableValue diff --git a/asm/main_02014E38.s b/asm/main_02014E64.s similarity index 99% rename from asm/main_02014E38.s rename to asm/main_02014E64.s index 015fb7ea..6df0173f 100644 --- a/asm/main_02014E38.s +++ b/asm/main_02014E64.s @@ -1,23 +1,8 @@ .include "asm/macros.inc" - .include "main_02014E38.inc" + .include "main_02014E64.inc" .text - arm_func_start IsNot2TurnsMoveOrSketch -IsNot2TurnsMoveOrSketch: ; 0x02014E38 - stmdb sp!, {r4, lr} - mov r4, r0 - bl Is2TurnsMove - cmp r0, #0 - movne r0, #0 - ldmneia sp!, {r4, pc} - cmp r4, #0x8a - movne r0, #1 - moveq r0, #0 - and r0, r0, #0xff - ldmia sp!, {r4, pc} - arm_func_end IsNot2TurnsMoveOrSketch - arm_func_start IsRealMove IsRealMove: ; 0x02014E64 cmp r0, #0 diff --git a/include/main_02014CEC.h b/include/main_02014CEC.h index 184a9029..a878c680 100644 --- a/include/main_02014CEC.h +++ b/include/main_02014CEC.h @@ -25,4 +25,7 @@ bool8 IsTrappingMove(enum move_id move_id); // Checks if the move is a one hit KO move bool8 IsOneHitKoMove(enum move_id move_id); +// Checks if the move is not a two turn move or sketch +bool8 IsNot2TurnsMoveOrSketch(enum move_id move_id); + #endif //PMDSKY_MAIN_02014CEC_H diff --git a/main.lsf b/main.lsf index fa108445..a3a956df 100644 --- a/main.lsf +++ b/main.lsf @@ -79,7 +79,7 @@ Static main Object src/main_02014A4C.o Object asm/main_02014B1C.o Object src/main_02014CEC.o - Object asm/main_02014E38.o + Object asm/main_02014E64.o Object src/main_020251AC.o Object asm/main_020251F0.o Object src/main_02025788.o diff --git a/src/main_02014CEC.c b/src/main_02014CEC.c index 8adce2f3..693a198a 100644 --- a/src/main_02014CEC.c +++ b/src/main_02014CEC.c @@ -72,3 +72,11 @@ bool8 IsOneHitKoMove(enum move_id move_id) return FALSE; } + +bool8 IsNot2TurnsMoveOrSketch(enum move_id move_id) +{ + if (Is2TurnsMove(move_id)) return FALSE; + if (move_id == MOVE_SKETCH) return FALSE; + + return TRUE; +}