diff options
| author | octorock <79596758+octorock@users.noreply.github.com> | 2022-07-23 12:43:43 +0200 |
|---|---|---|
| committer | octorock <79596758+octorock@users.noreply.github.com> | 2022-07-25 22:45:55 +0200 |
| commit | 852effa474c159398014da736ade6f0fea454de7 (patch) | |
| tree | 97da22c4758ca4156dc9fb7ac123c7a3b0a9e9f5 /src/object/object2A.c | |
| parent | ccba86d292a0e4c8a0e07325ac4fb25e5a58dc89 (diff) | |
Rename objects
Diffstat (limited to 'src/object/object2A.c')
| -rw-r--r-- | src/object/object2A.c | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/src/object/object2A.c b/src/object/object2A.c deleted file mode 100644 index 226c9868..00000000 --- a/src/object/object2A.c +++ /dev/null @@ -1,98 +0,0 @@ -#include "global.h" -#include "sound.h" -#include "entity.h" -#include "functions.h" -#include "flags.h" - -extern void sub_0807AB44(Entity*, s32, s32); - -void (*const gUnk_08120DD0[])(Entity*); - -void Object2A(Entity* this) { - gUnk_08120DD0[this->action](this); -} - -void Object2A_Init(Entity* this) { - this->action = 1; - this->spriteSettings.draw = TRUE; - if (this->type2 != 0) { - this->timer = this->type2; - } - InitializeAnimation(this, 0); - switch (this->type) { - case 1: - this->y.HALF.HI -= 8; - this->timer = 40; - break; - case 2: - this->timer = 15; - sub_08004168(this); - break; - case 3: - CopyPosition(this->parent, this); - break; - case 4: - if (!CheckFlags(this->field_0x86.HWORD)) { - this->spriteSettings.draw = FALSE; - this->subAction = 1; - return; - } - } - EnqueueSFX(SFX_124); -} - -void sub_08089BA0(Entity* this) { - u32 val; - GetNextFrame(this); - - switch (this->type) { - case 0: - default: - if (this->type2 == 0) - return; - case 1: - case 2: - if (this->timer-- != 0) - return; - if (this->type == 2) { - sub_0807B7D8(((u16*)this->child)[3], COORD_TO_TILE(this), this->collisionLayer); - sub_0807AB44(this, 0, 0x10); - sub_0807AB44(this, 0, -0x10); - sub_0807AB44(this, 0x10, 0); - sub_0807AB44(this, -0x10, 0); - } - DeleteThisEntity(); - break; - case 3: - if (this->parent->next == NULL) { - DeleteThisEntity(); - } - if (--this->timer == 0) { - DeleteThisEntity(); - } - - CopyPosition(this->parent, this); - break; - case 4: - val = CheckFlags(this->field_0x86.HWORD); - if (this->subAction == 0) { - if (val) - return; - this->subAction = 1; - this->spriteSettings.draw = 0; - } else { - if (!val) - return; - this->subAction = 0; - this->spriteSettings.draw = 1; - InitializeAnimation(this, 0); - EnqueueSFX(SFX_124); - } - break; - } -} - -void (*const gUnk_08120DD0[])(Entity*) = { - Object2A_Init, - sub_08089BA0, -}; |
