From 3f624af3800f15d479aac26f7ade722134e44683 Mon Sep 17 00:00:00 2001 From: Macrepeh <63179588+Macrepeh@users.noreply.github.com> Date: Wed, 1 Jul 2020 17:54:31 -0400 Subject: [PATCH] Add files via upload --- src/archway.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/archway.c diff --git a/src/archway.c b/src/archway.c new file mode 100644 index 00000000..4596b42c --- /dev/null +++ b/src/archway.c @@ -0,0 +1,27 @@ +#include "global.h" +#include "entity.h" + +extern void UpdateSpriteOrderAndFlip(); +extern u32 CheckIsDungeon(); + +void Archway(Entity *this) +{ + u32 v1; + u32 v2; + u32 v3; + + if (this->action == 0) { + v1 = this->action = 1; + v2 = this->spriteSettings.raw; + v1 = v1 - 0x5; + v1 = v1 & v2; + this->spriteSettings.raw = v1 | 1; + this->frameIndex = this->entityType.parameter; + this->collisionLayer = 2; + UpdateSpriteOrderAndFlip(this); + v3 = CheckIsDungeon(); + if (v3 != 0) { + this->ticks.b0 = (this->ticks.b0 & 0xf8) | 1; + } + } +} \ No newline at end of file