diff options
| author | notyourav <65437533+notyourav@users.noreply.github.com> | 2021-03-15 16:30:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-15 16:30:28 -0700 |
| commit | c319dc53d3bc67909be7bbe75538d796bc99ddff (patch) | |
| tree | 46a2bc4237231598b6343e57c0bc62041797e263 /src/object | |
| parent | e09678c6ab4d6c1070495cf8b49b8b3dffefc4af (diff) | |
| parent | 366ffa30332e94b3d977d6be5b8fea78efc54c79 (diff) | |
Merge pull request #137 from gamestabled/minishSizedArchway
MinishSizedArchway OK
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/archway.c | 19 | ||||
| -rw-r--r-- | src/object/minishSizedArchway.c | 16 |
2 files changed, 21 insertions, 14 deletions
diff --git a/src/object/archway.c b/src/object/archway.c index 39975ee7..aa26762f 100644 --- a/src/object/archway.c +++ b/src/object/archway.c @@ -1,26 +1,17 @@ #include "global.h" #include "entity.h" #include "sprite.h" - -extern u32 CheckIsDungeon(); +#include "functions.h" 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->action = 1; + this->spriteSettings.b.draw = 1; this->frameIndex = this->type2; this->collisionLayer = 2; UpdateSpriteForCollisionLayer(this); - v3 = CheckIsDungeon(); - if (v3 != 0) { - this->spritePriority.b0 = (this->spritePriority.b0 & 0xf8) | 1; + if (CheckIsDungeon()) { + this->spritePriority.b0 = 1; } } } diff --git a/src/object/minishSizedArchway.c b/src/object/minishSizedArchway.c new file mode 100644 index 00000000..cc1b63d3 --- /dev/null +++ b/src/object/minishSizedArchway.c @@ -0,0 +1,16 @@ +#include "global.h" +#include "entity.h" +#include "sprite.h" +#include "functions.h" + +void MinishSizedArchway(Entity* this) { + if (this->action == 0) { + this->action = 1; + this->frameIndex = this->type; + this->collisionLayer = 2; + UpdateSpriteForCollisionLayer(this); + if (CheckIsDungeon()) { + this->spritePriority.b0 = 1; + } + } +} |
