diff --git a/csv/MapObj.csv b/csv/MapObj.csv index 1f9a06f8..18f723f0 100644 --- a/csv/MapObj.csv +++ b/csv/MapObj.csv @@ -40,53 +40,53 @@ createAirBubbleHolder__2MRFv,AirBubbleHolder.o,MapObj.a,true appearAirBubble__2MRFRCQ29JGeometry8TVec3l,AirBubbleHolder.o,MapObj.a,true __dt__15AirBubbleHolderFv,AirBubbleHolder.o,MapObj.a,false init__15AirBubbleHolderFRC12JMapInfoIter,AirBubbleHolder.o,MapObj.a,false -__ct__11AnmModelObjFPCc,AnmModelObj.o,MapObj.a,false -init__11AnmModelObjFRC12JMapInfoIter,AnmModelObj.o,MapObj.a,false -isDone__11AnmModelObjCFv,AnmModelObj.o,MapObj.a,false -exeMove__11AnmModelObjFv,AnmModelObj.o,MapObj.a,false -exeDone__11AnmModelObjFv,AnmModelObj.o,MapObj.a,false -__ct__18AnmModelSwitchMoveFPCc,AnmModelObj.o,MapObj.a,false -__dt__11AnmModelObjFv,AnmModelObj.o,MapObj.a,false -init__18AnmModelSwitchMoveFRC12JMapInfoIter,AnmModelObj.o,MapObj.a,false -isOnStartAnmTrigger__18AnmModelSwitchMoveCFv,AnmModelObj.o,MapObj.a,false -__ct__20AnmModelGroundOnMoveFPCc,AnmModelObj.o,MapObj.a,false -init__20AnmModelGroundOnMoveFRC12JMapInfoIter,AnmModelObj.o,MapObj.a,false -control__20AnmModelGroundOnMoveFv,AnmModelObj.o,MapObj.a,false -isOnStartAnmTrigger__20AnmModelGroundOnMoveCFv,AnmModelObj.o,MapObj.a,false -__ct__16AnmModelBindMoveFPCc,AnmModelObj.o,MapObj.a,false -init__16AnmModelBindMoveFRC12JMapInfoIter,AnmModelObj.o,MapObj.a,false -control__16AnmModelBindMoveFv,AnmModelObj.o,MapObj.a,false -receiveOtherMsg__16AnmModelBindMoveFUlP9HitSensorP9HitSensor,AnmModelObj.o,MapObj.a,false -isOnStartAnmTrigger__16AnmModelBindMoveCFv,AnmModelObj.o,MapObj.a,false -__ct__29AnmModelSwitchMoveEventCameraFPCc,AnmModelObj.o,MapObj.a,false -__dt__18AnmModelSwitchMoveFv,AnmModelObj.o,MapObj.a,false -init__29AnmModelSwitchMoveEventCameraFRC12JMapInfoIter,AnmModelObj.o,MapObj.a,false -isDone__29AnmModelSwitchMoveEventCameraCFv,AnmModelObj.o,MapObj.a,false -startInner__29AnmModelSwitchMoveEventCameraFv,AnmModelObj.o,MapObj.a,false -stopInner__29AnmModelSwitchMoveEventCameraFv,AnmModelObj.o,MapObj.a,false -__dt__20AnmModelGroundOnMoveFv,AnmModelObj.o,MapObj.a,false -__dt__16AnmModelBindMoveFv,AnmModelObj.o,MapObj.a,false -__dt__29AnmModelSwitchMoveEventCameraFv,AnmModelObj.o,MapObj.a,false -__sinit_\AnmModelObj_cpp,AnmModelObj.o,MapObj.a,false -__ct__Q214NrvAnmModelObj12HostTypeWaitFv,AnmModelObj.o,MapObj.a,false -__ct__Q214NrvAnmModelObj12HostTypeMoveFv,AnmModelObj.o,MapObj.a,false -__ct__Q214NrvAnmModelObj12HostTypeDoneFv,AnmModelObj.o,MapObj.a,false -execute__Q214NrvAnmModelObj12HostTypeDoneCFP5Spine,AnmModelObj.o,MapObj.a,false -execute__Q214NrvAnmModelObj12HostTypeMoveCFP5Spine,AnmModelObj.o,MapObj.a,false -execute__Q214NrvAnmModelObj12HostTypeWaitCFP5Spine,AnmModelObj.o,MapObj.a,false -startInner__11AnmModelObjFv,AnmModelObj.o,MapObj.a,false -moveInner__11AnmModelObjFv,AnmModelObj.o,MapObj.a,false -stopInner__11AnmModelObjFv,AnmModelObj.o,MapObj.a,false -isKilledAtMoveDone__11AnmModelObjCFv,AnmModelObj.o,MapObj.a,false -isRepeat__11AnmModelObjCFv,AnmModelObj.o,MapObj.a,false -control__11AnmModelObjFv,AnmModelObj.o,MapObj.a,false -initCaseNoUseSwitchB__11AnmModelObjFRC19MapObjActorInitInfo,AnmModelObj.o,MapObj.a,false -initCaseUseSwitchB__11AnmModelObjFRC19MapObjActorInitInfo,AnmModelObj.o,MapObj.a,false -initCaseNoUseSwitchA__11AnmModelObjFRC19MapObjActorInitInfo,AnmModelObj.o,MapObj.a,false -initCaseUseSwitchA__11AnmModelObjFRC19MapObjActorInitInfo,AnmModelObj.o,MapObj.a,false -isRepeat__16AnmModelBindMoveCFv,AnmModelObj.o,MapObj.a,false -isKilledAtMoveDone__16AnmModelBindMoveCFv,AnmModelObj.o,MapObj.a,false -isKilledAtMoveDone__20AnmModelGroundOnMoveCFv,AnmModelObj.o,MapObj.a,false +__ct__11AnmModelObjFPCc,AnmModelObj.o,MapObj.a,true +init__11AnmModelObjFRC12JMapInfoIter,AnmModelObj.o,MapObj.a,true +isDone__11AnmModelObjCFv,AnmModelObj.o,MapObj.a,true +exeMove__11AnmModelObjFv,AnmModelObj.o,MapObj.a,true +exeDone__11AnmModelObjFv,AnmModelObj.o,MapObj.a,true +__ct__18AnmModelSwitchMoveFPCc,AnmModelObj.o,MapObj.a,true +__dt__11AnmModelObjFv,AnmModelObj.o,MapObj.a,true +init__18AnmModelSwitchMoveFRC12JMapInfoIter,AnmModelObj.o,MapObj.a,true +isOnStartAnmTrigger__18AnmModelSwitchMoveCFv,AnmModelObj.o,MapObj.a,true +__ct__20AnmModelGroundOnMoveFPCc,AnmModelObj.o,MapObj.a,true +init__20AnmModelGroundOnMoveFRC12JMapInfoIter,AnmModelObj.o,MapObj.a,true +control__20AnmModelGroundOnMoveFv,AnmModelObj.o,MapObj.a,true +isOnStartAnmTrigger__20AnmModelGroundOnMoveCFv,AnmModelObj.o,MapObj.a,true +__ct__16AnmModelBindMoveFPCc,AnmModelObj.o,MapObj.a,true +init__16AnmModelBindMoveFRC12JMapInfoIter,AnmModelObj.o,MapObj.a,true +control__16AnmModelBindMoveFv,AnmModelObj.o,MapObj.a,true +receiveOtherMsg__16AnmModelBindMoveFUlP9HitSensorP9HitSensor,AnmModelObj.o,MapObj.a,true +isOnStartAnmTrigger__16AnmModelBindMoveCFv,AnmModelObj.o,MapObj.a,true +__ct__29AnmModelSwitchMoveEventCameraFPCc,AnmModelObj.o,MapObj.a,true +__dt__18AnmModelSwitchMoveFv,AnmModelObj.o,MapObj.a,true +init__29AnmModelSwitchMoveEventCameraFRC12JMapInfoIter,AnmModelObj.o,MapObj.a,true +isDone__29AnmModelSwitchMoveEventCameraCFv,AnmModelObj.o,MapObj.a,true +startInner__29AnmModelSwitchMoveEventCameraFv,AnmModelObj.o,MapObj.a,true +stopInner__29AnmModelSwitchMoveEventCameraFv,AnmModelObj.o,MapObj.a,true +__dt__20AnmModelGroundOnMoveFv,AnmModelObj.o,MapObj.a,true +__dt__16AnmModelBindMoveFv,AnmModelObj.o,MapObj.a,true +__dt__29AnmModelSwitchMoveEventCameraFv,AnmModelObj.o,MapObj.a,true +__sinit_\AnmModelObj_cpp,AnmModelObj.o,MapObj.a,true +__ct__Q214NrvAnmModelObj12HostTypeWaitFv,AnmModelObj.o,MapObj.a,true +__ct__Q214NrvAnmModelObj12HostTypeMoveFv,AnmModelObj.o,MapObj.a,true +__ct__Q214NrvAnmModelObj12HostTypeDoneFv,AnmModelObj.o,MapObj.a,true +execute__Q214NrvAnmModelObj12HostTypeDoneCFP5Spine,AnmModelObj.o,MapObj.a,true +execute__Q214NrvAnmModelObj12HostTypeMoveCFP5Spine,AnmModelObj.o,MapObj.a,true +execute__Q214NrvAnmModelObj12HostTypeWaitCFP5Spine,AnmModelObj.o,MapObj.a,true +startInner__11AnmModelObjFv,AnmModelObj.o,MapObj.a,true +moveInner__11AnmModelObjFv,AnmModelObj.o,MapObj.a,true +stopInner__11AnmModelObjFv,AnmModelObj.o,MapObj.a,true +isKilledAtMoveDone__11AnmModelObjCFv,AnmModelObj.o,MapObj.a,true +isRepeat__11AnmModelObjCFv,AnmModelObj.o,MapObj.a,true +control__11AnmModelObjFv,AnmModelObj.o,MapObj.a,true +initCaseNoUseSwitchB__11AnmModelObjFRC19MapObjActorInitInfo,AnmModelObj.o,MapObj.a,true +initCaseUseSwitchB__11AnmModelObjFRC19MapObjActorInitInfo,AnmModelObj.o,MapObj.a,true +initCaseNoUseSwitchA__11AnmModelObjFRC19MapObjActorInitInfo,AnmModelObj.o,MapObj.a,true +initCaseUseSwitchA__11AnmModelObjFRC19MapObjActorInitInfo,AnmModelObj.o,MapObj.a,true +isRepeat__16AnmModelBindMoveCFv,AnmModelObj.o,MapObj.a,true +isKilledAtMoveDone__16AnmModelBindMoveCFv,AnmModelObj.o,MapObj.a,true +isKilledAtMoveDone__20AnmModelGroundOnMoveCFv,AnmModelObj.o,MapObj.a,true __ct__11ArrowSwitchFPCc,ArrowSwitch.o,MapObj.a,true init__11ArrowSwitchFRC12JMapInfoIter,ArrowSwitch.o,MapObj.a,true control__11ArrowSwitchFv,ArrowSwitch.o,MapObj.a,true diff --git a/data/Game.json b/data/Game.json index 76203c8c..eb5a7f05 100644 --- a/data/Game.json +++ b/data/Game.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, "label": "Game", - "message": "13.94%", + "message": "14.012%", "color": "blue" } \ No newline at end of file diff --git a/data/json/MapObj.json b/data/json/MapObj.json index 7aaa7907..7e86ee2c 100644 --- a/data/json/MapObj.json +++ b/data/json/MapObj.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, "label": "MapObj", - "message": "29.032%", + "message": "29.421%", "color": "tan" } \ No newline at end of file diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md index dd5ac732..65fe4a6d 100644 --- a/docs/PROGRESS.md +++ b/docs/PROGRESS.md @@ -12,7 +12,7 @@ | [Gravity](https://github.com/shibbo/Petari/blob/master/docs/lib/Gravity.md) | 73.07927450580803% | | [LiveActor](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor.md) | 42.01936376210235% | | [Map](https://github.com/shibbo/Petari/blob/master/docs/lib/Map.md) | 17.65918333240488% | -| [MapObj](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj.md) | 29.032023213969982% | +| [MapObj](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj.md) | 29.421002818542053% | | [NameObj](https://github.com/shibbo/Petari/blob/master/docs/lib/NameObj.md) | 32.66059773273789% | | [NPC](https://github.com/shibbo/Petari/blob/master/docs/lib/NPC.md) | 2.155878467635403% | | [NWC24](https://github.com/shibbo/Petari/blob/master/docs/lib/NWC24.md) | 0.0% | diff --git a/docs/lib/MapObj.md b/docs/lib/MapObj.md index 16e99ec8..106f0b51 100644 --- a/docs/lib/MapObj.md +++ b/docs/lib/MapObj.md @@ -11,7 +11,7 @@ | [AirBubble.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/AirBubble.md) | 66.18122977346277% | 21 / 23 | 91.30434782608695% | :eight_pointed_black_star: | [AirBubbleGenerator.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/AirBubbleGenerator.md) | 72.68722466960352% | 10 / 11 | 90.9090909090909% | :eight_pointed_black_star: | [AirBubbleHolder.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/AirBubbleHolder.md) | 44.05594405594406% | 4 / 7 | 57.14285714285714% | :eight_pointed_black_star: -| [AnmModelObj.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/AnmModelObj.md) | 0.0% | 0 / 47 | 0.0% | :x: +| [AnmModelObj.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/AnmModelObj.md) | 100.0% | 47 / 47 | 100.0% | :white_check_mark: | [ArrowSwitch.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/ArrowSwitch.md) | 83.86727688787185% | 25 / 27 | 92.5925925925926% | :eight_pointed_black_star: | [ArrowSwitchMulti.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/ArrowSwitchMulti.md) | 82.25255972696246% | 20 / 21 | 95.23809523809523% | :eight_pointed_black_star: | [ArrowSwitchMultiHolder.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/ArrowSwitchMultiHolder.md) | 100.0% | 7 / 7 | 100.0% | :white_check_mark: diff --git a/docs/lib/MapObj/AnmModelObj.md b/docs/lib/MapObj/AnmModelObj.md index 567fa405..da41059d 100644 --- a/docs/lib/MapObj/AnmModelObj.md +++ b/docs/lib/MapObj/AnmModelObj.md @@ -5,54 +5,54 @@ | :white_check_mark: | Function is completed. -# 0 / 47 Completed -- (0.0%) +# 47 / 47 Completed -- (100.0%) # AnmModelObj.o | Symbol | Decompiled? | | ------------- | ------------- | -| `__ct__11AnmModelObjFPCc` | :x: | -| `init__11AnmModelObjFRC12JMapInfoIter` | :x: | -| `isDone__11AnmModelObjCFv` | :x: | -| `exeMove__11AnmModelObjFv` | :x: | -| `exeDone__11AnmModelObjFv` | :x: | -| `__ct__18AnmModelSwitchMoveFPCc` | :x: | -| `__dt__11AnmModelObjFv` | :x: | -| `init__18AnmModelSwitchMoveFRC12JMapInfoIter` | :x: | -| `isOnStartAnmTrigger__18AnmModelSwitchMoveCFv` | :x: | -| `__ct__20AnmModelGroundOnMoveFPCc` | :x: | -| `init__20AnmModelGroundOnMoveFRC12JMapInfoIter` | :x: | -| `control__20AnmModelGroundOnMoveFv` | :x: | -| `isOnStartAnmTrigger__20AnmModelGroundOnMoveCFv` | :x: | -| `__ct__16AnmModelBindMoveFPCc` | :x: | -| `init__16AnmModelBindMoveFRC12JMapInfoIter` | :x: | -| `control__16AnmModelBindMoveFv` | :x: | -| `receiveOtherMsg__16AnmModelBindMoveFUlP9HitSensorP9HitSensor` | :x: | -| `isOnStartAnmTrigger__16AnmModelBindMoveCFv` | :x: | -| `__ct__29AnmModelSwitchMoveEventCameraFPCc` | :x: | -| `__dt__18AnmModelSwitchMoveFv` | :x: | -| `init__29AnmModelSwitchMoveEventCameraFRC12JMapInfoIter` | :x: | -| `isDone__29AnmModelSwitchMoveEventCameraCFv` | :x: | -| `startInner__29AnmModelSwitchMoveEventCameraFv` | :x: | -| `stopInner__29AnmModelSwitchMoveEventCameraFv` | :x: | -| `__dt__20AnmModelGroundOnMoveFv` | :x: | -| `__dt__16AnmModelBindMoveFv` | :x: | -| `__dt__29AnmModelSwitchMoveEventCameraFv` | :x: | -| `__sinit_\AnmModelObj_cpp` | :x: | -| `__ct__Q214NrvAnmModelObj12HostTypeWaitFv` | :x: | -| `__ct__Q214NrvAnmModelObj12HostTypeMoveFv` | :x: | -| `__ct__Q214NrvAnmModelObj12HostTypeDoneFv` | :x: | -| `execute__Q214NrvAnmModelObj12HostTypeDoneCFP5Spine` | :x: | -| `execute__Q214NrvAnmModelObj12HostTypeMoveCFP5Spine` | :x: | -| `execute__Q214NrvAnmModelObj12HostTypeWaitCFP5Spine` | :x: | -| `startInner__11AnmModelObjFv` | :x: | -| `moveInner__11AnmModelObjFv` | :x: | -| `stopInner__11AnmModelObjFv` | :x: | -| `isKilledAtMoveDone__11AnmModelObjCFv` | :x: | -| `isRepeat__11AnmModelObjCFv` | :x: | -| `control__11AnmModelObjFv` | :x: | -| `initCaseNoUseSwitchB__11AnmModelObjFRC19MapObjActorInitInfo` | :x: | -| `initCaseUseSwitchB__11AnmModelObjFRC19MapObjActorInitInfo` | :x: | -| `initCaseNoUseSwitchA__11AnmModelObjFRC19MapObjActorInitInfo` | :x: | -| `initCaseUseSwitchA__11AnmModelObjFRC19MapObjActorInitInfo` | :x: | -| `isRepeat__16AnmModelBindMoveCFv` | :x: | -| `isKilledAtMoveDone__16AnmModelBindMoveCFv` | :x: | -| `isKilledAtMoveDone__20AnmModelGroundOnMoveCFv` | :x: | +| `__ct__11AnmModelObjFPCc` | :white_check_mark: | +| `init__11AnmModelObjFRC12JMapInfoIter` | :white_check_mark: | +| `isDone__11AnmModelObjCFv` | :white_check_mark: | +| `exeMove__11AnmModelObjFv` | :white_check_mark: | +| `exeDone__11AnmModelObjFv` | :white_check_mark: | +| `__ct__18AnmModelSwitchMoveFPCc` | :white_check_mark: | +| `__dt__11AnmModelObjFv` | :white_check_mark: | +| `init__18AnmModelSwitchMoveFRC12JMapInfoIter` | :white_check_mark: | +| `isOnStartAnmTrigger__18AnmModelSwitchMoveCFv` | :white_check_mark: | +| `__ct__20AnmModelGroundOnMoveFPCc` | :white_check_mark: | +| `init__20AnmModelGroundOnMoveFRC12JMapInfoIter` | :white_check_mark: | +| `control__20AnmModelGroundOnMoveFv` | :white_check_mark: | +| `isOnStartAnmTrigger__20AnmModelGroundOnMoveCFv` | :white_check_mark: | +| `__ct__16AnmModelBindMoveFPCc` | :white_check_mark: | +| `init__16AnmModelBindMoveFRC12JMapInfoIter` | :white_check_mark: | +| `control__16AnmModelBindMoveFv` | :white_check_mark: | +| `receiveOtherMsg__16AnmModelBindMoveFUlP9HitSensorP9HitSensor` | :white_check_mark: | +| `isOnStartAnmTrigger__16AnmModelBindMoveCFv` | :white_check_mark: | +| `__ct__29AnmModelSwitchMoveEventCameraFPCc` | :white_check_mark: | +| `__dt__18AnmModelSwitchMoveFv` | :white_check_mark: | +| `init__29AnmModelSwitchMoveEventCameraFRC12JMapInfoIter` | :white_check_mark: | +| `isDone__29AnmModelSwitchMoveEventCameraCFv` | :white_check_mark: | +| `startInner__29AnmModelSwitchMoveEventCameraFv` | :white_check_mark: | +| `stopInner__29AnmModelSwitchMoveEventCameraFv` | :white_check_mark: | +| `__dt__20AnmModelGroundOnMoveFv` | :white_check_mark: | +| `__dt__16AnmModelBindMoveFv` | :white_check_mark: | +| `__dt__29AnmModelSwitchMoveEventCameraFv` | :white_check_mark: | +| `__sinit_\AnmModelObj_cpp` | :white_check_mark: | +| `__ct__Q214NrvAnmModelObj12HostTypeWaitFv` | :white_check_mark: | +| `__ct__Q214NrvAnmModelObj12HostTypeMoveFv` | :white_check_mark: | +| `__ct__Q214NrvAnmModelObj12HostTypeDoneFv` | :white_check_mark: | +| `execute__Q214NrvAnmModelObj12HostTypeDoneCFP5Spine` | :white_check_mark: | +| `execute__Q214NrvAnmModelObj12HostTypeMoveCFP5Spine` | :white_check_mark: | +| `execute__Q214NrvAnmModelObj12HostTypeWaitCFP5Spine` | :white_check_mark: | +| `startInner__11AnmModelObjFv` | :white_check_mark: | +| `moveInner__11AnmModelObjFv` | :white_check_mark: | +| `stopInner__11AnmModelObjFv` | :white_check_mark: | +| `isKilledAtMoveDone__11AnmModelObjCFv` | :white_check_mark: | +| `isRepeat__11AnmModelObjCFv` | :white_check_mark: | +| `control__11AnmModelObjFv` | :white_check_mark: | +| `initCaseNoUseSwitchB__11AnmModelObjFRC19MapObjActorInitInfo` | :white_check_mark: | +| `initCaseUseSwitchB__11AnmModelObjFRC19MapObjActorInitInfo` | :white_check_mark: | +| `initCaseNoUseSwitchA__11AnmModelObjFRC19MapObjActorInitInfo` | :white_check_mark: | +| `initCaseUseSwitchA__11AnmModelObjFRC19MapObjActorInitInfo` | :white_check_mark: | +| `isRepeat__16AnmModelBindMoveCFv` | :white_check_mark: | +| `isKilledAtMoveDone__16AnmModelBindMoveCFv` | :white_check_mark: | +| `isKilledAtMoveDone__20AnmModelGroundOnMoveCFv` | :white_check_mark: | diff --git a/include/Game/MapObj/AnmModelObj.hpp b/include/Game/MapObj/AnmModelObj.hpp index bc1e37fb..39b91dfe 100644 --- a/include/Game/MapObj/AnmModelObj.hpp +++ b/include/Game/MapObj/AnmModelObj.hpp @@ -2,12 +2,6 @@ #include "Game/MapObj/MapObjActor.hpp" -namespace { - const char* cFollowJointName = "Move"; - const char* cAnimFileName = "Move"; - const char* cEndLoopEffectName = "EndLoop"; -}; - class AnmModelObj : public MapObjActor { public: AnmModelObj(const char *); @@ -27,7 +21,61 @@ public: virtual void moveInner(); virtual void stopInner(); + inline void exeWait(); void exeMove(); void exeDone(); + TVec3f mJointPos; // _C4 +}; + +class AnmModelSwitchMove : public AnmModelObj { +public: + AnmModelSwitchMove(const char *); + + virtual ~AnmModelSwitchMove(); + virtual void init(const JMapInfoIter &); + virtual bool isOnStartAnmTrigger() const; +}; + +class AnmModelGroundOnMove : public AnmModelObj { +public: + AnmModelGroundOnMove(const char *); + + virtual ~AnmModelGroundOnMove(); + virtual void init(const JMapInfoIter &); + virtual void control(); + virtual bool isOnStartAnmTrigger() const; + virtual bool isKilledAtMoveDone() const; +}; + +class AnmModelBindMove : public AnmModelObj { +public: + AnmModelBindMove(const char *); + + virtual ~AnmModelBindMove(); + virtual void init(const JMapInfoIter &); + virtual void control(); + virtual bool receiveOtherMsg(u32, HitSensor *, HitSensor *); + virtual bool isOnStartAnmTrigger() const; + virtual bool isKilledAtMoveDone() const; + virtual bool isRepeat() const; +}; + +class AnmModelSwitchMoveEventCamera : public AnmModelSwitchMove { +public: + AnmModelSwitchMoveEventCamera(const char *); + + virtual ~AnmModelSwitchMoveEventCamera(); + virtual void init(const JMapInfoIter &); + virtual bool isDone() const; + virtual void startInner(); + virtual void stopInner(); + + ActorCameraInfo* mCameraInfo; // _D0 +}; + +namespace NrvAnmModelObj { + NERVE_DECL(HostTypeWait, AnmModelObj, AnmModelObj::exeWait); + NERVE_DECL(HostTypeMove, AnmModelObj, AnmModelObj::exeMove); + NERVE_DECL(HostTypeDone, AnmModelObj, AnmModelObj::exeDone); }; \ No newline at end of file diff --git a/include/Game/MapObj/MapParts.hpp b/include/Game/MapObj/MapParts.hpp index e733af23..579c1c1f 100644 --- a/include/Game/MapObj/MapParts.hpp +++ b/include/Game/MapObj/MapParts.hpp @@ -2,10 +2,6 @@ #include "Game/LiveActor/LiveActor.hpp" -namespace { - const char* cFollowjointName = "Move"; -}; - class MapParts : public LiveActor { public: MapParts(const char *); diff --git a/include/Game/MapObj/StageEffectDataTable.hpp b/include/Game/MapObj/StageEffectDataTable.hpp index 2354213e..c042cab8 100644 --- a/include/Game/MapObj/StageEffectDataTable.hpp +++ b/include/Game/MapObj/StageEffectDataTable.hpp @@ -204,10 +204,12 @@ namespace MR { static bool isExistStageEffectData(const char *); + static void rumblePadMoving(LiveActor *, const char *); static void rumblePadStart(LiveActor *, const char *); static void rumblePadStop(LiveActor *, const char *); static void shakeCameraMoving(NameObj *, const char *); + static void shakeStopCamera(LiveActor *, const char *); static void stopShakingCameraMoving(NameObj *, const char *); }; }; \ No newline at end of file diff --git a/include/Game/Util/LiveActorUtil.hpp b/include/Game/Util/LiveActorUtil.hpp index b1f5a1b3..cddbfb16 100644 --- a/include/Game/Util/LiveActorUtil.hpp +++ b/include/Game/Util/LiveActorUtil.hpp @@ -291,6 +291,7 @@ namespace MR { CollisionParts* createCollisionPartsFromLiveActor(LiveActor *, const char *, HitSensor *, MtxPtr, CollisionScaleType); bool isBinded(const LiveActor *); + bool isBinded(const LiveActor *, HitSensor *); bool isBindedGround(const LiveActor *); bool isBindedWall(const LiveActor *); diff --git a/include/Game/Util/PlayerUtil.hpp b/include/Game/Util/PlayerUtil.hpp index e2a02820..36990c1e 100644 --- a/include/Game/Util/PlayerUtil.hpp +++ b/include/Game/Util/PlayerUtil.hpp @@ -108,4 +108,6 @@ namespace MR { bool isBckStoppedPlayer(); f64 getBckFrameMaxPlayer(); + + LiveActor* getCurrentRushActor(); }; diff --git a/source/Game/MapObj/AnmModelObj.cpp b/source/Game/MapObj/AnmModelObj.cpp new file mode 100644 index 00000000..3caaa8ae --- /dev/null +++ b/source/Game/MapObj/AnmModelObj.cpp @@ -0,0 +1,305 @@ +#include "Game/MapObj/AnmModelObj.hpp" +#include "Game/MapObj/StageEffectDataTable.hpp" + +namespace { + const char* cFollowjointName = "Move"; + const char* cAnimFileName = "Move"; + const char* cEndLoopEffectName = "EndLoop"; +}; + +AnmModelObj::AnmModelObj(const char *pName) : MapObjActor(pName) { + mJointPos.x = 0.0f; + mJointPos.y = 0.0f; + mJointPos.z = 0.0f; +} + +void AnmModelObj::init(const JMapInfoIter &rIter) { + MapObjActor::init(rIter); + MapObjActorInitInfo info; + MapObjActorUtil::setupInitInfoSimpleMapObj(&info); + info.setupNerve(&NrvAnmModelObj::HostTypeWait::sInstance); + MapObjActorUtil::setupInitInfoTypical(&info, mObjectName); + initialize(rIter, info); + + if (MR::isExistJoint(this, cFollowjointName)) { + MR::copyJointPos(this, cFollowjointName, &mJointPos); + } + else { + mJointPos.set(mPosition); + } + + f32 boundRadius; + MR::calcModelBoundingRadius(&boundRadius, this); + MR::setClippingTypeSphere(this, boundRadius, &mJointPos); +} + +bool AnmModelObj::isDone() const { + return MR::isBckOneTimeAndStopped(this); +} + +void AnmModelObj::exeMove() { + if (MR::isFirstStep(this)) { + MR::tryStartAllAnim(this, cAnimFileName); + MR::StageEffect::tryStageEffectStart(this, mObjectName); + MR::StageEffect::shakeCameraMoving(this, mObjectName); + startInner(); + } + + s32 steps = MR::StageEffect::getStopSeSteps(mObjectName); + const char* movingSE = MR::StageEffect::getMovingSe(mObjectName); + if (movingSE != nullptr) { + if (steps > 0) { + if (MR::isLessStep(this, steps)) { + MR::startLevelSound(this, movingSE, -1, -1, -1); + } + } + else { + MR::startLevelSound(this, movingSE, -1, -1, -1); + } + } + + const char* stopSE = MR::StageEffect::getStopSe(mObjectName); + + if (stopSE != nullptr) { + if (steps >= 0) { + if (MR::isStep(this, steps)) { + MR::startSound(this, stopSE, -1, -1); + if (MR::StageEffect::isRiddleSeTypeStop(mObjectName)) { + MR::startSystemSE("SE_SY_READ_RIDDLE_S", -1, -1); + } + } + } + } + + MR::StageEffect::rumblePadMoving(this, mObjectName); + moveInner(); + if (MR::isExistJoint(this, cFollowjointName)) { + MR::copyJointPos(this, cFollowjointName, &mJointPos); + } + else { + mJointPos.set(mPosition); + } + + if (isDone()) { + MR::StageEffect::rumblePadStop(this, mObjectName); + MR::StageEffect::shakeStopCamera(this, mObjectName); + MR::StageEffect::stopShakingCameraMoving(this, mObjectName); + stopInner(); + + if (isKilledAtMoveDone()) { + kill(); + } + else if (isRepeat()) { + setNerve(&NrvAnmModelObj::HostTypeWait::sInstance); + } + else { + setNerve(&NrvAnmModelObj::HostTypeDone::sInstance); + } + } +} + +void AnmModelObj::exeDone() { + if (MR::isFirstStep(this) && MR::isRegisteredEffect(this, cEndLoopEffectName)) { + MR::emitEffect(this, cEndLoopEffectName); + } + + if (MR::isEqualString(mObjectName, "HeavenlyBeachUnderRock")) { + const char* movingSE = MR::StageEffect::getMovingSe(mObjectName); + + if (movingSE) { + MR::startLevelSound(this, movingSE, -1, -1, -1); + } + } +} + +void AnmModelObj::exeWait() { + if (isOnStartAnmTrigger()) { + setNerve(&NrvAnmModelObj::HostTypeMove::sInstance); + } +} + +AnmModelSwitchMove::AnmModelSwitchMove(const char *pName) : AnmModelObj(pName) { + +} + +AnmModelObj::~AnmModelObj() { + +} + +void AnmModelSwitchMove::init(const JMapInfoIter &rIter) { + AnmModelObj::init(rIter); + + if (MR::isDemoCast(this, nullptr)) { + if (MR::tryRegisterDemoActionNerve(this, &NrvAnmModelObj::HostTypeMove::sInstance, nullptr)) { + setNerve(&NrvAnmModelObj::HostTypeWait::sInstance); + } + } +} + +bool AnmModelSwitchMove::isOnStartAnmTrigger() const { + if (MR::isDemoCast(this, nullptr) && MR::isRegisteredDemoActionNerve(this)) { + return false; + } + + if (!MR::isValidSwitchA(this)) { + return true; + } + + return MR::isOnSwitchA(this); +} + +AnmModelGroundOnMove::AnmModelGroundOnMove(const char *pName) : AnmModelObj(pName) { + +} + +void AnmModelGroundOnMove::init(const JMapInfoIter &rIter) { + AnmModelObj::init(rIter); + MR::useStageSwitchWriteB(this, rIter); +} + +void AnmModelGroundOnMove::control() { + if (MR::isValidSwitchB(this) && isNerve(&NrvAnmModelObj::HostTypeMove::sInstance) && MR::isFirstStep(this) && !MR::isOnSwitchB(this)) { + MR::onSwitchB(this); + } +} + +bool AnmModelGroundOnMove::isOnStartAnmTrigger() const { + return MR::isOnPlayer(getSensor("body")); +} + +AnmModelBindMove::AnmModelBindMove(const char *pName) : AnmModelObj(pName) { + +} + +void AnmModelBindMove::init(const JMapInfoIter &rIter) { + AnmModelObj::init(rIter); + MR::useStageSwitchWriteB(this, rIter); +} + +void AnmModelBindMove::control() { + if (MR::isValidSwitchB(this) && isNerve(&NrvAnmModelObj::HostTypeMove::sInstance) && MR::isFirstStep(this) && !MR::isOnSwitchB(this)) { + MR::onSwitchB(this); + } +} + +bool AnmModelBindMove::receiveOtherMsg(u32 msg, HitSensor *, HitSensor *) { + return msg == 196; +} + +bool AnmModelBindMove::isOnStartAnmTrigger() const { + LiveActor* rush = MR::getCurrentRushActor(); + + if (rush != nullptr) { + return MR::isBinded(rush, getSensor("body")); + } + + return false; +} + +AnmModelSwitchMoveEventCamera::AnmModelSwitchMoveEventCamera(const char *pName) : AnmModelSwitchMove(pName) { + mCameraInfo = nullptr; +} + +AnmModelSwitchMove::~AnmModelSwitchMove() { + +} + +void AnmModelSwitchMoveEventCamera::init(const JMapInfoIter &rIter) { + AnmModelObj::init(rIter); + if (MR::isDemoCast(this, nullptr) && MR::tryRegisterDemoActionNerve(this, &NrvAnmModelObj::HostTypeMove::sInstance, nullptr)) { + setNerve(&NrvAnmModelObj::HostTypeWait::sInstance); + } + + MR::initActorCamera(this, rIter, &mCameraInfo); +} + +bool AnmModelSwitchMoveEventCamera::isDone() const { + ActorCameraInfo* info = mCameraInfo; + if (info == nullptr) { + return MR::isBckOneTimeAndStopped(this); + } + + s32 frames = MR::getActorCameraFrames(this, info); + if (frames <= 0) { + return MR::isBckOneTimeAndStopped(this); + } + else { + return MR::isGreaterEqualStep(this, frames); + } +} + +void AnmModelSwitchMoveEventCamera::startInner() { + if (mCameraInfo != nullptr) { + MR::startActorCameraNoTarget(this, mCameraInfo, -1); + } +} + +void AnmModelSwitchMoveEventCamera::stopInner() { + MR::endActorCamera(this, mCameraInfo, false, -1); +} + +AnmModelGroundOnMove::~AnmModelGroundOnMove() { + +} + +AnmModelBindMove::~AnmModelBindMove() { + +} + +AnmModelSwitchMoveEventCamera::~AnmModelSwitchMoveEventCamera() { + +} + +namespace NrvAnmModelObj { + INIT_NERVE(HostTypeWait); + INIT_NERVE(HostTypeMove); + INIT_NERVE(HostTypeDone); +}; + +void AnmModelObj::startInner() { + +} + +void AnmModelObj::stopInner() { + +} + +bool AnmModelObj::isKilledAtMoveDone() const { + return false; +} + +bool AnmModelObj::isRepeat() const { + return false; +} + +void AnmModelObj::control() { + +} + +void AnmModelObj::initCaseNoUseSwitchB(const MapObjActorInitInfo &) { + +} + +void AnmModelObj::initCaseUseSwitchB(const MapObjActorInitInfo &) { + +} + +void AnmModelObj::initCaseNoUseSwitchA(const MapObjActorInitInfo &) { + +} + +void AnmModelObj::initCaseUseSwitchA(const MapObjActorInitInfo &) { + +} + +bool AnmModelBindMove::isRepeat() const { + return true; +} + +bool AnmModelBindMove::isKilledAtMoveDone() const { + return false; +} + +bool AnmModelGroundOnMove::isKilledAtMoveDone() const { + return true; +} \ No newline at end of file diff --git a/source/Game/MapObj/MapParts.cpp b/source/Game/MapObj/MapParts.cpp index 5ce74ac5..06970609 100644 --- a/source/Game/MapObj/MapParts.cpp +++ b/source/Game/MapObj/MapParts.cpp @@ -2,6 +2,10 @@ #include "JSystem/JMath/JMath.hpp" #include "math_types.hpp" +namespace { + const char* cFollowjointName = "Move"; +}; + MapParts::~MapParts() { } diff --git a/source/Game/NameObj/NameObjHolder.cpp b/source/Game/NameObj/NameObjHolder.cpp index 0dc5fb10..c183b45c 100644 --- a/source/Game/NameObj/NameObjHolder.cpp +++ b/source/Game/NameObj/NameObjHolder.cpp @@ -38,6 +38,7 @@ void NameObjHolder::callMethodAllObj(func functionPtr) { NameObj** start = mObjs; NameObj** end = &mObjs[mObjCount]; + function = functionPtr; while (start != end) { (*start->*function)();