diff options
author | Marcus Huderle <huderlem@gmail.com> | 2018-05-30 18:06:44 -0500 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2018-05-30 18:18:37 -0500 |
commit | 41578b45d0b4b43354ca88237f7c2fdfa24f3d32 (patch) | |
tree | aa22491ca34ea8db685bb4672958888b2a646eb8 | |
parent | 244f1af5708f66e215f716f41246f4d6e80cc92f (diff) |
Fix nonmatching in decoration
-rw-r--r-- | include/decoration.h | 4 | ||||
-rw-r--r-- | src/decoration.c | 47 |
2 files changed, 10 insertions, 41 deletions
diff --git a/include/decoration.h b/include/decoration.h index 6bff60771..a2e2bf8f8 100644 --- a/include/decoration.h +++ b/include/decoration.h @@ -175,7 +175,11 @@ void sub_80FE948(u8); void sub_80FEABC(u8, u8); void sub_80FEC94(u8); void sub_80FECB8(u8); +#ifdef GERMAN +int sub_80FECE0(u8); +#else void sub_80FECE0(u8); +#endif void sub_80FEF50(u8); bool8 sub_80FEFA4(void); void sub_80FF394(u16, u16, u16); diff --git a/src/decoration.c b/src/decoration.c index 6c1953677..448e684ad 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -1856,48 +1856,13 @@ void sub_80FECE0(u8 decoCat) sub_8072AB0(gDecorations[gUnknown_020388D0[decoCat]].description, 0x80, 0x68, 0x68, 0x30, 0x1); } #elif GERMAN -NAKED -void sub_80FECE0(u8 decoCat) +int sub_80FECE0(u8 decoCat) { - asm(".syntax unified\n\ - push {lr}\n\ - sub sp, 0x8\n\ - lsls r0, 24\n\ - lsrs r2, r0, 24\n\ - ldr r0, _080FED18 @ =gUnknown_020388D5\n\ - ldrb r0, [r0]\n\ - cmp r2, r0\n\ - beq _080FED24\n\ - ldr r1, _080FED1C @ =gDecorations\n\ - ldr r0, _080FED20 @ =gUnknown_020388D0\n\ - ldr r0, [r0]\n\ - adds r0, r2\n\ - ldrb r0, [r0]\n\ - lsls r0, 5\n\ - adds r1, 0x18\n\ - adds r0, r1\n\ - ldr r0, [r0]\n\ - movs r1, 0x30\n\ - str r1, [sp]\n\ - movs r1, 0x1\n\ - str r1, [sp, 0x4]\n\ - movs r1, 0x80\n\ - movs r2, 0x68\n\ - movs r3, 0x68\n\ - bl sub_8072AB0\n\ - movs r0, 0x1\n\ - b _080FED26\n\ - .align 2, 0\n\ -_080FED18: .4byte gUnknown_020388D5\n\ -_080FED1C: .4byte gDecorations\n\ -_080FED20: .4byte gUnknown_020388D0\n\ -_080FED24:\n\ - movs r0, 0\n\ -_080FED26:\n\ - add sp, 0x8\n\ - pop {r1}\n\ - bx r1\n\ - .syntax divided\n"); + if (decoCat == gUnknown_020388D5) + return FALSE; + + sub_8072AB0(gDecorations[gUnknown_020388D0[decoCat]].description, 0x80, 0x68, 0x68, 0x30, 0x1); + return TRUE; } #endif |