mirror of https://github.com/zeldaret/tp.git
parent
aeeaf91054
commit
70f0ed7ef7
|
@ -1657,8 +1657,8 @@ config.libs = [
|
||||||
ActorRel(NonMatching, "d_a_e_bs"),
|
ActorRel(NonMatching, "d_a_e_bs"),
|
||||||
ActorRel(NonMatching, "d_a_e_bu"),
|
ActorRel(NonMatching, "d_a_e_bu"),
|
||||||
ActorRel(NonMatching, "d_a_e_bug"),
|
ActorRel(NonMatching, "d_a_e_bug"),
|
||||||
ActorRel(NonMatching, "d_a_e_cr"),
|
ActorRel(Equivalent, "d_a_e_cr"), # weak func order
|
||||||
ActorRel(NonMatching, "d_a_e_cr_egg"),
|
ActorRel(MatchingFor("GZ2E01"), "d_a_e_cr_egg"),
|
||||||
ActorRel(NonMatching, "d_a_e_db"),
|
ActorRel(NonMatching, "d_a_e_db"),
|
||||||
ActorRel(MatchingFor("GZ2E01"), "d_a_e_db_leaf"),
|
ActorRel(MatchingFor("GZ2E01"), "d_a_e_db_leaf"),
|
||||||
ActorRel(NonMatching, "d_a_e_dd"),
|
ActorRel(NonMatching, "d_a_e_dd"),
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#ifndef D_A_E_CR_H
|
#ifndef D_A_E_CR_H
|
||||||
#define D_A_E_CR_H
|
#define D_A_E_CR_H
|
||||||
|
|
||||||
#include "f_op/f_op_actor_mng.h"
|
#include "f_op/f_op_actor_mng.h"
|
||||||
|
#include "d/d_bg_s_acch.h"
|
||||||
|
#include "d/d_cc_d.h"
|
||||||
|
#include "d/d_cc_uty.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup actors-enemies
|
* @ingroup actors-enemies
|
||||||
|
@ -10,16 +14,54 @@
|
||||||
* @details
|
* @details
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class e_cr_class : public fopEn_enemy_c {
|
class e_cr_class {
|
||||||
private:
|
public:
|
||||||
/* 0x5ac */ u8 field_0x5ac[0xa60 - 0x5ac];
|
/* 0x000 */ fopEn_enemy_c enemy;
|
||||||
|
/* 0x5AC */ request_of_phase_process_class phase;
|
||||||
|
/* 0x5B4 */ u8 field_0x5b4;
|
||||||
|
/* 0x5B5 */ u8 field_0x5b5;
|
||||||
|
/* 0x5B8 */ mDoExt_McaMorfSO* modelMorf;
|
||||||
|
/* 0x5BC */ Z2CreatureEnemy sound;
|
||||||
|
/* 0x660 */ int anm;
|
||||||
|
/* 0x664 */ s16 lifetime;
|
||||||
|
/* 0x666 */ s16 action;
|
||||||
|
/* 0x668 */ s16 mode;
|
||||||
|
/* 0x66A */ u8 field_0x66A[0x678 - 0x66A];
|
||||||
|
/* 0x678 */ s16 angle_target;
|
||||||
|
/* 0x67A */ u8 field_0x67A[0x67C - 0x67A];
|
||||||
|
/* 0x67C */ s16 angle_to_pl;
|
||||||
|
/* 0x680 */ f32 dist_to_pl;
|
||||||
|
/* 0x684 */ s16 timers[4];
|
||||||
|
/* 0x68C */ s16 invulnerabilityTimer;
|
||||||
|
/* 0x68E */ s16 field_0x68e;
|
||||||
|
/* 0x690 */ s8 field_0x690;
|
||||||
|
/* 0x692 */ s16 field_0x692;
|
||||||
|
/* 0x694 */ s16 head_rot;
|
||||||
|
/* 0x696 */ s16 head_rot_target;
|
||||||
|
/* 0x698 */ dBgS_AcchCir acchcir;
|
||||||
|
/* 0x6D8 */ dBgS_ObjAcch acch;
|
||||||
|
/* 0x8B0 */ dCcD_Stts ccStts;
|
||||||
|
/* 0x8EC */ dCcD_Sph ccSph;
|
||||||
|
/* 0xA24 */ dCcU_AtInfo atInfo;
|
||||||
|
/* 0xA48 */ u32 field_0xa48;
|
||||||
|
/* 0xA4C */ u32 field_0xa4c;
|
||||||
|
/* 0xA50 */ u8 field_0xA50[0xA5C - 0xA50];
|
||||||
|
/* 0xA5C */ u8 HIOInit;
|
||||||
};
|
};
|
||||||
|
|
||||||
STATIC_ASSERT(sizeof(e_cr_class) == 0xa60);
|
STATIC_ASSERT(sizeof(e_cr_class) == 0xa60);
|
||||||
|
|
||||||
class daE_CR_HIO_c {
|
class daE_CR_HIO_c : public JORReflexible {
|
||||||
|
public:
|
||||||
/* 8069800C */ daE_CR_HIO_c();
|
/* 8069800C */ daE_CR_HIO_c();
|
||||||
/* 806997F4 */ ~daE_CR_HIO_c();
|
/* 806997F4 */ virtual ~daE_CR_HIO_c() {}
|
||||||
|
|
||||||
|
void genMessage(JORMContext*);
|
||||||
|
|
||||||
|
/* 0x04 */ s8 id;
|
||||||
|
/* 0x08 */ f32 base_size;
|
||||||
|
/* 0x0C */ f32 move_speed;
|
||||||
|
/* 0x10 */ f32 pl_search_range;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#ifndef D_A_E_CR_EGG_H
|
#ifndef D_A_E_CR_EGG_H
|
||||||
#define D_A_E_CR_EGG_H
|
#define D_A_E_CR_EGG_H
|
||||||
|
|
||||||
#include "f_op/f_op_actor_mng.h"
|
#include "f_op/f_op_actor_mng.h"
|
||||||
|
#include "d/d_bg_s_acch.h"
|
||||||
|
#include "d/d_cc_d.h"
|
||||||
|
#include "d/d_cc_uty.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup actors-enemies
|
* @ingroup actors-enemies
|
||||||
|
@ -10,9 +14,25 @@
|
||||||
* @details
|
* @details
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class e_cr_egg_class : public fopEn_enemy_c {
|
class e_cr_egg_class {
|
||||||
private:
|
public:
|
||||||
/* 0x5ac */ u8 field_0x5ac[0xa0c - 0x5ac];
|
/* 0x000 */ fopEn_enemy_c enemy;
|
||||||
|
/* 0x5AC */ request_of_phase_process_class phase;
|
||||||
|
/* 0x5B4 */ u8 field_0x5b4;
|
||||||
|
/* 0x5B5 */ u8 field_0x5b5;
|
||||||
|
/* 0x5B8 */ J3DModel* model;
|
||||||
|
/* 0x5BC */ Z2Creature sound;
|
||||||
|
/* 0x64C */ s16 lifetime;
|
||||||
|
/* 0x64E */ s16 action;
|
||||||
|
/* 0x650 */ s16 mode;
|
||||||
|
/* 0x652 */ s16 timers[2];
|
||||||
|
/* 0x656 */ s16 field_0x656;
|
||||||
|
/* 0x658 */ u8 field_0x658[0x65C - 0x658];
|
||||||
|
/* 0x65C */ dBgS_AcchCir acchcir;
|
||||||
|
/* 0x69C */ dBgS_ObjAcch acch;
|
||||||
|
/* 0x874 */ dCcD_Stts ccStts;
|
||||||
|
/* 0x8B0 */ dCcD_Sph ccSph;
|
||||||
|
/* 0x9E8 */ dCcU_AtInfo atInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
STATIC_ASSERT(sizeof(e_cr_egg_class) == 0xa0c);
|
STATIC_ASSERT(sizeof(e_cr_egg_class) == 0xa0c);
|
||||||
|
|
|
@ -61,7 +61,7 @@ public:
|
||||||
/* 0x684 */ u32 mShadowId;
|
/* 0x684 */ u32 mShadowId;
|
||||||
/* 0x688 */ s16 mTargetAngle;
|
/* 0x688 */ s16 mTargetAngle;
|
||||||
/* 0x68A */ s16 mTargetStep;
|
/* 0x68A */ s16 mTargetStep;
|
||||||
/* 0x68C */ u8 field_0x68c;
|
/* 0x68C */ u8 mMoveWaitTimer;
|
||||||
/* 0x68E */ s16 mInvulnerabilityTimer;
|
/* 0x68E */ s16 mInvulnerabilityTimer;
|
||||||
/* 0x690 */ u8 field_0x690;
|
/* 0x690 */ u8 field_0x690;
|
||||||
/* 0x691 */ u8 field_0x691;
|
/* 0x691 */ u8 field_0x691;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -5,342 +5,248 @@
|
||||||
|
|
||||||
#include "d/actor/d_a_e_cr_egg.h"
|
#include "d/actor/d_a_e_cr_egg.h"
|
||||||
#include "d/d_cc_d.h"
|
#include "d/d_cc_d.h"
|
||||||
#include "dol2asm.h"
|
#include "d/d_com_inf_game.h"
|
||||||
|
#include "d/d_s_play.h"
|
||||||
|
|
||||||
//
|
|
||||||
// Forward References:
|
|
||||||
//
|
|
||||||
|
|
||||||
extern "C" static void daE_CR_EGG_Draw__FP14e_cr_egg_class();
|
|
||||||
extern "C" static void e_cr_egg_move__FP14e_cr_egg_class();
|
|
||||||
extern "C" static void action__FP14e_cr_egg_class();
|
|
||||||
extern "C" static void daE_CR_EGG_Execute__FP14e_cr_egg_class();
|
|
||||||
extern "C" static bool daE_CR_EGG_IsDelete__FP14e_cr_egg_class();
|
|
||||||
extern "C" static void daE_CR_EGG_Delete__FP14e_cr_egg_class();
|
|
||||||
extern "C" static void useHeapInit__FP10fopAc_ac_c();
|
|
||||||
extern "C" static void daE_CR_EGG_Create__FP10fopAc_ac_c();
|
|
||||||
extern "C" void __dt__8cM3dGSphFv();
|
|
||||||
extern "C" void __dt__8cM3dGAabFv();
|
|
||||||
extern "C" void __dt__12dBgS_ObjAcchFv();
|
|
||||||
extern "C" static void func_8069A8B4();
|
|
||||||
extern "C" static void func_8069A8BC();
|
|
||||||
extern "C" extern char const* const d_a_e_cr_egg__stringBase0;
|
|
||||||
|
|
||||||
//
|
|
||||||
// External References:
|
|
||||||
//
|
|
||||||
|
|
||||||
extern "C" void mDoMtx_XrotM__FPA4_fs();
|
|
||||||
extern "C" void mDoMtx_YrotS__FPA4_fs();
|
|
||||||
extern "C" void mDoMtx_YrotM__FPA4_fs();
|
|
||||||
extern "C" void transM__14mDoMtx_stack_cFfff();
|
|
||||||
extern "C" void scaleM__14mDoMtx_stack_cFfff();
|
|
||||||
extern "C" void mDoExt_modelUpdateDL__FP8J3DModel();
|
|
||||||
extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl();
|
|
||||||
extern "C" void __ct__10fopAc_ac_cFv();
|
|
||||||
extern "C" void fopAcM_delete__FP10fopAc_ac_c();
|
|
||||||
extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl();
|
|
||||||
extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc();
|
|
||||||
extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc();
|
|
||||||
extern "C" void dComIfGd_setSimpleShadow__FP4cXyzffR13cBgS_PolyInfosfP9_GXTexObj();
|
|
||||||
extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci();
|
|
||||||
extern "C" void
|
|
||||||
set__13dPa_control_cFUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf();
|
|
||||||
extern "C" void __ct__12dBgS_AcchCirFv();
|
|
||||||
extern "C" void SetWall__12dBgS_AcchCirFff();
|
|
||||||
extern "C" void __dt__9dBgS_AcchFv();
|
|
||||||
extern "C" void __ct__9dBgS_AcchFv();
|
|
||||||
extern "C" void Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz();
|
|
||||||
extern "C" void CrrPos__9dBgS_AcchFR4dBgS();
|
|
||||||
extern "C" void SetObj__16dBgS_PolyPassChkFv();
|
|
||||||
extern "C" void __ct__10dCcD_GSttsFv();
|
|
||||||
extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c();
|
|
||||||
extern "C" void __ct__12dCcD_GObjInfFv();
|
|
||||||
extern "C" void ChkAtHit__12dCcD_GObjInfFv();
|
|
||||||
extern "C" void ChkTgHit__12dCcD_GObjInfFv();
|
|
||||||
extern "C" void Set__8dCcD_SphFRC11dCcD_SrcSph();
|
|
||||||
extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c();
|
|
||||||
extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c();
|
|
||||||
extern "C" void Set__4cCcSFP8cCcD_Obj();
|
|
||||||
extern "C" void __pl__4cXyzCFRC3Vec();
|
|
||||||
extern "C" void cM_rndF__Ff();
|
|
||||||
extern "C" void cM_rndFX__Ff();
|
|
||||||
extern "C" void SetC__8cM3dGSphFRC4cXyz();
|
|
||||||
extern "C" void SetR__8cM3dGSphFf();
|
|
||||||
extern "C" void cLib_addCalc0__FPfff();
|
|
||||||
extern "C" void MtxPosition__FP4cXyzP4cXyz();
|
|
||||||
extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc();
|
|
||||||
extern "C" void __ct__10Z2CreatureFv();
|
|
||||||
extern "C" void init__10Z2CreatureFP3VecP3VecUcUc();
|
|
||||||
extern "C" void stopAnime__10Z2CreatureFv();
|
|
||||||
extern "C" void __dl__FPv();
|
|
||||||
extern "C" void _savegpr_29();
|
|
||||||
extern "C" void _restgpr_29();
|
|
||||||
extern "C" extern void* __vt__8dCcD_Sph[36];
|
|
||||||
extern "C" extern void* __vt__9dCcD_Stts[11];
|
|
||||||
extern "C" extern void* __vt__12cCcD_SphAttr[25];
|
|
||||||
extern "C" extern void* __vt__14cCcD_ShapeAttr[22];
|
|
||||||
extern "C" extern void* __vt__9cCcD_Stts[8];
|
|
||||||
extern "C" u8 now__14mDoMtx_stack_c[48];
|
|
||||||
extern "C" extern u8 g_dComIfG_gameInfo[122384];
|
|
||||||
extern "C" u8 mSimpleTexObj__21dDlst_shadowControl_c[32];
|
|
||||||
extern "C" extern void* calc_mtx[1 + 1 /* padding */];
|
|
||||||
extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
|
|
||||||
|
|
||||||
//
|
|
||||||
// Declarations:
|
|
||||||
//
|
|
||||||
|
|
||||||
/* ############################################################################################## */
|
|
||||||
/* 8069A8CC-8069A8D0 000000 0004+00 4/4 0/0 0/0 .rodata @3657 */
|
|
||||||
SECTION_RODATA static f32 const lit_3657 = 30.0f;
|
|
||||||
COMPILER_STRIP_GATE(0x8069A8CC, &lit_3657);
|
|
||||||
|
|
||||||
/* 8069A8D0-8069A8D4 000004 0004+00 1/3 0/0 0/0 .rodata @3658 */
|
|
||||||
SECTION_RODATA static f32 const lit_3658 = 1.0f;
|
|
||||||
COMPILER_STRIP_GATE(0x8069A8D0, &lit_3658);
|
|
||||||
|
|
||||||
/* 80699F38-80699FC8 000078 0090+00 1/0 0/0 0/0 .text daE_CR_EGG_Draw__FP14e_cr_egg_class
|
/* 80699F38-80699FC8 000078 0090+00 1/0 0/0 0/0 .text daE_CR_EGG_Draw__FP14e_cr_egg_class
|
||||||
*/
|
*/
|
||||||
static void daE_CR_EGG_Draw(e_cr_egg_class* param_0) {
|
static int daE_CR_EGG_Draw(e_cr_egg_class* a_this) {
|
||||||
// NONMATCHING
|
fopAc_ac_c* actor = &a_this->enemy;
|
||||||
|
|
||||||
|
g_env_light.settingTevStruct(0, &actor->current.pos, &actor->tevStr);
|
||||||
|
g_env_light.setLightTevColorType_MAJI(a_this->model, &actor->tevStr);
|
||||||
|
mDoExt_modelUpdateDL(a_this->model);
|
||||||
|
|
||||||
|
dComIfGd_setSimpleShadow(&actor->current.pos, a_this->acch.GetGroundH(), 30.0f + TREG_F(10), a_this->acch.m_gnd, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex());
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ############################################################################################## */
|
|
||||||
/* 8069A8D4-8069A8E0 000008 000C+00 0/1 0/0 0/0 .rodata @3676 */
|
|
||||||
#pragma push
|
|
||||||
#pragma force_active on
|
|
||||||
SECTION_RODATA static u8 const lit_3676[12] = {
|
|
||||||
0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x0A,
|
|
||||||
};
|
|
||||||
COMPILER_STRIP_GATE(0x8069A8D4, &lit_3676);
|
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8069A8E0-8069A8E4 000014 0004+00 0/1 0/0 0/0 .rodata @3702 */
|
|
||||||
#pragma push
|
|
||||||
#pragma force_active on
|
|
||||||
SECTION_RODATA static f32 const lit_3702 = 5.0f;
|
|
||||||
COMPILER_STRIP_GATE(0x8069A8E0, &lit_3702);
|
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8069A8E4-8069A8E8 000018 0004+00 0/2 0/0 0/0 .rodata @3703 */
|
|
||||||
#pragma push
|
|
||||||
#pragma force_active on
|
|
||||||
SECTION_RODATA static f32 const lit_3703 = 3.0f;
|
|
||||||
COMPILER_STRIP_GATE(0x8069A8E4, &lit_3703);
|
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8069A8E8-8069A8EC 00001C 0004+00 0/1 0/0 0/0 .rodata @3704 */
|
|
||||||
#pragma push
|
|
||||||
#pragma force_active on
|
|
||||||
SECTION_RODATA static f32 const lit_3704 = 10000.0f;
|
|
||||||
COMPILER_STRIP_GATE(0x8069A8E8, &lit_3704);
|
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8069A8EC-8069A8F0 000020 0004+00 0/1 0/0 0/0 .rodata @3705 */
|
|
||||||
#pragma push
|
|
||||||
#pragma force_active on
|
|
||||||
SECTION_RODATA static f32 const lit_3705 = -0.5f;
|
|
||||||
COMPILER_STRIP_GATE(0x8069A8EC, &lit_3705);
|
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8069A8F0-8069A8F4 000024 0004+00 0/1 0/0 0/0 .rodata @3706 */
|
|
||||||
#pragma push
|
|
||||||
#pragma force_active on
|
|
||||||
SECTION_RODATA static f32 const lit_3706 = 8000.0f;
|
|
||||||
COMPILER_STRIP_GATE(0x8069A8F0, &lit_3706);
|
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8069A8F4-8069A8F8 000028 0004+00 0/1 0/0 0/0 .rodata @3707 */
|
|
||||||
#pragma push
|
|
||||||
#pragma force_active on
|
|
||||||
SECTION_RODATA static f32 const lit_3707 = -1.0f;
|
|
||||||
COMPILER_STRIP_GATE(0x8069A8F4, &lit_3707);
|
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8069A8F8-8069A8FC 00002C 0004+00 0/1 0/0 0/0 .rodata @3708 */
|
|
||||||
#pragma push
|
|
||||||
#pragma force_active on
|
|
||||||
SECTION_RODATA static f32 const lit_3708 = 0.5f;
|
|
||||||
COMPILER_STRIP_GATE(0x8069A8F8, &lit_3708);
|
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8069A914-8069A920 000000 000C+00 1/1 0/0 0/0 .data spy$3662 */
|
|
||||||
SECTION_DATA static u8 spy[12] = {
|
|
||||||
0x41, 0x88, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x40, 0xA0, 0x00, 0x00,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 80699FC8-8069A258 000108 0290+00 1/1 0/0 0/0 .text e_cr_egg_move__FP14e_cr_egg_class
|
/* 80699FC8-8069A258 000108 0290+00 1/1 0/0 0/0 .text e_cr_egg_move__FP14e_cr_egg_class
|
||||||
*/
|
*/
|
||||||
static void e_cr_egg_move(e_cr_egg_class* param_0) {
|
static void e_cr_egg_move(e_cr_egg_class* a_this) {
|
||||||
// NONMATCHING
|
fopAc_ac_c* actor = &a_this->enemy;
|
||||||
|
|
||||||
|
switch (a_this->mode) {
|
||||||
|
case 0:
|
||||||
|
a_this->mode = 1;
|
||||||
|
a_this->timers[0] = 150;
|
||||||
|
actor->speedF = 5.0f + cM_rndF(3.0f);
|
||||||
|
actor->current.angle.y += (int)cM_rndFX(10000.0f);
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
if (a_this->acch.ChkWallHit() && a_this->timers[1] == 0) {
|
||||||
|
a_this->timers[1] = 10;
|
||||||
|
actor->speedF *= -0.5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (a_this->acch.ChkGroundHit()) {
|
||||||
|
if (a_this->mode < 4) {
|
||||||
|
static f32 spy[] = {17.0f, 8.0f, 5.0f};
|
||||||
|
actor->speed.y = spy[a_this->mode - 1];
|
||||||
|
actor->current.angle.y += (int)cM_rndFX(8000.0f);
|
||||||
|
|
||||||
|
int sp28[3] = {40, 20, 10};
|
||||||
|
Z2GetAudioMgr()->seStart(Z2SE_EN_CR_EGG_BOUND, &actor->current.pos, sp28[a_this->mode], 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||||
|
a_this->mode++;
|
||||||
|
}
|
||||||
|
|
||||||
|
cLib_addCalc0(&actor->speedF, 1.0f, 0.5f + TREG_F(4));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (a_this->timers[0] == 0 || a_this->ccSph.ChkTgHit() || a_this->ccSph.ChkAtHit()) {
|
||||||
|
fopAcM_delete(actor);
|
||||||
|
|
||||||
|
cXyz effscale(0.5f, 0.5f, 0.5f);
|
||||||
|
u16 eff_id = 0x109;
|
||||||
|
if (a_this->timers[0] == 0) {
|
||||||
|
eff_id = 0x108;
|
||||||
|
}
|
||||||
|
cXyz effpos(actor->current.pos);
|
||||||
|
dComIfGp_particle_set(eff_id, &effpos, NULL, &effscale);
|
||||||
|
Z2GetAudioMgr()->seStart(Z2SE_EN_CR_EGG_BOMB, &actor->current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ############################################################################################## */
|
|
||||||
/* 8069A8FC-8069A900 000030 0004+00 0/1 0/0 0/0 .rodata @3728 */
|
|
||||||
#pragma push
|
|
||||||
#pragma force_active on
|
|
||||||
SECTION_RODATA static f32 const lit_3728 = 700.0f;
|
|
||||||
COMPILER_STRIP_GATE(0x8069A8FC, &lit_3728);
|
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8069A900-8069A904 000034 0004+00 0/2 0/0 0/0 .rodata @3729 */
|
|
||||||
#pragma push
|
|
||||||
#pragma force_active on
|
|
||||||
SECTION_RODATA static u8 const lit_3729[4] = {
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
};
|
|
||||||
COMPILER_STRIP_GATE(0x8069A900, &lit_3729);
|
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8069A904-8069A908 000038 0004+00 1/3 0/0 0/0 .rodata @3730 */
|
|
||||||
SECTION_RODATA static f32 const lit_3730 = 20.0f;
|
|
||||||
COMPILER_STRIP_GATE(0x8069A904, &lit_3730);
|
|
||||||
|
|
||||||
/* 8069A258-8069A378 000398 0120+00 1/1 0/0 0/0 .text action__FP14e_cr_egg_class */
|
/* 8069A258-8069A378 000398 0120+00 1/1 0/0 0/0 .text action__FP14e_cr_egg_class */
|
||||||
static void action(e_cr_egg_class* param_0) {
|
static void action(e_cr_egg_class* a_this) {
|
||||||
// NONMATCHING
|
fopAc_ac_c* actor = &a_this->enemy;
|
||||||
|
cXyz mae;
|
||||||
|
cXyz ato;
|
||||||
|
|
||||||
|
switch (a_this->action) {
|
||||||
|
case 0:
|
||||||
|
e_cr_egg_move(a_this);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
actor->current.angle.x += (int)(actor->speedF * (700.0f + TREG_F(9)));
|
||||||
|
|
||||||
|
cMtx_YrotS(*calc_mtx, actor->current.angle.y);
|
||||||
|
mae.x = 0.0f;
|
||||||
|
mae.y = 0.0f;
|
||||||
|
mae.z = actor->speedF;
|
||||||
|
MtxPosition(&mae, &ato);
|
||||||
|
actor->speed.x = ato.x;
|
||||||
|
actor->speed.z = ato.z;
|
||||||
|
actor->current.pos += actor->speed;
|
||||||
|
actor->speed.y -= 3.0f;
|
||||||
|
|
||||||
|
actor->current.pos.y -= 20.0f;
|
||||||
|
actor->old.pos.y -= 20.0f;
|
||||||
|
a_this->acch.CrrPos(dComIfG_Bgsp());
|
||||||
|
actor->current.pos.y += 20.0f;
|
||||||
|
actor->old.pos.y += 20.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ############################################################################################## */
|
|
||||||
/* 8069A908-8069A90C 00003C 0004+00 0/1 0/0 0/0 .rodata @3770 */
|
|
||||||
#pragma push
|
|
||||||
#pragma force_active on
|
|
||||||
SECTION_RODATA static f32 const lit_3770 = -20.0f;
|
|
||||||
COMPILER_STRIP_GATE(0x8069A908, &lit_3770);
|
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8069A378-8069A4C4 0004B8 014C+00 2/1 0/0 0/0 .text daE_CR_EGG_Execute__FP14e_cr_egg_class */
|
/* 8069A378-8069A4C4 0004B8 014C+00 2/1 0/0 0/0 .text daE_CR_EGG_Execute__FP14e_cr_egg_class */
|
||||||
static void daE_CR_EGG_Execute(e_cr_egg_class* param_0) {
|
static int daE_CR_EGG_Execute(e_cr_egg_class* a_this) {
|
||||||
// NONMATCHING
|
fopAc_ac_c* actor = &a_this->enemy;
|
||||||
|
cXyz sp2C;
|
||||||
|
cXyz sp20;
|
||||||
|
|
||||||
|
a_this->lifetime++;
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
if (a_this->timers[i] != 0) {
|
||||||
|
a_this->timers[i]--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (a_this->field_0x656 != 0) {
|
||||||
|
a_this->field_0x656--;
|
||||||
|
}
|
||||||
|
|
||||||
|
action(a_this);
|
||||||
|
|
||||||
|
mDoMtx_stack_c::transS(actor->current.pos.x, actor->current.pos.y, actor->current.pos.z);
|
||||||
|
mDoMtx_stack_c::YrotM(actor->current.angle.y);
|
||||||
|
mDoMtx_stack_c::XrotM(actor->current.angle.x);
|
||||||
|
mDoMtx_stack_c::transM(0.0f, TREG_F(12) - 20.0f, 0.0f);
|
||||||
|
|
||||||
|
f32 size = 1.0f + TREG_F(17);
|
||||||
|
mDoMtx_stack_c::scaleM(size, size, size);
|
||||||
|
a_this->model->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||||
|
|
||||||
|
cXyz c_offset(0.0f, 20.0f, 0.0f);
|
||||||
|
a_this->ccSph.SetC(actor->current.pos + c_offset);
|
||||||
|
a_this->ccSph.SetR(size * (20.0f + BREG_F(0)));
|
||||||
|
dComIfG_Ccsp()->Set(&a_this->ccSph);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 8069A4C4-8069A4CC 000604 0008+00 1/0 0/0 0/0 .text daE_CR_EGG_IsDelete__FP14e_cr_egg_class */
|
/* 8069A4C4-8069A4CC 000604 0008+00 1/0 0/0 0/0 .text daE_CR_EGG_IsDelete__FP14e_cr_egg_class */
|
||||||
static bool daE_CR_EGG_IsDelete(e_cr_egg_class* param_0) {
|
static int daE_CR_EGG_IsDelete(e_cr_egg_class* a_this) {
|
||||||
return true;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ############################################################################################## */
|
|
||||||
/* 8069A90C-8069A90C 000040 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
|
||||||
#pragma push
|
|
||||||
#pragma force_active on
|
|
||||||
SECTION_DEAD static char const* const stringBase_8069A90C = "E_CR";
|
|
||||||
#pragma pop
|
|
||||||
|
|
||||||
/* 8069A4CC-8069A510 00060C 0044+00 1/0 0/0 0/0 .text daE_CR_EGG_Delete__FP14e_cr_egg_class */
|
/* 8069A4CC-8069A510 00060C 0044+00 1/0 0/0 0/0 .text daE_CR_EGG_Delete__FP14e_cr_egg_class */
|
||||||
static void daE_CR_EGG_Delete(e_cr_egg_class* param_0) {
|
static int daE_CR_EGG_Delete(e_cr_egg_class* a_this) {
|
||||||
// NONMATCHING
|
fopAc_ac_c* actor = &a_this->enemy;
|
||||||
|
|
||||||
|
fpc_ProcID id = fopAcM_GetID(actor);
|
||||||
|
dComIfG_resDelete(&a_this->phase, "E_CR");
|
||||||
|
a_this->sound.stopAnime();
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 8069A510-8069A57C 000650 006C+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */
|
/* 8069A510-8069A57C 000650 006C+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */
|
||||||
static void useHeapInit(fopAc_ac_c* param_0) {
|
static int useHeapInit(fopAc_ac_c* i_this) {
|
||||||
// NONMATCHING
|
e_cr_egg_class* a_this = (e_cr_egg_class*)i_this;
|
||||||
|
|
||||||
|
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("E_CR", 0xC);
|
||||||
|
JUT_ASSERT(374, modelData != 0);
|
||||||
|
|
||||||
|
a_this->model = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
|
||||||
|
if (a_this->model == NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ############################################################################################## */
|
/* 8069A57C-8069A7B4 0006BC 0238+00 1/0 0/0 0/0 .text daE_CR_EGG_Create__FP10fopAc_ac_c
|
||||||
/* 8069A920-8069A960 00000C 0040+00 1/1 0/0 0/0 .data cc_sph_src$3802 */
|
*/
|
||||||
static dCcD_SrcSph cc_sph_src = {
|
static int daE_CR_EGG_Create(fopAc_ac_c* i_this) {
|
||||||
{
|
e_cr_egg_class* a_this = (e_cr_egg_class*)i_this;
|
||||||
{0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0xd}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
|
fopAcM_SetupActor(i_this, e_cr_egg_class);
|
||||||
{dCcD_SE_NONE, 0x1, 0x0, 0x0, 0x0}, // mGObjAt
|
|
||||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
|
int phase_state = dComIfG_resLoad(&a_this->phase, "E_CR");
|
||||||
{0x0}, // mGObjCo
|
if (phase_state == cPhs_COMPLEATE_e) {
|
||||||
}, // mObjInf
|
OS_REPORT("E_CR_EGG PARAM %x\n", fopAcM_GetParam(i_this));
|
||||||
{
|
|
||||||
{{0.0f, 0.0f, 0.0f}, 20.0f} // mSph
|
a_this->field_0x5b4 = fopAcM_GetParam(i_this);
|
||||||
} // mSphAttr
|
if (a_this->field_0x5b4 == 0xFF) {
|
||||||
};
|
a_this->field_0x5b4 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
a_this->field_0x5b5 = (fopAcM_GetParam(i_this) & 0xFF00) >> 8;
|
||||||
|
if (a_this->field_0x5b5 == 0xFF) {
|
||||||
|
a_this->field_0x5b5 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
OS_REPORT("E_CR_EGG//////////////E_CR_EGG SET 1 !!\n");
|
||||||
|
if (!fopAcM_entrySolidHeap(i_this, useHeapInit, 0x820)) {
|
||||||
|
OS_REPORT("//////////////E_CR_EGG SET NON !!\n");
|
||||||
|
return cPhs_ERROR_e;
|
||||||
|
}
|
||||||
|
|
||||||
|
OS_REPORT("//////////////E_CR_EGG SET 2 !!\n");
|
||||||
|
|
||||||
|
fopAcM_SetMtx(i_this, a_this->model->getBaseTRMtx());
|
||||||
|
|
||||||
|
static dCcD_SrcSph cc_sph_src = {
|
||||||
|
{
|
||||||
|
{0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0xd}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
|
||||||
|
{dCcD_SE_NONE, 0x1, 0x0, 0x0, 0x0}, // mGObjAt
|
||||||
|
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
|
||||||
|
{0x0}, // mGObjCo
|
||||||
|
}, // mObjInf
|
||||||
|
{
|
||||||
|
{{0.0f, 0.0f, 0.0f}, 20.0f} // mSph
|
||||||
|
} // mSphAttr
|
||||||
|
};
|
||||||
|
|
||||||
|
a_this->ccStts.Init(50, 0, i_this);
|
||||||
|
a_this->ccSph.Set(cc_sph_src);
|
||||||
|
a_this->ccSph.SetStts(&a_this->ccStts);
|
||||||
|
|
||||||
|
a_this->sound.init(&i_this->current.pos, NULL, 3, 1);
|
||||||
|
|
||||||
|
a_this->acch.Set(fopAcM_GetPosition_p(i_this), fopAcM_GetOldPosition_p(i_this), i_this, 1, &a_this->acchcir, fopAcM_GetSpeed_p(i_this), NULL, NULL);
|
||||||
|
a_this->acchcir.SetWall(20.0f, 20.0f);
|
||||||
|
|
||||||
|
daE_CR_EGG_Execute(a_this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return phase_state;
|
||||||
|
}
|
||||||
|
|
||||||
/* 8069A960-8069A980 -00001 0020+00 1/0 0/0 0/0 .data l_daE_CR_EGG_Method */
|
/* 8069A960-8069A980 -00001 0020+00 1/0 0/0 0/0 .data l_daE_CR_EGG_Method */
|
||||||
static actor_method_class l_daE_CR_EGG_Method = {
|
static actor_method_class l_daE_CR_EGG_Method = {
|
||||||
(process_method_func)daE_CR_EGG_Create__FP10fopAc_ac_c,
|
(process_method_func)daE_CR_EGG_Create,
|
||||||
(process_method_func)daE_CR_EGG_Delete__FP14e_cr_egg_class,
|
(process_method_func)daE_CR_EGG_Delete,
|
||||||
(process_method_func)daE_CR_EGG_Execute__FP14e_cr_egg_class,
|
(process_method_func)daE_CR_EGG_Execute,
|
||||||
(process_method_func)daE_CR_EGG_IsDelete__FP14e_cr_egg_class,
|
(process_method_func)daE_CR_EGG_IsDelete,
|
||||||
(process_method_func)daE_CR_EGG_Draw__FP14e_cr_egg_class,
|
(process_method_func)daE_CR_EGG_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 8069A980-8069A9B0 -00001 0030+00 0/0 0/0 1/0 .data g_profile_E_CR_EGG */
|
/* 8069A980-8069A9B0 -00001 0030+00 0/0 0/0 1/0 .data g_profile_E_CR_EGG */
|
||||||
extern actor_process_profile_definition g_profile_E_CR_EGG = {
|
extern actor_process_profile_definition g_profile_E_CR_EGG = {
|
||||||
fpcLy_CURRENT_e, // mLayerID
|
fpcLy_CURRENT_e, // mLayerID
|
||||||
7, // mListID
|
7, // mListID
|
||||||
fpcPi_CURRENT_e, // mListPrio
|
fpcPi_CURRENT_e, // mListPrio
|
||||||
PROC_E_CR_EGG, // mProcName
|
PROC_E_CR_EGG, // mProcName
|
||||||
&g_fpcLf_Method.base, // sub_method
|
&g_fpcLf_Method.base, // sub_method
|
||||||
sizeof(e_cr_egg_class), // mSize
|
sizeof(e_cr_egg_class), // mSize
|
||||||
0, // mSizeOther
|
0, // mSizeOther
|
||||||
0, // mParameters
|
0, // mParameters
|
||||||
&g_fopAc_Method.base, // sub_method
|
&g_fopAc_Method.base, // sub_method
|
||||||
114, // mPriority
|
114, // mPriority
|
||||||
&l_daE_CR_EGG_Method, // sub_method
|
&l_daE_CR_EGG_Method, // sub_method
|
||||||
0x00040100, // mStatus
|
0x00040100, // mStatus
|
||||||
fopAc_ENEMY_e, // mActorType
|
fopAc_ENEMY_e, // mActorType
|
||||||
fopAc_CULLBOX_0_e, // cullType
|
fopAc_CULLBOX_0_e, // cullType
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 8069A9B0-8069A9BC 00009C 000C+00 2/2 0/0 0/0 .data __vt__8cM3dGSph */
|
|
||||||
SECTION_DATA extern void* __vt__8cM3dGSph[3] = {
|
|
||||||
(void*)NULL /* RTTI */,
|
|
||||||
(void*)NULL,
|
|
||||||
(void*)__dt__8cM3dGSphFv,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 8069A9BC-8069A9C8 0000A8 000C+00 2/2 0/0 0/0 .data __vt__8cM3dGAab */
|
|
||||||
SECTION_DATA extern void* __vt__8cM3dGAab[3] = {
|
|
||||||
(void*)NULL /* RTTI */,
|
|
||||||
(void*)NULL,
|
|
||||||
(void*)__dt__8cM3dGAabFv,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 8069A9C8-8069A9EC 0000B4 0024+00 2/2 0/0 0/0 .data __vt__12dBgS_ObjAcch */
|
|
||||||
SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = {
|
|
||||||
(void*)NULL /* RTTI */,
|
|
||||||
(void*)NULL,
|
|
||||||
(void*)__dt__12dBgS_ObjAcchFv,
|
|
||||||
(void*)NULL,
|
|
||||||
(void*)NULL,
|
|
||||||
(void*)func_8069A8BC,
|
|
||||||
(void*)NULL,
|
|
||||||
(void*)NULL,
|
|
||||||
(void*)func_8069A8B4,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 8069A57C-8069A7B4 0006BC 0238+00 1/0 0/0 0/0 .text daE_CR_EGG_Create__FP10fopAc_ac_c
|
|
||||||
*/
|
|
||||||
static void daE_CR_EGG_Create(fopAc_ac_c* param_0) {
|
|
||||||
// NONMATCHING
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 8069A7B4-8069A7FC 0008F4 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGSphFv */
|
|
||||||
// cM3dGSph::~cM3dGSph() {
|
|
||||||
extern "C" void __dt__8cM3dGSphFv() {
|
|
||||||
// NONMATCHING
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 8069A7FC-8069A844 00093C 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */
|
|
||||||
// cM3dGAab::~cM3dGAab() {
|
|
||||||
extern "C" void __dt__8cM3dGAabFv() {
|
|
||||||
// NONMATCHING
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 8069A844-8069A8B4 000984 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */
|
|
||||||
// dBgS_ObjAcch::~dBgS_ObjAcch() {
|
|
||||||
extern "C" void __dt__12dBgS_ObjAcchFv() {
|
|
||||||
// NONMATCHING
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 8069A8B4-8069A8BC 0009F4 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */
|
|
||||||
static void func_8069A8B4() {
|
|
||||||
// NONMATCHING
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 8069A8BC-8069A8C4 0009FC 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */
|
|
||||||
static void func_8069A8BC() {
|
|
||||||
// NONMATCHING
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 8069A90C-8069A90C 000040 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
|
||||||
|
|
|
@ -182,10 +182,12 @@ int daE_WS_c::checkPlayerPos() {
|
||||||
gndchk.SetPos(&gndpos);
|
gndchk.SetPos(&gndpos);
|
||||||
gndpos.y = dComIfG_Bgsp().GroundCross(&gndchk);
|
gndpos.y = dComIfG_Bgsp().GroundCross(&gndchk);
|
||||||
if (current.pos.y - gndpos.y > l_HIO.dist_to_ground) {
|
if (current.pos.y - gndpos.y > l_HIO.dist_to_ground) {
|
||||||
|
// Return 1 if walltula is looking towards player
|
||||||
if (cLib_distanceAngleS(shape_angle.y, calcTargetAngle(current.pos, player_pos)) < l_HIO.search_angle) {
|
if (cLib_distanceAngleS(shape_angle.y, calcTargetAngle(current.pos, player_pos)) < l_HIO.search_angle) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// otherwise return 2 if player is near the walltula
|
||||||
if (calcTargetDist(current.pos, player_pos) < 150.0f) {
|
if (calcTargetDist(current.pos, player_pos) < 150.0f) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
@ -230,12 +232,12 @@ void daE_WS_c::executeWait() {
|
||||||
|
|
||||||
switch (mMode) {
|
switch (mMode) {
|
||||||
case 0:
|
case 0:
|
||||||
field_0x68c = 50.0f + cM_rndF(50.0f);
|
mMoveWaitTimer = 50.0f + cM_rndF(50.0f);
|
||||||
setBck(9, 2, 3.0f, 1.0f);
|
setBck(9, 2, 3.0f, 1.0f);
|
||||||
mMode = 1;
|
mMode = 1;
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case 1:
|
case 1:
|
||||||
if (field_0x68c == 0) {
|
if (mMoveWaitTimer == 0) {
|
||||||
mMode = 2;
|
mMode = 2;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -263,19 +265,19 @@ void daE_WS_c::executeWait() {
|
||||||
|
|
||||||
if (cLib_chaseAngleS(&shape_angle.y, mTargetAngle, mTargetStep)) {
|
if (cLib_chaseAngleS(&shape_angle.y, mTargetAngle, mTargetStep)) {
|
||||||
mMode = 4;
|
mMode = 4;
|
||||||
field_0x68c = 10;
|
mMoveWaitTimer = 10;
|
||||||
setBck(9, 2, 3.0f, 1.0f);
|
setBck(9, 2, 3.0f, 1.0f);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (field_0x68c == 0) {
|
if (mMoveWaitTimer == 0) {
|
||||||
mMode = 5;
|
mMode = 5;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
mMode = 6;
|
mMode = 6;
|
||||||
speedF = 3.0f;
|
speedF = 3.0f;
|
||||||
field_0x68c = 20.0f + cM_rndF(10.0f);
|
mMoveWaitTimer = 20.0f + cM_rndF(10.0f);
|
||||||
setBck(7, 2, 3.0f, 1.0f);
|
setBck(7, 2, 3.0f, 1.0f);
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case 6:
|
case 6:
|
||||||
|
@ -283,15 +285,15 @@ void daE_WS_c::executeWait() {
|
||||||
|
|
||||||
if (field_0x690 == 0) {
|
if (field_0x690 == 0) {
|
||||||
if (calcTargetDist(current.pos, field_0x65c) >= l_HIO.move_range) {
|
if (calcTargetDist(current.pos, field_0x65c) >= l_HIO.move_range) {
|
||||||
field_0x68c = 0;
|
mMoveWaitTimer = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (checkBeforeBg(shape_angle.y)) {
|
if (checkBeforeBg(shape_angle.y)) {
|
||||||
field_0x68c = 0;
|
mMoveWaitTimer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (field_0x68c == 0) {
|
if (mMoveWaitTimer == 0) {
|
||||||
speedF = 0.0f;
|
speedF = 0.0f;
|
||||||
mMode = 0;
|
mMode = 0;
|
||||||
}
|
}
|
||||||
|
@ -322,12 +324,12 @@ void daE_WS_c::executeAttack() {
|
||||||
mMode = 2;
|
mMode = 2;
|
||||||
setBck(10, 2, 3.0f, 1.0f);
|
setBck(10, 2, 3.0f, 1.0f);
|
||||||
mSound.startCreatureVoice(Z2SE_EN_WS_V_YOKOKU, -1);
|
mSound.startCreatureVoice(Z2SE_EN_WS_V_YOKOKU, -1);
|
||||||
field_0x68c = 10;
|
mMoveWaitTimer = 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (field_0x68c == 0) {
|
if (mMoveWaitTimer == 0) {
|
||||||
speedF = l_HIO.attack_speed * mBodyScale;
|
speedF = l_HIO.attack_speed * mBodyScale;
|
||||||
setBck(7, 2, 3.0f, 3.0f);
|
setBck(7, 2, 3.0f, 3.0f);
|
||||||
mMode = 3;
|
mMode = 3;
|
||||||
|
@ -410,7 +412,7 @@ void daE_WS_c::executeDown() {
|
||||||
speedF = 3.0f + cM_rndF(2.0f);
|
speedF = 3.0f + cM_rndF(2.0f);
|
||||||
speed.y = 12.0f;
|
speed.y = 12.0f;
|
||||||
mMode = 3;
|
mMode = 3;
|
||||||
field_0x68c = 30;
|
mMoveWaitTimer = 30;
|
||||||
setBck(6, 0, 5.0f, 1.0f);
|
setBck(6, 0, 5.0f, 1.0f);
|
||||||
mSound.startCreatureSound(Z2SE_CM_BODYFALL_S, 0, -1);
|
mSound.startCreatureSound(Z2SE_CM_BODYFALL_S, 0, -1);
|
||||||
}
|
}
|
||||||
|
@ -445,7 +447,7 @@ void daE_WS_c::executeDown() {
|
||||||
cLib_addCalc2(&mDownColor, -20.0f, 1.0f, 0.4f);
|
cLib_addCalc2(&mDownColor, -20.0f, 1.0f, 0.4f);
|
||||||
|
|
||||||
if (mpModelMorf->isStop()) {
|
if (mpModelMorf->isStop()) {
|
||||||
field_0x68c = 15;
|
mMoveWaitTimer = 15;
|
||||||
mMode = 5;
|
mMode = 5;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -453,7 +455,7 @@ void daE_WS_c::executeDown() {
|
||||||
case 5:
|
case 5:
|
||||||
cLib_addCalc2(&mDownColor, -20.0f, 1.0f, 0.4f);
|
cLib_addCalc2(&mDownColor, -20.0f, 1.0f, 0.4f);
|
||||||
|
|
||||||
if (field_0x68c == 0) {
|
if (mMoveWaitTimer == 0) {
|
||||||
fopAcM_delete(this);
|
fopAcM_delete(this);
|
||||||
fopAcM_createDisappear(this, ¤t.pos, 7, 0, 7);
|
fopAcM_createDisappear(this, ¤t.pos, 7, 0, 7);
|
||||||
|
|
||||||
|
@ -480,7 +482,7 @@ void daE_WS_c::executeWindDown() {
|
||||||
setBck(7, 2, 3.0f, 1.0f);
|
setBck(7, 2, 3.0f, 1.0f);
|
||||||
|
|
||||||
mSound.startCreatureVoice(Z2SE_EN_WS_V_DAMAGE, -1);
|
mSound.startCreatureVoice(Z2SE_EN_WS_V_DAMAGE, -1);
|
||||||
field_0x68c = 5;
|
mMoveWaitTimer = 5;
|
||||||
mAcch.SetGroundUpY(20.0f);
|
mAcch.SetGroundUpY(20.0f);
|
||||||
attention_info.flags = 0;
|
attention_info.flags = 0;
|
||||||
speed.y = 0.0f;
|
speed.y = 0.0f;
|
||||||
|
@ -496,7 +498,7 @@ void daE_WS_c::executeWindDown() {
|
||||||
shape_angle.z += 0x800;
|
shape_angle.z += 0x800;
|
||||||
speed.y = 30.0f;
|
speed.y = 30.0f;
|
||||||
|
|
||||||
if (field_0x68c == 0) {
|
if (mMoveWaitTimer == 0) {
|
||||||
mMode = 2;
|
mMode = 2;
|
||||||
gravity = -3.0f;
|
gravity = -3.0f;
|
||||||
}
|
}
|
||||||
|
@ -512,7 +514,7 @@ void daE_WS_c::executeWindDown() {
|
||||||
speedF = 3.0f + cM_rndF(2.0f);
|
speedF = 3.0f + cM_rndF(2.0f);
|
||||||
speed.y = 12.0f;
|
speed.y = 12.0f;
|
||||||
mMode = 3;
|
mMode = 3;
|
||||||
field_0x68c = 30;
|
mMoveWaitTimer = 30;
|
||||||
setBck(6, 0, 5.0f, 1.0f);
|
setBck(6, 0, 5.0f, 1.0f);
|
||||||
mSound.startCreatureVoice(Z2SE_EN_WS_V_DEATH, -1);
|
mSound.startCreatureVoice(Z2SE_EN_WS_V_DEATH, -1);
|
||||||
mSound.startCreatureSound(Z2SE_CM_BODYFALL_S, 0, -1);
|
mSound.startCreatureSound(Z2SE_CM_BODYFALL_S, 0, -1);
|
||||||
|
@ -539,13 +541,13 @@ void daE_WS_c::executeWindDown() {
|
||||||
shape_angle.y += mTargetStep;
|
shape_angle.y += mTargetStep;
|
||||||
|
|
||||||
if (mpModelMorf->isStop()) {
|
if (mpModelMorf->isStop()) {
|
||||||
field_0x68c = 15;
|
mMoveWaitTimer = 15;
|
||||||
mMode = 5;
|
mMode = 5;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
cLib_addCalc2(&mDownColor, -20.0f, 1.0f, 0.4f);
|
cLib_addCalc2(&mDownColor, -20.0f, 1.0f, 0.4f);
|
||||||
if (field_0x68c == 0) {
|
if (mMoveWaitTimer == 0) {
|
||||||
fopAcM_delete(this);
|
fopAcM_delete(this);
|
||||||
fopAcM_createDisappear(this, ¤t.pos, 7, 0, 7);
|
fopAcM_createDisappear(this, ¤t.pos, 7, 0, 7);
|
||||||
|
|
||||||
|
@ -690,8 +692,8 @@ void daE_WS_c::cc_set() {
|
||||||
|
|
||||||
/* 807E5C0C-807E5CB8 0022EC 00AC+00 1/1 0/0 0/0 .text execute__8daE_WS_cFv */
|
/* 807E5C0C-807E5CB8 0022EC 00AC+00 1/1 0/0 0/0 .text execute__8daE_WS_cFv */
|
||||||
int daE_WS_c::execute() {
|
int daE_WS_c::execute() {
|
||||||
if (field_0x68c != 0) {
|
if (mMoveWaitTimer != 0) {
|
||||||
field_0x68c--;
|
mMoveWaitTimer--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mInvulnerabilityTimer != 0) {
|
if (mInvulnerabilityTimer != 0) {
|
||||||
|
|
Loading…
Reference in New Issue