diff options
Diffstat (limited to 'src')
| -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; + } + } +} |
