1#include "Game/MapObj/Fountain.hpp"
3Fountain::Fountain(
const char *pName) :
LiveActor(pName) {
4 mFountainName =
nullptr;
12 MR::initDefaultPos(
this, rIter);
26 f32 v20 = (v18 * v14);
27 mtx.mMtx[0][0] = v14 * v13;
28 mtx.mMtx[2][1] = v18 * v14;
29 mtx.mMtx[1][0] = v14 * v16;
30 f32 v21 = ((v15 * v13) + ((v18 * v17) * v16));
31 f32 v22 = (((v18 * v17) * v13) - (v15 * v16));
34 mtx.mMtx[0][2] = ((v15 * v13) * v17) + (v19 * v16);
35 mtx.mMtx[2][0] = -v17;
36 mtx.mMtx[2][2] = v15 * v14;
37 mtx.mMtx[1][2] = ((v15 * v16) * v17) - (v19 * v13);
39 _90.set<f32>(v22, v21, v20);
41 MR::getObjectName(&mFountainName, rIter);
42 initEffectKeeper(0, mFountainName,
false);
49 MR::addHitSensorMapObj(
this,
"body", 0x10, 300.0f, offs);
50 MR::setClippingTypeSphere(
this, 3500.0f);
51 MR::useStageSwitchReadA(
this, rIter);
52 initNerve(&NrvFountain::HostTypeMove::sInstance);
53 MR::connectToSceneMapObjMovement(
this);
55 if (MR::useStageSwitchReadAppear(
this, rIter)) {
56 MR::syncStageSwitchAppear(
this);
65void Fountain::appear() {
68 if (MR::isValidSwitchA(
this)) {
69 setNerve(&NrvFountain::HostTypeWait::sInstance);
72 setNerve(&NrvFountain::HostTypeMove::sInstance);
76void Fountain::startClipped() {
77 LiveActor::startClipped();
79 if (!isNerve(&NrvFountain::HostTypeWait::sInstance)) {
80 MR::deleteEffectAll(
this);
85void Fountain::endClipped() {
86 LiveActor::endClipped();
88 if (!isNerve(&NrvFountain::HostTypeWait::sInstance)) {
89 MR::emitEffect(
this, mFountainName);
95void Fountain::exeWait() {
96 if (MR::isFirstStep(
this)) {
97 MR::invalidateHitSensor(
this,
"body");
100 if (MR::isOnSwitchA(
this)) {
101 setNerve(&NrvFountain::HostTypeMove::sInstance);
105void Fountain::exeMove() {
106 if (MR::isFirstStep(
this)) {
107 MR::validateHitSensor(
this,
"body");
108 MR::emitEffect(
this, mFountainName);
111 MR::startLevelSound(
this,
"SE_OJ_LV_FOUNTAIN", -1, -1, -1);
114Fountain::~Fountain() {
118namespace NrvFountain {
119 INIT_NERVE(HostTypeWait);
120 INIT_NERVE(HostTypeMove);
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
The basis of a drawable actor that can contain states (see: Nerve)
TVec3f mRotation
3D vector of the actor's rotation.