Remove uses of INVALID_ defines, clean up some arrays with constants, and spaces -> tabs
This commit is contained in:
@@ -214,7 +214,7 @@ void sub_8158E9C(u8 taskId)
|
||||
|
||||
if (species != SPECIES_NONE)
|
||||
{
|
||||
if (gBattleAnimArgs[1] == INVALID_U8)
|
||||
if (gBattleAnimArgs[1] == 0xFF)
|
||||
PlayCry3(species, pan, 9);
|
||||
else
|
||||
PlayCry3(species, pan, 7);
|
||||
@@ -238,7 +238,7 @@ static void sub_8158FF4(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gTasks[taskId].data[0] == INVALID_U8)
|
||||
if (gTasks[taskId].data[0] == 0xFF)
|
||||
{
|
||||
if (!IsCryPlaying())
|
||||
{
|
||||
@@ -389,50 +389,50 @@ void sub_8159308(u8 taskId)
|
||||
NAKED
|
||||
void sub_8159308(u8 taskId)
|
||||
{
|
||||
asm_unified(" push {r4,r5,lr}\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
adds r5, r0, 0\n\
|
||||
ldr r1, =gTasks\n\
|
||||
lsls r0, r5, 2\n\
|
||||
adds r0, r5\n\
|
||||
lsls r0, 3\n\
|
||||
adds r4, r0, r1\n\
|
||||
ldrh r2, [r4, 0xE]\n\
|
||||
ldrh r0, [r4, 0x1C]\n\
|
||||
adds r1, r0, 0x1\n\
|
||||
strh r1, [r4, 0x1C]\n\
|
||||
lsls r0, 16\n\
|
||||
asrs r0, 16\n\
|
||||
movs r3, 0x12\n\
|
||||
ldrsh r1, [r4, r3]\n\
|
||||
cmp r0, r1\n\
|
||||
bne _08159342\n\
|
||||
movs r0, 0\n\
|
||||
strh r0, [r4, 0x1C]\n\
|
||||
ldrh r1, [r4, 0x1E]\n\
|
||||
adds r0, r2, r1\n\
|
||||
strh r0, [r4, 0x1E]\n\
|
||||
movs r2, 0x1E\n\
|
||||
ldrsh r0, [r4, r2]\n\
|
||||
bl KeepPanInRange\n\
|
||||
strh r0, [r4, 0x1E]\n\
|
||||
asm_unified(" push {r4,r5,lr}\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
adds r5, r0, 0\n\
|
||||
ldr r1, =gTasks\n\
|
||||
lsls r0, r5, 2\n\
|
||||
adds r0, r5\n\
|
||||
lsls r0, 3\n\
|
||||
adds r4, r0, r1\n\
|
||||
ldrh r2, [r4, 0xE]\n\
|
||||
ldrh r0, [r4, 0x1C]\n\
|
||||
adds r1, r0, 0x1\n\
|
||||
strh r1, [r4, 0x1C]\n\
|
||||
lsls r0, 16\n\
|
||||
asrs r0, 16\n\
|
||||
movs r3, 0x12\n\
|
||||
ldrsh r1, [r4, r3]\n\
|
||||
cmp r0, r1\n\
|
||||
bne _08159342\n\
|
||||
movs r0, 0\n\
|
||||
strh r0, [r4, 0x1C]\n\
|
||||
ldrh r1, [r4, 0x1E]\n\
|
||||
adds r0, r2, r1\n\
|
||||
strh r0, [r4, 0x1E]\n\
|
||||
movs r2, 0x1E\n\
|
||||
ldrsh r0, [r4, r2]\n\
|
||||
bl KeepPanInRange\n\
|
||||
strh r0, [r4, 0x1E]\n\
|
||||
_08159342:\n\
|
||||
ldr r1, =gUnknown_02038440\n\
|
||||
ldrh r0, [r4, 0x1E]\n\
|
||||
strb r0, [r1]\n\
|
||||
movs r3, 0x1E\n\
|
||||
ldrsh r1, [r4, r3]\n\
|
||||
movs r2, 0xC\n\
|
||||
ldrsh r0, [r4, r2]\n\
|
||||
cmp r1, r0\n\
|
||||
bne _0815935A\n\
|
||||
adds r0, r5, 0\n\
|
||||
bl DestroyAnimVisualTask\n\
|
||||
ldr r1, =gUnknown_02038440\n\
|
||||
ldrh r0, [r4, 0x1E]\n\
|
||||
strb r0, [r1]\n\
|
||||
movs r3, 0x1E\n\
|
||||
ldrsh r1, [r4, r3]\n\
|
||||
movs r2, 0xC\n\
|
||||
ldrsh r0, [r4, r2]\n\
|
||||
cmp r1, r0\n\
|
||||
bne _0815935A\n\
|
||||
adds r0, r5, 0\n\
|
||||
bl DestroyAnimVisualTask\n\
|
||||
_0815935A:\n\
|
||||
pop {r4,r5}\n\
|
||||
pop {r0}\n\
|
||||
bx r0\n\
|
||||
.pool");
|
||||
pop {r4,r5}\n\
|
||||
pop {r0}\n\
|
||||
bx r0\n\
|
||||
.pool");
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user