mirror of
https://github.com/SMGCommunity/Petari.git
synced 2024-11-30 08:50:43 +00:00
Decompile a lot more of LiveActor
This commit is contained in:
parent
8a4718ba30
commit
950ec9669f
@ -25,6 +25,7 @@ public:
|
||||
u32* _10; // AreaLightInfo*
|
||||
ZoneLightID mZoneLightID; // _14
|
||||
u32 _1C;
|
||||
u8 _20[0x58-0x20];
|
||||
};
|
||||
|
||||
#endif // ACTORLIGHTCTRL_H
|
@ -10,6 +10,8 @@
|
||||
#include "Actor/Nerve/Spine.h"
|
||||
#include "Actor/Sensor/HitSensor.h"
|
||||
#include "Actor/Sensor/HitSensorKeeper.h"
|
||||
#include "Actor/StarPointer/StarPointerTarget.h"
|
||||
#include "Actor/Switch/StageSwitch.h"
|
||||
#include "Collision/Binder.h"
|
||||
#include "JGeometry/TVec3.h"
|
||||
#include "Model/ModelManager.h"
|
||||
@ -47,7 +49,6 @@ public:
|
||||
virtual u32 receiveMsgApart(HitSensor *, HitSensor *);
|
||||
virtual u32 receiveMsgOtherMsg(u32, HitSensor *, HitSensor *);
|
||||
|
||||
void updateBinder();
|
||||
void calcAnmMtx();
|
||||
void setNerve(const Nerve *);
|
||||
bool isNerve(const Nerve *) const;
|
||||
@ -58,6 +59,12 @@ public:
|
||||
void initHitSensor(s32);
|
||||
void initBinder(f32, f32, u32);
|
||||
|
||||
void initStageSwitch(const JMapInfoIter &);
|
||||
void initActorStarPointerTarget(f32, const JGeometry::TVec3<f32> *, Mtx *, JGeometry::TVec3<f32>);
|
||||
void initActorLightCtrl();
|
||||
void addToSoundObjHolder();
|
||||
void updateBinder();
|
||||
|
||||
JGeometry::TVec3<f32> mTranslation; // _C
|
||||
JGeometry::TVec3<f32> mRotation; // _18
|
||||
JGeometry::TVec3<f32> mScale; // _24
|
||||
@ -74,8 +81,8 @@ public:
|
||||
LiveActorFlag mFlags; // _68
|
||||
u32* _74; // ShadowController*
|
||||
u32* _78; // CollisionParts*
|
||||
u32* _7C; // StageSwitchCtrl*
|
||||
u32* _80; // StarPointerTarget*
|
||||
StageSwitchCtrl* mStageSwitchCtrl; // _7C
|
||||
StarPointerTarget* mPointerTarget; // _80
|
||||
ActorLightCtrl* mLightCtrl; // _84
|
||||
ActorPadAndCameraCtrl* mCameraCtrl; // _88
|
||||
|
||||
|
16
include/Actor/StarPointer/StarPointerTarget.h
Normal file
16
include/Actor/StarPointer/StarPointerTarget.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef STARPOINTERTARGET_H
|
||||
#define STARPOINTERTARGET_H
|
||||
|
||||
#include "types.h"
|
||||
#include "JGeometry/TVec2.h"
|
||||
#include "JGeometry/TVec3.h"
|
||||
|
||||
class StarPointerTarget
|
||||
{
|
||||
public:
|
||||
StarPointerTarget(f32, const JGeometry::TVec3<f32> *, Mtx *, JGeometry::TVec3<f32>);
|
||||
|
||||
u8 _0[0x1C];
|
||||
};
|
||||
|
||||
#endif // STARPOINTERTARGET_H
|
21
include/Actor/Switch/StageSwitch.h
Normal file
21
include/Actor/Switch/StageSwitch.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef STAGESWITCHCTRL_H
|
||||
#define STAGESWITCHCTRL_H
|
||||
|
||||
#include "types.h"
|
||||
#include "Actor/NameObj/NameObj.h"
|
||||
#include "JMap/JMapInfoIter.h"
|
||||
|
||||
class StageSwitchCtrl
|
||||
{
|
||||
public:
|
||||
StageSwitchCtrl(const JMapInfoIter &);
|
||||
|
||||
u8 _0[0x10];
|
||||
};
|
||||
|
||||
namespace MR
|
||||
{
|
||||
StageSwitchCtrl* createStageSwitchCtrl(NameObj *, const JMapInfoIter &);
|
||||
};
|
||||
|
||||
#endif // STAGESWITCHCTRL_H
|
@ -9,6 +9,7 @@ class Binder
|
||||
public:
|
||||
Binder(Mtx *, const JGeometry::TVec3<f32> *, const JGeometry::TVec3<f32> *, f32, f32, u64);
|
||||
|
||||
static void bind(JGeometry::TVec3<f32> &, Binder *, const JGeometry::TVec3<f32> &);
|
||||
void clear();
|
||||
|
||||
u8 _0[0x1F0];
|
||||
|
17
include/JGeometry/TVec2.h
Normal file
17
include/JGeometry/TVec2.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef TVEC2_H
|
||||
#define TVEC2_H
|
||||
|
||||
namespace JGeometry
|
||||
{
|
||||
template<typename T>
|
||||
class TVec2
|
||||
{
|
||||
public:
|
||||
TVec2();
|
||||
|
||||
T x; // _0
|
||||
T y; // _4
|
||||
};
|
||||
};
|
||||
|
||||
#endif // TVEC2_H
|
@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef TVEC3_H
|
||||
#define TVEC3_H
|
||||
|
||||
namespace JGeometry
|
||||
{
|
||||
@ -20,5 +21,6 @@ namespace JGeometry
|
||||
T y; // _4
|
||||
T z; // _8
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
#endif // TVEC3_H
|
@ -10,6 +10,8 @@ namespace MR
|
||||
void clearHitSensors(LiveActor *);
|
||||
HitSensor* getTaken(const LiveActor *);
|
||||
HitSensor* getTaking(const LiveActor *);
|
||||
|
||||
u32 setHitSensorApart(HitSensor *, HitSensor *);
|
||||
};
|
||||
|
||||
#endif // ACTORSENSORUTIL_H
|
@ -49,8 +49,8 @@ LiveActor::LiveActor(const char *name) : NameObj(name)
|
||||
|
||||
this->_74 = 0;
|
||||
this->_78 = 0;
|
||||
this->_7C = 0;
|
||||
this->_80 = 0;
|
||||
this->mStageSwitchCtrl = 0;
|
||||
this->mPointerTarget = 0;
|
||||
this->mLightCtrl = 0;
|
||||
this->mCameraCtrl = 0;
|
||||
|
||||
@ -447,4 +447,54 @@ void LiveActor::initBinder(f32 a1, f32 a2, u32 a3)
|
||||
{
|
||||
this->mEffectKeeper->setBinder(this->mBinder);
|
||||
}
|
||||
}
|
||||
|
||||
void LiveActor::initStageSwitch(const JMapInfoIter &iter)
|
||||
{
|
||||
this->mStageSwitchCtrl = MR::createStageSwitchCtrl(this, iter);
|
||||
}
|
||||
|
||||
void LiveActor::initActorStarPointerTarget(f32 a1, const JGeometry::TVec3<f32> *a2, Mtx *a3, JGeometry::TVec3<f32> a4)
|
||||
{
|
||||
this->mPointerTarget = new StarPointerTarget(a1, a2, a3, a4);
|
||||
}
|
||||
|
||||
void LiveActor::initActorLightCtrl()
|
||||
{
|
||||
this->mLightCtrl = new ActorLightCtrl(this);
|
||||
}
|
||||
|
||||
void LiveActor::attackSensor(HitSensor* taking, HitSensor* taken)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
u32 LiveActor::receiveMsgApart(HitSensor* taking, HitSensor* taken)
|
||||
{
|
||||
MR::setHitSensorApart(taking, taken);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// LiveActor::addToSoundObjHolder()
|
||||
|
||||
void LiveActor::updateBinder()
|
||||
{
|
||||
if (this->mBinder == 0)
|
||||
{
|
||||
this->mTranslation += this->mGravity;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this->mFlags.mIsOnBind != 0)
|
||||
{
|
||||
this->mTranslation += this->mGravity;
|
||||
this->mBinder->clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
JGeometry::TVec3<f32> what;
|
||||
Binder::bind(what, this->mBinder, this->mGravity);
|
||||
this->mTranslation += what;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user