mirror of
https://github.com/SMGCommunity/Petari.git
synced 2025-02-26 00:45:52 +00:00
Small fixes and decompile a few LiveActor init functions
This commit is contained in:
parent
2d3fc43f27
commit
8a4718ba30
@ -9,6 +9,7 @@ class ActorPadAndCameraCtrl
|
||||
public:
|
||||
ActorPadAndCameraCtrl(const ModelManager *, const JGeometry::TVec3<f32> *);
|
||||
|
||||
static ActorPadAndCameraCtrl* tryCreate(const ModelManager *, const JGeometry::TVec3<f32> *);
|
||||
void update();
|
||||
|
||||
ModelManager* mModelManager; // _0
|
||||
|
@ -53,6 +53,10 @@ public:
|
||||
bool isNerve(const Nerve *) const;
|
||||
u32 getNerveStep() const;
|
||||
HitSensor* getSensor(const char *) const;
|
||||
void initModelManagerWithAnm(const char *, const char *, bool);
|
||||
void initNerve(const Nerve *);
|
||||
void initHitSensor(s32);
|
||||
void initBinder(f32, f32, u32);
|
||||
|
||||
JGeometry::TVec3<f32> mTranslation; // _C
|
||||
JGeometry::TVec3<f32> mRotation; // _18
|
||||
|
@ -7,7 +7,7 @@
|
||||
class Binder
|
||||
{
|
||||
public:
|
||||
Binder(f32 *[4], const JGeometry::TVec3<f32> *, const JGeometry::TVec3<f32> *, f32, f32, u64);
|
||||
Binder(Mtx *, const JGeometry::TVec3<f32> *, const JGeometry::TVec3<f32> *, f32, f32, u64);
|
||||
|
||||
void clear();
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
namespace MR
|
||||
{
|
||||
J3DModel* getJ3DModel(const LiveActor *);
|
||||
void calcJ3DModel(LiveActor *);
|
||||
}
|
||||
|
||||
#endif // MODELUTIL_H
|
@ -15,6 +15,9 @@ namespace MR
|
||||
|
||||
bool isClipped(const LiveActor *);
|
||||
bool isNoEntryDrawBuffer(const LiveActor *);
|
||||
bool isNoBind(const LiveActor *);
|
||||
void onBind(LiveActor *);
|
||||
void offBind(LiveActor *);
|
||||
|
||||
void setCollisionMtx(LiveActor *);
|
||||
void validateCollisionParts(LiveActor *);
|
||||
|
@ -410,4 +410,41 @@ void LiveActor::endClipped()
|
||||
{
|
||||
MR::connectToDrawTemporarily(this);
|
||||
}
|
||||
}
|
||||
|
||||
void LiveActor::initModelManagerWithAnm(const char *a1, const char *a2, bool a3)
|
||||
{
|
||||
ModelManager* manager = new ModelManager();
|
||||
this->mModelManager = manager;
|
||||
mModelManager->init(a1, a2, a3);
|
||||
|
||||
J3DModel* model = MR::getJ3DModel(this);
|
||||
model->setBaseScale((Vec&)this->mScale);
|
||||
this->calcAndSetBaseMtx();
|
||||
MR::calcJ3DModel(this);
|
||||
|
||||
this->mAnimKeeper = ActorAnimKeeper::tryCreate(this);
|
||||
this->mCameraCtrl = ActorPadAndCameraCtrl::tryCreate(this->mModelManager, &this->mTranslation);
|
||||
}
|
||||
|
||||
void LiveActor::initNerve(const Nerve *nerve)
|
||||
{
|
||||
this->mSpine = new Spine(this, nerve);
|
||||
}
|
||||
|
||||
void LiveActor::initHitSensor(s32 numSensors)
|
||||
{
|
||||
this->mSensorKeeper = new HitSensorKeeper(numSensors);
|
||||
}
|
||||
|
||||
void LiveActor::initBinder(f32 a1, f32 a2, u32 a3)
|
||||
{
|
||||
Mtx* baseMtx = this->getBaseMtx();
|
||||
this->mBinder = new Binder(baseMtx, &this->mTranslation, &this->mGravity, a1, a2, a3);
|
||||
MR::onBind(this);
|
||||
|
||||
if (this->mEffectKeeper != 0)
|
||||
{
|
||||
this->mEffectKeeper->setBinder(this->mBinder);
|
||||
}
|
||||
}
|
@ -19,8 +19,6 @@ void NameObjGroup::registerObj(NameObj *obj)
|
||||
|
||||
void NameObjGroup::pauseOffAll() const
|
||||
{
|
||||
_savegpr_29();
|
||||
|
||||
u32 curObjIdx = 0;
|
||||
|
||||
while (curObjIdx < this->mNumObjs)
|
||||
@ -28,8 +26,6 @@ void NameObjGroup::pauseOffAll() const
|
||||
MR::requestMovementOn(this->mObjs[curObjIdx]);
|
||||
curObjIdx++;
|
||||
}
|
||||
|
||||
_restgpr_29();
|
||||
}
|
||||
|
||||
void NameObjGroup::initObjArray(s32 numObjs)
|
||||
|
@ -24,8 +24,6 @@ void NameObjHolder::add(NameObj *obj)
|
||||
|
||||
void NameObjHolder::suspendAllObj()
|
||||
{
|
||||
_savegpr_29();
|
||||
|
||||
u32 curObjIdx = 0;
|
||||
|
||||
while (curObjIdx < this->_8)
|
||||
@ -33,14 +31,10 @@ void NameObjHolder::suspendAllObj()
|
||||
MR::requestMovementOff(this->mObjs[curObjIdx]);
|
||||
curObjIdx++;
|
||||
}
|
||||
|
||||
_restgpr_29();
|
||||
}
|
||||
|
||||
void NameObjHolder::resumeAllObj()
|
||||
{
|
||||
_savegpr_29();
|
||||
|
||||
u32 curObjIdx = 0;
|
||||
|
||||
while (curObjIdx < this->_8)
|
||||
@ -48,8 +42,6 @@ void NameObjHolder::resumeAllObj()
|
||||
MR::requestMovementOn(this->mObjs[curObjIdx]);
|
||||
curObjIdx++;
|
||||
}
|
||||
|
||||
_restgpr_29();
|
||||
}
|
||||
|
||||
/* TODO -- callMethodAllObj() / syncWithFlags() / find() */
|
||||
|
Loading…
x
Reference in New Issue
Block a user