diff options
| author | gamestabled <chandler2016@yahoo.com> | 2021-03-15 14:55:15 -0400 |
|---|---|---|
| committer | gamestabled <chandler2016@yahoo.com> | 2021-03-15 14:55:15 -0400 |
| commit | 366ffa30332e94b3d977d6be5b8fea78efc54c79 (patch) | |
| tree | 3de01aa385897fcfa844ac9f81e6c3c691e0c82e /src/object | |
| parent | e541025bb7c5bc4d4abeccc10bf0aef8f2662024 (diff) | |
fixed suggestions, and also improved the similar archway.c
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/archway.c | 19 | ||||
| -rw-r--r-- | src/object/minishSizedArchway.c | 6 |
2 files changed, 7 insertions, 18 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 index f7fa4266..cc1b63d3 100644 --- a/src/object/minishSizedArchway.c +++ b/src/object/minishSizedArchway.c @@ -1,8 +1,7 @@ #include "global.h" #include "entity.h" #include "sprite.h" - -extern u32 CheckIsDungeon(); +#include "functions.h" void MinishSizedArchway(Entity* this) { if (this->action == 0) { @@ -11,8 +10,7 @@ void MinishSizedArchway(Entity* this) { this->collisionLayer = 2; UpdateSpriteForCollisionLayer(this); if (CheckIsDungeon()) { - this->spritePriority.b0 = (this->spritePriority.b0 & 0xf8) | 1; + this->spritePriority.b0 = 1; } } - return; } |
