| 1 | #pragma once |
| 2 | |
| 3 | #include <basis/seadTypes.h> |
| 4 | #include <math/seadQuat.h> |
| 5 | #include <math/seadVector.h> |
| 6 | |
| 7 | #include "Library/LiveActor/LiveActor.h" |
| 8 | |
| 9 | namespace al { |
| 10 | struct ActorInitInfo; |
| 11 | class HitSensor; |
| 12 | class IUseNerve; |
| 13 | class MtxConnector; |
| 14 | } // namespace al |
| 15 | |
| 16 | class CoinStateAppearRotate; |
| 17 | class CoinRotateCalculator; |
| 18 | class WaterSurfaceShadow; |
| 19 | class SaveObjInfo; |
| 20 | class ExternalForceKeeper; |
| 21 | |
| 22 | class Coin : public al::LiveActor { |
| 23 | public: |
| 24 | Coin(const char* name, bool isDemo = false); |
| 25 | |
| 26 | void init(const al::ActorInitInfo& initInfo) override; |
| 27 | void initAfterPlacement() override; |
| 28 | void appear() override; |
| 29 | void makeActorAlive() override; |
| 30 | void control() override; |
| 31 | void endClipped() override; |
| 32 | bool receiveMsg(const al::SensorMsg* message, al::HitSensor* other, |
| 33 | al::HitSensor* self) override; |
| 34 | |
| 35 | void tryCreateMtxConnector(); |
| 36 | void appearCirclePlacement(); |
| 37 | void (bool startHitReaction); |
| 38 | void (); |
| 39 | void (); |
| 40 | void (); |
| 41 | void appearAbove(); |
| 42 | void appearCountUpCommon(sead::Vector3f* velocity, s32 delay); |
| 43 | void appearCountUp(); |
| 44 | void appearCountUpFiveCount(); |
| 45 | void appearCountUp3(s32 coinIndex); |
| 46 | void appearCountUp5(s32 coinIndex); |
| 47 | void appearCountUp10(s32 coinIndex); |
| 48 | void appearCountUpFixPos10(s32 coinIndex); |
| 49 | void appearCoinRail(); |
| 50 | void appearCoinChameleon(const sead::Vector3f& trans, const sead::Quatf& quat, |
| 51 | const sead::Vector3f& position); |
| 52 | void appearLimitTime(s32 timeLimit); |
| 53 | void appearBlow(const sead::Vector3f& velocity, s32 delayTime); |
| 54 | void rotate(); |
| 55 | void appearBlowUpCommon(s32 delayTime, f32 horizontalForce, f32 verticalForce, s32 coinCount, |
| 56 | s32 coinIndex); |
| 57 | void appearBlowUp(s32 coinIndex, s32 coinCount); |
| 58 | void appearBlowUpLittle(s32 coinIndex, s32 coinCount); |
| 59 | void appearFall(const sead::Vector3f& velocity, s32 timeLimit); |
| 60 | void appearPlayerDead(const sead::Vector3f& position, const sead::Vector3f& direction, |
| 61 | bool isInWater, bool isTimeBalloon); |
| 62 | void appearPlayerDeadReplace(const sead::Vector3f& position); |
| 63 | void setShadowDropLength(f32 shadowLength); |
| 64 | void get(); |
| 65 | |
| 66 | bool isGot() const; |
| 67 | bool isGotOrRotate() const; |
| 68 | bool isWait() const; |
| 69 | bool isAnyWaitOrAppear() const; |
| 70 | |
| 71 | void exeAppear(); |
| 72 | void exeAppearCoinLead(); |
| 73 | void (); |
| 74 | void exeCountUpDelay(); |
| 75 | void exeCountUp(); |
| 76 | void exeWait(); |
| 77 | void exeWaitOnDemoEnd(); |
| 78 | void exeGot(); |
| 79 | void exeBlowUpDelay(); |
| 80 | |
| 81 | void setMtxConnector(al::MtxConnector* mtxConnector) { mMtxConnector = mtxConnector; } |
| 82 | |
| 83 | private: |
| 84 | CoinStateAppearRotate* mStateAppearRotate = nullptr; |
| 85 | sead::Vector3f mDisplayOffset = sead::Vector3f::zero; |
| 86 | sead::Quatf mStartingQuat = sead::Quatf::unit; |
| 87 | al::MtxConnector* mMtxConnector = nullptr; |
| 88 | bool mIsConnectToCollisionBack = false; |
| 89 | s32 mTimeLimit = -1; |
| 90 | sead::Vector3f mChameleonOffset = sead::Vector3f::zero; |
| 91 | ExternalForceKeeper* mExternalForceKeeper = nullptr; |
| 92 | CoinRotateCalculator* mRotateCalculator = nullptr; |
| 93 | bool mIsPlaced = false; |
| 94 | f32 mShadowSize = 0.0f; |
| 95 | sead::Vector3f mPoseTrans = sead::Vector3f::zero; |
| 96 | sead::Quatf mPoseQuat = sead::Quatf::unit; |
| 97 | WaterSurfaceShadow* mWaterSurfaceShadow = nullptr; |
| 98 | s32 mCountUpDelay = 0; |
| 99 | sead::Vector3f mBlowVelocity = sead::Vector3f::zero; |
| 100 | SaveObjInfo* mSaveObjInfo = nullptr; |
| 101 | bool mIsDemo; |
| 102 | }; |
| 103 | |
| 104 | namespace CoinFunction { |
| 105 | |
| 106 | const sead::Vector3f& getAppearAboveVelocity(); |
| 107 | void appearCoinBlowVeryLittle(Coin* coin, const sead::Vector3f& direction); |
| 108 | void appearCoinBlowLittle(Coin* coin, const sead::Vector3f& direction); |
| 109 | void appearCoinBlowMiddle(Coin* coin, const sead::Vector3f& direction); |
| 110 | void appearCoinBlowLarge(Coin* coin, const sead::Vector3f& direction); |
| 111 | void appearCoinBlowLargeEnemy(Coin* coin, const sead::Vector3f& direction); |
| 112 | void appearCoinBlowBoss(Coin* coin, const sead::Vector3f& direction); |
| 113 | void appearCoinBlowGk(Coin* coin, const sead::Vector3f& direction); |
| 114 | |
| 115 | } // namespace CoinFunction |
| 116 | |