d_a_e_tk debug (#3062)

* d_a_e_tk debug

* a_this -> actor
This commit is contained in:
Niklas Bauer
2026-01-24 20:20:33 +01:00
committed by GitHub
parent 46da46b152
commit 6f73e18bd2
17 changed files with 533 additions and 361 deletions
+159 -96
View File
@@ -1,13 +1,14 @@
/**
* @file d_a_e_tk2.cpp
* @file d_a_e_tk2.cpp
*
*/
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_e_tk2.h"
#include "d/actor/d_a_e_tk_ball.h"
#include "d/d_com_inf_game.h"
#include "d/d_s_play.h"
enum Action {
/* 0x0 */ ACT_TK2_WAIT,
@@ -43,26 +44,46 @@ static bool hio_set;
static daE_TK2_HIO_c l_HIO;
daE_TK2_HIO_c::daE_TK2_HIO_c() {
field_0x04 = -1;
mRadiusScale = 2.3f;
mPlayerRange2 = 1400.0f;
mPlayerRange1 = 500.0f;
mSpeedModifier1 = 10.0f;
mSpeedModifier2 = 25.0f;
mNo = -1;
mBaseSize = 2.3f;
mPlayerDetectionDistanceFar = 1400.0f;
mPlayerDetectionDistanceNear = 500.0f;
mSwimSpeedModifier = 10.0f;
mFleeSpeedModifier = 25.0f;
}
static void anm_init(e_tk2_class* i_this, int i_index, f32 i_morf, u8 i_attr, f32 i_rate) {
J3DAnmTransform* anm = (J3DAnmTransform*)dComIfG_getObjectRes("E_tk2", i_index);
#if DEBUG
void daE_TK2_HIO_c::genMessage(JORMContext* ctext) {
// Tadpole
ctext->genLabel(" タドポール", 0x80000001, 0U, NULL);
// Base Size
ctext->genSlider("基本サイズ", &mBaseSize, 0.0f, 5.0f);
// Player Detection Distance Far
ctext->genSlider("PL認識距離 遠", &mPlayerDetectionDistanceFar, 0.0f, 3000.0f);
// Player Detection Distance Near
ctext->genSlider("PL認識距離 近", &mPlayerDetectionDistanceNear, 0.0f, 3000.0f);
ctext->genLabel(" ", 0x80000001);
// ↓ Behavior not guaranteed if changed
ctext->genLabel(" ↓変更すると動作保証しません", 0x80000001);
// Swim Speed
ctext->genSlider("泳ぎ速度", &mSwimSpeedModifier, 0.0f, 40.0f);
// Flee Speed
ctext->genSlider("逃げ速度", &mFleeSpeedModifier, 0.0f, 40.0f);
}
#endif
i_this->mpMorf->setAnm(anm, i_attr, i_morf, i_rate, 0.0f, -1.0f);
static void anm_init(e_tk2_class* i_this, int i_index, f32 i_morf, u8 i_attr, f32 i_rate) {
i_this->mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("E_tk2", i_index), i_attr, i_morf,
i_rate, 0.0f, -1.0f);
i_this->mAnim = i_index;
}
static int daE_TK2_Draw(e_tk2_class* i_this) {
fopAc_ac_c* actor = i_this;
J3DModel* model = i_this->mpMorf->getModel();
g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->tevStr);
g_env_light.setLightTevColorType_MAJI(model, &i_this->tevStr);
g_env_light.settingTevStruct(0, &actor->current.pos, &actor->tevStr);
g_env_light.setLightTevColorType_MAJI(model, &actor->tevStr);
i_this->mpMorf->entryDL();
return 1;
}
@@ -70,6 +91,7 @@ static int daE_TK2_Draw(e_tk2_class* i_this) {
static int other_bg_check(e_tk2_class* i_this, fopAc_ac_c* i_ac) {
fopAc_ac_c* actor = i_this;
dBgS_LinChk line_check;
cXyz _unk1;
cXyz start_pos;
cXyz end_pos;
@@ -88,10 +110,11 @@ static int other_bg_check(e_tk2_class* i_this, fopAc_ac_c* i_ac) {
}
static int pl_check(e_tk2_class* i_this, f32 i_limit, s16 i_max_diff) {
fopAc_ac_c* actor = i_this;
fopAc_ac_c* player = dComIfGp_getPlayer(0);
if (i_this->mPlayerDistanceLimit < i_limit) {
s16 diff = i_this->shape_angle.y - i_this->mPlayerAngleY;
s16 diff = actor->shape_angle.y - i_this->mPlayerAngleY;
if (diff < i_max_diff && diff > (s16)-i_max_diff && !other_bg_check(i_this, player)) {
return 1;
}
@@ -101,6 +124,9 @@ static int pl_check(e_tk2_class* i_this, f32 i_limit, s16 i_max_diff) {
}
static void damage_check(e_tk2_class* i_this) {
fopAc_ac_c* actor = i_this;
fopAc_ac_c* player = dComIfGp_getPlayer(0);
if (i_this->mInvincibilityTimer == 0) {
i_this->mStts.Move();
@@ -119,7 +145,7 @@ static void damage_check(e_tk2_class* i_this) {
i_this->mMode = MODE_TK2_KYORO2;
i_this->mActionTimer[0] = 50;
} else {
cc_at_check(i_this, &i_this->mAtInfo);
cc_at_check(actor, &i_this->mAtInfo);
if (i_this->mAtInfo.mHitType == HIT_TYPE_STUN) {
i_this->mAction = ACT_TK2_S_DAMAGE;
} else {
@@ -129,18 +155,24 @@ static void damage_check(e_tk2_class* i_this) {
}
}
if (i_this->health <= 1) {
i_this->health = 0;
if (actor->health <= 1) {
actor->health = 0;
i_this->mSph.SetTgHitMark(CcG_Tg_UNK_MARK_3);
}
if (i_this->health <= 1) { // Yes, this is a duplicate (??)
i_this->health = 0;
if (actor->health <= 1) { // Yes, this is a duplicate (??)
actor->health = 0;
i_this->mSph.SetTgHitMark(CcG_Tg_UNK_MARK_3);
}
}
}
static void e_tk2_wait_0(e_tk2_class* i_this) {
fopAc_ac_c* actor = i_this;
cXyz src_pos;
f32 speed_mul = 1.0f;
f32 speed_step = 1.0f + YREG_F(5);
i_this->mAttentionOFF = true;
switch (i_this->mMode) {
@@ -149,7 +181,9 @@ static void e_tk2_wait_0(e_tk2_class* i_this) {
break;
case MODE_TK2_APPEAR:
if (i_this->mActionTimer[1] == 0 && pl_check(i_this, l_HIO.mPlayerRange2, 0x4000)) {
if (i_this->mActionTimer[1] == 0 &&
pl_check(i_this, l_HIO.mPlayerDetectionDistanceFar, 0x4000))
{
i_this->mAction = ACT_TK2_FIND;
i_this->mMode = MODE_TK2_NONE;
}
@@ -157,10 +191,16 @@ static void e_tk2_wait_0(e_tk2_class* i_this) {
}
i_this->mSomeAngle = i_this->mPlayerAngleY;
cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->mSomeAngle, 0x10, 0x400);
cLib_addCalcAngleS2(&actor->shape_angle.y, i_this->mSomeAngle, 0x10, 0x400);
}
static void e_tk2_find(e_tk2_class* i_this) {
fopAc_ac_c* actor = i_this;
cXyz local_58;
f32 speed_target = 0.0f;
f32 speed_step = 3.0f;
switch (i_this->mMode) {
case MODE_TK2_NONE:
anm_init(i_this, ANM_TK2_APPEAR, 3.0f, 0x0, 1.0f);
@@ -202,7 +242,7 @@ static void e_tk2_find(e_tk2_class* i_this) {
break;
case MODE_TK2_SWIM:
i_this->mPlayerAngleY = i_this->mPlayerAngleY + -0x8000;
ADD_ANGLE(i_this->mPlayerAngleY, 0x8000);
i_this->mAttentionOFF = true;
if (i_this->mpMorf->isStop()) {
i_this->mAnimSpeed = 4.0f;
@@ -215,8 +255,10 @@ static void e_tk2_find(e_tk2_class* i_this) {
i_this->mAttentionOFF = true;
cLib_addCalc2(&i_this->mAnimSpeed, 2.0f, 1.0f, 0.15f);
i_this->mpMorf->setPlaySpeed(i_this->mAnimSpeed);
speed_target = 1.0f + YREG_F(17);
speed_step = 10.0f + YREG_F(18);
if (i_this->mActionTimer[0] == 0 &&
i_this->mPlayerDistanceLimit > l_HIO.mPlayerRange1 * 1.2f)
i_this->mPlayerDistanceLimit > l_HIO.mPlayerDetectionDistanceNear * 1.2f)
{
i_this->mMode = MODE_TK2_NONE;
} else {
@@ -226,16 +268,18 @@ static void e_tk2_find(e_tk2_class* i_this) {
}
}
if (i_this->mActionTimer[1] == 0) {
i_this->mPlayerAngleY = i_this->mPlayerAngleY - 0x8000;
ADD_ANGLE(i_this->mPlayerAngleY, 0x8000);
} else {
i_this->mPlayerAngleY = i_this->mSomeAngle;
}
}
cLib_addCalcAngleS2(&(i_this)->shape_angle.y, i_this->mPlayerAngleY, 4, 0x800);
cLib_addCalcAngleS2(&actor->shape_angle.y, i_this->mPlayerAngleY, 4, 0x800);
}
static void e_tk2_attack(e_tk2_class* i_this) {
fopAc_ac_c* actor = i_this;
switch (i_this->mMode) {
case MODE_TK2_NONE:
i_this->mMode = MODE_TK2_APPEAR;
@@ -245,15 +289,15 @@ static void e_tk2_attack(e_tk2_class* i_this) {
case MODE_TK2_APPEAR:
if ((int)i_this->mpMorf->getFrame() == 0x18) {
i_this->mBallID =
fopAcM_createChild(PROC_E_TK_BALL, fopAcM_GetID(i_this), 1, &i_this->eyePos,
fopAcM_GetRoomNo(i_this), &i_this->shape_angle, 0, -1, 0);
fopAcM_createChild(PROC_E_TK_BALL, fopAcM_GetID(actor), 1, &actor->eyePos,
fopAcM_GetRoomNo(actor), &actor->shape_angle, 0, -1, 0);
}
if ((int)i_this->mpMorf->getFrame() == 0x1c) {
i_this->mTKBallSpawned = true;
}
if (i_this->mpMorf->isStop()) {
anm_init(i_this, ANM_TK2_WAIT01, 1.0f, 0x02, 1.0f);
i_this->mActionTimer[0] = (short)(int)(cM_rndF(30.0f) + 70.0f);
i_this->mActionTimer[0] = cM_rndF(30.0f) + 70.0f;
i_this->mMode = MODE_TK2_ATTACK;
}
break;
@@ -261,17 +305,19 @@ static void e_tk2_attack(e_tk2_class* i_this) {
case MODE_TK2_ATTACK:
if (i_this->mActionTimer[0] == 0) {
i_this->mMode = MODE_TK2_NONE;
} else if (!pl_check(i_this, l_HIO.mPlayerRange2 + 50.0f, 0x6000)) {
} else if (!pl_check(i_this, l_HIO.mPlayerDetectionDistanceFar + 50.0f, 0x6000)) {
i_this->mAction = ACT_TK2_FIND;
i_this->mMode = MODE_TK2_DAMAGE;
}
break;
}
cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->mPlayerAngleY, 4, 0x800);
cLib_addCalcAngleS2(&actor->shape_angle.y, i_this->mPlayerAngleY, 4, 0x800);
}
static void e_tk2_s_damage(e_tk2_class* i_this) {
fopAc_ac_c* actor = i_this;
switch (i_this->mMode) {
case MODE_TK2_NONE:
anm_init(i_this, ANM_TK2_DAMAGE, 2.0f, 0x0, 1.0f);
@@ -279,7 +325,7 @@ static void e_tk2_s_damage(e_tk2_class* i_this) {
break;
case MODE_TK2_APPEAR:
if (i_this->mpMorf->getFrame() > 10.0f) {
if (i_this->mpMorf->getFrame() > 10.0f + YREG_F(3)) {
i_this->mAction = ACT_TK2_FIND;
i_this->mMode = MODE_TK2_DAMAGE;
}
@@ -288,6 +334,8 @@ static void e_tk2_s_damage(e_tk2_class* i_this) {
}
static void e_tk2_damage(e_tk2_class* i_this) {
fopAc_ac_c* actor = i_this;
i_this->mInvincibilityTimer = 6;
i_this->mAttentionOFF = true;
@@ -299,8 +347,8 @@ static void e_tk2_damage(e_tk2_class* i_this) {
case MODE_TK2_APPEAR:
if (i_this->mpMorf->isStop()) {
fopAcM_createDisappear(i_this, &i_this->eyePos, 10, 0, 0x12);
fopAcM_delete(i_this);
fopAcM_createDisappear(actor, &actor->eyePos, 10, 0, 0x12);
fopAcM_delete(actor);
}
break;
}
@@ -308,6 +356,10 @@ static void e_tk2_damage(e_tk2_class* i_this) {
static void action(e_tk2_class* i_this) {
fopAc_ac_c* actor = i_this;
cXyz _unk1;
cXyz _unk2;
i_this->mPlayerAngleY = fopAcM_searchPlayerAngleY(actor);
i_this->mPlayerDistanceLimit = fopAcM_searchPlayerDistance(actor);
damage_check(i_this);
@@ -341,20 +393,23 @@ static void action(e_tk2_class* i_this) {
}
static int daE_TK2_Execute(e_tk2_class* i_this) {
fopAc_ac_c* actor = i_this;
cXyz cStack_94;
cXyz cStack_a0;
if (i_this->mExecuteState == 0x00) {
dBgS_ObjGndChk_Spl ground_check;
cStack_94 = i_this->current.pos;
cStack_94 = actor->current.pos;
cStack_94.y += 200.0f;
ground_check.SetPos(&cStack_94);
i_this->current.pos.y = dComIfG_Bgsp().GroundCross(&ground_check) - 10.0f;
f32 ground_cross = dComIfG_Bgsp().GroundCross(&ground_check);
actor->current.pos.y = ground_cross - 10.0f + JREG_F(8);
}
i_this->mLifetime++;
i_this->mAttentionOFF = false;
for (int i = 0; i <= 3; i++) {
for (int i = 0; i < 4; i++) {
if (i_this->mActionTimer[i] != 0) {
i_this->mActionTimer[i]--;
}
@@ -366,14 +421,14 @@ static int daE_TK2_Execute(e_tk2_class* i_this) {
action(i_this);
i_this->mAcch.CrrPos(dComIfG_Bgsp());
mDoMtx_stack_c::transS(i_this->current.pos.x, i_this->current.pos.y, i_this->current.pos.z);
mDoMtx_stack_c::YrotM(i_this->shape_angle.y);
mDoMtx_stack_c::scaleM(l_HIO.mRadiusScale, l_HIO.mRadiusScale, l_HIO.mRadiusScale);
mDoMtx_stack_c::transS(actor->current.pos.x, actor->current.pos.y, actor->current.pos.z);
mDoMtx_stack_c::YrotM(actor->shape_angle.y);
mDoMtx_stack_c::scaleM(l_HIO.mBaseSize, l_HIO.mBaseSize, l_HIO.mBaseSize);
J3DModel* model = i_this->mpMorf->getModel();
model->setBaseTRMtx(mDoMtx_stack_c::get());
i_this->mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
i_this->mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(actor)));
if (i_this->mAnim == ANM_TK2_SWIM) {
if (i_this->mpMorf->checkFrame(0.0f) || i_this->mpMorf->checkFrame(6.0f) ||
@@ -416,32 +471,30 @@ static int daE_TK2_Execute(e_tk2_class* i_this) {
MTXCopy(model->getAnmMtx(3), *calc_mtx);
cStack_94.set(0.0f, 0.0f, 0.0f);
MtxPosition(&cStack_94, &i_this->eyePos);
MtxPosition(&cStack_94, &actor->eyePos);
i_this->attention_info.position = i_this->eyePos;
i_this->attention_info.position.y =
i_this->attention_info.position.y + l_HIO.mRadiusScale * 35.0f;
actor->attention_info.position = actor->eyePos;
actor->attention_info.position.y = actor->attention_info.position.y + l_HIO.mBaseSize * 35.0f;
if (i_this->mTKBallSpawned) {
e_tk_ball_class* ball_actor =
static_cast<e_tk_ball_class*>(fopAcM_SearchByID(i_this->mBallID));
if (ball_actor != NULL) {
ball_actor->current.pos = i_this->eyePos;
ball_actor->current.pos = actor->eyePos;
ball_actor->mSuspended = false;
}
cXyz scale;
scale.setall(2.0f);
dComIfGp_particle_set(0x8198, &i_this->eyePos, &i_this->shape_angle, &scale);
dComIfGp_particle_set(0x8199, &i_this->eyePos, &i_this->shape_angle, &scale);
cXyz scale(2.0f + TREG_F(8), 2.0f + TREG_F(8), 2.0f + TREG_F(8));
dComIfGp_particle_set(0x8198, &actor->eyePos, &actor->shape_angle, &scale);
dComIfGp_particle_set(0x8199, &actor->eyePos, &actor->shape_angle, &scale);
i_this->mTKBallSpawned = false;
}
if (i_this->mAttentionOFF) {
fopAcM_OffStatus(i_this, 0);
i_this->attention_info.flags = 0;
fopAcM_OffStatus(actor, 0);
actor->attention_info.flags = 0;
} else {
fopAcM_OnStatus(i_this, 0);
i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e;
fopAcM_OnStatus(actor, 0);
actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e;
}
MTXCopy(model->getAnmMtx(2), *calc_mtx);
@@ -449,7 +502,7 @@ static int daE_TK2_Execute(e_tk2_class* i_this) {
MtxPosition(&cStack_94, &cStack_a0);
i_this->mSph.SetC(cStack_a0);
i_this->mSph.SetR(50.0f * l_HIO.mRadiusScale);
i_this->mSph.SetR((50.0f + JREG_F(3)) * l_HIO.mBaseSize);
dComIfG_Ccsp()->Set(&i_this->mSph);
@@ -461,18 +514,23 @@ static int daE_TK2_IsDelete(e_tk2_class* i_this) {
}
static int daE_TK2_Delete(e_tk2_class* i_this) {
fopAc_ac_c* actor = i_this;
fopAcM_RegisterDeleteID(i_this, "E_TK2");
dComIfG_resDelete(&i_this->mPhaseReq, "E_tk2");
if (i_this->mInitHIO) {
hio_set = false;
mDoHIO_DELETE_CHILD(l_HIO.mNo);
}
if (i_this->heap != NULL) {
if (actor->heap != NULL) {
i_this->mpMorf->stopZelAnime();
}
return 1;
}
static int useHeapInit(fopAc_ac_c* a_this) {
e_tk2_class* i_this = static_cast<e_tk2_class*>(a_this);
static int useHeapInit(fopAc_ac_c* actor) {
e_tk2_class* i_this = static_cast<e_tk2_class*>(actor);
i_this->mpMorf =
new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("E_tk2", 0xE), NULL, NULL,
@@ -486,61 +544,66 @@ static int useHeapInit(fopAc_ac_c* a_this) {
return 1;
}
static int daE_TK2_Create(fopAc_ac_c* i_this) {
static dCcD_SrcSph cc_sph_src = {
{
{0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
}, // mObjInf
{
{{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
} // mSphAttr
};
static int daE_TK2_Create(fopAc_ac_c* actor) {
e_tk2_class* i_this = (e_tk2_class*)actor;
fopAcM_ct(i_this, e_tk2_class);
e_tk2_class* a_this = static_cast<e_tk2_class*>(i_this);
cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&a_this->mPhaseReq, "E_tk2");
cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhaseReq, "E_tk2");
if (phase == cPhs_COMPLEATE_e) {
a_this->mArg0 = fopAcM_GetParamBit(a_this, 0, 8);
a_this->mArg1 = fopAcM_GetParamBit(a_this, 8, 4);
a_this->mArg2 = fopAcM_GetParamBit(a_this, 12, 4);
OS_REPORT("E_tk2 PARAM %x\n", fopAcM_GetParam(actor));
i_this->mArg0 = (fopAcM_GetParam(actor) & 0xFF) >> 0;
i_this->mArg1 = (fopAcM_GetParam(actor) & 0xF00) >> 8;
i_this->mArg2 = (fopAcM_GetParam(actor) & 0xF000) >> 12;
if (!fopAcM_entrySolidHeap(a_this, useHeapInit, 0x23a0)) {
OS_REPORT("E_tk2//////////////E_TK2 SET 1 !!\n");
if (!fopAcM_entrySolidHeap(actor, useHeapInit, 0x23a0)) {
OS_REPORT("//////////////E_TK2 SET NON !!\n");
return cPhs_ERROR_e;
}
OS_REPORT("//////////////E_TK2 SET 2 !!\n");
if (hio_set == false) {
a_this->mInitHIO = true;
i_this->mInitHIO = true;
hio_set = true;
l_HIO.field_0x04 = -1;
l_HIO.mNo = mDoHIO_CREATE_CHILD("たどぽーる2", &l_HIO); // "Tadpole 2"
}
a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e;
actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e;
fopAcM_SetMtx(a_this, a_this->mpMorf->getModel()->getBaseTRMtx());
fopAcM_SetMin(a_this, -100.0f, -100.0f, -100.0f);
fopAcM_SetMax(a_this, 100.0f, 100.0f, 100.0f);
fopAcM_SetMtx(actor, i_this->mpMorf->getModel()->getBaseTRMtx());
fopAcM_SetMin(actor, -100.0f, -100.0f, -100.0f);
fopAcM_SetMax(actor, 100.0f, 100.0f, 100.0f);
a_this->attention_info.distances[fopAc_attn_BATTLE_e] = 0x04;
a_this->health = 0;
a_this->field_0x560 = 0;
actor->attention_info.distances[fopAc_attn_BATTLE_e] = 0x04;
actor->field_0x560 = actor->health = 0;
a_this->mStts.Init(100, 0, a_this);
a_this->mSph.Set(cc_sph_src);
a_this->mSph.SetStts(&a_this->mStts);
static dCcD_SrcSph cc_sph_src = {
{
{0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
}, // mObjInf
{
{{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
} // mSphAttr
};
a_this->mAcch.Set(&i_this->current.pos, &a_this->old.pos, a_this, 1, &a_this->mAcchCir,
fopAcM_GetSpeed_p(a_this), NULL, NULL);
i_this->mStts.Init(100, 0, actor);
i_this->mSph.Set(cc_sph_src);
i_this->mSph.SetStts(&i_this->mStts);
a_this->mAcchCir.SetWall(-50.0f, 60.0f);
a_this->mSound.init(&a_this->current.pos, &a_this->eyePos, 0x3, 0x1);
a_this->mSound.setEnemyName("E_tk2");
a_this->mAtInfo.mpSound = &a_this->mSound;
a_this->mExecuteState = 0x14;
daE_TK2_Execute(a_this);
i_this->mAcch.Set(fopAcM_GetPosition_p(actor), fopAcM_GetOldPosition_p(actor), actor, 1,
&i_this->mAcchCir, fopAcM_GetSpeed_p(actor), NULL, NULL);
i_this->mAcchCir.SetWall(-50.0f, 60.0f);
i_this->mSound.init(&actor->current.pos, &actor->eyePos, 0x3, 0x1);
i_this->mSound.setEnemyName("E_tk2");
i_this->mAtInfo.mpSound = &i_this->mSound;
i_this->mExecuteState = 0x14;
daE_TK2_Execute(i_this);
}
return phase;
}