mirror of
https://github.com/zeldaret/tmc
synced 2026-09-03 02:13:43 -04:00
Document structs for interacting with entities
This commit is contained in:
@@ -27,7 +27,7 @@ typedef struct {
|
||||
} BossDoorEntity;
|
||||
|
||||
extern bool32 gUnk_02036BB8;
|
||||
extern const u8 gUnk_0811F740[];
|
||||
extern const u8 gLockedDoorInteractDirections[];
|
||||
|
||||
void sub_0808C500(BossDoorEntity*);
|
||||
void sub_0808C4BC(BossDoorEntity*);
|
||||
@@ -70,7 +70,7 @@ void BossDoor_Init(BossDoorEntity* this) {
|
||||
super->spriteSettings.draw = 1;
|
||||
sub_0808C500(this);
|
||||
sub_08078800(super);
|
||||
sub_08078850(super, 0, gUnk_0811F740[this->unk_76], 0);
|
||||
sub_08078850(super, 0, gLockedDoorInteractDirections[this->unk_76], 0);
|
||||
break;
|
||||
case 1:
|
||||
super->action = 4;
|
||||
|
||||
@@ -57,7 +57,7 @@ void CameraTarget(Entity* this) {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (gUnk_03003DF0.unk_4->unk_3 == KINSTONE_32) {
|
||||
if (gPossibleInteraction.currentObject->kinstoneId == KINSTONE_32) {
|
||||
if (CheckKinstoneFused(KINSTONE_32) == 0) {
|
||||
uVar2 = 0;
|
||||
break;
|
||||
@@ -103,9 +103,9 @@ void CameraTarget_Action1(Entity* this) {
|
||||
if (this->timer) {
|
||||
this->timer--;
|
||||
} else {
|
||||
if ((gUnk_03003DF0.unk_4->entity != NULL) && ((u8)(gUnk_03003DF0.unk_4->unk_3 - 1) < 100)) {
|
||||
this->child = gUnk_03003DF0.unk_4->entity;
|
||||
this->interactType = gUnk_03003DF0.unk_3;
|
||||
if ((gPossibleInteraction.currentObject->entity != NULL) && ((u8)(gPossibleInteraction.currentObject->kinstoneId - 1) < 100)) {
|
||||
this->child = gPossibleInteraction.currentObject->entity;
|
||||
this->interactType = gPossibleInteraction.currentIndex;
|
||||
sub_08083A40(this);
|
||||
}
|
||||
}
|
||||
@@ -120,7 +120,7 @@ void CameraTarget_Action2(Entity* this) {
|
||||
const KinstoneWorldEvent* ptr;
|
||||
|
||||
if ((this->type != 1) &&
|
||||
(((u8)(gUnk_03003DF0.unk_4->unk_3 - 1) >= 100 || (this->child != gUnk_03003DF0.unk_4->entity)))) {
|
||||
(((u8)(gPossibleInteraction.currentObject->kinstoneId - 1) >= 100 || (this->child != gPossibleInteraction.currentObject->entity)))) {
|
||||
sub_080838DC(this);
|
||||
} else {
|
||||
this->x = this->child->x;
|
||||
@@ -129,7 +129,7 @@ void CameraTarget_Action2(Entity* this) {
|
||||
if (this->frame == 1) {
|
||||
this->frame = 0;
|
||||
if (this->type == 0) {
|
||||
bVar2 = gUnk_03003DF0.unk_4->unk_3;
|
||||
bVar2 = gPossibleInteraction.currentObject->kinstoneId;
|
||||
} else {
|
||||
bVar2 = this->type2;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ void sub_080819B4(ItemForSaleEntity* this) {
|
||||
void sub_08081A5C(ItemForSaleEntity* this) {
|
||||
u32 tmp = sub_080787D8(super);
|
||||
if (super->timer == 1) {
|
||||
gUnk_03003DF0.array[tmp].unk_2 = 0;
|
||||
gPossibleInteraction.candidates[tmp].interactDirections = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ const struct_0811F730 gUnk_0811F730[] = {
|
||||
{ { 8, 8 }, { 8, -8 } },
|
||||
};
|
||||
|
||||
const u8 gUnk_0811F740[] = {
|
||||
const u8 gLockedDoorInteractDirections[] = {
|
||||
0xBE,
|
||||
0x7D,
|
||||
0xEB,
|
||||
@@ -134,7 +134,7 @@ void LockedDoor_Init(Entity* this) {
|
||||
} else {
|
||||
this->action = 8;
|
||||
sub_080787CC(this);
|
||||
sub_08078850(this, 0, gUnk_0811F740[this->field_0x7c.BYTES.byte2], 0);
|
||||
sub_08078850(this, 0, gLockedDoorInteractDirections[this->field_0x7c.BYTES.byte2], 0);
|
||||
}
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
|
||||
Reference in New Issue
Block a user