mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-13 19:44:32 -04:00
fire particle + closed link hand
This commit is contained in:
@@ -2662,6 +2662,9 @@ public:
|
||||
void preKandelaarDraw();
|
||||
void preGhostLanternDraw();
|
||||
static void* srchPoe(void*, void*);
|
||||
#if TARGET_PC
|
||||
void setGhostLanternModel();
|
||||
#endif
|
||||
void setKandelaarModel();
|
||||
void resetOilBottleModel();
|
||||
void commonKandelaarPourInit();
|
||||
|
||||
@@ -6102,7 +6102,6 @@ void daAlink_c::setItemMatrix(int param_0) {
|
||||
mpGhostLanternModel->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
|
||||
modelCalc(mpGhostLanternModel);
|
||||
mGhostLanternFlamePos.y -= 25.0f;
|
||||
mDoMtx_stack_c::transS(mGhostLanternFlamePos);
|
||||
mpGhostLanternGlowModel->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
modelCalc(mpGhostLanternGlowModel);
|
||||
@@ -14160,6 +14159,11 @@ BOOL daAlink_c::setItemModel() {
|
||||
}
|
||||
}
|
||||
|
||||
if (mEquipItem == dItemNo_LENS_OF_TRUTH_e) {
|
||||
setGhostLanternModel();
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (mEquipItem == dItemNo_KANTERA_e) {
|
||||
setKandelaarModel();
|
||||
return 1;
|
||||
@@ -18592,16 +18596,10 @@ int daAlink_c::execute() {
|
||||
setEffect();
|
||||
|
||||
if (mEquipItem == dItemNo_LENS_OF_TRUTH_e) {
|
||||
u16 effName;
|
||||
dPa_levelEcallBack* callbackp;
|
||||
JPABaseEmitter* emitterp;
|
||||
|
||||
effName = ID_ZI_J_KANTERA_FIRE;
|
||||
callbackp = NULL;
|
||||
|
||||
ghostLanternFlameEffect = dComIfGp_particle_set(
|
||||
ghostLanternFlameEffect, effName, &mGhostLanternFlamePos, &tevStr, &shape_angle,
|
||||
NULL, 0xFF, callbackp, -1, NULL, NULL, NULL);
|
||||
cXyz effscale(1.0f, 1.0f, 1.0f);
|
||||
ghostLanternFlameEffect =
|
||||
dComIfGp_particle_set(ghostLanternFlameEffect, ID_ZI_J_KANTERA_FIRE,
|
||||
&mGhostLanternFlamePos, &shape_angle, &effscale);
|
||||
} else {
|
||||
stopDrawParticle(ghostLanternFlameEffect);
|
||||
}
|
||||
|
||||
@@ -164,12 +164,12 @@ int daAlink_c::ghostLanternModelCallBack() {
|
||||
mDoMtx_stack_c::ZXYrotM(var_r28, var_r29, var_r27);
|
||||
}
|
||||
|
||||
static Vec const kandelaarOffset = {0.0f, -17.0f, 0.0f};
|
||||
mDoMtx_stack_c::multVec(&kandelaarOffset, &mGhostLanternFlamePos);
|
||||
static Vec const ghostLanternOffset = {0.0f, -40.0f, 0.0f};
|
||||
mDoMtx_stack_c::multVec(&ghostLanternOffset, &mGhostLanternFlamePos);
|
||||
|
||||
ghost_lantern_0x3618 = (mGhostLanternFlamePos - ghost_lantern_0x3624) * 0.9f;
|
||||
|
||||
if (!checkEndResetFlg1(ERFLG1_UNK_8)) {
|
||||
if (!checkEndResetFlg1(ERFLG1_UNK_8) && mpGhostLanternModel != nullptr) {
|
||||
f32 scale = JMAFastSqrt(SQUARE(J3DSys::mCurrentMtx[0][0]) + SQUARE(J3DSys::mCurrentMtx[1][0]) + SQUARE(J3DSys::mCurrentMtx[2][0]));
|
||||
mDoMtx_stack_c::transS(J3DSys::mCurrentMtx[0][3], J3DSys::mCurrentMtx[1][3], J3DSys::mCurrentMtx[2][3]);
|
||||
mDoMtx_stack_c::ZXYrotM(var_r28, var_r29, var_r27);
|
||||
@@ -234,15 +234,15 @@ void daAlink_c::preGhostLanternDraw() {
|
||||
J3DMaterial* mat_p = mpGhostLanternGlowModel->getModelData()->getMaterialNodePointer(0);
|
||||
|
||||
J3DGXColorS10 color;
|
||||
color.r = 64;
|
||||
color.g = 128;
|
||||
color.b = 128;
|
||||
color.r = 120;
|
||||
color.g = 150;
|
||||
color.b = 150;
|
||||
color.a = 255;
|
||||
mat_p->setTevColor(1, &color);
|
||||
|
||||
color.r = 64;
|
||||
color.g = 128;
|
||||
color.b = 128;
|
||||
color.r = 0;
|
||||
color.g = 60;
|
||||
color.b = 101;
|
||||
mat_p->setTevColor(2, &color);
|
||||
|
||||
cXyz proj;
|
||||
@@ -319,6 +319,16 @@ void daAlink_c::preKandelaarDraw() {
|
||||
field_0x344c = ((near_ + (far_ * near_) / proj.z) / (far_ - near_) + 1.0f) * 1.6777215E7f;
|
||||
}
|
||||
|
||||
void daAlink_c::setGhostLanternModel() {
|
||||
field_0x2f94 = 0;
|
||||
|
||||
mDoMtx_multVecZero(mpLinkModel->getAnmMtx(mLeftItemJntNo), &mGhostLanternFlamePos);
|
||||
|
||||
ghost_lantern_0x3630 = ghost_lantern_0x3624;
|
||||
ghost_lantern_0x3624 = mGhostLanternFlamePos;
|
||||
ghost_lantern_0x3618 = cXyz::Zero;
|
||||
}
|
||||
|
||||
void daAlink_c::setKandelaarModel() {
|
||||
field_0x2f94 = 0;
|
||||
|
||||
@@ -331,7 +341,6 @@ void daAlink_c::setKandelaarModel() {
|
||||
field_0x3630 = field_0x3624;
|
||||
field_0x3624 = mKandelaarFlamePos;
|
||||
field_0x3618 = cXyz::Zero;
|
||||
ghost_lantern_0x3618 = cXyz::Zero;
|
||||
|
||||
field_0x32c8 = 0;
|
||||
field_0x3448 = 0.0f;
|
||||
|
||||
@@ -404,7 +404,6 @@ void daAlink_c::changeLink(int param_0) {
|
||||
}
|
||||
|
||||
mpKanteraModel = initModelEnv(static_cast<J3DModelData*>(dComIfG_getObjectRes(mArcName, "al_kantera.bmd")), 0);
|
||||
mpGhostLanternModel = initModelEnv(static_cast<J3DModelData*>(dComIfG_getObjectRes(mArcName, "ghost_lantern.bmd")), 0);
|
||||
|
||||
modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(mArcName, "ef_ktGlow.bmd"));
|
||||
mpKanteraGlowModel = initModel(modelData, 0x200);
|
||||
@@ -413,9 +412,11 @@ void daAlink_c::changeLink(int param_0) {
|
||||
mpKanteraGlowBtk->searchUpdateMaterialID(modelData);
|
||||
modelData->entryTexMtxAnimator(mpKanteraGlowBtk);
|
||||
|
||||
modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(mArcName, "ef_ghost_lantern.bmd"));
|
||||
mpGhostLanternModel = initModelEnv(static_cast<J3DModelData*>(dComIfG_getObjectRes("E_HP", "hp_ori.bmd")), 0);
|
||||
|
||||
modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(mArcName, "ef_ktGlow.bmd"));
|
||||
mpGhostLanternGlowModel = initModel(modelData, 0x200);
|
||||
mpGhostLanternGlowBtk = static_cast<J3DAnmTextureSRTKey*>(dComIfG_getObjectRes(mArcName, "ef_ghost_lantern.btk"));
|
||||
mpGhostLanternGlowBtk = static_cast<J3DAnmTextureSRTKey*>(dComIfG_getObjectRes(mArcName, "ef_ktGlow.btk"));
|
||||
mpGhostLanternGlowBtk->setFrame(0.0f);
|
||||
mpGhostLanternGlowBtk->searchUpdateMaterialID(modelData);
|
||||
modelData->entryTexMtxAnimator(mpGhostLanternGlowBtk);
|
||||
|
||||
@@ -1495,6 +1495,9 @@ void dScnLogo_c::dvdDataLoad() {
|
||||
OS_REPORT("\x1b[32m%d archiveHeap->getTotalFreeSize %08x\n\x1b[m", 2421, archiveHeap->getTotalFreeSize());
|
||||
archiveHeap->dump_sort();
|
||||
|
||||
rt = dComIfG_setObjectRes("E_HP", (u8)0, NULL);
|
||||
JUT_ASSERT(2425, rt == 1);
|
||||
|
||||
rt = dComIfG_setObjectRes("Alink", (u8)0, NULL);
|
||||
JUT_ASSERT(2429, rt == 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user