summaryrefslogtreecommitdiff
path: root/src/object
diff options
context:
space:
mode:
authorReinmmar <31139601+Reinmmar@users.noreply.github.com>2023-12-11 01:21:31 +0100
committerGitHub <noreply@github.com>2023-12-10 16:21:31 -0800
commitb163ecafc9e3fed2bf91ec19ae5cd8c0e80c1b5c (patch)
tree1624539c80ff4bb13e0d54c7edb7266f41f46bd5 /src/object
parentaaa441574668f5472662951437c8e4b69acae9c2 (diff)
Applied the enum for interactions (#647)
* Interactions enum applied * Interactions enum applied
Diffstat (limited to 'src/object')
-rw-r--r--src/object/bossDoor.c2
-rw-r--r--src/object/chestSpawner.c2
-rw-r--r--src/object/cutsceneMiscObject.c8
-rw-r--r--src/object/figurineDevice.c4
-rw-r--r--src/object/itemForSale.c8
-rw-r--r--src/object/lockedDoor.c2
-rw-r--r--src/object/objectA.c2
-rw-r--r--src/object/specialChest.c3
-rw-r--r--src/object/swordsmanNewsletter.c4
9 files changed, 18 insertions, 17 deletions
diff --git a/src/object/bossDoor.c b/src/object/bossDoor.c
index 58f24666..cf18f937 100644
--- a/src/object/bossDoor.c
+++ b/src/object/bossDoor.c
@@ -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);
diff --git a/src/object/chestSpawner.c b/src/object/chestSpawner.c
index 7b6f96c1..dd9038db 100644
--- a/src/object/chestSpawner.c
+++ b/src/object/chestSpawner.c
@@ -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);
diff --git a/src/object/cutsceneMiscObject.c b/src/object/cutsceneMiscObject.c
index 225657e4..9f604808 100644
--- a/src/object/cutsceneMiscObject.c
+++ b/src/object/cutsceneMiscObject.c
@@ -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);
diff --git a/src/object/figurineDevice.c b/src/object/figurineDevice.c
index f24170ce..624824ae 100644
--- a/src/object/figurineDevice.c
+++ b/src/object/figurineDevice.c
@@ -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;
diff --git a/src/object/itemForSale.c b/src/object/itemForSale.c
index 8ea4cced..7dcef6c5 100644
--- a/src/object/itemForSale.c
+++ b/src/object/itemForSale.c
@@ -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();
diff --git a/src/object/lockedDoor.c b/src/object/lockedDoor.c
index 43d04047..ae3ae896 100644
--- a/src/object/lockedDoor.c
+++ b/src/object/lockedDoor.c
@@ -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;
diff --git a/src/object/objectA.c b/src/object/objectA.c
index 1648250b..aad2385c 100644
--- a/src/object/objectA.c
+++ b/src/object/objectA.c
@@ -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);
diff --git a/src/object/specialChest.c b/src/object/specialChest.c
index 8d8fd2f1..fd57c7fc 100644
--- a/src/object/specialChest.c
+++ b/src/object/specialChest.c
@@ -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();
}
diff --git a/src/object/swordsmanNewsletter.c b/src/object/swordsmanNewsletter.c
index 36a2aedf..732927c9 100644
--- a/src/object/swordsmanNewsletter.c
+++ b/src/object/swordsmanNewsletter.c
@@ -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);
}
}