Merge branch 'master' of github.com:pret/pokefirered into dism_more_data
This commit is contained in:
+4
-171
@@ -564,19 +564,18 @@ static void sub_8110BB0(u8 a0)
|
||||
questLog->unk_006 = gSaveBlock1Ptr->pos.y;
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
static void sub_8110BE8(u8 a0)
|
||||
{
|
||||
struct QuestLog * questLog = &gSaveBlock1Ptr->questLog[a0];
|
||||
u16 i; // r6
|
||||
u16 i;
|
||||
|
||||
sub_815A008(questLog);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gSaveBlock1Ptr->mapObjectTemplates); i++)
|
||||
for (i = 0; i < NELEMS(gSaveBlock1Ptr->mapObjectTemplates); i++)
|
||||
{
|
||||
if (gSaveBlock1Ptr->mapObjectTemplates[i].x < 0)
|
||||
{
|
||||
questLog->npcData[i].x = (u8)-gSaveBlock1Ptr->mapObjectTemplates[i].x;
|
||||
questLog->npcData[i].x = -1 * gSaveBlock1Ptr->mapObjectTemplates[i].x;
|
||||
questLog->npcData[i].negx = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -586,7 +585,7 @@ static void sub_8110BE8(u8 a0)
|
||||
}
|
||||
if (gSaveBlock1Ptr->mapObjectTemplates[i].y < 0)
|
||||
{
|
||||
questLog->npcData[i].y = (u8)-gSaveBlock1Ptr->mapObjectTemplates[i].y;
|
||||
questLog->npcData[i].y = (-gSaveBlock1Ptr->mapObjectTemplates[i].y << 24) >> 24;
|
||||
questLog->npcData[i].negy = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -598,172 +597,6 @@ static void sub_8110BE8(u8 a0)
|
||||
questLog->npcData[i].movementType = gSaveBlock1Ptr->mapObjectTemplates[i].movementType;
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
static void sub_8110BE8(u8 a0)
|
||||
{
|
||||
asm_unified("\tpush {r4-r7,lr}\n"
|
||||
"\tmov r7, r10\n"
|
||||
"\tmov r6, r9\n"
|
||||
"\tmov r5, r8\n"
|
||||
"\tpush {r5-r7}\n"
|
||||
"\tlsls r0, 24\n"
|
||||
"\tlsrs r0, 24\n"
|
||||
"\tldr r4, =gSaveBlock1Ptr\n"
|
||||
"\tmovs r1, 0xCD\n"
|
||||
"\tlsls r1, 3\n"
|
||||
"\tmuls r0, r1\n"
|
||||
"\tmovs r1, 0x98\n"
|
||||
"\tlsls r1, 5\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tldr r1, [r4]\n"
|
||||
"\tadds r7, r1, r0\n"
|
||||
"\tadds r0, r7, 0\n"
|
||||
"\tbl sub_815A008\n"
|
||||
"\tmovs r6, 0\n"
|
||||
"\tmov r9, r4\n"
|
||||
"\tmovs r2, 0x8D\n"
|
||||
"\tlsls r2, 3\n"
|
||||
"\tmov r8, r2\n"
|
||||
"\tldr r3, =0x0000046a\n"
|
||||
"\tmov r10, r3\n"
|
||||
"_08110C1C:\n"
|
||||
"\tmov r4, r9\n"
|
||||
"\tldr r1, [r4]\n"
|
||||
"\tlsls r2, r6, 1\n"
|
||||
"\tadds r0, r2, r6\n"
|
||||
"\tlsls r0, 3\n"
|
||||
"\tadds r1, r0\n"
|
||||
"\tldr r0, =0x000008e4\n"
|
||||
"\tadds r1, r0\n"
|
||||
"\tldrh r4, [r1]\n"
|
||||
"\tmovs r3, 0\n"
|
||||
"\tldrsh r0, [r1, r3]\n"
|
||||
"\tmov r12, r2\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbge _08110C64\n"
|
||||
"\tlsls r3, r6, 2\n"
|
||||
"\tadds r2, r7, r3\n"
|
||||
"\tnegs r0, r0\n"
|
||||
"\tmov r4, r8\n"
|
||||
"\tadds r1, r2, r4\n"
|
||||
"\tstrb r0, [r1]\n"
|
||||
"\tldr r0, =0x00000469\n"
|
||||
"\tadds r2, r0\n"
|
||||
"\tldrb r0, [r2]\n"
|
||||
"\tmovs r1, 0x1\n"
|
||||
"\torrs r0, r1\n"
|
||||
"\tstrb r0, [r2]\n"
|
||||
"\tb _08110C7C\n"
|
||||
"\t.pool\n"
|
||||
"_08110C64:\n"
|
||||
"\tlsls r3, r6, 2\n"
|
||||
"\tadds r1, r7, r3\n"
|
||||
"\tmov r2, r8\n"
|
||||
"\tadds r0, r1, r2\n"
|
||||
"\tstrb r4, [r0]\n"
|
||||
"\tldr r4, =0x00000469\n"
|
||||
"\tadds r1, r4\n"
|
||||
"\tldrb r2, [r1]\n"
|
||||
"\tmovs r0, 0x2\n"
|
||||
"\tnegs r0, r0\n"
|
||||
"\tands r0, r2\n"
|
||||
"\tstrb r0, [r1]\n"
|
||||
"_08110C7C:\n"
|
||||
"\tadds r5, r3, 0\n"
|
||||
"\tmov r1, r9\n"
|
||||
"\tldr r0, [r1]\n"
|
||||
"\tmov r2, r12\n"
|
||||
"\tadds r1, r2, r6\n"
|
||||
"\tlsls r1, 3\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tldr r3, =0x000008e6\n"
|
||||
"\tadds r1, r0, r3\n"
|
||||
"\tldrh r2, [r1]\n"
|
||||
"\tmovs r4, 0\n"
|
||||
"\tldrsh r0, [r1, r4]\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbge _08110CC8\n"
|
||||
"\tadds r3, r7, r5\n"
|
||||
"\tadds r1, r0, 0\n"
|
||||
"\tnegs r1, r1\n"
|
||||
"\tlsls r1, 24\n"
|
||||
"\tmov r2, r8\n"
|
||||
"\tadds r4, r3, r2\n"
|
||||
"\tlsrs r1, 15\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tldr r2, =0xfffe01ff\n"
|
||||
"\tands r0, r2\n"
|
||||
"\torrs r0, r1\n"
|
||||
"\tstr r0, [r4]\n"
|
||||
"\tadd r3, r10\n"
|
||||
"\tldrb r0, [r3]\n"
|
||||
"\tmovs r1, 0x2\n"
|
||||
"\torrs r0, r1\n"
|
||||
"\tb _08110CE6\n"
|
||||
"\t.pool\n"
|
||||
"_08110CC8:\n"
|
||||
"\tadds r3, r7, r5\n"
|
||||
"\tlsls r2, 24\n"
|
||||
"\tmov r0, r8\n"
|
||||
"\tadds r4, r3, r0\n"
|
||||
"\tlsrs r2, 15\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tldr r1, =0xfffe01ff\n"
|
||||
"\tands r0, r1\n"
|
||||
"\torrs r0, r2\n"
|
||||
"\tstr r0, [r4]\n"
|
||||
"\tadd r3, r10\n"
|
||||
"\tldrb r1, [r3]\n"
|
||||
"\tmovs r0, 0x3\n"
|
||||
"\tnegs r0, r0\n"
|
||||
"\tands r0, r1\n"
|
||||
"_08110CE6:\n"
|
||||
"\tstrb r0, [r3]\n"
|
||||
"\tadds r5, r7, r5\n"
|
||||
"\tmov r1, r9\n"
|
||||
"\tldr r0, [r1]\n"
|
||||
"\tmov r2, r12\n"
|
||||
"\tadds r3, r2, r6\n"
|
||||
"\tlsls r3, 3\n"
|
||||
"\tadds r0, r3\n"
|
||||
"\tldr r4, =0x000008e8\n"
|
||||
"\tadds r0, r4\n"
|
||||
"\tldrb r1, [r0]\n"
|
||||
"\tmov r0, r10\n"
|
||||
"\tadds r4, r5, r0\n"
|
||||
"\tlsls r1, 2\n"
|
||||
"\tldrb r2, [r4]\n"
|
||||
"\tmovs r0, 0x3\n"
|
||||
"\tands r0, r2\n"
|
||||
"\torrs r0, r1\n"
|
||||
"\tstrb r0, [r4]\n"
|
||||
"\tmov r1, r9\n"
|
||||
"\tldr r0, [r1]\n"
|
||||
"\tadds r0, r3\n"
|
||||
"\tldr r2, =0x000008e9\n"
|
||||
"\tadds r0, r2\n"
|
||||
"\tldrb r0, [r0]\n"
|
||||
"\tldr r3, =0x0000046b\n"
|
||||
"\tadds r5, r3\n"
|
||||
"\tstrb r0, [r5]\n"
|
||||
"\tadds r0, r6, 0x1\n"
|
||||
"\tlsls r0, 16\n"
|
||||
"\tlsrs r6, r0, 16\n"
|
||||
"\tcmp r6, 0x3F\n"
|
||||
"\tbhi _08110D2A\n"
|
||||
"\tb _08110C1C\n"
|
||||
"_08110D2A:\n"
|
||||
"\tpop {r3-r5}\n"
|
||||
"\tmov r8, r3\n"
|
||||
"\tmov r9, r4\n"
|
||||
"\tmov r10, r5\n"
|
||||
"\tpop {r4-r7}\n"
|
||||
"\tpop {r0}\n"
|
||||
"\tbx r0\n"
|
||||
"\t.pool");
|
||||
}
|
||||
#endif // NONMATCHING
|
||||
|
||||
static void sub_8110D48(u8 a0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user