From 1f7442f8e8f10e61419daa72d7897516c9324dd9 Mon Sep 17 00:00:00 2001 From: Macrepeh <63179588+Macrepeh@users.noreply.github.com> Date: Wed, 1 Jul 2020 17:53:12 -0400 Subject: [PATCH 1/3] Update linker.ld --- linker.ld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linker.ld b/linker.ld index e667b817..6e5485b3 100644 --- a/linker.ld +++ b/linker.ld @@ -732,7 +732,7 @@ SECTIONS { asm/pushableFurniture.o(.text); asm/furniture.o(.text); asm/minishSizedEntrance.o(.text); - asm/archway.o(.text); + src/archway.o(.text); asm/giantRock.o(.text); asm/object51.o(.text); asm/object52.o(.text); 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 2/3] 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 From d649701eb8cf9b2261871fe0864f57db820850d4 Mon Sep 17 00:00:00 2001 From: Macrepeh <63179588+Macrepeh@users.noreply.github.com> Date: Wed, 1 Jul 2020 17:55:12 -0400 Subject: [PATCH 3/3] Delete archway.s --- asm/archway.s | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 asm/archway.s diff --git a/asm/archway.s b/asm/archway.s deleted file mode 100644 index 04497890..00000000 --- a/asm/archway.s +++ /dev/null @@ -1,46 +0,0 @@ - .include "asm/macros.inc" - - .include "constants/constants.inc" - - .syntax unified - - .text - - - thumb_func_start Archway -Archway: @ 0x08090F70 - push {r4, r5, lr} - adds r4, r0, #0 - ldrb r0, [r4, #0xc] - cmp r0, #0 - bne _08090FB4 - movs r5, #1 - movs r0, #1 - strb r0, [r4, #0xc] - ldrb r1, [r4, #0x18] - subs r0, #5 - ands r0, r1 - orrs r0, r5 - strb r0, [r4, #0x18] - ldrb r0, [r4, #0xb] - strb r0, [r4, #0x1e] - adds r1, r4, #0 - adds r1, #0x38 - movs r0, #2 - strb r0, [r1] - adds r0, r4, #0 - bl UpdateSpriteOrderAndFlip - bl CheckIsDungeon - cmp r0, #0 - beq _08090FB4 - adds r2, r4, #0 - adds r2, #0x29 - ldrb r1, [r2] - movs r0, #8 - rsbs r0, r0, #0 - ands r0, r1 - orrs r0, r5 - strb r0, [r2] -_08090FB4: - pop {r4, r5, pc} - .align 2, 0