Decomped sub_0205C8E0

Decomped by @slaw-22
This commit is contained in:
AnonymousRandomPerson 2026-03-19 21:17:59 -04:00
parent f8498f1d05
commit dd62d391f9
5 changed files with 32 additions and 29 deletions

View File

@ -373,4 +373,5 @@
.public sub_0205BD5C
.public sub_0205C73C
.public sub_0205C870
.public sub_0205C8E0
.public vsprintf

View File

@ -1,35 +1,8 @@
.include "asm/macros.inc"
.include "main_0205C8E0.inc"
.include "main_0205C934.inc"
.text
arm_func_start sub_0205C8E0
sub_0205C8E0: ; 0x0205C8E0
ldrb ip, [r0]
ldrb r2, [r1]
cmp ip, r2
movne r0, #0
bxne lr
cmp ip, #0
bne _0205C910
ldrh r3, [r0, #2]
ldrh r2, [r1, #2]
cmp r3, r2
movne r0, #0
bxne lr
_0205C910:
cmp ip, #1
bne _0205C92C
ldrsh r2, [r0, #2]
ldrsh r0, [r1, #2]
cmp r2, r0
movne r0, #0
bxne lr
_0205C92C:
mov r0, #1
bx lr
arm_func_end sub_0205C8E0
arm_func_start AreMissionsEquivalent
AreMissionsEquivalent: ; 0x0205C934
stmdb sp!, {r3, r4, r5, lr}

View File

@ -3,9 +3,16 @@
#include "mission.h"
struct unkStruct_0205C8E0 {
u8 unk0;
u8 unk1;
s16 unk2;
};
void sub_0205C73C(void);
void sub_0205C75C(void);
bool8 IsMissionSuspendedAndValid(struct mission *mission);
u8 sub_0205C870(u32 type, s16 *ptr1, s16 *ptr2);
bool8 sub_0205C8E0(struct unkStruct_0205C8E0 *p1, struct unkStruct_0205C8E0 *p2);
#endif //PMDSKY_MAIN_0205C73C_H

View File

@ -162,7 +162,7 @@ Static main
Object src/main_0205C440.o
Object asm/main_0205C548.o
Object src/main_0205C73C.o
Object asm/main_0205C8E0.o
Object asm/main_0205C934.o
Object src/dungeon_init_2.o
Object asm/main_0206A750.o
Object src/main_0206C98C.o

View File

@ -71,3 +71,25 @@ u8 sub_0205C870(u32 type, s16 *ptr1, s16 *ptr2)
return FALSE;
}
}
bool8 sub_0205C8E0(struct unkStruct_0205C8E0 *p1, struct unkStruct_0205C8E0 *p2)
{
u8 type = p1->unk0;
if (type != p2->unk0)
return FALSE;
if (type == 0)
{
if ((u16)p1->unk2 != (u16)p2->unk2)
return FALSE;
}
if (type == 1)
{
if (p1->unk2 != p2->unk2)
return FALSE;
}
return TRUE;
}