This commit is contained in:
DizzyEggg 2018-09-09 20:31:51 +02:00
parent 6454740587
commit 4d1df7ecbe
2 changed files with 15 additions and 38 deletions

View File

@ -7,44 +7,6 @@
thumb_func_start sub_819F600
sub_819F600: @ 819F600
push {r4,lr}
adds r4, r0, 0
adds r0, 0x3F
ldrb r1, [r0]
movs r0, 0x20
ands r0, r1
cmp r0, 0
beq _0819F640
adds r2, r4, 0
adds r2, 0x3E
ldrb r0, [r2]
movs r1, 0x4
orrs r0, r1
strb r0, [r2]
ldr r0, =sub_819F69C
movs r1, 0x1
bl CreateTask
lsls r0, 24
lsrs r0, 24
ldr r2, =gTasks
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r2
ldrh r2, [r4, 0x3C]
strh r2, [r1, 0x16]
ldr r1, [r1]
bl _call_via_r1
ldr r0, =SpriteCallbackDummy
str r0, [r4, 0x1C]
_0819F640:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_819F600
thumb_func_start sub_819F654
sub_819F654: @ 819F654

View File

@ -208,6 +208,7 @@ void Swap_UpdateActionCursorPosition(s8 direction);
void Swap_UpdateBallCursorPosition(s8 direction);
void Swap_RunMenuOptionFunc(u8 taskId);
void Swap_RunActionFunc(u8 taskId);
void sub_819F69C(u8 taskId);
void Task_SwapCantHaveSameMons(u8 taskId);
void Swap_PrintActionStrings(void);
void Swap_PrintActionStrings2(void);
@ -3278,3 +3279,17 @@ bool8 Swap_AlreadyHasSameSpecies(u8 monId)
}
return FALSE;
}
void sub_819F600(struct Sprite *sprite)
{
u8 taskId;
if (sprite->affineAnimEnded)
{
sprite->invisible = 1;
taskId = CreateTask(sub_819F69C, 1);
gTasks[taskId].data[7] = sprite->data[7];
gTasks[taskId].func(taskId);
sprite->callback = SpriteCallbackDummy;
}
}