summaryrefslogtreecommitdiff
path: root/src/object/archway.c
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2020-07-13 15:27:20 -0700
committertheo3 <arisstephenson2@gmail.com>2020-07-13 15:27:20 -0700
commit62ddaaa5f6fe2dc2aaa2dd002d4ce0b1d61a3cc9 (patch)
treed625ad1b183fc6aa5b56c00ce6573ef850679731 /src/object/archway.c
parentc47f16e5e7b0abb010133b3ee1a58099d8b8915d (diff)
add subdirs
Diffstat (limited to 'src/object/archway.c')
-rw-r--r--src/object/archway.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/object/archway.c b/src/object/archway.c
new file mode 100644
index 00000000..ff6c7b14
--- /dev/null
+++ b/src/object/archway.c
@@ -0,0 +1,27 @@
+#include "global.h"
+#include "entity.h"
+#include "sprite.h"
+
+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;
+ UpdateSpriteForCollisionLayer(this);
+ v3 = CheckIsDungeon();
+ if (v3 != 0) {
+ this->spritePriority.b0 = (this->spritePriority.b0 & 0xf8) | 1;
+ }
+ }
+} \ No newline at end of file