mirror of https://github.com/zeldaret/tp.git
d_a_obj_enemy_create OK
This commit is contained in:
parent
edcc309734
commit
5fa8a73aed
|
@ -7,9 +7,15 @@
|
|||
#include "dolphin/mtx/mtx.h"
|
||||
#include "f_pc/f_pc_leaf.h"
|
||||
|
||||
struct actor_method_class {
|
||||
/* 0x00 */ process_method_class mBase;
|
||||
/* 0x10 */ process_method_func mpDrawFunc;
|
||||
/* 0x14 */ u8 field_0x14[0xC]; // Likely padding
|
||||
};
|
||||
|
||||
struct actor_process_profile_definition {
|
||||
/* 0x00 */ leaf_process_profile_definition mBase;
|
||||
/* 0x24 */ leafdraw_method_class* mSubMtd;
|
||||
/* 0x24 */ actor_method_class* mSubMtd;
|
||||
/* 0x28 */ int field_0x28; // mStatus
|
||||
/* 0x2C */ u8 field_0x2c; // mActorType
|
||||
/* 0x2D */ u8 field_0x2d; // mCullType
|
||||
|
|
|
@ -186,6 +186,10 @@ inline cXyz& fopAcM_GetPosition_p(fopAc_ac_c* pActor) {
|
|||
return pActor->current.pos;
|
||||
}
|
||||
|
||||
inline cXyz& fopAcM_GetPosition(fopAc_ac_c* pActor) {
|
||||
return pActor->current.pos;
|
||||
}
|
||||
|
||||
inline cXyz& fopAcM_GetOldPosition_p(fopAc_ac_c* pActor) {
|
||||
return pActor->next.pos;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,63 @@
|
|||
#ifndef D_A_OBJ_ENEMY_CREATE_H
|
||||
#define D_A_OBJ_ENEMY_CREATE_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
|
||||
class daObjE_CREATE_c : public fopAc_ac_c {
|
||||
public:
|
||||
/* 80BE31BC */ void NormalAction();
|
||||
/* 80BE345C */ void SearchAction();
|
||||
/* 80BE34A0 */ void LoopAction();
|
||||
/* 80BE3544 */ void Action();
|
||||
/* 80BE359C */ int Execute();
|
||||
/* 80BE35C0 */ int Delete();
|
||||
/* 80BE3618 */ void NameChk();
|
||||
/* 80BE3770 */ int create();
|
||||
|
||||
private:
|
||||
/* 0x568 */ u8 field_0x568;
|
||||
/* 0x569 */ u8 mEnemyNum;
|
||||
/* 0x56A */ u8 mActivateSw;
|
||||
/* 0x56B */ u8 mDeactivateSw;
|
||||
/* 0x56C */ u8 mEndLoopSw;
|
||||
/* 0x56E */ csXyz mEnemyAngle;
|
||||
/* 0x574 */ s16 mEnemyProcName;
|
||||
/* 0x578 */ u32 mEnemyParams;
|
||||
/* 0x57C */ u32* mActorList;
|
||||
/* 0x580 */ u8 mActionMode;
|
||||
/* 0x582 */ s16 mKillCheckDelayTimer;
|
||||
/* 0x584 */ u8 mAction;
|
||||
/* 0x588 */ u8 unused[12];
|
||||
}; // Size: 0x594
|
||||
|
||||
enum daObjE_EnemyType {
|
||||
ENEMY_NONE,
|
||||
ENEMY_KEESE,
|
||||
ENEMY_RAT,
|
||||
ENEMY_CHU,
|
||||
ENEMY_CHU2,
|
||||
ENEMY_BABY_GOHMA,
|
||||
ENEMY_BUBBLE,
|
||||
ENEMY_BOKOBLIN,
|
||||
ENEMY_LIZALFOS,
|
||||
ENEMY_SHADOW_BEAST,
|
||||
ENEMY_SHADOW_VERMIN,
|
||||
ENEMY_SHADOW_KEESE,
|
||||
ENEMY_BOKOBLIN2,
|
||||
};
|
||||
|
||||
enum daObjE_Action {
|
||||
ACT_NORMAL,
|
||||
ACT_SEARCH,
|
||||
ACT_LOOP,
|
||||
ACT_DEFAULT = 0xF,
|
||||
};
|
||||
|
||||
enum daObjE_Mode {
|
||||
MODE_CREATE,
|
||||
MODE_WAIT,
|
||||
MODE_KILL_CHECK,
|
||||
MODE_END,
|
||||
};
|
||||
|
||||
#endif /* D_A_OBJ_ENEMY_CREATE_H */
|
||||
|
|
|
@ -1,280 +1,297 @@
|
|||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: d_a_obj_enemy_create
|
||||
//
|
||||
/*
|
||||
* d_a_obj_enemy_create.cpp
|
||||
* Enemy spawner
|
||||
*/
|
||||
|
||||
#include "rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct fopAc_ac_c {
|
||||
/* 80018B64 */ fopAc_ac_c();
|
||||
};
|
||||
|
||||
struct daObjE_CREATE_c {
|
||||
/* 80BE31BC */ void NormalAction();
|
||||
/* 80BE345C */ void SearchAction();
|
||||
/* 80BE34A0 */ void LoopAction();
|
||||
/* 80BE3544 */ void Action();
|
||||
/* 80BE359C */ void Execute();
|
||||
/* 80BE35C0 */ void Delete();
|
||||
/* 80BE3618 */ void NameChk();
|
||||
/* 80BE3770 */ void create();
|
||||
};
|
||||
|
||||
struct dSv_info_c {
|
||||
/* 80035200 */ void onSwitch(int, int);
|
||||
/* 80035360 */ void isSwitch(int, int) const;
|
||||
};
|
||||
|
||||
struct csXyz {};
|
||||
|
||||
struct cXyz {};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" static void daObjE_CREATE_Create__FP10fopAc_ac_c();
|
||||
extern "C" static void daObjE_CREATE_Delete__FP15daObjE_CREATE_c();
|
||||
extern "C" void NormalAction__15daObjE_CREATE_cFv();
|
||||
extern "C" void SearchAction__15daObjE_CREATE_cFv();
|
||||
extern "C" void LoopAction__15daObjE_CREATE_cFv();
|
||||
extern "C" void Action__15daObjE_CREATE_cFv();
|
||||
extern "C" void Execute__15daObjE_CREATE_cFv();
|
||||
extern "C" void Delete__15daObjE_CREATE_cFv();
|
||||
extern "C" static bool daObjE_CREATE_Draw__FP15daObjE_CREATE_c();
|
||||
extern "C" static void daObjE_CREATE_Execute__FP15daObjE_CREATE_c();
|
||||
extern "C" void NameChk__15daObjE_CREATE_cFv();
|
||||
extern "C" void create__15daObjE_CREATE_cFv();
|
||||
extern "C" static bool daObjE_CREATE_IsDelete__FP15daObjE_CREATE_c();
|
||||
extern "C" extern void* g_profile_Obj_E_CREATE[12];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void __ct__10fopAc_ac_cFv();
|
||||
extern "C" void fopAcIt_Judge__FPFPvPv_PvPv();
|
||||
extern "C" void fopAcM_createChild__FsUiUlPC4cXyziPC5csXyzPC4cXyzScPFPv_i();
|
||||
extern "C" void fpcSch_JudgeByID__FPvPv();
|
||||
extern "C" void onSwitch__10dSv_info_cFii();
|
||||
extern "C" void isSwitch__10dSv_info_cCFii();
|
||||
extern "C" void cLib_offsetPos__FP4cXyzPC4cXyzsPC4cXyz();
|
||||
extern "C" void* __nwa__FUl();
|
||||
extern "C" void __dla__FPv();
|
||||
extern "C" void _savegpr_25();
|
||||
extern "C" void _restgpr_25();
|
||||
extern "C" extern void* g_fopAc_Method[8];
|
||||
extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */];
|
||||
extern "C" extern u8 g_dComIfG_gameInfo[122384];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
extern "C" extern leafdraw_method_class g_fopAc_Method;
|
||||
|
||||
/* 80BE3178-80BE3198 000078 0020+00 1/0 0/0 0/0 .text daObjE_CREATE_Create__FP10fopAc_ac_c */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daObjE_CREATE_Create(fopAc_ac_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create/daObjE_CREATE_Create__FP10fopAc_ac_c.s"
|
||||
static int daObjE_CREATE_Create(fopAc_ac_c* i_this) {
|
||||
return static_cast<daObjE_CREATE_c*>(i_this)->create();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80BE3198-80BE31BC 000098 0024+00 1/0 0/0 0/0 .text daObjE_CREATE_Delete__FP15daObjE_CREATE_c */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daObjE_CREATE_Delete(daObjE_CREATE_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create/daObjE_CREATE_Delete__FP15daObjE_CREATE_c.s"
|
||||
static int daObjE_CREATE_Delete(daObjE_CREATE_c* i_this) {
|
||||
i_this->Delete();
|
||||
return 1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80BE3888-80BE388C 000000 0004+00 1/1 0/0 0/0 .rodata @3720 */
|
||||
SECTION_RODATA static u8 const lit_3720[4] = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x80BE3888, &lit_3720);
|
||||
|
||||
/* 80BE388C-80BE3890 000004 0004+00 0/1 0/0 0/0 .rodata @3721 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3721 = 100.0f;
|
||||
COMPILER_STRIP_GATE(0x80BE388C, &lit_3721);
|
||||
#pragma pop
|
||||
|
||||
/* 80BE3890-80BE3898 000008 0004+04 0/1 0/0 0/0 .rodata @3722 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static f32 const lit_3722[1 + 1 /* padding */] = {
|
||||
62000.0f,
|
||||
/* padding */
|
||||
0.0f,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x80BE3890, &lit_3722);
|
||||
#pragma pop
|
||||
|
||||
/* 80BE3898-80BE38A0 000010 0008+00 0/1 0/0 0/0 .rodata @3724 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static u8 const lit_3724[8] = {
|
||||
0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x80BE3898, &lit_3724);
|
||||
#pragma pop
|
||||
|
||||
/* 80BE31BC-80BE345C 0000BC 02A0+00 3/3 0/0 0/0 .text NormalAction__15daObjE_CREATE_cFv
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daObjE_CREATE_c::NormalAction() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create/NormalAction__15daObjE_CREATE_cFv.s"
|
||||
void daObjE_CREATE_c::NormalAction() {
|
||||
cXyz offsetPos(0.0f, 0.0f, 100.0f);
|
||||
|
||||
switch (mActionMode) {
|
||||
case MODE_CREATE:
|
||||
if (mActivateSw != 0xFF && dComIfGs_isSwitch(mActivateSw, fopAcM_GetRoomNo(this))) {
|
||||
int enemyNum = mEnemyNum;
|
||||
|
||||
for (int i = 0; i < enemyNum; i++) {
|
||||
s16 angle = shape_angle.y + (62000.0f / enemyNum) * i;
|
||||
|
||||
// this cLib_offsetPos call is useless since the result is stored in `offsetPos`
|
||||
// and `offsetPos` is never used afterward.
|
||||
// this was probably supposed to be:
|
||||
// "cLib_offsetPos(¤t.pos, ¤t.pos, angle, &offsetPos)"
|
||||
cLib_offsetPos(&offsetPos, ¤t.pos, angle, &offsetPos);
|
||||
s8 roomNo = fopAcM_GetRoomNo(this);
|
||||
|
||||
mActorList[i] =
|
||||
fopAcM_createChild(mEnemyProcName, fopAcM_GetID(this), mEnemyParams,
|
||||
¤t.pos, roomNo, &mEnemyAngle, NULL, -1, NULL);
|
||||
}
|
||||
mActionMode++;
|
||||
mKillCheckDelayTimer = 50;
|
||||
}
|
||||
break;
|
||||
case MODE_WAIT:
|
||||
mKillCheckDelayTimer--;
|
||||
if (mKillCheckDelayTimer <= 0) {
|
||||
mKillCheckDelayTimer = 0;
|
||||
}
|
||||
|
||||
if (mKillCheckDelayTimer == 0) {
|
||||
mActionMode++;
|
||||
}
|
||||
break;
|
||||
case MODE_KILL_CHECK:
|
||||
int killed_num;
|
||||
int enemyNum = mEnemyNum;
|
||||
|
||||
killed_num = 0;
|
||||
for (int i = 0; i < enemyNum; i++) {
|
||||
if (fopAcM_SearchByID(mActorList[i]) == NULL) {
|
||||
mActorList[i] = 0xFFFFFFFF;
|
||||
killed_num++;
|
||||
}
|
||||
}
|
||||
|
||||
if (killed_num == enemyNum) {
|
||||
mActionMode++;
|
||||
if (mDeactivateSw != 0xFF &&
|
||||
!dComIfGs_isSwitch(mDeactivateSw, fopAcM_GetRoomNo(this))) {
|
||||
dComIfGs_onSwitch(mDeactivateSw, fopAcM_GetRoomNo(this));
|
||||
}
|
||||
|
||||
mKillCheckDelayTimer = 100;
|
||||
}
|
||||
break;
|
||||
case MODE_END:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80BE345C-80BE34A0 00035C 0044+00 1/1 0/0 0/0 .text SearchAction__15daObjE_CREATE_cFv
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daObjE_CREATE_c::SearchAction() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create/SearchAction__15daObjE_CREATE_cFv.s"
|
||||
/**
|
||||
* Moves the enemy spawner position to player position
|
||||
*/
|
||||
void daObjE_CREATE_c::SearchAction() {
|
||||
current.pos = fopAcM_GetPosition(daPy_getPlayerActorClass());
|
||||
NormalAction();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80BE34A0-80BE3544 0003A0 00A4+00 1/1 0/0 0/0 .text LoopAction__15daObjE_CREATE_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daObjE_CREATE_c::LoopAction() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create/LoopAction__15daObjE_CREATE_cFv.s"
|
||||
/**
|
||||
* Starts the enemy spawn loop over again when all enemies are killed.
|
||||
* If a loop end switch is specified and activated, the loop will end
|
||||
*/
|
||||
void daObjE_CREATE_c::LoopAction() {
|
||||
NormalAction();
|
||||
|
||||
if (mActionMode == MODE_END) {
|
||||
mKillCheckDelayTimer--;
|
||||
if (mKillCheckDelayTimer <= 0) {
|
||||
mKillCheckDelayTimer = 0;
|
||||
}
|
||||
|
||||
if (mKillCheckDelayTimer == 0) {
|
||||
mActionMode = MODE_CREATE;
|
||||
}
|
||||
}
|
||||
|
||||
if (mEndLoopSw != 0xFF && dComIfGs_isSwitch(mEndLoopSw, fopAcM_GetRoomNo(this))) {
|
||||
mAction = ACT_NORMAL;
|
||||
mActionMode = MODE_KILL_CHECK;
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80BE3544-80BE359C 000444 0058+00 1/1 0/0 0/0 .text Action__15daObjE_CREATE_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daObjE_CREATE_c::Action() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create/Action__15daObjE_CREATE_cFv.s"
|
||||
void daObjE_CREATE_c::Action() {
|
||||
switch (mAction) {
|
||||
case ACT_NORMAL:
|
||||
NormalAction();
|
||||
break;
|
||||
case ACT_SEARCH:
|
||||
SearchAction();
|
||||
break;
|
||||
case ACT_LOOP:
|
||||
LoopAction();
|
||||
break;
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80BE359C-80BE35C0 00049C 0024+00 1/1 0/0 0/0 .text Execute__15daObjE_CREATE_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daObjE_CREATE_c::Execute() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create/Execute__15daObjE_CREATE_cFv.s"
|
||||
int daObjE_CREATE_c::Execute() {
|
||||
Action();
|
||||
return 1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80BE35C0-80BE35F0 0004C0 0030+00 1/1 0/0 0/0 .text Delete__15daObjE_CREATE_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daObjE_CREATE_c::Delete() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create/Delete__15daObjE_CREATE_cFv.s"
|
||||
int daObjE_CREATE_c::Delete() {
|
||||
if (mActorList != NULL) {
|
||||
delete[] mActorList;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80BE35F0-80BE35F8 0004F0 0008+00 1/0 0/0 0/0 .text daObjE_CREATE_Draw__FP15daObjE_CREATE_c */
|
||||
static bool daObjE_CREATE_Draw(daObjE_CREATE_c* param_0) {
|
||||
return true;
|
||||
static int daObjE_CREATE_Draw(daObjE_CREATE_c* i_this) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80BE35F8-80BE3618 0004F8 0020+00 1/0 0/0 0/0 .text daObjE_CREATE_Execute__FP15daObjE_CREATE_c
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void daObjE_CREATE_Execute(daObjE_CREATE_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create/daObjE_CREATE_Execute__FP15daObjE_CREATE_c.s"
|
||||
static int daObjE_CREATE_Execute(daObjE_CREATE_c* i_this) {
|
||||
return i_this->Execute();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80BE38A0-80BE38D4 -00001 0034+00 1/1 0/0 0/0 .data @3838 */
|
||||
SECTION_DATA static void* lit_3838[13] = {
|
||||
(void*)(((char*)NameChk__15daObjE_CREATE_cFv) + 0x154),
|
||||
(void*)(((char*)NameChk__15daObjE_CREATE_cFv) + 0x50),
|
||||
(void*)(((char*)NameChk__15daObjE_CREATE_cFv) + 0x5C),
|
||||
(void*)(((char*)NameChk__15daObjE_CREATE_cFv) + 0x68),
|
||||
(void*)(((char*)NameChk__15daObjE_CREATE_cFv) + 0x7C),
|
||||
(void*)(((char*)NameChk__15daObjE_CREATE_cFv) + 0x90),
|
||||
(void*)(((char*)NameChk__15daObjE_CREATE_cFv) + 0xA8),
|
||||
(void*)(((char*)NameChk__15daObjE_CREATE_cFv) + 0xB4),
|
||||
(void*)(((char*)NameChk__15daObjE_CREATE_cFv) + 0xC0),
|
||||
(void*)(((char*)NameChk__15daObjE_CREATE_cFv) + 0xCC),
|
||||
(void*)(((char*)NameChk__15daObjE_CREATE_cFv) + 0x100),
|
||||
(void*)(((char*)NameChk__15daObjE_CREATE_cFv) + 0x114),
|
||||
(void*)(((char*)NameChk__15daObjE_CREATE_cFv) + 0x128),
|
||||
};
|
||||
|
||||
/* 80BE3618-80BE3770 000518 0158+00 2/1 0/0 0/0 .text NameChk__15daObjE_CREATE_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daObjE_CREATE_c::NameChk() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create/NameChk__15daObjE_CREATE_cFv.s"
|
||||
void daObjE_CREATE_c::NameChk() {
|
||||
int enemyType = fopAcM_GetParam(this) & 0xF;
|
||||
mEnemyNum = (fopAcM_GetParam(this) >> 4) & 0xF;
|
||||
mEnemyParams = 0xFFFFFFFF;
|
||||
mEnemyAngle = shape_angle;
|
||||
|
||||
switch (enemyType) {
|
||||
case ENEMY_NONE:
|
||||
break;
|
||||
case ENEMY_KEESE:
|
||||
mEnemyProcName = PROC_E_BA;
|
||||
break;
|
||||
case ENEMY_RAT:
|
||||
mEnemyProcName = PROC_E_MS;
|
||||
break;
|
||||
case ENEMY_CHU:
|
||||
mEnemyProcName = PROC_E_SM2;
|
||||
mEnemyParams = 0xFFFFFF1F;
|
||||
break;
|
||||
case ENEMY_CHU2:
|
||||
mEnemyProcName = PROC_E_SM2;
|
||||
mEnemyParams = 0xFFFFFF3F;
|
||||
break;
|
||||
case ENEMY_BABY_GOHMA:
|
||||
mEnemyProcName = PROC_E_GM;
|
||||
mEnemyParams = 0x000AFF02;
|
||||
break;
|
||||
case ENEMY_BUBBLE:
|
||||
mEnemyProcName = PROC_E_BU;
|
||||
break;
|
||||
case ENEMY_BOKOBLIN:
|
||||
mEnemyProcName = PROC_E_OC;
|
||||
break;
|
||||
case ENEMY_LIZALFOS:
|
||||
mEnemyProcName = PROC_E_DN;
|
||||
break;
|
||||
case ENEMY_SHADOW_BEAST:
|
||||
mEnemyProcName = PROC_E_S1;
|
||||
|
||||
if (mEnemyNum == 1) {
|
||||
mEnemyParams = 0xFFFFFEF0;
|
||||
} else {
|
||||
mEnemyParams = (mEnemyNum << 4) | 0xFFFFFE00;
|
||||
}
|
||||
break;
|
||||
case ENEMY_SHADOW_VERMIN:
|
||||
mEnemyProcName = PROC_E_YG;
|
||||
mEnemyParams = 0xFFFFFF00;
|
||||
break;
|
||||
case ENEMY_SHADOW_KEESE:
|
||||
mEnemyProcName = PROC_E_YK;
|
||||
mEnemyParams = 0xFFFFFF01;
|
||||
break;
|
||||
case ENEMY_BOKOBLIN2:
|
||||
mEnemyProcName = PROC_E_OC;
|
||||
mEnemyParams = 0xFFFF01FF;
|
||||
mEnemyAngle.set(0x100, shape_angle.y, shape_angle.z);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80BE3770-80BE3878 000670 0108+00 1/1 0/0 0/0 .text create__15daObjE_CREATE_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daObjE_CREATE_c::create() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create/create__15daObjE_CREATE_cFv.s"
|
||||
int daObjE_CREATE_c::create() {
|
||||
if (!fopAcM_CheckCondition(this, 8)) {
|
||||
new (this) kytag05_class();
|
||||
fopAcM_OnCondition(this, 8);
|
||||
}
|
||||
|
||||
NameChk();
|
||||
u32 enemyType = fopAcM_GetParam(this) & 0xF;
|
||||
|
||||
mAction = current.angle.x & 0xF;
|
||||
if (mAction == ACT_DEFAULT) {
|
||||
mAction = ACT_NORMAL;
|
||||
}
|
||||
|
||||
current.angle.x = 0;
|
||||
|
||||
if (enemyType == 0 || enemyType == 0xFF) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
mEndLoopSw = fopAcM_GetParam(this) >> 0x18;
|
||||
if (dComIfGs_isSwitch(mEndLoopSw, fopAcM_GetRoomNo(this))) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
mActivateSw = fopAcM_GetParam(this) >> 8;
|
||||
mDeactivateSw = fopAcM_GetParam(this) >> 0x10;
|
||||
mActorList = new u32[mEnemyNum];
|
||||
|
||||
if (mActorList == NULL) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80BE3878-80BE3880 000778 0008+00 1/0 0/0 0/0 .text daObjE_CREATE_IsDelete__FP15daObjE_CREATE_c
|
||||
*/
|
||||
static bool daObjE_CREATE_IsDelete(daObjE_CREATE_c* param_0) {
|
||||
return true;
|
||||
static int daObjE_CREATE_IsDelete(daObjE_CREATE_c* i_this) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80BE38D4-80BE38F4 -00001 0020+00 1/0 0/0 0/0 .data l_daObjE_CREATE_Method */
|
||||
SECTION_DATA static void* l_daObjE_CREATE_Method[8] = {
|
||||
(void*)daObjE_CREATE_Create__FP10fopAc_ac_c,
|
||||
(void*)daObjE_CREATE_Delete__FP15daObjE_CREATE_c,
|
||||
(void*)daObjE_CREATE_Execute__FP15daObjE_CREATE_c,
|
||||
(void*)daObjE_CREATE_IsDelete__FP15daObjE_CREATE_c,
|
||||
(void*)daObjE_CREATE_Draw__FP15daObjE_CREATE_c,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
static actor_method_class l_daObjE_CREATE_Method = {
|
||||
(process_method_func)daObjE_CREATE_Create, (process_method_func)daObjE_CREATE_Delete,
|
||||
(process_method_func)daObjE_CREATE_Execute, (process_method_func)daObjE_CREATE_IsDelete,
|
||||
(process_method_func)daObjE_CREATE_Draw,
|
||||
};
|
||||
|
||||
/* 80BE38F4-80BE3924 -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_E_CREATE */
|
||||
SECTION_DATA extern void* g_profile_Obj_E_CREATE[12] = {
|
||||
(void*)0xFFFFFFFD, (void*)0x0003FFFD,
|
||||
(void*)0x00680000, (void*)&g_fpcLf_Method,
|
||||
(void*)0x00000594, (void*)NULL,
|
||||
(void*)NULL, (void*)&g_fopAc_Method,
|
||||
(void*)0x01CA0000, (void*)&l_daObjE_CREATE_Method,
|
||||
(void*)0x00040000, (void*)0x000E0000,
|
||||
extern actor_process_profile_definition g_profile_Obj_E_CREATE = {
|
||||
-3,
|
||||
3,
|
||||
0xFFFD,
|
||||
PROC_Obj_E_CREATE,
|
||||
0,
|
||||
&g_fpcLf_Method.mBase,
|
||||
sizeof(daObjE_CREATE_c),
|
||||
0,
|
||||
0,
|
||||
&g_fopAc_Method,
|
||||
0x01CA,
|
||||
0,
|
||||
0,
|
||||
&l_daObjE_CREATE_Method,
|
||||
0x00040000,
|
||||
0x0,
|
||||
0xE,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
|
|
|
@ -108,37 +108,39 @@ static int daTagMmsg_Execute(daTagMmsg_c* tag) {
|
|||
}
|
||||
|
||||
/* 80D5BD28-80D5BD30 000488 0008+00 1/0 0/0 0/0 .text daTagMmsg_Draw__FP11daTagMmsg_c */
|
||||
static bool daTagMmsg_Draw(daTagMmsg_c* tag) {
|
||||
return true;
|
||||
static int daTagMmsg_Draw(daTagMmsg_c* tag) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80D5BD44-80D5BD64 -00001 0020+00 1/0 0/0 0/0 .data l_daTagMmsg_Method */
|
||||
// This is probably of type leafdraw_method_class, but I can't get the data to have the right
|
||||
// padding without these extra NULLs.
|
||||
static void* l_daTagMmsg_Method[8] = {
|
||||
daTagMmsg_Create, daTagMmsg_Delete, daTagMmsg_Execute, NULL, daTagMmsg_Draw, NULL, NULL, NULL,
|
||||
static actor_method_class l_daTagMmsg_Method = {
|
||||
(process_method_func)daTagMmsg_Create,
|
||||
(process_method_func)daTagMmsg_Delete,
|
||||
(process_method_func)daTagMmsg_Execute,
|
||||
(process_method_func)NULL,
|
||||
(process_method_func)daTagMmsg_Draw,
|
||||
};
|
||||
|
||||
/* 80D5BD64-80D5BD94 -00001 0030+00 0/0 0/0 1/0 .data g_profile_Tag_Mmsg */
|
||||
extern actor_process_profile_definition g_profile_Tag_Mmsg = {
|
||||
-3, // mLayerID
|
||||
7, // mListID
|
||||
0xFFFD, // mListPrio
|
||||
PROC_Tag_Mmsg, // mProcName
|
||||
0, // unkA
|
||||
&g_fpcLf_Method.mBase, // mSubMtd
|
||||
sizeof(daTagMmsg_c), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopAc_Method, // mSubMtd
|
||||
0x00FF, // mPriority
|
||||
0, // unk22[0]
|
||||
0, // unk22[1]
|
||||
(leafdraw_method_class*)&l_daTagMmsg_Method, // mSubMtd
|
||||
0x00044000, // mStatus
|
||||
0x03, // mActorType
|
||||
0x0E, // mCullType
|
||||
0, // field_0x2e[0]
|
||||
0 // field_0x2e[1]
|
||||
-3, // mLayerID
|
||||
7, // mListID
|
||||
0xFFFD, // mListPrio
|
||||
PROC_Tag_Mmsg, // mProcName
|
||||
0, // unkA
|
||||
&g_fpcLf_Method.mBase, // mSubMtd
|
||||
sizeof(daTagMmsg_c), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopAc_Method, // mSubMtd
|
||||
0x00FF, // mPriority
|
||||
0, // unk22[0]
|
||||
0, // unk22[1]
|
||||
&l_daTagMmsg_Method, // mSubMtd
|
||||
0x00044000, // mStatus
|
||||
0x03, // mActorType
|
||||
0x0E, // mCullType
|
||||
0, // field_0x2e[0]
|
||||
0 // field_0x2e[1]
|
||||
};
|
Loading…
Reference in New Issue