mirror of
https://github.com/SMGCommunity/Petari.git
synced 2024-12-02 10:36:39 +00:00
LiveActor::initEffectKeeper and initRailRider
This commit is contained in:
parent
4a368e1db4
commit
2b57ac6c90
@ -8,6 +8,7 @@
|
||||
#include "Actor/LiveActor/LiveActorFlag.h"
|
||||
#include "Actor/NameObj/NameObj.h"
|
||||
#include "Actor/Nerve/Spine.h"
|
||||
#include "Actor/Rail/RailRider.h"
|
||||
#include "Actor/Sensor/HitSensor.h"
|
||||
#include "Actor/Sensor/HitSensorKeeper.h"
|
||||
#include "Actor/Shadow/ShadowController.h"
|
||||
@ -59,7 +60,9 @@ public:
|
||||
void initNerve(const Nerve *);
|
||||
void initHitSensor(s32);
|
||||
void initBinder(f32, f32, u32);
|
||||
|
||||
void initRailRider(const JMapInfoIter &);
|
||||
void initEffectKeeper(s32, const char *, bool);
|
||||
void initSound(s32, bool);
|
||||
void initShadowControllerList(u32);
|
||||
void initStageSwitch(const JMapInfoIter &);
|
||||
void initActorStarPointerTarget(f32, const JGeometry::TVec3<f32> *, Mtx *, JGeometry::TVec3<f32>);
|
||||
@ -77,7 +80,7 @@ public:
|
||||
Spine* mSpine; // _50
|
||||
HitSensorKeeper* mSensorKeeper; //_54
|
||||
Binder* mBinder; // _58
|
||||
u32* _5C; // RailRider*
|
||||
RailRider* mRailRider; // _5C
|
||||
EffectKeeper* mEffectKeeper; // _60
|
||||
u32* _64; // AudSoundObject*
|
||||
LiveActorFlag mFlags; // _68
|
||||
|
36
include/Actor/Rail/RailRider.h
Normal file
36
include/Actor/Rail/RailRider.h
Normal file
@ -0,0 +1,36 @@
|
||||
#ifndef RAILRIDER_H
|
||||
#define RAILRIDER_H
|
||||
|
||||
#include "JGeometry/TVec3.h"
|
||||
#include "JMap/JMapInfoIter.h"
|
||||
#include "Map/Rail/BezierRail.h"
|
||||
|
||||
class RailRider
|
||||
{
|
||||
public:
|
||||
RailRider(const JMapInfoIter &);
|
||||
RailRider(s32, s32);
|
||||
|
||||
void move();
|
||||
void moveToNearestPos(const JGeometry::TVec3<f32> &);
|
||||
void moveToNearestPoint(const JGeometry::TVec3<f32> &);
|
||||
void moveToNextPoint();
|
||||
void reverse();
|
||||
|
||||
bool isReachedGoal() const;
|
||||
bool isReachedEdge() const;
|
||||
void setCoord(f32);
|
||||
void setSpeed(f32);
|
||||
|
||||
BezierRail* mBezierRail; // _0
|
||||
f32 _4;
|
||||
f32 mSpeed; // _8
|
||||
u32 _C;
|
||||
JGeometry::TVec3<f32> _10;
|
||||
JGeometry::TVec3<f32> _1C;
|
||||
JGeometry::TVec3<f32> _28;
|
||||
JGeometry::TVec3<f32> _34;
|
||||
s32 _40;
|
||||
};
|
||||
|
||||
#endif // RAILRIDER_H
|
@ -2,6 +2,7 @@
|
||||
#define LIVEACTORUTIL_H
|
||||
|
||||
#include "types.h"
|
||||
#include "System/Resource/ResourceHolder.h"
|
||||
|
||||
class LiveActor;
|
||||
|
||||
@ -29,6 +30,8 @@ namespace MR
|
||||
|
||||
void updateLightCtrl(LiveActor *);
|
||||
void setBaseTRMtx(LiveActor *, Mtx);
|
||||
|
||||
ResourceHolder* getModelResourceHolder(const LiveActor *);
|
||||
};
|
||||
|
||||
#endif // LIVEACTORUTIL_H
|
14
include/Map/Rail/BezierRail.h
Normal file
14
include/Map/Rail/BezierRail.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef BEZIERRAIL_H
|
||||
#define BEZIERRAIL_H
|
||||
|
||||
#include "JMap/JMapInfo.h"
|
||||
#include "JMap/JMapInfoIter.h"
|
||||
#include "Map/Rail/RailPart.h"
|
||||
|
||||
class BezierRail
|
||||
{
|
||||
public:
|
||||
BezierRail(const JMapInfoIter &, const JMapInfo *);
|
||||
};
|
||||
|
||||
#endif // BEZIERRAIL_H
|
15
include/Map/Rail/RailPart.h
Normal file
15
include/Map/Rail/RailPart.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef RAILPART_H
|
||||
#define RAILPART_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
class RailPart
|
||||
{
|
||||
public:
|
||||
RailPart();
|
||||
|
||||
u32 _0;
|
||||
u32 _4;
|
||||
};
|
||||
|
||||
#endif // RAILPART_H
|
@ -40,7 +40,7 @@ LiveActor::LiveActor(const char *name) : NameObj(name)
|
||||
this->mSpine = 0;
|
||||
this->mSensorKeeper = 0;
|
||||
this->mBinder = 0;
|
||||
this->_5C = 0;
|
||||
this->mRailRider = 0;
|
||||
this->mEffectKeeper = 0;
|
||||
this->_64 = 0;
|
||||
|
||||
@ -449,6 +449,33 @@ void LiveActor::initBinder(f32 a1, f32 a2, u32 a3)
|
||||
}
|
||||
}
|
||||
|
||||
void LiveActor::initRailRider(const JMapInfoIter &iter)
|
||||
{
|
||||
this->mRailRider = new RailRider(iter);
|
||||
}
|
||||
|
||||
void LiveActor::initEffectKeeper(s32 effectCount, const char *resName, bool enableSort)
|
||||
{
|
||||
const char* objName = this->mName;
|
||||
ResourceHolder* holder = MR::getModelResourceHolder(this);
|
||||
EffectKeeper* effectKeeper = new EffectKeeper(objName, holder, effectCount, resName);
|
||||
this->mEffectKeeper = effectKeeper;
|
||||
|
||||
if (enableSort)
|
||||
{
|
||||
effectKeeper->enableSort();
|
||||
}
|
||||
|
||||
this->mEffectKeeper->init(this);
|
||||
|
||||
if (this->mBinder != 0)
|
||||
{
|
||||
this->mEffectKeeper->setBinder(this->mBinder);
|
||||
}
|
||||
}
|
||||
|
||||
// LiveActor::initSound()
|
||||
|
||||
void LiveActor::initShadowControllerList(u32 listNum)
|
||||
{
|
||||
this->mShadowController = new ShadowControllerList(this, listNum);
|
||||
|
Loading…
Reference in New Issue
Block a user