mirror of
https://github.com/zeldaret/tmc
synced 2026-08-31 01:30:40 -04:00
Name a lot of functions about interactable objects
This commit is contained in:
@@ -69,8 +69,8 @@ void BossDoor_Init(BossDoorEntity* this) {
|
||||
super->action = 1;
|
||||
super->spriteSettings.draw = 1;
|
||||
sub_0808C500(this);
|
||||
sub_08078800(super);
|
||||
sub_08078850(super, 0, gLockedDoorInteractDirections[this->unk_76], 0);
|
||||
AddInteractableBossDoor(super);
|
||||
SetInteractableObjectCollision(super, 0, gLockedDoorInteractDirections[this->unk_76], NULL);
|
||||
break;
|
||||
case 1:
|
||||
super->action = 4;
|
||||
@@ -87,7 +87,7 @@ void BossDoor_Init(BossDoorEntity* this) {
|
||||
void BossDoor_Action1(BossDoorEntity* this) {
|
||||
if (super->interactType != 0) {
|
||||
super->action = 2;
|
||||
sub_080788E0(super);
|
||||
RemoveInteractableObject(super);
|
||||
SetFlag(this->unk_86);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ extern const Hitbox gUnk_0811F8A8;
|
||||
extern const Hitbox gUnk_0811F8B0;
|
||||
|
||||
void sub_080842D8(ChestSpawnerEntity*);
|
||||
void sub_08078828(ChestSpawnerEntity*);
|
||||
void AddInteractableChest(ChestSpawnerEntity*);
|
||||
void sub_08083E20(ChestSpawnerEntity*);
|
||||
void sub_08084074(u32);
|
||||
void sub_080840A8(s32, s32);
|
||||
@@ -76,7 +76,7 @@ void sub_08083E20(ChestSpawnerEntity* this) {
|
||||
super->spriteSettings.draw = 1;
|
||||
super->spriteRendering.alphaBlend = 0;
|
||||
sub_080842D8(this);
|
||||
sub_08078828(this);
|
||||
AddInteractableChest(this);
|
||||
}
|
||||
void ChestSpawner_Type2Init(ChestSpawnerEntity* this) {
|
||||
super->hitbox = (Hitbox*)&gUnk_0811F8B0;
|
||||
@@ -153,7 +153,7 @@ void ChestSpawner_Type2Action3(ChestSpawnerEntity* this) {
|
||||
if (super->interactType != 0) {
|
||||
super->action = 4;
|
||||
super->subtimer = 30;
|
||||
sub_080788E0(super);
|
||||
RemoveInteractableObject(super);
|
||||
RequestPriorityDuration(super, 60);
|
||||
SoundReq(SFX_CHEST_OPEN);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ extern u16 gUnk_08122B1E[];
|
||||
extern Coords8 gUnk_08122B2E[]; // TODO struct xy
|
||||
typedef struct {
|
||||
Hitbox hit;
|
||||
u8 _8[4]; // TODO fourth param of sub_08078850
|
||||
u8 _8[4]; // TODO fourth param of SetInteractableObjectCollision
|
||||
u8 _c;
|
||||
} HitboxCfg;
|
||||
extern HitboxCfg gUnk_08122B3C[];
|
||||
@@ -395,13 +395,13 @@ void sub_08094FA8(CutsceneMiscObjectEntity* this) {
|
||||
super->action = 1;
|
||||
super->frameIndex = 0;
|
||||
super->spritePriority.b0 = 7;
|
||||
sub_080787B4(super);
|
||||
AddInteractableCheckableObject(super);
|
||||
break;
|
||||
case 1:
|
||||
if (super->interactType != 0) {
|
||||
super->interactType = 0;
|
||||
super->action = 2;
|
||||
sub_080788E0(super);
|
||||
RemoveInteractableObject(super);
|
||||
gPlayerState.queued_action = PLAYER_EMPTYBOTTLE;
|
||||
gPlayerState.field_0x38 = 54;
|
||||
#ifndef EU
|
||||
@@ -449,13 +449,13 @@ void sub_08095088(CutsceneMiscObjectEntity* this) {
|
||||
DeleteThisEntity();
|
||||
super->action = 1;
|
||||
super->spritePriority.b0 = 7;
|
||||
sub_080787B4(super);
|
||||
AddInteractableCheckableObject(super);
|
||||
break;
|
||||
case 1:
|
||||
if (super->interactType != 0) {
|
||||
super->interactType = 0;
|
||||
super->action = 2;
|
||||
sub_080788E0(super);
|
||||
RemoveInteractableObject(super);
|
||||
CreateEzloHint(TEXT_INDEX(TEXT_BELARI, 0x1F), 0);
|
||||
}
|
||||
break;
|
||||
@@ -1322,6 +1322,6 @@ void sub_080962E8(CutsceneMiscObjectEntity* this) {
|
||||
|
||||
void sub_080962F8(CutsceneMiscObjectEntity* this, ScriptExecutionContext* ctx) {
|
||||
HitboxCfg* cfg = &gUnk_08122B3C[ctx->intVariable];
|
||||
sub_08078850(super, 1, cfg->_c, cfg->_8);
|
||||
SetInteractableObjectCollision(super, 1, cfg->_c, cfg->_8);
|
||||
super->hitbox = &cfg->hit;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ void FigurineDevice_Init(FigurineDeviceEntity* this) {
|
||||
case 0:
|
||||
if (CheckLocalFlag(SHOP07_TANA)) {
|
||||
this->unk_7a = 1;
|
||||
sub_080787B4(super);
|
||||
AddInteractableCheckableObject(super);
|
||||
} else {
|
||||
this->unk_7a = 0;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ void FigurineDevice_Action1(FigurineDeviceEntity* this) {
|
||||
switch (this->unk_7a) {
|
||||
case 0:
|
||||
this->unk_7a = 1;
|
||||
sub_080787B4(super);
|
||||
AddInteractableCheckableObject(super);
|
||||
break;
|
||||
case 1:
|
||||
if (super->interactType != 0) {
|
||||
@@ -142,7 +142,7 @@ void FigurineDevice_Action1(FigurineDeviceEntity* this) {
|
||||
default:
|
||||
if (CheckRoomFlag(2) == 0) {
|
||||
this->unk_7a = 1;
|
||||
sub_080787B4(super);
|
||||
AddInteractableCheckableObject(super);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -27,14 +27,14 @@ typedef struct {
|
||||
// not match.
|
||||
} ModifiedParentEntity;
|
||||
|
||||
extern u32 sub_080787D8(Entity*);
|
||||
extern u32 AddInteractableShopItem(Entity*);
|
||||
extern void* sub_080784E4(void);
|
||||
|
||||
void ItemForSale_Init(ItemForSaleEntity*);
|
||||
void ItemForSale_Action1(ItemForSaleEntity*);
|
||||
void ItemForSale_Action2(ItemForSaleEntity*);
|
||||
void ItemForSale_Action3(ItemForSaleEntity*);
|
||||
void sub_08081A5C(ItemForSaleEntity*);
|
||||
void ItemForSale_MakeInteractable(ItemForSaleEntity*);
|
||||
void sub_080819B4(ItemForSaleEntity*);
|
||||
void sub_08081AB0(void);
|
||||
|
||||
@@ -71,7 +71,7 @@ void ItemForSale_Init(ItemForSaleEntity* this) {
|
||||
SetDefaultPriority(super, 6);
|
||||
#endif
|
||||
super->child = super;
|
||||
sub_08081A5C(this);
|
||||
ItemForSale_MakeInteractable(this);
|
||||
switch (super->timer) {
|
||||
case 0:
|
||||
super->hitbox = (Hitbox*)&gUnk_080FD328;
|
||||
@@ -154,11 +154,11 @@ void sub_080819B4(ItemForSaleEntity* this) {
|
||||
super->collisionLayer = 1;
|
||||
super->spritePriority.b0 = 4;
|
||||
UpdateSpriteForCollisionLayer(super);
|
||||
sub_08081A5C(this);
|
||||
ItemForSale_MakeInteractable(this);
|
||||
}
|
||||
|
||||
void sub_08081A5C(ItemForSaleEntity* this) {
|
||||
u32 tmp = sub_080787D8(super);
|
||||
void ItemForSale_MakeInteractable(ItemForSaleEntity* this) {
|
||||
u32 tmp = AddInteractableShopItem(super);
|
||||
if (super->timer == 1) {
|
||||
gPossibleInteraction.candidates[tmp].interactDirections = 0;
|
||||
}
|
||||
|
||||
@@ -133,8 +133,8 @@ void LockedDoor_Init(Entity* this) {
|
||||
this->action = 5;
|
||||
} else {
|
||||
this->action = 8;
|
||||
sub_080787CC(this);
|
||||
sub_08078850(this, 0, gLockedDoorInteractDirections[this->field_0x7c.BYTES.byte2], 0);
|
||||
AddInteractableSmallKeyLock(this);
|
||||
SetInteractableObjectCollision(this, 0, gLockedDoorInteractDirections[this->field_0x7c.BYTES.byte2], NULL);
|
||||
}
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
|
||||
@@ -34,7 +34,7 @@ void ObjectA(Entity* this) {
|
||||
}
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
sub_080787CC(this);
|
||||
AddInteractableSmallKeyLock(this);
|
||||
}
|
||||
} else if (this->interactType != 0) {
|
||||
SetTileType(*(u16*)&this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "flags.h"
|
||||
#include "room.h"
|
||||
|
||||
extern void sub_08078828(Entity*);
|
||||
extern void AddInteractableChest(Entity*);
|
||||
extern void OpenSmallChest(u32 pos, u32 layer);
|
||||
|
||||
void SpecialChest(Entity* this) {
|
||||
@@ -19,7 +19,7 @@ void SpecialChest(Entity* this) {
|
||||
}
|
||||
this->action = 1;
|
||||
this->collisionLayer = 1;
|
||||
sub_08078828(this);
|
||||
AddInteractableChest(this);
|
||||
}
|
||||
if (this->interactType != 0) {
|
||||
OpenSmallChest(COORD_TO_TILE(this), 2);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "global.h"
|
||||
#include "message.h"
|
||||
|
||||
extern void sub_080787B4(Entity*);
|
||||
extern void AddInteractableCheckableObject(Entity*);
|
||||
void SwordsmanNewsletter_Init(Entity*);
|
||||
void SwordsmanNewsletter_Action1(Entity*);
|
||||
|
||||
@@ -27,7 +27,7 @@ void SwordsmanNewsletter_Init(Entity* this) {
|
||||
this->frameIndex = this->type;
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
this->hitbox = (Hitbox*)&gUnk_081228A8;
|
||||
sub_080787B4(this);
|
||||
AddInteractableCheckableObject(this);
|
||||
}
|
||||
|
||||
void SwordsmanNewsletter_Action1(Entity* this) {
|
||||
|
||||
@@ -22,9 +22,9 @@ void Windcrest(Entity* this) {
|
||||
HandleEntity0x82Actions(this);
|
||||
}
|
||||
|
||||
void sub_080A2124(Entity* this) {
|
||||
void Windcrest_ChangeInteractableHitbox(Entity* this) {
|
||||
static const u8 gUnk_08125010[] = { 0, 0, 12, 12 };
|
||||
sub_08078850(this, 1, 0xe, gUnk_08125010);
|
||||
SetInteractableObjectCollision(this, 1, 0xe, gUnk_08125010);
|
||||
}
|
||||
|
||||
void Windcrest_Unlock(Entity* this) {
|
||||
|
||||
Reference in New Issue
Block a user