summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Winwood <twwinwood@gmail.com>2018-06-22 15:54:01 +0100
committerThomas Winwood <twwinwood@gmail.com>2018-06-22 15:54:01 +0100
commit7f185ce187271334796162b95e1a378d0edabbd3 (patch)
treee33476fa173127c5a79402b60137f1a0c35364b3
parent6bf9718737e6863ee66336549a7da450233a8df9 (diff)
Decompile sub_80DE3AC
-rw-r--r--asm/ghost.s22
-rw-r--r--src/ghost.c10
2 files changed, 10 insertions, 22 deletions
diff --git a/asm/ghost.s b/asm/ghost.s
index d529715c5..36487210d 100644
--- a/asm/ghost.s
+++ b/asm/ghost.s
@@ -7,28 +7,6 @@
@ ghost
- thumb_func_start sub_80DE3AC
-sub_80DE3AC: @ 80DE3AC
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- lsls r1, r0, 2
- adds r1, r0
- lsls r1, 3
- ldr r2, _080DE3CC @ =gTasks
- adds r1, r2
- movs r2, 0
- strh r2, [r1, 0x26]
- ldr r2, _080DE3D0 @ =sub_80DE3D4
- str r2, [r1]
- bl _call_via_r2
- pop {r0}
- bx r0
- .align 2, 0
-_080DE3CC: .4byte gTasks
-_080DE3D0: .4byte sub_80DE3D4
- thumb_func_end sub_80DE3AC
-
thumb_func_start sub_80DE3D4
sub_80DE3D4: @ 80DE3D4
push {r4-r7,lr}
diff --git a/src/ghost.c b/src/ghost.c
index 3a13f0b7c..c5d19e082 100644
--- a/src/ghost.c
+++ b/src/ghost.c
@@ -18,6 +18,7 @@ void sub_80DDED0(u8 taskId);
void sub_80DDFE8(struct Sprite *);
void sub_80DE114(struct Sprite *);
void sub_80DE2DC(u8 taskId);
+void sub_80DE3D4(u8 taskId);
void sub_80DDB6C(struct Sprite *sprite) {
InitAnimSpritePos(sprite, 1);
@@ -410,4 +411,13 @@ void sub_80DE2DC(u8 taskId) {
case 2:
DestroyAnimVisualTask(taskId);
}
+}
+
+void sub_80DE3AC(u8 taskId) {
+ struct Task *task;
+
+ task = &gTasks[taskId];
+ task->data[15] = 0;
+ task->func = &sub_80DE3D4;
+ sub_80DE3D4(taskId);
} \ No newline at end of file