diff options
| author | theo3 <arisstephenson2@gmail.com> | 2020-07-15 17:30:26 -0700 |
|---|---|---|
| committer | theo3 <arisstephenson2@gmail.com> | 2020-07-15 17:30:26 -0700 |
| commit | 7d42d7c0deeeec49d2e4e2768e42497913856367 (patch) | |
| tree | a5fece0f3239998c1c24e68fb25d959e2b004ad2 /src | |
| parent | 842e10502e4b7f0b78291025a1ef926bebe93bc5 (diff) | |
keese.c OK
Diffstat (limited to 'src')
| -rw-r--r-- | src/enemy/keese.c | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/src/enemy/keese.c b/src/enemy/keese.c index 0cbc9acd..ea25214b 100644 --- a/src/enemy/keese.c +++ b/src/enemy/keese.c @@ -14,6 +14,8 @@ extern void sub_08021EF0(Entity*); extern void sub_080AEFB4(Entity*); extern void sub_08021F24(Entity*); extern u32 sub_0806FCB8(Entity*, s32, s32, u32); +extern u32 sub_08049FA0(Entity*); +extern u32 sub_08049EE4(Entity*); extern void (*gUnk_080CB69C[])(Entity*); extern void (*gUnk_080CB6B4[])(Entity*); @@ -21,9 +23,7 @@ extern void (*gUnk_080CB6C4[])(Entity*); extern u8 gUnk_080CB6D0[]; extern u16 gUnk_080CB6D6[]; - - -extern u8 gUnk_080CB6D0[]; +extern u8 gUnk_080CB6F6[]; void Keese(Entity *this) { @@ -129,3 +129,28 @@ void sub_08021EF0(Entity *this) this->field_0x7a = 0x3c; InitializeAnimation(this, 0); } + +void sub_08021F24(Entity *this) +{ + u32 bVar1; + + if (this->field_0x78.HWORD == 0) { + this->action = 2; + this->actionDelay = gUnk_080CB6F6[Random() & 0xf]; + InitializeAnimation(this, 1); + } + else if (!this->field_0x7a && !(sub_0806FCB8(this, gLinkEntity.x.HALF.HI, gLinkEntity.y.HALF.HI, 0x70))) { + this->action = 3; + this->actionDelay = 0x1e; + InitializeAnimation(this, 1); + } + else { + if (sub_08049FA0(this) != 0) { + this->direction = Random() & 0x1f; + } + else { + this->direction = sub_08049EE4(this); + } + InitializeAnimation(this, 0); + } +}
\ No newline at end of file |
