summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/object/object66.c34
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();
+ }
+}