| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <container/seadPtrArray.h> |
| 4 | |
| 5 | #include "Library/LiveActor/LiveActor.h" |
| 6 | |
| 7 | class ElectricWire; |
| 8 | |
| 9 | namespace al { |
| 10 | class CameraTicket; |
| 11 | class CameraTicketId; |
| 12 | class CameraPoser; |
| 13 | class PlacementInfo; |
| 14 | } // namespace al |
| 15 | |
| 16 | class ElectricWireRailKeeper : public al::LiveActor { |
| 17 | public: |
| 18 | enum class PosType : u32 { NONE, HEAD, BOTTOM }; |
| 19 | |
| 20 | struct TicketHolder { |
| 21 | al::CameraTicket* ticket; |
| 22 | al::CameraTicket* ticketHackEnd; |
| 23 | s32 pointIdx; |
| 24 | }; |
| 25 | |
| 26 | ElectricWireRailKeeper(const char* name); |
| 27 | ElectricWireRailKeeper(const char* name, al::LiveActor* wire); |
| 28 | |
| 29 | void init(const al::ActorInitInfo& info) override; |
| 30 | void appear() override; |
| 31 | void kill() override; |
| 32 | |
| 33 | bool isRailPointFaceToCameraDir(s32 index) const; |
| 34 | bool isRailPointPlacementPole(s32 index) const; |
| 35 | bool isRailPointEnableTargetEndCollision(s32 index) const; |
| 36 | bool isRailPointIgnore(s32 index) const; |
| 37 | bool isRailPointSpringFix(s32 index) const; |
| 38 | bool isRailPointIsNeedCamera(s32 index) const; |
| 39 | bool isRailPointIsNeedStartCameraHackEnd(s32 index) const; |
| 40 | bool isRailPointIsExpandRailSelectableAngle(s32 index) const; |
| 41 | bool isRailPointIsDisplayPointModelForce(s32 index) const; |
| 42 | bool tryGetRailPointOutDir(sead::Vector3f* out, s32 index) const; |
| 43 | bool tryGetRailPointDestinationTrans(sead::Vector3f* out, s32 index) const; |
| 44 | bool tryGetRailPointFastenerMoveLimitAreaFlag(s32* out, s32 index) const; |
| 45 | al::CameraTicket* findRailPointCameraTicket(s32 pointIdx) const; |
| 46 | const al::CameraTicket* findRailPointStartCameraHackEndTicket(s32 pointIdx) const; |
| 47 | bool tryGetPlayerHeadPosOnVerticalMove(sead::Vector3f* playerHeadPos) const; |
| 48 | bool tryGetPlayerBottomPosOnVerticalMove(sead::Vector3f* playerBottomPos) const; |
| 49 | void endCameraIfActive(); |
| 50 | al::PlacementInfo* getRailPointInfo(s32 index) const; |
| 51 | void appearBySwitch(); |
| 52 | void killBySwitch(); |
| 53 | void exeStandby(); |
| 54 | void exeWait(); |
| 55 | bool isNerveStandby() const; |
| 56 | |
| 57 | private: |
| 58 | ElectricWire* mElectricWire = nullptr; |
| 59 | f32 mUnused = 75; |
| 60 | bool mIsShowLine = true; |
| 61 | bool mIsThrowaway = false; |
| 62 | PosType mPosType = PosType::NONE; |
| 63 | sead::Vector3f mPlayerPosOnVerticalMove = sead::Vector3f::zero; |
| 64 | sead::PtrArray<TicketHolder> mCameraTickets{}; |
| 65 | }; |
| 66 | |
| 67 | static_assert(sizeof(ElectricWireRailKeeper) == 0x138); |
| 68 |