mirror of
https://github.com/zeldaret/tmc
synced 2026-07-09 14:55:35 -04:00
npc5 document
This commit is contained in:
@@ -710,7 +710,7 @@ void sub_0809567C(CutsceneMiscObjectEntity* this) {
|
||||
super->action = 3;
|
||||
super->subAction = 1;
|
||||
super->speed = 0x400;
|
||||
super->direction = sub_080045DA(super->x.WORD - ((s16)this->px << 16), super->y.WORD - ((s16)this->py << 16));
|
||||
super->direction = CalcOffsetAngle(super->x.WORD - ((s16)this->px << 16), super->y.WORD - ((s16)this->py << 16));
|
||||
}
|
||||
|
||||
void CutsceneMiscObject_Type15(CutsceneMiscObjectEntity* this) {
|
||||
|
||||
@@ -83,10 +83,10 @@ void EvilSpirit_Action1(EvilSpiritEntity* this) {
|
||||
this->unk7a = this->unk7c;
|
||||
super->speed = 0x300;
|
||||
super->direction =
|
||||
sub_080045DA(super->parent->x.WORD - super->x.WORD, super->parent->y.WORD - super->y.WORD) ^ 0x80;
|
||||
CalcOffsetAngle(super->parent->x.WORD - super->x.WORD, super->parent->y.WORD - super->y.WORD) ^ 0x80;
|
||||
} else {
|
||||
super->speed = 0x600;
|
||||
dir = sub_080045DA(gPlayerEntity.base.x.WORD - super->x.WORD, gPlayerEntity.base.y.WORD - super->y.WORD) ^
|
||||
dir = CalcOffsetAngle(gPlayerEntity.base.x.WORD - super->x.WORD, gPlayerEntity.base.y.WORD - super->y.WORD) ^
|
||||
0x80;
|
||||
if (dir != super->direction) {
|
||||
if ((u8)(dir - super->direction) > 0x80) {
|
||||
@@ -178,7 +178,7 @@ void EvilSpirit_Action3(EvilSpiritEntity* this) {
|
||||
short iVar4;
|
||||
int iVar6;
|
||||
|
||||
super->direction = sub_080045DA(this->x - super->x.WORD, this->y - super->y.WORD);
|
||||
super->direction = CalcOffsetAngle(this->x - super->x.WORD, this->y - super->y.WORD);
|
||||
if ((super->contactFlags & 0x7f) == 0x13) {
|
||||
super->speed = 0x100;
|
||||
super->gustJarTolerance--;
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef struct {
|
||||
/*0x70*/ u8 unk_70;
|
||||
} FileScreenObjectsEntity;
|
||||
|
||||
extern u32 sub_080041EC(s32, s32);
|
||||
extern u32 CalcDistance(s32, s32);
|
||||
|
||||
static bool32 sub_0808E950(void);
|
||||
static void sub_0808EABC(FileScreenObjectsEntity*);
|
||||
@@ -550,14 +550,14 @@ static u32 sub_0808EF6C(FileScreenObjectsEntity* this) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
var4 = var7 = sub_080041EC(var0, var2);
|
||||
var4 = var7 = CalcDistance(var0, var2);
|
||||
var4 += 128;
|
||||
var7 = var4 + var7 * 16;
|
||||
if (this->unk_6c < var7) {
|
||||
var7 = this->unk_6c;
|
||||
}
|
||||
super->speed = var7;
|
||||
super->direction = sub_080045DA(var0, var2) >> 3;
|
||||
super->direction = CalcOffsetAngle(var0, var2) >> 3;
|
||||
LinearMoveUpdate(super);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ void sub_0809E0D4(KeyStealingTakkuriEntity* this, ScriptExecutionContext* contex
|
||||
varY2 = varY;
|
||||
if (--context->unk_19 == 0) {
|
||||
context->unk_19 = 8;
|
||||
super->direction = sub_080045DA(varX2 - super->x.HALF.HI, varY2 - super->y.HALF.HI);
|
||||
super->direction = CalcOffsetAngle(varX2 - super->x.HALF.HI, varY2 - super->y.HALF.HI);
|
||||
}
|
||||
varX3 = super->x.HALF.HI - varX2;
|
||||
varY3 = super->y.HALF.HI - varY2;
|
||||
|
||||
@@ -117,5 +117,5 @@ void sub_0809F448(Entity* this) {
|
||||
break;
|
||||
}
|
||||
this->speed = (tmp > 0 ? tmp : -tmp) / (tmp2->unk_1 << 8);
|
||||
this->direction = sub_080045DA(tmp, 0) >> 3;
|
||||
this->direction = CalcOffsetAngle(tmp, 0) >> 3;
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ void OctorokBossObject_Action1(OctorokBossObjectEntity* this) {
|
||||
return;
|
||||
}
|
||||
case 1:
|
||||
super->direction = sub_080045DA(this->helper->tailObjects[super->timer]->x.WORD - super->x.WORD,
|
||||
super->direction = CalcOffsetAngle(this->helper->tailObjects[super->timer]->x.WORD - super->x.WORD,
|
||||
this->helper->tailObjects[super->timer]->y.WORD - super->y.WORD);
|
||||
LinearMoveAngle(super, super->speed, super->direction);
|
||||
if (EntityInRectRadius(super, this->helper->tailObjects[super->timer], 2, 2) == 0) {
|
||||
@@ -207,7 +207,7 @@ void OctorokBossObject_Action1(OctorokBossObjectEntity* this) {
|
||||
case 2:
|
||||
if (super->parent->type2 == 3) {
|
||||
Entity* object = ((OctorokBossObjectEntity*)super->parent)->helper->mouthObject;
|
||||
super->direction = sub_080045DA(object->x.WORD - super->x.WORD, object->y.WORD - super->y.WORD);
|
||||
super->direction = CalcOffsetAngle(object->x.WORD - super->x.WORD, object->y.WORD - super->y.WORD);
|
||||
LinearMoveAngle(super, 0x280, super->direction);
|
||||
if (sub_0806FC80(super, super->parent, 0x48) == 0) {
|
||||
return;
|
||||
|
||||
@@ -199,7 +199,7 @@ void sub_080845DC(SpecialFxObject* this) {
|
||||
|
||||
void sub_080845F8(SpecialFxObject* this) {
|
||||
if (((8 - (super->x.HALF.HI & 0xF)) | (8 - (super->y.HALF.HI & 0xF))) != 0) {
|
||||
super->direction = sub_080045DA((8 - (super->x.HALF.HI & 0xF)), (8 - (super->y.HALF.HI & 0xF))) >> 3;
|
||||
super->direction = CalcOffsetAngle((8 - (super->x.HALF.HI & 0xF)), (8 - (super->y.HALF.HI & 0xF))) >> 3;
|
||||
LinearMoveUpdate(super);
|
||||
}
|
||||
sub_08084630(this);
|
||||
|
||||
Reference in New Issue
Block a user