diff options
| author | Tal Hayon <talhayon1@gmail.com> | 2022-03-13 12:03:11 +0200 |
|---|---|---|
| committer | Tal Hayon <talhayon1@gmail.com> | 2022-03-13 12:03:11 +0200 |
| commit | be2ea6c846380dd6dffd4f69a15795c04af8d00a (patch) | |
| tree | 978029c1e2ad190d564b2baecc47b7f074063a53 /src/object | |
| parent | 2446053493563105fb27d01c16862fb8636376a2 (diff) | |
Decompile object66
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/object66.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/object/object66.c b/src/object/object66.c new file mode 100644 index 00000000..02f31e6c --- /dev/null +++ b/src/object/object66.c @@ -0,0 +1,34 @@ +#define NENT_DEPRECATED +#include "entity.h" +#include "functions.h" + +void Object66(Entity* this) { + int iVar2; + int iVar4; + Entity* parent; + + parent = this->parent; + if (parent->z.HALF.HI != 0) { + if (this->action == 0) { + this->action = 1; + this->spriteSettings.draw = 1; + this->spritePriority.b0 = 6; + this->spriteOffsetY = 5; + InitializeAnimation(this, 1); + } + this->x.HALF.HI = parent->x.HALF.HI; + this->y.HALF.HI = parent->y.HALF.HI; + this->spriteOrientation.flipY = parent->spriteOrientation.flipY; + this->spriteRendering.b3 = parent->spriteRendering.b3; + if (parent->z.HALF.HI > -0x40) { + iVar2 = 0x100; + iVar4 = 0x200; + } else { + iVar2 = 0x100 - 2 * (parent->z.HALF.HI + 0x40); + iVar4 = 0x200 - 4 * (parent->z.HALF.HI + 0x40); + } + sub_0805EC9C(this, iVar2, iVar4, 0); + } else { + DeleteThisEntity(); + } +} |
