mirror of https://github.com/zeldaret/tmc.git
Name the interaction types
This commit is contained in:
parent
d5afe1f2dd
commit
2e21fde027
|
@ -437,6 +437,20 @@ s32 ModHealth(s32 delta);
|
||||||
void ModRupees(s32 delta);
|
void ModRupees(s32 delta);
|
||||||
void ModBombs(s32 delta);
|
void ModBombs(s32 delta);
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
INTERACTION_NONE,
|
||||||
|
INTERACTION_TALK,
|
||||||
|
INTERACTION_FUSE,
|
||||||
|
INTERACTION_OPEN_CHEST,
|
||||||
|
INTERACTION_UNUSED,
|
||||||
|
INTERACTION_USE_SMALL_KEY,
|
||||||
|
INTERACTION_USE_BIG_KEY,
|
||||||
|
INTERACTION_TALK_MINISH,
|
||||||
|
INTERACTION_LIFT_SHOP_ITEM,
|
||||||
|
INTERACTION_CHECK,
|
||||||
|
INTERACTION_DROP_PEDESTAL,
|
||||||
|
} InteractionType;
|
||||||
|
|
||||||
// playerUtils.c
|
// playerUtils.c
|
||||||
void DeleteClones(void);
|
void DeleteClones(void);
|
||||||
void CreateItemEquippedAtSlot(/*EquipSlot*/ u32 equipSlot);
|
void CreateItemEquippedAtSlot(/*EquipSlot*/ u32 equipSlot);
|
||||||
|
|
|
@ -996,24 +996,24 @@ void sub_08078180(void) {
|
||||||
if (ptr->entity->interactType == 0) {
|
if (ptr->entity->interactType == 0) {
|
||||||
|
|
||||||
switch (ptr->type) {
|
switch (ptr->type) {
|
||||||
case 1:
|
case INTERACTION_TALK:
|
||||||
case 7:
|
case INTERACTION_TALK_MINISH:
|
||||||
uVar1 = 7;
|
uVar1 = 7;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case INTERACTION_LIFT_SHOP_ITEM:
|
||||||
if (gRoomVars.shopItemType == ITEM_NONE) {
|
if (gRoomVars.shopItemType == ITEM_NONE) {
|
||||||
uVar1 = 9;
|
uVar1 = 9;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case INTERACTION_OPEN_CHEST:
|
||||||
case 5:
|
case INTERACTION_USE_SMALL_KEY:
|
||||||
case 6:
|
case INTERACTION_USE_BIG_KEY:
|
||||||
uVar1 = 6;
|
uVar1 = 6;
|
||||||
break;
|
break;
|
||||||
case 9:
|
case INTERACTION_CHECK:
|
||||||
uVar1 = 5;
|
uVar1 = 5;
|
||||||
break;
|
break;
|
||||||
case 10:
|
case INTERACTION_DROP_PEDESTAL:
|
||||||
uVar1 = 2;
|
uVar1 = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1108,21 +1108,21 @@ bool32 sub_080782C0(void) {
|
||||||
}
|
}
|
||||||
switch (gPossibleInteraction.currentObject->type) {
|
switch (gPossibleInteraction.currentObject->type) {
|
||||||
default:
|
default:
|
||||||
case 0:
|
case INTERACTION_NONE:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case 1:
|
case INTERACTION_TALK:
|
||||||
case 6:
|
case INTERACTION_USE_BIG_KEY:
|
||||||
case 9:
|
case INTERACTION_CHECK:
|
||||||
case 0xa:
|
case INTERACTION_DROP_PEDESTAL:
|
||||||
gPlayerState.queued_action = PLAYER_08070E9C;
|
gPlayerState.queued_action = PLAYER_08070E9C;
|
||||||
ForceSetPlayerState(PL_STATE_TALKEZLO);
|
ForceSetPlayerState(PL_STATE_TALKEZLO);
|
||||||
case 3:
|
case INTERACTION_OPEN_CHEST:
|
||||||
case 5:
|
case INTERACTION_USE_SMALL_KEY:
|
||||||
case 7:
|
case INTERACTION_TALK_MINISH:
|
||||||
entity->interactType = 1;
|
entity->interactType = 1;
|
||||||
gPossibleInteraction.kinstoneId = 0;
|
gPossibleInteraction.kinstoneId = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case 8:
|
case INTERACTION_LIFT_SHOP_ITEM:
|
||||||
if (gRoomVars.shopItemType == 0) {
|
if (gRoomVars.shopItemType == 0) {
|
||||||
entity->interactType = 1;
|
entity->interactType = 1;
|
||||||
gRoomVars.shopItemType = entity->type;
|
gRoomVars.shopItemType = entity->type;
|
||||||
|
@ -1146,11 +1146,11 @@ void AddInteractableWhenBigObject(Entity* ent) {
|
||||||
AddInteractableObject(ent, 1, 0);
|
AddInteractableObject(ent, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddInteractableWhenBigFuser(Entity* ent, u32 kinstoneId) {
|
void AddInteractableWhenBigFuser(Entity* ent, KinstoneId kinstoneId) {
|
||||||
AddInteractableObject(ent, 1, kinstoneId);
|
AddInteractableObject(ent, 1, kinstoneId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddInteractableFuser(Entity* ent, u32 kinstoneId) {
|
void AddInteractableFuser(Entity* ent, KinstoneId kinstoneId) {
|
||||||
AddInteractableObject(ent, 2, kinstoneId);
|
AddInteractableObject(ent, 2, kinstoneId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1158,7 +1158,7 @@ void AddInteractableAsMinishObject(Entity* ent) {
|
||||||
AddInteractableObject(ent, 7, 0);
|
AddInteractableObject(ent, 7, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddInteractableAsMinishFuser(Entity* ent, u32 kinstoneId) {
|
void AddInteractableAsMinishFuser(Entity* ent, KinstoneId kinstoneId) {
|
||||||
AddInteractableObject(ent, 7, kinstoneId);
|
AddInteractableObject(ent, 7, kinstoneId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1217,7 +1217,7 @@ void SetInteractableObjectCollision(Entity* arg0, u32 ignoreLayer, u32 interactD
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 AddInteractableObject(Entity* entity, u32 type, u32 kinstoneId) {
|
s32 AddInteractableObject(Entity* entity, InteractionType type, KinstoneId kinstoneId) {
|
||||||
s32 index;
|
s32 index;
|
||||||
entity->interactType = 0;
|
entity->interactType = 0;
|
||||||
index = GetInteractableObjectIndex(entity);
|
index = GetInteractableObjectIndex(entity);
|
||||||
|
|
Loading…
Reference in New Issue