mirror of
https://github.com/zeldaret/tp
synced 2026-09-03 02:03:55 -04:00
d_a_alink work / lv4digsand done / e_s1 matched (#2224)
* d_a_alink work / d_a_obj_lv4digsand done * d_a_e_s1 matched, not linked * d_a_e_s1 documentation
This commit is contained in:
@@ -271,12 +271,14 @@ public:
|
||||
void onWolfDownPullEndFlg() { mFlags |= 0x20; }
|
||||
void onWolfNoLock() { mFlags |= 0x200; }
|
||||
void onDownFlg() { mFlags |= 1; }
|
||||
void onHeadLockFlg() { mFlags |= 0x80; }
|
||||
|
||||
void offWolfBiteDamage() { mFlags &= ~0x40; }
|
||||
void offCutDownHitFlg() { mFlags &= ~0x2; }
|
||||
void offWolfDownPullFlg() { mFlags &= ~0x10; }
|
||||
void offDownFlg() { mFlags &= ~0x17; }
|
||||
void offWolfNoLock() { mFlags &= ~0x200; }
|
||||
void offHeadLockFlg() { mFlags &= ~0x80; }
|
||||
|
||||
void setMidnaBindMode(u8 i_bindMode) { mMidnaBindMode = i_bindMode; }
|
||||
void setMidnaBindID(u8 i_idx, u32 i_bindID) { mMidnaBindID[i_idx] = i_bindID; }
|
||||
@@ -285,6 +287,7 @@ public:
|
||||
void setThrowModeThrowRight() { mThrowMode |= 0x10; }
|
||||
void setThrowModeThrowLeft() { mThrowMode |= 8; }
|
||||
void setDownPos(const cXyz* i_pos) { mDownPos = *i_pos; }
|
||||
void setHeadLockPos(const cXyz* i_pos) { mHeadLockPos = *i_pos; }
|
||||
|
||||
/* 0x568 */ cXyz mDownPos;
|
||||
/* 0x574 */ cXyz mHeadLockPos;
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
#ifndef F_OP_ACTOR_ENEMY_H_
|
||||
#define F_OP_ACTOR_ENEMY_H_
|
||||
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "Z2AudioLib/Z2Creature.h"
|
||||
#include "d/actor/d_a_midna.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
// NONMATCHING ?
|
||||
static int setMidnaBindEffect(fopEn_enemy_c* i_actorP, Z2CreatureEnemy* i_creatureP, cXyz* i_effPos,
|
||||
cXyz* i_effSize) {
|
||||
static GXColor e_prim[] = {
|
||||
{0xFF, 0x78, 0x00, 0x00},
|
||||
{0xFF, 0x64, 0x78, 0x00},
|
||||
};
|
||||
static GXColor e_env[] = {
|
||||
{0x5A, 0x2D, 0x2D, 0x00},
|
||||
{0x3C, 0x1E, 0x1E, 0x00},
|
||||
};
|
||||
|
||||
daPy_py_c* player = daPy_getPlayerActorClass();
|
||||
fopAc_ac_c* a_this = (fopAc_ac_c*)i_actorP;
|
||||
|
||||
if (player->getMidnaActor() && player->checkWolfLock(a_this)) {
|
||||
cXyz sp48;
|
||||
|
||||
BOOL darkworld_check;
|
||||
if (dKy_darkworld_check()) {
|
||||
darkworld_check = 1;
|
||||
} else {
|
||||
darkworld_check = 0;
|
||||
}
|
||||
|
||||
if (i_actorP->getMidnaBindMode() == 0) {
|
||||
i_actorP->setMidnaBindMode(1);
|
||||
|
||||
csXyz sp68;
|
||||
MTXCopy(player->getMidnaActor()->getMtxHairTop(), mDoMtx_stack_c::get());
|
||||
|
||||
cXyz sp54(nREG_F(8) + 100.0f, nREG_F(9), nREG_F(10));
|
||||
mDoMtx_stack_c::multVec(&sp54, &sp48);
|
||||
|
||||
cXyz sp60 = sp48 - *i_effPos;
|
||||
|
||||
sp68.y = cM_atan2s(sp60.x, sp60.z);
|
||||
sp68.x = -cM_atan2s(sp60.y, JMAFastSqrt(sp60.x * sp60.x + sp60.z * sp60.z));
|
||||
sp68.z = 0;
|
||||
|
||||
s32 room_no = fopAcM_GetRoomNo(a_this);
|
||||
JPABaseEmitter* emitter = dComIfGp_particle_set(
|
||||
0x29B, i_effPos, &a_this->tevStr, &sp68, i_effSize, 0xFF, NULL, room_no,
|
||||
&e_prim[darkworld_check], &e_env[darkworld_check], NULL);
|
||||
|
||||
if (emitter != NULL) {
|
||||
emitter->setGlobalParticleHeightScale((JREG_F(7) + 0.01f) * sp60.abs());
|
||||
}
|
||||
|
||||
room_no = fopAcM_GetRoomNo(a_this);
|
||||
dComIfGp_particle_set(0x29C, i_effPos, &a_this->tevStr, &a_this->shape_angle, i_effSize,
|
||||
0xFF, NULL, room_no, &e_prim[darkworld_check],
|
||||
&e_env[darkworld_check], NULL);
|
||||
|
||||
i_creatureP->startCreatureSound(Z2SE_MIDNA_BIND_LOCK_ON, 0, -1);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
static u16 eff_id[] = {0x29D, 0x29E, 0x29F};
|
||||
|
||||
u32* bind_id = i_actorP->getMidnaBindID(i);
|
||||
*bind_id = dComIfGp_particle_set(*bind_id, eff_id[i], i_effPos, &a_this->tevStr,
|
||||
&a_this->shape_angle, i_effSize, 0xFF, NULL,
|
||||
fopAcM_GetRoomNo(a_this), &e_prim[darkworld_check],
|
||||
&e_env[darkworld_check], NULL);
|
||||
}
|
||||
|
||||
i_creatureP->startCreatureSound(Z2SE_MIDNA_BIND_LOCK_SUS, 0, -1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
i_actorP->setMidnaBindMode(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -116,6 +116,7 @@ public:
|
||||
static bool getTriPla(cM3dGPla* i_plane) { return dComIfG_Bgsp().GetTriPla(mGndCheck, i_plane); }
|
||||
static int getRoomId() { return dComIfG_Bgsp().GetRoomId(mGndCheck); }
|
||||
static int getPolyColor() { return dComIfG_Bgsp().GetPolyColor(mGndCheck); }
|
||||
static int getPolyAtt0() { return dComIfG_Bgsp().GetPolyAtt0(mGndCheck); }
|
||||
static dBgS_ObjGndChk* getGroundCheck() { return &mGndCheck; }
|
||||
static f32 getGroundY() { return mGroundY; }
|
||||
};
|
||||
@@ -607,7 +608,7 @@ s32 fopAcM_createWarpHole(const cXyz*, const csXyz*, int, u8, u8, u8);
|
||||
|
||||
fopAc_ac_c* fopAcM_myRoomSearchEnemy(s8 roomNo);
|
||||
|
||||
s32 fopAcM_createDisappear(const fopAc_ac_c*, const cXyz*, u8, u8, u8);
|
||||
s32 fopAcM_createDisappear(const fopAc_ac_c* i_actor, const cXyz* i_pos, u8 i_size, u8 i_type, u8 i_enemyID);
|
||||
void fopAcM_setCarryNow(fopAc_ac_c*, int);
|
||||
void fopAcM_cancelCarryNow(fopAc_ac_c*);
|
||||
s32 fopAcM_otoCheck(const fopAc_ac_c*, f32);
|
||||
@@ -728,76 +729,4 @@ inline bool fopAcM_CheckFoodStatus(const fopAc_ac_c* actor, fopAcM_FOOD status)
|
||||
return actor->field_0x567 == status;
|
||||
}
|
||||
|
||||
/* static inline int setMidnaBindEffect(fopEn_enemy_c* i_actorP, Z2CreatureEnemy* i_creatureP, cXyz* param_2,
|
||||
cXyz* param_3) {
|
||||
static GXColor e_prim[] = {
|
||||
{0xFF, 0x78, 0x00, 0x00},
|
||||
{0xFF, 0x64, 0x78, 0x00},
|
||||
};
|
||||
static GXColor e_env[] = {
|
||||
{0x5A, 0x2D, 0x2D, 0x00},
|
||||
{0x3C, 0x1E, 0x1E, 0x00},
|
||||
};
|
||||
|
||||
daPy_py_c* player = daPy_getPlayerActorClass();
|
||||
fopAc_ac_c* a_this = (fopAc_ac_c*)i_actorP;
|
||||
|
||||
if (player->getMidnaActor() && player->checkWolfLock(a_this)) {
|
||||
cXyz sp48;
|
||||
|
||||
BOOL darkworld_check;
|
||||
if (dKy_darkworld_check()) {
|
||||
darkworld_check = 1;
|
||||
} else {
|
||||
darkworld_check = 0;
|
||||
}
|
||||
|
||||
if (i_actorP->getMidnaBindMode() == 0) {
|
||||
i_actorP->setMidnaBindMode(1);
|
||||
|
||||
csXyz sp68;
|
||||
MTXCopy(player->getMidnaActor()->getMtxHairTop(), mDoMtx_stack_c::get());
|
||||
|
||||
cXyz sp54(nREG_F(8) + 100.0f, nREG_F(9), nREG_F(10));
|
||||
mDoMtx_stack_c::multVec(&sp54, &sp48);
|
||||
|
||||
cXyz sp60 = sp48 - *param_2;
|
||||
|
||||
sp68.y = cM_atan2s(sp60.x, sp60.z);
|
||||
sp68.x = -cM_atan2s(sp60.y, JMAFastSqrt(sp60.x * sp60.x + sp60.z * sp60.z));
|
||||
sp68.z = 0;
|
||||
|
||||
JPABaseEmitter* emitter = dComIfGp_particle_set(
|
||||
0x29B, param_2, &a_this->tevStr, &sp68, param_3, 0xFF, NULL, fopAcM_GetRoomNo(a_this),
|
||||
&e_prim[darkworld_check], &e_env[darkworld_check], NULL);
|
||||
|
||||
if (emitter != NULL) {
|
||||
emitter->setGlobalParticleHeightScale((JREG_F(7) + 0.01f) * sp60.abs());
|
||||
}
|
||||
|
||||
dComIfGp_particle_set(0x29C, param_2, &a_this->tevStr, &a_this->shape_angle,
|
||||
param_3, 0xFF, NULL, fopAcM_GetRoomNo(a_this), &e_prim[darkworld_check],
|
||||
&e_env[darkworld_check], NULL);
|
||||
|
||||
i_creatureP->startCreatureSound(Z2SE_MIDNA_BIND_LOCK_ON, 0, -1);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
static u16 eff_id[] = {0x29D, 0x29E, 0x29F};
|
||||
|
||||
u32* bind_id = i_actorP->getMidnaBindID(i);
|
||||
*bind_id = dComIfGp_particle_set(*bind_id, eff_id[i], param_2, &a_this->tevStr,
|
||||
&a_this->shape_angle, param_3, 0xFF, NULL, fopAcM_GetRoomNo(a_this),
|
||||
&e_prim[darkworld_check], &e_env[darkworld_check], NULL);
|
||||
|
||||
}
|
||||
|
||||
i_creatureP->startCreatureSound(Z2SE_MIDNA_BIND_LOCK_SUS, 0, -1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
i_actorP->setMidnaBindMode(0);
|
||||
return 0;
|
||||
} */
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user