fixed suggestions, and also improved the similar archway.c

This commit is contained in:
gamestabled 2021-03-15 14:55:15 -04:00
parent e541025bb7
commit 366ffa3033
3 changed files with 8 additions and 19 deletions

View File

@ -62,7 +62,7 @@ extern void CreateDust(Entity*);
extern u32 IsItemEquipped(u32);
extern void DeleteManager(Manager*);
extern bool32 CheckPlayerInRegion(u32 centerX, u32 centerY, u32 radiusX, u32 radiusY);
extern u32 CheckIsDungeon();
extern u32 CheckIsDungeon(void);
extern u32 GetTileTypeByEntity(Entity*);
// Unidentified

View File

@ -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;
}
}
}

View File

@ -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;
}