summaryrefslogtreecommitdiff
path: root/src/projectile
diff options
context:
space:
mode:
authoroctorock <79596758+octorock@users.noreply.github.com>2022-04-10 23:42:14 +0200
committeroctorock <79596758+octorock@users.noreply.github.com>2022-04-11 18:55:07 +0200
commit4fd8048c3cc36065e15faee67e50365dead51784 (patch)
tree87fcf28ac319e2df885df618f81843790daccffa /src/projectile
parent02cec8ca8d9b8f7373286fcd1c4c88c42beeeeb1 (diff)
Decompile some functions
Diffstat (limited to 'src/projectile')
-rw-r--r--src/projectile/gyorgTail.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/projectile/gyorgTail.c b/src/projectile/gyorgTail.c
index d743cf40..ddd0fcb9 100644
--- a/src/projectile/gyorgTail.c
+++ b/src/projectile/gyorgTail.c
@@ -188,7 +188,35 @@ END_NONMATCH
ASM_FUNC("asm/non_matching/gyorgTail/sub_080AC6F0.inc", void sub_080AC6F0(Entity* this))
-ASM_FUNC("asm/non_matching/gyorgTail/sub_080AC760.inc", void sub_080AC760(Entity* this))
+void sub_080AC760(Entity* param_1) {
+ s32 tmp;
+ Entity* entity1;
+ Entity* entity2;
+
+ entity1 = param_1->child;
+ tmp = (entity1->direction - param_1->direction) & 0xff;
+ if (((tmp + 8) & 0xff) > 0x10) {
+ if (tmp > 0x80) {
+ entity1->direction = param_1->direction - 8;
+ } else {
+ entity1->direction = param_1->direction + 8;
+ }
+ }
+ entity2 = entity1->child;
+ if (entity2->child == NULL) {
+ entity2->direction = param_1->parent->animationState ^ 0x80;
+ } else {
+ tmp = (entity2->direction - entity1->direction) & 0xff;
+ if (((tmp + 8) & 0xff) <= 0x10) {
+ return;
+ }
+ if (tmp > 0x80) {
+ entity2->direction = entity1->direction - 8;
+ } else {
+ entity2->direction = entity1->direction + 8;
+ }
+ }
+}
NONMATCH("asm/non_matching/gyorgTail/sub_080AC7C4.inc", void sub_080AC7C4(Entity* this)) {
// TODO regalloc