diff options
| author | notyouraveragehooman <65437533+notyouraveragehooman@users.noreply.github.com> | 2020-08-04 17:08:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-04 17:08:03 -0700 |
| commit | 252cd6685d2debae06889a0190542f3fd2701951 (patch) | |
| tree | c09d1dcee4d79d13bf70ae2a009b642b40a31ed6 /src | |
| parent | e2bbe039ded00520c4267552697bb7f643ca3482 (diff) | |
| parent | 778577d6ebb6519397e13b0c8f47b886f02ff232 (diff) | |
Merge pull request #37 from 0xDouze:minishLight
Decompiled minishLight.c
Diffstat (limited to 'src')
| -rw-r--r-- | src/object/minishLight.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/object/minishLight.c b/src/object/minishLight.c new file mode 100644 index 00000000..8982a49a --- /dev/null +++ b/src/object/minishLight.c @@ -0,0 +1,40 @@ +#include "global.h" +#include "entity.h" + +extern void (* const gUnk_081247F8[])(Entity*); + +void MinishLight(Entity* this) +{ + gUnk_081247F8[this->action](this); +} + +void sub_0809F840(Entity* this) +{ + this->action = 1; + this->frameIndex = 0; + this->actionDelay = 0x20; + this->field_0xf = 0; + + if (this->entityType.parameter != 0) + { + this->spriteSettings.b.flipX = 1; + } + + UpdateSpriteForCollisionLayer(this); +} + +void sub_0809F868(Entity* this) +{ + if (--this->actionDelay == 0) { + if (this->field_0xf == 0) { + if (++this->frameIndex == 3) { + this->field_0xf = 1; + } + } else { + if (--this->frameIndex == 0) { + this->field_0xf = 0; + } + } + this->actionDelay = 32; + } +} |
