mirror of https://github.com/zeldaret/tmc.git
fixed suggestions, and also improved the similar archway.c
This commit is contained in:
parent
e541025bb7
commit
366ffa3033
|
@ -62,7 +62,7 @@ extern void CreateDust(Entity*);
|
||||||
extern u32 IsItemEquipped(u32);
|
extern u32 IsItemEquipped(u32);
|
||||||
extern void DeleteManager(Manager*);
|
extern void DeleteManager(Manager*);
|
||||||
extern bool32 CheckPlayerInRegion(u32 centerX, u32 centerY, u32 radiusX, u32 radiusY);
|
extern bool32 CheckPlayerInRegion(u32 centerX, u32 centerY, u32 radiusX, u32 radiusY);
|
||||||
extern u32 CheckIsDungeon();
|
extern u32 CheckIsDungeon(void);
|
||||||
extern u32 GetTileTypeByEntity(Entity*);
|
extern u32 GetTileTypeByEntity(Entity*);
|
||||||
|
|
||||||
// Unidentified
|
// Unidentified
|
||||||
|
|
|
@ -1,26 +1,17 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "entity.h"
|
#include "entity.h"
|
||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
|
#include "functions.h"
|
||||||
extern u32 CheckIsDungeon();
|
|
||||||
|
|
||||||
void Archway(Entity* this) {
|
void Archway(Entity* this) {
|
||||||
u32 v1;
|
|
||||||
u32 v2;
|
|
||||||
u32 v3;
|
|
||||||
|
|
||||||
if (this->action == 0) {
|
if (this->action == 0) {
|
||||||
v1 = this->action = 1;
|
this->action = 1;
|
||||||
v2 = this->spriteSettings.raw;
|
this->spriteSettings.b.draw = 1;
|
||||||
v1 = v1 - 0x5;
|
|
||||||
v1 = v1 & v2;
|
|
||||||
this->spriteSettings.raw = v1 | 1;
|
|
||||||
this->frameIndex = this->type2;
|
this->frameIndex = this->type2;
|
||||||
this->collisionLayer = 2;
|
this->collisionLayer = 2;
|
||||||
UpdateSpriteForCollisionLayer(this);
|
UpdateSpriteForCollisionLayer(this);
|
||||||
v3 = CheckIsDungeon();
|
if (CheckIsDungeon()) {
|
||||||
if (v3 != 0) {
|
this->spritePriority.b0 = 1;
|
||||||
this->spritePriority.b0 = (this->spritePriority.b0 & 0xf8) | 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "entity.h"
|
#include "entity.h"
|
||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
|
#include "functions.h"
|
||||||
extern u32 CheckIsDungeon();
|
|
||||||
|
|
||||||
void MinishSizedArchway(Entity* this) {
|
void MinishSizedArchway(Entity* this) {
|
||||||
if (this->action == 0) {
|
if (this->action == 0) {
|
||||||
|
@ -11,8 +10,7 @@ void MinishSizedArchway(Entity* this) {
|
||||||
this->collisionLayer = 2;
|
this->collisionLayer = 2;
|
||||||
UpdateSpriteForCollisionLayer(this);
|
UpdateSpriteForCollisionLayer(this);
|
||||||
if (CheckIsDungeon()) {
|
if (CheckIsDungeon()) {
|
||||||
this->spritePriority.b0 = (this->spritePriority.b0 & 0xf8) | 1;
|
this->spritePriority.b0 = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue