mirror of
https://github.com/zeldaret/tww.git
synced 2026-05-28 00:15:50 -04:00
50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
//
|
|
// Generated by dtk
|
|
// Translation Unit: d_a_leaflift_static.cpp
|
|
//
|
|
|
|
#include "d/dolzel.h" // IWYU pragma: keep
|
|
#include "d/actor/d_a_leaflift.h"
|
|
#include "d/d_com_inf_game.h"
|
|
#include "dolphin/types.h"
|
|
|
|
const f32 daLlift_c::m_height = 560.0f;
|
|
const f32 daLlift_c::m_max_speed = 10.0f;
|
|
const f32 daLlift_c::m_min_speed = 5.0f;
|
|
|
|
/* 800690E4-80069100 .text checkEndDownLift__9daLlift_cFv */
|
|
BOOL daLlift_c::checkEndDownLift() {
|
|
return (current.pos.y <= home.pos.y);
|
|
}
|
|
|
|
/* 80069100-800692C4 .text MoveUpLift__9daLlift_cFv */
|
|
BOOL daLlift_c::MoveUpLift() {
|
|
f32 max_speed = m_max_speed;
|
|
f32 min_speed = m_min_speed;
|
|
cXyz upLiftPos;
|
|
bool res = FALSE;
|
|
mEmitterTimer++;
|
|
if (current.pos.y != home.pos.y + m_height) {
|
|
m43D = TRUE;
|
|
}
|
|
f32 upVel = cLib_addCalc(¤t.pos.y, home.pos.y + m_height, 0.1f, max_speed, min_speed);
|
|
if (upVel == 0.0f) {
|
|
mbIsAscending = FALSE;
|
|
res = TRUE;
|
|
}
|
|
else if ((upVel != 0.0f) && (mbIsAscending == FALSE)) {
|
|
fopAcM_seStart(this, JA_SE_OBJ_LOTUS_LIFT_UP, 0);
|
|
mbIsAscending = TRUE;
|
|
mEmitter1 = dComIfGp_particle_set(dPa_name::ID_IT_SN_DEKLIFT_MIZUPOTA00, ¤t.pos, ¤t.angle);
|
|
mEmitter2 = NULL;
|
|
upLiftPos = current.pos;
|
|
upLiftPos.y = mWaterY;
|
|
mEmitter4 = dComIfGp_particle_set(dPa_name::ID_IT_SN_DEKLIFT_HAMONB00, &upLiftPos, ¤t.angle);
|
|
mEmitterTimer = 0;
|
|
if (mEmitter3) {
|
|
mEmitter3->stopCreateParticle();
|
|
}
|
|
}
|
|
return res;
|
|
}
|