From 5c77de0dd772a29a7c03683cb41286bbda709763 Mon Sep 17 00:00:00 2001 From: shibbo Date: Wed, 31 Jul 2019 14:36:34 -0400 Subject: [PATCH] ClippingDirector::entryLodCtrl() --- include/Actor/Clipping/ClippingActorHolder.h | 2 ++ include/Actor/Clipping/ClippingDirector.h | 2 ++ include/Actor/LOD/LodCtrl.h | 37 ++++++++++++++++++++ source/Actor/Clipping/ClippingDirector.cpp | 5 +++ 4 files changed, 46 insertions(+) create mode 100644 include/Actor/LOD/LodCtrl.h diff --git a/include/Actor/Clipping/ClippingActorHolder.h b/include/Actor/Clipping/ClippingActorHolder.h index ef191623..e0f70d10 100644 --- a/include/Actor/Clipping/ClippingActorHolder.h +++ b/include/Actor/Clipping/ClippingActorHolder.h @@ -3,6 +3,7 @@ #include "Actor/Clipping/ClippingActorInfo.h" #include "Actor/LiveActor/LiveActor.h" +#include "Actor/LOD/LodCtrl.h" #include "Actor/NameObj/NameObj.h" class ClippingActorHolder : public NameObj @@ -14,6 +15,7 @@ public: virtual void movement(); void initViewGroupTable(); + void entryLodCtrl(LodCtrl *, const JMapInfoIter &); void registerActor(LiveActor *); void initSystemInfo(LiveActor *, const JMapInfoIter &); diff --git a/include/Actor/Clipping/ClippingDirector.h b/include/Actor/Clipping/ClippingDirector.h index d5e54b1a..89e61f40 100644 --- a/include/Actor/Clipping/ClippingDirector.h +++ b/include/Actor/Clipping/ClippingDirector.h @@ -4,6 +4,7 @@ #include "Actor/Clipping/ClippingActorHolder.h" #include "Actor/Clipping/ClippingGroupHolder.h" #include "Actor/Clipping/ClippingJudge.h" +#include "Actor/LOD/LodCtrl.h" #include "Actor/NameObj/NameObj.h" class ClippingDirector : public NameObj @@ -17,6 +18,7 @@ public: void registerActor(LiveActor *); void initActorSystemInfo(LiveActor *, const JMapInfoIter &); void joinToGroupClipping(LiveActor *, const JMapInfoIter &, s32); + void entryLodCtrl(LodCtrl *, const JMapInfoIter &); ClippingJudge* mJudge; // _C ClippingActorHolder* mActorHolder; // _10 diff --git a/include/Actor/LOD/LodCtrl.h b/include/Actor/LOD/LodCtrl.h new file mode 100644 index 00000000..3fb3e20f --- /dev/null +++ b/include/Actor/LOD/LodCtrl.h @@ -0,0 +1,37 @@ +#ifndef LODCTRL_H +#define LODCTRL_H + +#include "Actor/LiveActor/LiveActor.h" +#include "JMap/JMapInfoIter.h" + +class LodCtrl +{ +public: + LodCtrl(LiveActor *, const JMapInfoIter &); + + void offSyncShadowHost(); + void appear(); + void kill(); + void validate(); + void invalidate(); + void update(); + bool isShowLowModel() const; + void setDistanceToMiddle(f32); + void calcDistanceToCamera() const; + void setDistanceToLow(f32); + void setDistanceToMiddleAndLow(f32, f32); + + f32 mDistToMiddle; // _0 + f32 mDistToLow; // _4 + u32 _8; + const LiveActor* mActor; // _C + u32 _10; + u32 _14; + bool mIsValid; // _18 + u8 _19; + u8 _1A; + u8 _1B; + u8 _1C[0x34-0x1C]; +}; + +#endif // LODCTRL_H \ No newline at end of file diff --git a/source/Actor/Clipping/ClippingDirector.cpp b/source/Actor/Clipping/ClippingDirector.cpp index caadd0af..f6c6188c 100644 --- a/source/Actor/Clipping/ClippingDirector.cpp +++ b/source/Actor/Clipping/ClippingDirector.cpp @@ -59,4 +59,9 @@ void ClippingDirector::joinToGroupClipping(LiveActor *actor, const JMapInfoIter ClippingActorInfo* info = this->mActorHolder->startGroupClipping(actor, iter); this->mGroupHolder->createAndAdd(info, iter, unk1); +} + +void ClippingDirector::entryLodCtrl(LodCtrl* lodCtrl, const JMapInfoIter &iter) +{ + this->mActorHolder->entryLodCtrl(lodCtrl, iter); } \ No newline at end of file