From 365a0a21886b6519f69e0ad4d5c2368ea58a7c71 Mon Sep 17 00:00:00 2001 From: MelonSpeedruns Date: Tue, 28 Apr 2026 13:02:31 -0400 Subject: [PATCH] fire particle + closed link hand --- include/d/actor/d_a_alink.h | 3 +++ src/d/actor/d_a_alink.cpp | 20 +++++++++----------- src/d/actor/d_a_alink_kandelaar.inc | 29 +++++++++++++++++++---------- src/d/actor/d_a_alink_wolf.inc | 7 ++++--- src/d/d_s_logo.cpp | 3 +++ 5 files changed, 38 insertions(+), 24 deletions(-) diff --git a/include/d/actor/d_a_alink.h b/include/d/actor/d_a_alink.h index e08deaf493..1c2628037b 100644 --- a/include/d/actor/d_a_alink.h +++ b/include/d/actor/d_a_alink.h @@ -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(); diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index 1c57a0f186..fd9990d7e8 100644 --- a/src/d/actor/d_a_alink.cpp +++ b/src/d/actor/d_a_alink.cpp @@ -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); } diff --git a/src/d/actor/d_a_alink_kandelaar.inc b/src/d/actor/d_a_alink_kandelaar.inc index b12304a9aa..75b5c6645a 100644 --- a/src/d/actor/d_a_alink_kandelaar.inc +++ b/src/d/actor/d_a_alink_kandelaar.inc @@ -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; diff --git a/src/d/actor/d_a_alink_wolf.inc b/src/d/actor/d_a_alink_wolf.inc index 17785c70a3..7ede7de890 100644 --- a/src/d/actor/d_a_alink_wolf.inc +++ b/src/d/actor/d_a_alink_wolf.inc @@ -404,7 +404,6 @@ void daAlink_c::changeLink(int param_0) { } mpKanteraModel = initModelEnv(static_cast(dComIfG_getObjectRes(mArcName, "al_kantera.bmd")), 0); - mpGhostLanternModel = initModelEnv(static_cast(dComIfG_getObjectRes(mArcName, "ghost_lantern.bmd")), 0); modelData = static_cast(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(dComIfG_getObjectRes(mArcName, "ef_ghost_lantern.bmd")); + mpGhostLanternModel = initModelEnv(static_cast(dComIfG_getObjectRes("E_HP", "hp_ori.bmd")), 0); + + modelData = static_cast(dComIfG_getObjectRes(mArcName, "ef_ktGlow.bmd")); mpGhostLanternGlowModel = initModel(modelData, 0x200); - mpGhostLanternGlowBtk = static_cast(dComIfG_getObjectRes(mArcName, "ef_ghost_lantern.btk")); + mpGhostLanternGlowBtk = static_cast(dComIfG_getObjectRes(mArcName, "ef_ktGlow.btk")); mpGhostLanternGlowBtk->setFrame(0.0f); mpGhostLanternGlowBtk->searchUpdateMaterialID(modelData); modelData->entryTexMtxAnimator(mpGhostLanternGlowBtk); diff --git a/src/d/d_s_logo.cpp b/src/d/d_s_logo.cpp index cc5d0114a4..8c4d706b7f 100644 --- a/src/d/d_s_logo.cpp +++ b/src/d/d_s_logo.cpp @@ -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);