remove naked asm (oops)

This commit is contained in:
Kurausukun 2020-10-22 05:04:35 -04:00
parent 2945a3a845
commit 0bca313b41

View file

@ -623,7 +623,6 @@ static void ASCIIToPkmnStr(u8 *pkmnStr, const u8 *asciiStr)
pkmnStr[i] = EOS;
}
#ifdef NONMATCHING
static u8 GetConnectedChildStrength(u8 maxFlags)
{
u8 flagCount = 0;
@ -655,76 +654,6 @@ static u8 GetConnectedChildStrength(u8 maxFlags)
}
return 0;
}
#else
NAKED
static u8 GetConnectedChildStrength(u8 maxFlags)
{
asm_unified("\tpush {r4-r7,lr}\n"
"\tlsls r0, 24\n"
"\tlsrs r5, r0, 24\n"
"\tmovs r6, 0\n"
"\tldr r0, =gRfuLinkStatus\n"
"\tldr r4, [r0]\n"
"\tldrb r2, [r4, 0x2]\n"
"\tldrb r1, [r4]\n"
"\tadds r7, r0, 0\n"
"\tcmp r1, 0x1\n"
"\tbne _0800DD72\n"
"\tmovs r3, 0\n"
"\tands r1, r2\n"
"\tcmp r1, 0\n"
"\tbeq _0800DD4E\n"
"\tcmp r5, 0x1\n"
"\tbne _0800DD48\n"
"\tldrb r0, [r4, 0xA]\n"
"\tb _0800DD8C\n"
"\t.pool\n"
"_0800DD48:\n"
"\tadds r0, r6, 0x1\n"
"\tlsls r0, 24\n"
"\tlsrs r6, r0, 24\n"
"_0800DD4E:\n"
"\tlsrs r2, 1\n"
"\tadds r0, r3, 0x1\n"
"\tlsls r0, 24\n"
"\tlsrs r3, r0, 24\n"
"\tcmp r3, 0x3\n"
"\tbhi _0800DD8A\n"
"\tmovs r0, 0x1\n"
"\tands r0, r2\n"
"\tcmp r0, 0\n"
"\tbeq _0800DD4E\n"
"\tadds r0, r6, 0x1\n"
"\tcmp r5, r0\n"
"\tbne _0800DD48\n"
"_0800DD68:\n"
"\tldr r0, [r7]\n"
"\tadds r0, 0xA\n"
"\tadds r0, r3\n"
"\tldrb r0, [r0]\n"
"\tb _0800DD8C\n"
"_0800DD72:\n"
"\tmovs r3, 0\n"
"\tmovs r1, 0x1\n"
"_0800DD76:\n"
"\tadds r0, r2, 0\n"
"\tands r0, r1\n"
"\tcmp r0, 0\n"
"\tbne _0800DD68\n"
"\tlsrs r2, 1\n"
"\tadds r0, r3, 0x1\n"
"\tlsls r0, 24\n"
"\tlsrs r3, r0, 24\n"
"\tcmp r3, 0x3\n"
"\tbls _0800DD76\n"
"_0800DD8A:\n"
"\tmovs r0, 0\n"
"_0800DD8C:\n"
"\tpop {r4-r7}\n"
"\tpop {r1}\n"
"\tbx r1");
}
#endif
void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 started, s32 child_sprite_genders)
{