// // Generated by dtk // Translation Unit: d_wpot_water.cpp // #include "d/d_wpot_water.h" #include "d/d_bg_s_gnd_chk.h" #include "d/d_com_inf_game.h" #include "d/d_procname.h" #include "f_op/f_op_kankyo_mng.h" /* 8023F5D0-8023F64C .text draw__20dWpotWater_EcallBackFP14JPABaseEmitter */ void dWpotWater_EcallBack::draw(JPABaseEmitter* emtr) { if (emtr->isZDraw()) { GXSetAlphaCompare(GX_ALWAYS, 0, GX_AOP_AND, GX_ALWAYS, 0); GXSetBlendMode(GX_BM_BLEND, GX_BL_DST_ALPHA, GX_BL_INV_DST_ALPHA, GX_LO_CLEAR); GXSetZMode(GX_FALSE, GX_LEQUAL, GX_FALSE); GXSetZCompLoc(GX_FALSE); GXSetColorUpdate(GX_FALSE); GXSetAlphaUpdate(GX_TRUE); } } /* 8023F64C-8023F688 .text dWpotWater_Draw__FP12dWpotWater_c */ static BOOL dWpotWater_Draw(dWpotWater_c* i_this) { dComIfGd_getXluList()->entryImm(&i_this->mPacket, 0); return TRUE; } /* 8023F688-8023F740 .text dWpotWater_Execute__FP12dWpotWater_c */ static BOOL dWpotWater_Execute(dWpotWater_c* i_this) { /* Nonmatching */ mDoMtx_stack_c::transS(i_this->mPos.x, i_this->mPos.y + 50.0f, i_this->mPos.z); mDoMtx_stack_c::scaleM(220.0f, 100.0f, 220.0f); mDoMtx_concat(j3dSys.getViewMtx(), mDoMtx_stack_c::get(), i_this->mPacket.mtx); if (i_this->emtr->isEnableDeleteEmitter()) { i_this->emtr->quitImmortalEmitter(); fopKyM_Delete(i_this); } return TRUE; } /* 8023F740-8023F748 .text dWpotWater_IsDelete__FP12dWpotWater_c */ static BOOL dWpotWater_IsDelete(dWpotWater_c* i_this) { return TRUE; } /* 8023F748-8023F750 .text dWpotWater_Delete__FP12dWpotWater_c */ static BOOL dWpotWater_Delete(dWpotWater_c* i_this) { return TRUE; } /* 8023F750-8023FFCC .text dWpotWater_Create__FP12kankyo_class */ static s32 dWpotWater_Create(kankyo_class* i_k) { /* Nonmatching */ dWpotWater_c* i_this = (dWpotWater_c*)i_k; dBgS_GndChk chk2; dBgS_ObjGndChk_Yogan chk; s16 angle = 0; for (s32 i = 0; i < 50; i++, angle += 10000) { cXyz pos = i_this->mPos; pos.x += 2.040816f * cM_ssin(angle); pos.y += 100.0f; pos.z += 2.040816f * cM_scos(angle); chk.SetPos(&pos); f32 ret = dComIfG_Bgsp()->GroundCross(&chk); if (ret != -1000000000.0f) { chk2.SetPos(&pos); f32 ret2 = dComIfG_Bgsp()->GroundCross(&chk2); if (chk.ChkSetInfo() && dComIfG_Bgsp()->GetAttributeCode(chk) && ret2 < ret) { cXyz spawnPos = pos; spawnPos.y = ret + 25.0f; fopAcM_create(PROC_Obj_Magmarock, 0, &spawnPos, i_this->mParam); break; } } } cXyz pos = i_this->mPos; pos.y += 100.0f; chk2.SetPos(&pos); f32 ret = dComIfG_Bgsp()->GroundCross(&chk2); i_this->mPos.y = ret; if (ret != -1000000000.0f) return cPhs_ERROR_e; fopAcM_create(PROC_HITOBJ, 0, &i_this->mPos, i_this->mParam); new(&i_this) dWpotWater_c(); dComIfGp_particle_set(0x8083, &i_this->mPos); dComIfGp_particle_set(0x8084, &i_this->mPos); i_this->emtr = dComIfGp_particle_set(0x8086, &i_this->mPos, NULL, NULL, 0xAA, &dWpotWater_c::mEcallback); if (i_this->emtr == NULL) return cPhs_ERROR_e; i_this->emtr->becomeImmortalEmitter(); return cPhs_NEXT_e; } kankyo_method_class l_dWpotWater_Method = { (process_method_func)dWpotWater_Create, (process_method_func)dWpotWater_Delete, (process_method_func)dWpotWater_Execute, (process_method_func)dWpotWater_IsDelete, (process_method_func)dWpotWater_Draw, }; kankyo_process_profile_definition g_profile_WPOT_WATER = { fpcLy_CURRENT_e, 2, fpcPi_CURRENT_e, PROC_WPOT_WATER, &g_fpcLf_Method.base, sizeof(dWpotWater_c), 0, 0, &g_fopKy_Method, 0x01CC, &l_dWpotWater_Method, };