mirror of
https://github.com/zeldaret/tmc
synced 2026-08-04 01:03:49 -04:00
Applied the enum for interactions (#647)
* Interactions enum applied * Interactions enum applied
This commit is contained in:
@@ -83,7 +83,7 @@ void BossDoor_Init(BossDoorEntity* this) {
|
||||
}
|
||||
|
||||
void BossDoor_Action1(BossDoorEntity* this) {
|
||||
if (super->interactType != 0) {
|
||||
if (super->interactType != INTERACTION_NONE) {
|
||||
super->action = 2;
|
||||
RemoveInteractableObject(super);
|
||||
SetFlag(this->unk_86);
|
||||
|
||||
@@ -148,7 +148,7 @@ void ChestSpawner_Type2Action2(ChestSpawnerEntity* this) {
|
||||
|
||||
void ChestSpawner_Type2Action3(ChestSpawnerEntity* this) {
|
||||
sub_0800445C(super);
|
||||
if (super->interactType != 0) {
|
||||
if (super->interactType != INTERACTION_NONE) {
|
||||
super->action = 4;
|
||||
super->subtimer = 30;
|
||||
RemoveInteractableObject(super);
|
||||
|
||||
@@ -395,8 +395,8 @@ void CutsceneMiscObject_Type6(CutsceneMiscObjectEntity* this) {
|
||||
AddInteractableCheckableObject(super);
|
||||
break;
|
||||
case 1:
|
||||
if (super->interactType != 0) {
|
||||
super->interactType = 0;
|
||||
if (super->interactType != INTERACTION_NONE) {
|
||||
super->interactType = INTERACTION_NONE;
|
||||
super->action = 2;
|
||||
RemoveInteractableObject(super);
|
||||
gPlayerState.queued_action = PLAYER_EMPTYBOTTLE;
|
||||
@@ -449,8 +449,8 @@ void CutsceneMiscObject_Type7(CutsceneMiscObjectEntity* this) {
|
||||
AddInteractableCheckableObject(super);
|
||||
break;
|
||||
case 1:
|
||||
if (super->interactType != 0) {
|
||||
super->interactType = 0;
|
||||
if (super->interactType != INTERACTION_NONE) {
|
||||
super->interactType = INTERACTION_NONE;
|
||||
super->action = 2;
|
||||
RemoveInteractableObject(super);
|
||||
CreateEzloHint(TEXT_INDEX(TEXT_BELARI, 0x1F), 0);
|
||||
|
||||
@@ -125,8 +125,8 @@ void FigurineDevice_Action1(FigurineDeviceEntity* this) {
|
||||
AddInteractableCheckableObject(super);
|
||||
break;
|
||||
case 1:
|
||||
if (super->interactType != 0) {
|
||||
super->interactType = 0;
|
||||
if (super->interactType != INTERACTION_NONE) {
|
||||
super->interactType = INTERACTION_NONE;
|
||||
ResetPlayerAnimationAndAction();
|
||||
if (CheckLocalFlag(SHOP07_TANA)) {
|
||||
this->unk_7a = 2;
|
||||
|
||||
@@ -86,15 +86,15 @@ void ItemForSale_Action1(ItemForSaleEntity* this) {
|
||||
gUnk_0200AF00.rActionPlayerState = 2;
|
||||
} else {
|
||||
if (super->type == 0x36) {
|
||||
if (super->interactType != 0) {
|
||||
super->interactType = 0;
|
||||
if (super->interactType != INTERACTION_NONE) {
|
||||
super->interactType = INTERACTION_NONE;
|
||||
super->action = 3;
|
||||
gRoomVars.animFlags = 1;
|
||||
gPlayerState.queued_action = PLAYER_08070E9C;
|
||||
}
|
||||
} else {
|
||||
if (super->interactType != 0) {
|
||||
super->interactType = 0;
|
||||
if (super->interactType != INTERACTION_NONE) {
|
||||
super->interactType = INTERACTION_NONE;
|
||||
super->subAction = 1;
|
||||
sub_08078B48();
|
||||
ResetActiveItems();
|
||||
|
||||
@@ -230,7 +230,7 @@ void LockedDoor_Action7(LockedDoorEntity* this) {
|
||||
}
|
||||
|
||||
void LockedDoor_Action8(LockedDoorEntity* this) {
|
||||
if (super->interactType == 0 && !CheckFlags(this->unk_86))
|
||||
if (super->interactType == INTERACTION_NONE && !CheckFlags(this->unk_86))
|
||||
return;
|
||||
super->action = 1;
|
||||
super->timer = 20;
|
||||
|
||||
@@ -44,7 +44,7 @@ void ObjectA(ObjectAEntity* this) {
|
||||
} else {
|
||||
AddInteractableSmallKeyLock(super);
|
||||
}
|
||||
} else if (super->interactType != 0) {
|
||||
} else if (super->interactType != INTERACTION_NONE) {
|
||||
SetTileType(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetFlag(this->unk_86);
|
||||
CreateDust(super);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "player.h"
|
||||
#include "room.h"
|
||||
|
||||
extern void AddInteractableChest(Entity*);
|
||||
@@ -21,7 +22,7 @@ void SpecialChest(Entity* this) {
|
||||
this->collisionLayer = 1;
|
||||
AddInteractableChest(this);
|
||||
}
|
||||
if (this->interactType != 0) {
|
||||
if (this->interactType != INTERACTION_NONE) {
|
||||
OpenSmallChest(COORD_TO_TILE(this), 2);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ void SwordsmanNewsletter_Action1(Entity* this) {
|
||||
TEXT_INDEX(TEXT_NEWSLETTER, 4), TEXT_INDEX(TEXT_NEWSLETTER, 5), TEXT_INDEX(TEXT_NEWSLETTER, 6),
|
||||
TEXT_INDEX(TEXT_NEWSLETTER, 7), TEXT_INDEX(TEXT_NEWSLETTER, 8),
|
||||
};
|
||||
if (this->interactType != 0) {
|
||||
this->interactType = 0;
|
||||
if (this->interactType != INTERACTION_NONE) {
|
||||
this->interactType = INTERACTION_NONE;
|
||||
MessageNoOverlap(messageIndices[this->type], this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user