mirror of
https://github.com/SMGCommunity/Petari.git
synced 2024-11-23 13:40:02 +00:00
BossKameck.o
93%
This commit is contained in:
parent
7dc050e46b
commit
156ed89634
62
csv/Boss.csv
62
csv/Boss.csv
@ -131,39 +131,39 @@ __dt__40JointControlDelegator<15BossBegomanHead>Fv,BossBegomanHead.o,Boss.a,true
|
||||
calcJointMatrix__40JointControlDelegator<15BossBegomanHead>FPQ29JGeometry64TPosition3<Q29JGeometry38TMatrix34<Q29JGeometry13SMatrix34C<f>>>RC19JointControllerInfo,BossBegomanHead.o,Boss.a,true
|
||||
calcJointMatrixAfterChild__40JointControlDelegator<15BossBegomanHead>FPQ29JGeometry64TPosition3<Q29JGeometry38TMatrix34<Q29JGeometry13SMatrix34C<f>>>RC19JointControllerInfo,BossBegomanHead.o,Boss.a,true
|
||||
__dt__15BossBegomanHeadFv,BossBegomanHead.o,Boss.a,true
|
||||
__ct<i>__Q29JGeometry8TVec3<f>Fiii_Pv,BossKameck.o,Boss.a,false
|
||||
__dt__9LiveActorFv,BossKameck.o,Boss.a,false
|
||||
__ct__10BossKameckFPCcPCc,BossKameck.o,Boss.a,false
|
||||
getMoveRail__10BossKameckFl,BossKameck.o,Boss.a,false
|
||||
startSequence__10BossKameckFv,BossKameck.o,Boss.a,false
|
||||
startDemoAppearKameck__10BossKameckFv,BossKameck.o,Boss.a,false
|
||||
endDemoAppearKameck__10BossKameckFv,BossKameck.o,Boss.a,false
|
||||
appearKameck__10BossKameckFv,BossKameck.o,Boss.a,false
|
||||
deadKameck__10BossKameckFv,BossKameck.o,Boss.a,false
|
||||
getLivingKameckNum__10BossKameckCFv,BossKameck.o,Boss.a,false
|
||||
appearStarPieceToPlayer__10BossKameckFl,BossKameck.o,Boss.a,false
|
||||
makeActorDead__10BossKameckFv,BossKameck.o,Boss.a,false
|
||||
control__10BossKameckFv,BossKameck.o,Boss.a,false
|
||||
calcAndSetBaseMtx__10BossKameckFv,BossKameck.o,Boss.a,false
|
||||
attackSensor__10BossKameckFP9HitSensorP9HitSensor,BossKameck.o,Boss.a,false
|
||||
receiveMsgPlayerAttack__10BossKameckFUlP9HitSensorP9HitSensor,BossKameck.o,Boss.a,false
|
||||
endDemo__10BossKameckFv,BossKameck.o,Boss.a,false
|
||||
__ct<i>__Q29JGeometry8TVec3<f>Fiii_Pv,BossKameck.o,Boss.a,true
|
||||
__dt__9LiveActorFv,BossKameck.o,Boss.a,true
|
||||
__ct__10BossKameckFPCcPCc,BossKameck.o,Boss.a,true
|
||||
getMoveRail__10BossKameckFl,BossKameck.o,Boss.a,true
|
||||
startSequence__10BossKameckFv,BossKameck.o,Boss.a,true
|
||||
startDemoAppearKameck__10BossKameckFv,BossKameck.o,Boss.a,true
|
||||
endDemoAppearKameck__10BossKameckFv,BossKameck.o,Boss.a,true
|
||||
appearKameck__10BossKameckFv,BossKameck.o,Boss.a,true
|
||||
deadKameck__10BossKameckFv,BossKameck.o,Boss.a,true
|
||||
getLivingKameckNum__10BossKameckCFv,BossKameck.o,Boss.a,true
|
||||
appearStarPieceToPlayer__10BossKameckFl,BossKameck.o,Boss.a,true
|
||||
makeActorDead__10BossKameckFv,BossKameck.o,Boss.a,true
|
||||
control__10BossKameckFv,BossKameck.o,Boss.a,true
|
||||
calcAndSetBaseMtx__10BossKameckFv,BossKameck.o,Boss.a,true
|
||||
attackSensor__10BossKameckFP9HitSensorP9HitSensor,BossKameck.o,Boss.a,true
|
||||
receiveMsgPlayerAttack__10BossKameckFUlP9HitSensorP9HitSensor,BossKameck.o,Boss.a,true
|
||||
endDemo__10BossKameckFv,BossKameck.o,Boss.a,true
|
||||
setPose__10BossKameckFPA4_f,BossKameck.o,Boss.a,false
|
||||
killAllBeam__10BossKameckFv,BossKameck.o,Boss.a,false
|
||||
killAllBeam__10BossKameckFv,BossKameck.o,Boss.a,true
|
||||
updatePose__10BossKameckFv,BossKameck.o,Boss.a,false
|
||||
createBossKameck2__2MRFPCc,BossKameck.o,Boss.a,false
|
||||
hitBeam__27BossKameckBeamEventListenerFl,BossKameck.o,Boss.a,false
|
||||
init__10BossKameckFRC12JMapInfoIter,BossKameck.o,Boss.a,false
|
||||
initKameckHolder__10BossKameckFRC12JMapInfoIter,BossKameck.o,Boss.a,false
|
||||
initMoveRail__10BossKameckFRC12JMapInfoIter,BossKameck.o,Boss.a,false
|
||||
appearStarPieceToUp__10BossKameckFl,BossKameck.o,Boss.a,false
|
||||
startDemo__10BossKameckFv,BossKameck.o,Boss.a,false
|
||||
hitBeam__10BossKameckFl,BossKameck.o,Boss.a,false
|
||||
createBossKameck1__2MRFPCc,BossKameck.o,Boss.a,false
|
||||
start__19BossKameckSequencerFv,BossKameck.o,Boss.a,false
|
||||
__cl__Q22MR47FunctorV0M<P10BossKameck,M10BossKameckFPCvPv_v>CFv,BossKameck.o,Boss.a,false
|
||||
clone__Q22MR47FunctorV0M<P10BossKameck,M10BossKameckFPCvPv_v>CFP7JKRHeap,BossKameck.o,Boss.a,false
|
||||
__dt__10BossKameckFv,BossKameck.o,Boss.a,false
|
||||
createBossKameck2__2MRFPCc,BossKameck.o,Boss.a,true
|
||||
hitBeam__27BossKameckBeamEventListenerFl,BossKameck.o,Boss.a,true
|
||||
init__10BossKameckFRC12JMapInfoIter,BossKameck.o,Boss.a,true
|
||||
initKameckHolder__10BossKameckFRC12JMapInfoIter,BossKameck.o,Boss.a,true
|
||||
initMoveRail__10BossKameckFRC12JMapInfoIter,BossKameck.o,Boss.a,true
|
||||
appearStarPieceToUp__10BossKameckFl,BossKameck.o,Boss.a,true
|
||||
startDemo__10BossKameckFv,BossKameck.o,Boss.a,true
|
||||
hitBeam__10BossKameckFl,BossKameck.o,Boss.a,true
|
||||
createBossKameck1__2MRFPCc,BossKameck.o,Boss.a,true
|
||||
start__19BossKameckSequencerFv,BossKameck.o,Boss.a,true
|
||||
__cl__Q22MR47FunctorV0M<P10BossKameck,M10BossKameckFPCvPv_v>CFv,BossKameck.o,Boss.a,true
|
||||
clone__Q22MR47FunctorV0M<P10BossKameck,M10BossKameckFPCvPv_v>CFP7JKRHeap,BossKameck.o,Boss.a,true
|
||||
__dt__10BossKameckFv,BossKameck.o,Boss.a,true
|
||||
__ct__16BossKameckActionFPCcP10BossKameck,BossKameckAction.o,Boss.a,true
|
||||
__dt__28ActorStateBase<10BossKameck>Fv,BossKameckAction.o,Boss.a,true
|
||||
control__23ActorStateBaseInterfaceFv,BossKameckAction.o,Boss.a,true
|
||||
|
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "Game",
|
||||
"message": "15.781%",
|
||||
"message": "15.86%",
|
||||
"color": "blue"
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "Boss",
|
||||
"message": "12.877%",
|
||||
"message": "13.731%",
|
||||
"color": "orange"
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
| [Animation](https://github.com/shibbo/Petari/blob/master/docs/lib/Animation.md) | 5.303240099695375% |
|
||||
| [AreaObj](https://github.com/shibbo/Petari/blob/master/docs/lib/AreaObj.md) | 58.466557911908644% |
|
||||
| [AudioLib](https://github.com/shibbo/Petari/blob/master/docs/lib/AudioLib.md) | 0.0% |
|
||||
| [Boss](https://github.com/shibbo/Petari/blob/master/docs/lib/Boss.md) | 12.877857989889113% |
|
||||
| [Boss](https://github.com/shibbo/Petari/blob/master/docs/lib/Boss.md) | 13.731874258847027% |
|
||||
| [Camera](https://github.com/shibbo/Petari/blob/master/docs/lib/Camera.md) | 34.12644987572494% |
|
||||
| [Demo](https://github.com/shibbo/Petari/blob/master/docs/lib/Demo.md) | 3.7442572741194486% |
|
||||
| [Effect](https://github.com/shibbo/Petari/blob/master/docs/lib/Effect.md) | 2.2184743124026984% |
|
||||
|
@ -11,7 +11,7 @@
|
||||
| [BossAccessor.o](https://github.com/shibbo/Petari/blob/master/docs/lib/Boss/BossAccessor.md) | 0.0% | 0 / 4 | 0.0% | :x:
|
||||
| [BossBegoman.o](https://github.com/shibbo/Petari/blob/master/docs/lib/Boss/BossBegoman.md) | 0.0% | 0 / 92 | 0.0% | :x:
|
||||
| [BossBegomanHead.o](https://github.com/shibbo/Petari/blob/master/docs/lib/Boss/BossBegomanHead.md) | 100.0% | 36 / 36 | 100.0% | :white_check_mark:
|
||||
| [BossKameck.o](https://github.com/shibbo/Petari/blob/master/docs/lib/Boss/BossKameck.md) | 0.0% | 0 / 33 | 0.0% | :x:
|
||||
| [BossKameck.o](https://github.com/shibbo/Petari/blob/master/docs/lib/Boss/BossKameck.md) | 84.37821171634121% | 31 / 33 | 93.93939393939394% | :eight_pointed_black_star:
|
||||
| [BossKameckAction.o](https://github.com/shibbo/Petari/blob/master/docs/lib/Boss/BossKameckAction.md) | 100.0% | 12 / 12 | 100.0% | :white_check_mark:
|
||||
| [BossKameckBarrier.o](https://github.com/shibbo/Petari/blob/master/docs/lib/Boss/BossKameckBarrier.md) | 100.0% | 8 / 8 | 100.0% | :white_check_mark:
|
||||
| [BossKameckBattleDemo.o](https://github.com/shibbo/Petari/blob/master/docs/lib/Boss/BossKameckBattleDemo.md) | 100.0% | 44 / 44 | 100.0% | :white_check_mark:
|
||||
|
@ -5,40 +5,40 @@
|
||||
| :white_check_mark: | Function is completed.
|
||||
|
||||
|
||||
# 0 / 33 Completed -- (0.0%)
|
||||
# 31 / 33 Completed -- (93.93939393939394%)
|
||||
# BossKameck.o
|
||||
| Symbol | Decompiled? |
|
||||
| ------------- | ------------- |
|
||||
| `__ct<i>__Q29JGeometry8TVec3<f>Fiii_Pv` | :x: |
|
||||
| `__dt__9LiveActorFv` | :x: |
|
||||
| `__ct__10BossKameckFPCcPCc` | :x: |
|
||||
| `getMoveRail__10BossKameckFl` | :x: |
|
||||
| `startSequence__10BossKameckFv` | :x: |
|
||||
| `startDemoAppearKameck__10BossKameckFv` | :x: |
|
||||
| `endDemoAppearKameck__10BossKameckFv` | :x: |
|
||||
| `appearKameck__10BossKameckFv` | :x: |
|
||||
| `deadKameck__10BossKameckFv` | :x: |
|
||||
| `getLivingKameckNum__10BossKameckCFv` | :x: |
|
||||
| `appearStarPieceToPlayer__10BossKameckFl` | :x: |
|
||||
| `makeActorDead__10BossKameckFv` | :x: |
|
||||
| `control__10BossKameckFv` | :x: |
|
||||
| `calcAndSetBaseMtx__10BossKameckFv` | :x: |
|
||||
| `attackSensor__10BossKameckFP9HitSensorP9HitSensor` | :x: |
|
||||
| `receiveMsgPlayerAttack__10BossKameckFUlP9HitSensorP9HitSensor` | :x: |
|
||||
| `endDemo__10BossKameckFv` | :x: |
|
||||
| `__ct<i>__Q29JGeometry8TVec3<f>Fiii_Pv` | :white_check_mark: |
|
||||
| `__dt__9LiveActorFv` | :white_check_mark: |
|
||||
| `__ct__10BossKameckFPCcPCc` | :white_check_mark: |
|
||||
| `getMoveRail__10BossKameckFl` | :white_check_mark: |
|
||||
| `startSequence__10BossKameckFv` | :white_check_mark: |
|
||||
| `startDemoAppearKameck__10BossKameckFv` | :white_check_mark: |
|
||||
| `endDemoAppearKameck__10BossKameckFv` | :white_check_mark: |
|
||||
| `appearKameck__10BossKameckFv` | :white_check_mark: |
|
||||
| `deadKameck__10BossKameckFv` | :white_check_mark: |
|
||||
| `getLivingKameckNum__10BossKameckCFv` | :white_check_mark: |
|
||||
| `appearStarPieceToPlayer__10BossKameckFl` | :white_check_mark: |
|
||||
| `makeActorDead__10BossKameckFv` | :white_check_mark: |
|
||||
| `control__10BossKameckFv` | :white_check_mark: |
|
||||
| `calcAndSetBaseMtx__10BossKameckFv` | :white_check_mark: |
|
||||
| `attackSensor__10BossKameckFP9HitSensorP9HitSensor` | :white_check_mark: |
|
||||
| `receiveMsgPlayerAttack__10BossKameckFUlP9HitSensorP9HitSensor` | :white_check_mark: |
|
||||
| `endDemo__10BossKameckFv` | :white_check_mark: |
|
||||
| `setPose__10BossKameckFPA4_f` | :x: |
|
||||
| `killAllBeam__10BossKameckFv` | :x: |
|
||||
| `killAllBeam__10BossKameckFv` | :white_check_mark: |
|
||||
| `updatePose__10BossKameckFv` | :x: |
|
||||
| `createBossKameck2__2MRFPCc` | :x: |
|
||||
| `hitBeam__27BossKameckBeamEventListenerFl` | :x: |
|
||||
| `init__10BossKameckFRC12JMapInfoIter` | :x: |
|
||||
| `initKameckHolder__10BossKameckFRC12JMapInfoIter` | :x: |
|
||||
| `initMoveRail__10BossKameckFRC12JMapInfoIter` | :x: |
|
||||
| `appearStarPieceToUp__10BossKameckFl` | :x: |
|
||||
| `startDemo__10BossKameckFv` | :x: |
|
||||
| `hitBeam__10BossKameckFl` | :x: |
|
||||
| `createBossKameck1__2MRFPCc` | :x: |
|
||||
| `start__19BossKameckSequencerFv` | :x: |
|
||||
| `__cl__Q22MR47FunctorV0M<P10BossKameck,M10BossKameckFPCvPv_v>CFv` | :x: |
|
||||
| `clone__Q22MR47FunctorV0M<P10BossKameck,M10BossKameckFPCvPv_v>CFP7JKRHeap` | :x: |
|
||||
| `__dt__10BossKameckFv` | :x: |
|
||||
| `createBossKameck2__2MRFPCc` | :white_check_mark: |
|
||||
| `hitBeam__27BossKameckBeamEventListenerFl` | :white_check_mark: |
|
||||
| `init__10BossKameckFRC12JMapInfoIter` | :white_check_mark: |
|
||||
| `initKameckHolder__10BossKameckFRC12JMapInfoIter` | :white_check_mark: |
|
||||
| `initMoveRail__10BossKameckFRC12JMapInfoIter` | :white_check_mark: |
|
||||
| `appearStarPieceToUp__10BossKameckFl` | :white_check_mark: |
|
||||
| `startDemo__10BossKameckFv` | :white_check_mark: |
|
||||
| `hitBeam__10BossKameckFl` | :white_check_mark: |
|
||||
| `createBossKameck1__2MRFPCc` | :white_check_mark: |
|
||||
| `start__19BossKameckSequencerFv` | :white_check_mark: |
|
||||
| `__cl__Q22MR47FunctorV0M<P10BossKameck,M10BossKameckFPCvPv_v>CFv` | :white_check_mark: |
|
||||
| `clone__Q22MR47FunctorV0M<P10BossKameck,M10BossKameckFPCvPv_v>CFP7JKRHeap` | :white_check_mark: |
|
||||
| `__dt__10BossKameckFv` | :white_check_mark: |
|
||||
|
@ -1,12 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "Game/Enemy/KameckBeam.hpp"
|
||||
#include "Game/LiveActor/LiveActor.hpp"
|
||||
#include "Game/LiveActor/ActiveActorList.hpp"
|
||||
|
||||
class BossKameckVs2;
|
||||
class BossKameckMoveRail;
|
||||
class KameckHolder;
|
||||
class ActorJointCtrl;
|
||||
class KameckBeamEventListener;
|
||||
class BossKameck;
|
||||
class BossKameckSequencer;
|
||||
class BossKameckBeamEventListener;
|
||||
|
||||
class BossKameck : public LiveActor {
|
||||
public:
|
||||
@ -41,13 +45,31 @@ public:
|
||||
const char* _8C;
|
||||
TQuat4f _90;
|
||||
TVec3f _A0;
|
||||
u32 _AC;
|
||||
KameckHolder* mKameckHolder; // _B0
|
||||
ActorJointCtrl* mJointCtrl; // _B4
|
||||
ActiveActorList* mActorList; // _B8
|
||||
KameckBeamEventListener* mBeamListener; // _BC
|
||||
BossKameckMoveRail* mMoveRail; // _C0
|
||||
u32 _C4;
|
||||
BossKameckSequencer* mSequencer; // _AC
|
||||
KameckHolder* mKameckHolder; // _B0
|
||||
ActorJointCtrl* mJointCtrl; // _B4
|
||||
ActiveActorList* mActorList; // _B8
|
||||
BossKameckBeamEventListener* mBeamListener; // _BC
|
||||
BossKameckMoveRail** mMoveRail; // _C0
|
||||
s32 _C4;
|
||||
TVec3f _C8;
|
||||
s32 _D4;
|
||||
};
|
||||
|
||||
class BossKameckBeamEventListener : public KameckBeamEventListener {
|
||||
public:
|
||||
inline BossKameckBeamEventListener(BossKameck *pBoss) : KameckBeamEventListener() {
|
||||
mBossKameck = pBoss;
|
||||
}
|
||||
|
||||
virtual void hitBeam(s32 type) {
|
||||
mBossKameck->hitBeam(type);
|
||||
}
|
||||
|
||||
BossKameck* mBossKameck; // _4
|
||||
};
|
||||
|
||||
namespace MR {
|
||||
BossKameck* createBossKameck1(const char *);
|
||||
BossKameck* createBossKameck2(const char *);
|
||||
};
|
12
include/Game/Enemy/Kameck.hpp
Normal file
12
include/Game/Enemy/Kameck.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "Game/LiveActor/LiveActor.hpp"
|
||||
|
||||
class Kameck : public LiveActor {
|
||||
public:
|
||||
Kameck(const char *);
|
||||
|
||||
void setBeamType(s32);
|
||||
|
||||
u8 _8C[0xD0 - 0x8C];
|
||||
};
|
@ -2,7 +2,22 @@
|
||||
|
||||
#include "Game/LiveActor/LiveActor.hpp"
|
||||
|
||||
class KameckBeamEventListener;
|
||||
class KameckBeamEventListener {
|
||||
public:
|
||||
KameckBeamEventListener();
|
||||
|
||||
virtual void hitBeam(s32);
|
||||
};
|
||||
|
||||
class KameckBeamCollisionFilter {
|
||||
public:
|
||||
KameckBeamCollisionFilter(const TVec3f *, f32);
|
||||
|
||||
virtual bool isInvalidParts(const CollisionParts *) const;
|
||||
|
||||
TVec3f* _4;
|
||||
f32 _8;
|
||||
};
|
||||
|
||||
class KameckBeam : public LiveActor {
|
||||
public:
|
||||
|
@ -7,5 +7,9 @@ class KameckBeamEventListener;
|
||||
class KameckBeam;
|
||||
|
||||
namespace MR {
|
||||
void createKameckBeamHolder();
|
||||
void createKameckFireBallHolder();
|
||||
void createKameckBeamTurtleHolder();
|
||||
|
||||
KameckBeam* startFollowKameckBeam(s32, MtxPtr, f32, const TVec3f &, KameckBeamEventListener *);
|
||||
};
|
16
include/Game/Enemy/KameckHolder.hpp
Normal file
16
include/Game/Enemy/KameckHolder.hpp
Normal file
@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "Game/LiveActor/LiveActorGroup.hpp"
|
||||
|
||||
class Kameck;
|
||||
|
||||
class KameckHolder : public DeriveActorGroup<Kameck> {
|
||||
public:
|
||||
KameckHolder(s32);
|
||||
|
||||
virtual ~KameckHolder();
|
||||
|
||||
void startDemoAppear();
|
||||
void endDemoAppear();
|
||||
void deadForceAll();
|
||||
};
|
@ -102,4 +102,6 @@ namespace MR {
|
||||
void addVelocityKeepHeight(LiveActor *, const TVec3f &, f32, f32, f32);
|
||||
|
||||
void turnDirectionToTarget(const LiveActor *, TVec3f *, const TVec3f &, f32);
|
||||
|
||||
void makeQuatAndFrontFromRotate(TQuat4f *, TVec3f *, const LiveActor *);
|
||||
};
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "JSystem/JGeometry/TVec.hpp"
|
||||
#include "JSystem/JGeometry/TQuat.hpp"
|
||||
#include "Game/Animation/AnmPlayer.hpp"
|
||||
#include "Game/LiveActor/LiveActorGroup.hpp"
|
||||
#include "Game/Util/JMapInfo.hpp"
|
||||
@ -160,6 +161,7 @@ namespace MR {
|
||||
void initCollisionPartsAutoEqualScale(LiveActor *, const char *, HitSensor *, MtxPtr);
|
||||
|
||||
void setBaseTRMtx(LiveActor *, MtxPtr);
|
||||
void setBaseTRMtx(LiveActor *, const TQuat4f &);
|
||||
void setBaseTRMtx(LiveActor *, const TPos3f &);
|
||||
|
||||
void setClippingFar(LiveActor *, f32);
|
||||
|
@ -9,6 +9,13 @@ namespace JGeometry {
|
||||
/* Constructors */
|
||||
inline TQuat4() {}
|
||||
|
||||
inline TQuat4(T xyz, T _w) {
|
||||
x = xyz;
|
||||
y = xyz;
|
||||
z = xyz;
|
||||
w = _w;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
TQuat4(T _x, T _y, T _z, T _w) {
|
||||
x = _x;
|
||||
|
@ -75,8 +75,8 @@ namespace JGeometry {
|
||||
z = _z;
|
||||
}
|
||||
|
||||
template <typename U>
|
||||
TVec3(U _x, U _y, U _z);
|
||||
//template <typename U>
|
||||
//TVec3(U _x, U _y, U _z);
|
||||
|
||||
TVec3(T val)
|
||||
{
|
||||
@ -92,6 +92,13 @@ namespace JGeometry {
|
||||
z = _z;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
TVec3(T _x, T _y , T _z) {
|
||||
x = _x;
|
||||
y = _y;
|
||||
z = _z;
|
||||
}
|
||||
|
||||
// inline
|
||||
TVec3(const TVec3<T> &rSrc); /*{
|
||||
setInline(rSrc);
|
||||
|
@ -1,31 +1,319 @@
|
||||
#include "Game/Boss/BossKameck.hpp"
|
||||
#include "Game/Boss/BossKameckMoveRail.hpp"
|
||||
#include "Game/Boss/BossKameckSequencer.hpp"
|
||||
#include "Game/Boss/BossKameckVs1.hpp"
|
||||
#include "Game/Boss/BossKameckVs2.hpp"
|
||||
#include "Game/Enemy/Kameck.hpp"
|
||||
#include "Game/Enemy/KameckHolder.hpp"
|
||||
#include "Game/Enemy/KameckBeamHolder.hpp"
|
||||
#include "Game/LiveActor/ActorJointCtrl.hpp"
|
||||
|
||||
BossKameck::BossKameck(const char *pName, const char *pType) : LiveActor(pName),
|
||||
_8C(pType), _90(0.0f, 1.0f), _A0(0, 0, 1), mSequencer(nullptr), mKameckHolder(nullptr), mJointCtrl(nullptr),
|
||||
mActorList(nullptr), mBeamListener(nullptr), mMoveRail(nullptr), _C4(0), _C8(0, 0, 0), _D4(-1) {
|
||||
|
||||
mBeamListener = new BossKameckBeamEventListener(this);
|
||||
mActorList = new ActiveActorList(8);
|
||||
}
|
||||
|
||||
BossKameckMoveRail* BossKameck::getMoveRail(s32 no) {
|
||||
for (s32 i = 0; i < _C4; i++) {
|
||||
if (mMoveRail[i]->_8C == no) {
|
||||
return mMoveRail[i];
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void BossKameck::startSequence() {
|
||||
mSequencer->start();
|
||||
appear();
|
||||
MR::hideModel(this);
|
||||
}
|
||||
|
||||
void BossKameck::startDemoAppearKameck() {
|
||||
if (mKameckHolder != nullptr) {
|
||||
mKameckHolder->startDemoAppear();
|
||||
}
|
||||
}
|
||||
|
||||
void BossKameck::endDemoAppearKameck() {
|
||||
if (mKameckHolder != nullptr) {
|
||||
mKameckHolder->endDemoAppear();
|
||||
}
|
||||
}
|
||||
|
||||
void BossKameck::appearKameck() {
|
||||
if (mKameckHolder != nullptr) {
|
||||
mKameckHolder->appearAll();
|
||||
}
|
||||
}
|
||||
|
||||
void BossKameck::deadKameck() {
|
||||
if (mKameckHolder != nullptr) {
|
||||
mKameckHolder->deadForceAll();
|
||||
}
|
||||
}
|
||||
|
||||
s32 BossKameck::getLivingKameckNum() const {
|
||||
if (mKameckHolder != nullptr) {
|
||||
return mKameckHolder->getLivingActorNum();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void BossKameck::appearStarPieceToPlayer(s32 num) {
|
||||
TVec3f dir;
|
||||
MR::calcVecToPlayerH(&dir, this, nullptr);
|
||||
dir.subtract(mGravity);
|
||||
MR::normalizeOrZero(&dir);
|
||||
MR::appearStarPieceToDirection(this, mPosition, dir, num, 30.0f, 65.0f, false);
|
||||
MR::startSound(this, "SE_OJ_STAR_PIECE_BURST", -1, -1);
|
||||
}
|
||||
|
||||
void BossKameck::makeActorDead() {
|
||||
LiveActor::makeActorDead();
|
||||
MR::invalidateShadowAll(this);
|
||||
}
|
||||
|
||||
void BossKameck::control() {
|
||||
if (mSequencer != nullptr) {
|
||||
mSequencer->update();
|
||||
}
|
||||
|
||||
mActorList->removeDeadActor();
|
||||
_C8.set(mVelocity);
|
||||
mJointCtrl->update();
|
||||
}
|
||||
|
||||
void BossKameck::calcAndSetBaseMtx() {
|
||||
MR::setBaseTRMtx(this, _90);
|
||||
MR::setBaseScale(this, mScale);
|
||||
mJointCtrl->setCallBackFunction();
|
||||
}
|
||||
|
||||
void BossKameck::attackSensor(HitSensor *a1, HitSensor *a2) {
|
||||
if (mSequencer != nullptr) {
|
||||
mSequencer->attackSensor(a1, a2);
|
||||
}
|
||||
}
|
||||
|
||||
bool BossKameck::receiveMsgPlayerAttack(u32 msg, HitSensor *a1, HitSensor *a2) {
|
||||
if (mSequencer != nullptr) {
|
||||
return mSequencer->receiveMsgPlayerAttack(msg, a1, a2);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void BossKameck::endDemo() {
|
||||
_C8.zero();
|
||||
MR::zeroVelocity(this);
|
||||
MR::calcGravity(this);
|
||||
mJointCtrl->startDynamicCtrl("Suso1", -1);
|
||||
mJointCtrl->startDynamicCtrl("Cap1", -1);
|
||||
}
|
||||
|
||||
/* functionally matches */
|
||||
void BossKameck::setPose(MtxPtr mtx) {
|
||||
TPos3f pos;
|
||||
pos.setInline(mtx);
|
||||
pos.getQuat(_90);
|
||||
|
||||
f32 z = pos.mMtx[2][3];
|
||||
f32 y = pos.mMtx[1][3];
|
||||
f32 x = pos.mMtx[0][3];
|
||||
mPosition.set(x, y, z);
|
||||
|
||||
f32 v1 = (2.0f * (_90.x * _90.z)) + (2.0f * (_90.w * _90.y));
|
||||
f32 v2 = (2.0f * (_90.y * _90.z)) - (2.0f * (_90.w * _90.x));
|
||||
f32 v3 = (1.0f - (2.0f * (_90.x * _90.x))) - (2.0f * (_90.y * _90.y));
|
||||
_A0.set(v1, v2, v3);
|
||||
}
|
||||
|
||||
void BossKameck::killAllBeam() {
|
||||
mActorList->killAll();
|
||||
}
|
||||
|
||||
/* stack is off */
|
||||
void BossKameck::updatePose() {
|
||||
TVec3f v17(mGravity);
|
||||
TVec3f v17(-mGravity);
|
||||
TVec3f v19;
|
||||
v19.set(v17);
|
||||
TVec3f v16(mVelocity);
|
||||
v16.sub(_C8);
|
||||
f32 dot = mGravity.dot(v16);
|
||||
TVec3f* gravPtr = &mGravity;
|
||||
f32 dot = gravPtr->dot(v16);
|
||||
TVec3f v18;
|
||||
JMAVECScaleAdd(mGravity.toCVec(), v16.toCVec(), v18.toVec(), -dot);
|
||||
JMAVECScaleAdd(gravPtr->toCVec(), v16.toCVec(), v18.toVec(), -dot);
|
||||
f32 mag = PSVECMag(v18.toCVec());
|
||||
|
||||
TVec3f stack_44;
|
||||
TVec3f* ptr = &stack_44;
|
||||
|
||||
if (!MR::isNearZero(mag, 0.001f)) {
|
||||
f32 v4 = MR::normalize(mag, 0.0f, 3.0f);
|
||||
TVec3f v13(v18);
|
||||
|
||||
TVec3f stack_44;
|
||||
stack_44.addInline(v13);
|
||||
|
||||
ptr->scaleInline((4.0f * v4) / mag);
|
||||
ptr->addInline(v13);
|
||||
|
||||
if (MR::isNearZero(stack_44, 0.001f)) {
|
||||
TVec3f v12 = -mGravity;
|
||||
v19.set(v12);
|
||||
if (!MR::isNearZero(*ptr, 0.001f)) {
|
||||
MR::normalize(ptr);
|
||||
}
|
||||
else {
|
||||
MR::normalize(&v19);
|
||||
ptr->set(-mGravity);
|
||||
}
|
||||
}
|
||||
|
||||
MR::blendQuatUpFront(&_90, v19, _A0, 0.039999999f, 0.2f);
|
||||
}
|
||||
MR::blendQuatUpFront(&_90, stack_44, _A0, 0.039999999f, 0.2f);
|
||||
}
|
||||
|
||||
void BossKameck::init(const JMapInfoIter &rIter) {
|
||||
MR::initDefaultPos(this, rIter);
|
||||
initModelManagerWithAnm(_8C, nullptr, false);
|
||||
MR::connectToSceneEnemy(this);
|
||||
MR::initLightCtrl(this);
|
||||
MR::makeQuatAndFrontFromRotate(&_90, &_A0, this);
|
||||
MR::calcGravity(this);
|
||||
MR::invalidateClipping(this);
|
||||
MR::initShadowFromCSV(this, "Shadow");
|
||||
initHitSensor(2);
|
||||
MR::addHitSensorEnemy(this, "body", 8, 300.0f, TVec3f(0.0f, 0.0f, 0.0f));
|
||||
MR::addHitSensorEnemyAttack(this, "attack", 8, 240.0f, TVec3f(0.0f, 0.0f, 0.0f));
|
||||
initEffectKeeper(0, nullptr, false);
|
||||
MR::createKameckBeamHolder();
|
||||
MR::createKameckFireBallHolder();
|
||||
MR::createKameckBeamTurtleHolder();
|
||||
initKameckHolder(rIter);
|
||||
initMoveRail(rIter);
|
||||
MR::getJMapInfoArg7WithInit(rIter, &_D4);
|
||||
|
||||
if (_D4 != -1) {
|
||||
MR::declareCameraRegisterVec(this, _D4, &mPosition);
|
||||
}
|
||||
|
||||
mJointCtrl = new ActorJointCtrl(this);
|
||||
MR::addToAttributeGroupSearchTurtle(this);
|
||||
initSound(4, false);
|
||||
mSequencer->init(this, rIter);
|
||||
MR::declarePowerStar(this);
|
||||
s32 hasPowerStar = MR::hasPowerStarInCurrentStageWithDeclarer(mName, -1);
|
||||
MR::startBrk(this, "Star");
|
||||
MR::setBrkFrameAndStop(this, hasPowerStar);
|
||||
MR::needStageSwitchReadA(this, rIter);
|
||||
MR::listenStageSwitchOnA(this, MR::FunctorV0M<BossKameck*, void (BossKameck::*)(void)>(this, &BossKameck::startSequence));
|
||||
makeActorDead();
|
||||
}
|
||||
|
||||
void BossKameck::initKameckHolder(const JMapInfoIter &rIter) {
|
||||
s32 childNum = MR::getChildObjNum(rIter);
|
||||
s32 kameckChildNum = 0;
|
||||
const char* objName;
|
||||
|
||||
for (s32 i = 0; i < childNum; i++) {
|
||||
MR::getChildObjName(&objName, rIter, i);
|
||||
|
||||
if (MR::isEqualString(objName, "ChildKameck")) {
|
||||
kameckChildNum++;
|
||||
}
|
||||
}
|
||||
|
||||
if (kameckChildNum > 0) {
|
||||
mKameckHolder = new KameckHolder(kameckChildNum);
|
||||
|
||||
for (s32 j = 0; j < childNum; j++) {
|
||||
MR::getChildObjName(&objName, rIter, j);
|
||||
|
||||
if (MR::isEqualString(objName, "ChildKameck")) {
|
||||
Kameck* kameck = new Kameck("カメック[保持用]");
|
||||
kameck->setBeamType(2);
|
||||
MR::initChildObj(kameck, rIter, j);
|
||||
kameck->makeActorDead();
|
||||
mKameckHolder->registerActor(kameck);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BossKameck::initMoveRail(const JMapInfoIter &rIter) {
|
||||
s32 childNum = MR::getChildObjNum(rIter);
|
||||
_C4 = 0;
|
||||
const char* objName;
|
||||
|
||||
for (s32 i = 0; i < childNum; i++) {
|
||||
MR::getChildObjName(&objName, rIter, i);
|
||||
|
||||
if (MR::isEqualString(objName, "BossKameckMoveRail")) {
|
||||
_C4++;
|
||||
}
|
||||
}
|
||||
|
||||
if (_C4 > 0) {
|
||||
mMoveRail = new BossKameckMoveRail*[_C4];
|
||||
s32 curRails = 0;
|
||||
|
||||
for (s32 j = 0; j < childNum; j++) {
|
||||
MR::getChildObjName(&objName, rIter, j);
|
||||
|
||||
if (MR::isEqualString(objName, "BossKameckMoveRail")) {
|
||||
mMoveRail[curRails] = new BossKameckMoveRail("ボスカメック移動経路");
|
||||
MR::initChildObj(mMoveRail[curRails], rIter, j);
|
||||
curRails++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BossKameck::appearStarPieceToUp(s32 num) {
|
||||
TVec3f neg = -mGravity;
|
||||
MR::appearStarPieceToDirection(this, mPosition, neg, num, 30.0f, 40.0f, false);
|
||||
MR::startSound(this, "SE_OJ_STAR_PIECE_BURST", -1, -1);
|
||||
}
|
||||
|
||||
void BossKameck::startDemo() {
|
||||
_C8.zero();
|
||||
MR::zeroVelocity(this);
|
||||
MR::calcGravity(this);
|
||||
mJointCtrl->endDynamicCtrl("Suso1", 0);
|
||||
mJointCtrl->endDynamicCtrl("Cap1", 0);
|
||||
}
|
||||
|
||||
void BossKameck::hitBeam(s32 beamType) {
|
||||
if (MR::isDead(this)) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (beamType) {
|
||||
case 1:
|
||||
MR::startSound(this, "SE_BV_KAMECK_ATK_SUCCESS", -1, -1);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
MR::startSound(this, "SE_BV_KAMECK_ATK_SUCCESS", -1, -1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace MR {
|
||||
BossKameck* createBossKameck1(const char *pName) {
|
||||
BossKameck* boss = new BossKameck(pName, "BossKameck");
|
||||
boss->mSequencer = new BossKameckVs1();
|
||||
return boss;
|
||||
}
|
||||
|
||||
BossKameck* createBossKameck2(const char *pName) {
|
||||
BossKameck* boss = new BossKameck(pName, "BossKameck");
|
||||
boss->mSequencer = new BossKameckVs2();
|
||||
return boss;
|
||||
}
|
||||
};
|
||||
|
||||
BossKameck::~BossKameck() {
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user