mirror of
https://github.com/SMGCommunity/Petari.git
synced 2024-11-24 05:59:43 +00:00
decompile a few more ShadowController functions
This commit is contained in:
parent
f37146e3b8
commit
174ecbaaff
@ -595,20 +595,20 @@ __dt__16SensorHitCheckerFv,SensorHitChecker.o,LiveActor.a,true
|
||||
__ct__16SensorHitCheckerFPCc,SensorHitChecker.o,LiveActor.a,true
|
||||
__ct__22ShadowControllerHolderFv,ShadowController.o,LiveActor.a,false
|
||||
__ct__16ShadowControllerFP9LiveActorPCc,ShadowController.o,LiveActor.a,false
|
||||
__ct__Q22MR51Vector<Q22MR36AssignableArray<P16ShadowController>>Fv,ShadowController.o,LiveActor.a,false
|
||||
__dt__Q22MR51Vector<Q22MR36AssignableArray<P16ShadowController>>Fv,ShadowController.o,LiveActor.a,false
|
||||
push_back__Q22MR51Vector<Q22MR36AssignableArray<P16ShadowController>>FRCP16ShadowController,ShadowController.o,LiveActor.a,false
|
||||
movement__22ShadowControllerHolderFv,ShadowController.o,LiveActor.a,false
|
||||
initAfterPlacement__22ShadowControllerHolderFv,ShadowController.o,LiveActor.a,false
|
||||
updateController__22ShadowControllerHolderFv,ShadowController.o,LiveActor.a,false
|
||||
__ct__20ShadowControllerListFP9LiveActorUl,ShadowController.o,LiveActor.a,false
|
||||
addController__20ShadowControllerListFP16ShadowController,ShadowController.o,LiveActor.a,false
|
||||
getControllerCount__20ShadowControllerListCFv,ShadowController.o,LiveActor.a,false
|
||||
getController__20ShadowControllerListCFUl,ShadowController.o,LiveActor.a,false
|
||||
getController__20ShadowControllerListCFPCc,ShadowController.o,LiveActor.a,false
|
||||
resetCalcCount__20ShadowControllerListFv,ShadowController.o,LiveActor.a,false
|
||||
requestCalc__20ShadowControllerListFv,ShadowController.o,LiveActor.a,false
|
||||
requestCalc__16ShadowControllerFv,ShadowController.o,LiveActor.a,false
|
||||
__ct__Q22MR51Vector<Q22MR36AssignableArray<P16ShadowController>>Fv,ShadowController.o,LiveActor.a,true
|
||||
__dt__Q22MR51Vector<Q22MR36AssignableArray<P16ShadowController>>Fv,ShadowController.o,LiveActor.a,true
|
||||
push_back__Q22MR51Vector<Q22MR36AssignableArray<P16ShadowController>>FRCP16ShadowController,ShadowController.o,LiveActor.a,true
|
||||
movement__22ShadowControllerHolderFv,ShadowController.o,LiveActor.a,true
|
||||
initAfterPlacement__22ShadowControllerHolderFv,ShadowController.o,LiveActor.a,true
|
||||
updateController__22ShadowControllerHolderFv,ShadowController.o,LiveActor.a,true
|
||||
__ct__20ShadowControllerListFP9LiveActorUl,ShadowController.o,LiveActor.a,true
|
||||
addController__20ShadowControllerListFP16ShadowController,ShadowController.o,LiveActor.a,true
|
||||
getControllerCount__20ShadowControllerListCFv,ShadowController.o,LiveActor.a,true
|
||||
getController__20ShadowControllerListCFUl,ShadowController.o,LiveActor.a,true
|
||||
getController__20ShadowControllerListCFPCc,ShadowController.o,LiveActor.a,true
|
||||
resetCalcCount__20ShadowControllerListFv,ShadowController.o,LiveActor.a,true
|
||||
requestCalc__20ShadowControllerListFv,ShadowController.o,LiveActor.a,true
|
||||
requestCalc__16ShadowControllerFv,ShadowController.o,LiveActor.a,true
|
||||
update__16ShadowControllerFv,ShadowController.o,LiveActor.a,true
|
||||
updateFarClipping__16ShadowControllerFf,ShadowController.o,LiveActor.a,true
|
||||
updateDirection__16ShadowControllerFv,ShadowController.o,LiveActor.a,false
|
||||
@ -659,8 +659,8 @@ invalidate__16ShadowControllerFv,ShadowController.o,LiveActor.a,true
|
||||
addShadowController__2MRFP16ShadowController,ShadowController.o,LiveActor.a,false
|
||||
requestCalcActorShadowAppear__2MRFP9LiveActor,ShadowController.o,LiveActor.a,false
|
||||
requestCalcActorShadow__2MRFP9LiveActor,ShadowController.o,LiveActor.a,false
|
||||
__dt__Q22MR36AssignableArray<P16ShadowController>Fv,ShadowController.o,LiveActor.a,false
|
||||
__dt__22ShadowControllerHolderFv,ShadowController.o,LiveActor.a,false
|
||||
__dt__Q22MR36AssignableArray<P16ShadowController>Fv,ShadowController.o,LiveActor.a,true
|
||||
__dt__22ShadowControllerHolderFv,ShadowController.o,LiveActor.a,true
|
||||
__ct__12ShadowDrawerFPCc,ShadowDrawer.o,LiveActor.a,true
|
||||
getController__12ShadowDrawerCFv,ShadowDrawer.o,LiveActor.a,true
|
||||
setShadowController__12ShadowDrawerFP16ShadowController,ShadowDrawer.o,LiveActor.a,true
|
||||
|
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "Game",
|
||||
"message": "10.150944154778783%",
|
||||
"message": "10.177554894222311%",
|
||||
"color": "blue"
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "LiveActor",
|
||||
"message": "39.898%",
|
||||
"message": "41.18%",
|
||||
"color": "cyan"
|
||||
}
|
@ -10,7 +10,7 @@
|
||||
| [Enemy](https://github.com/shibbo/Petari/blob/master/docs/lib/Enemy.md) | 1.187873435931035% |
|
||||
| [GameAudio](https://github.com/shibbo/Petari/blob/master/docs/lib/GameAudio.md) | 0.0% |
|
||||
| [Gravity](https://github.com/shibbo/Petari/blob/master/docs/lib/Gravity.md) | 56.816792337477075% |
|
||||
| [LiveActor](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor.md) | 39.898570769940065% |
|
||||
| [LiveActor](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor.md) | 41.18026740433379% |
|
||||
| [Map](https://github.com/shibbo/Petari/blob/master/docs/lib/Map.md) | 15.921118600635062% |
|
||||
| [MapObj](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj.md) | 23.59306909068217% |
|
||||
| [NameObj](https://github.com/shibbo/Petari/blob/master/docs/lib/NameObj.md) | 30.427688079697695% |
|
||||
|
@ -49,7 +49,7 @@
|
||||
| [PartsModel.o](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor/PartsModel.md) | 91.37466307277629% | 12 / 13 | 92.3076923076923% | :eight_pointed_black_star:
|
||||
| [RailRider.o](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor/RailRider.md) | 75.37619699042408% | 28 / 33 | 84.84848484848484% | :eight_pointed_black_star:
|
||||
| [SensorHitChecker.o](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor/SensorHitChecker.md) | 65.21739130434783% | 10 / 13 | 76.92307692307693% | :eight_pointed_black_star:
|
||||
| [ShadowController.o](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor/ShadowController.md) | 32.82364933741081% | 39 / 68 | 57.35294117647059% | :eight_pointed_black_star:
|
||||
| [ShadowController.o](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor/ShadowController.md) | 61.16207951070336% | 55 / 68 | 80.88235294117648% | :eight_pointed_black_star:
|
||||
| [ShadowDrawer.o](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor/ShadowDrawer.md) | 100.0% | 4 / 4 | 100.0% | :white_check_mark:
|
||||
| [ShadowSurfaceBox.o](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor/ShadowSurfaceBox.md) | 0.0% | 0 / 5 | 0.0% | :x:
|
||||
| [ShadowSurfaceCircle.o](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor/ShadowSurfaceCircle.md) | 0.0% | 0 / 4 | 0.0% | :x:
|
||||
|
@ -5,26 +5,26 @@
|
||||
| :white_check_mark: | Function is completed.
|
||||
|
||||
|
||||
# 39 / 68 Completed -- (57.35294117647059%)
|
||||
# 55 / 68 Completed -- (80.88235294117648%)
|
||||
# ShadowController.o
|
||||
| Symbol | Decompiled? |
|
||||
| ------------- | ------------- |
|
||||
| `__ct__22ShadowControllerHolderFv` | :x: |
|
||||
| `__ct__16ShadowControllerFP9LiveActorPCc` | :x: |
|
||||
| `__ct__Q22MR51Vector<Q22MR36AssignableArray<P16ShadowController>>Fv` | :x: |
|
||||
| `__dt__Q22MR51Vector<Q22MR36AssignableArray<P16ShadowController>>Fv` | :x: |
|
||||
| `push_back__Q22MR51Vector<Q22MR36AssignableArray<P16ShadowController>>FRCP16ShadowController` | :x: |
|
||||
| `movement__22ShadowControllerHolderFv` | :x: |
|
||||
| `initAfterPlacement__22ShadowControllerHolderFv` | :x: |
|
||||
| `updateController__22ShadowControllerHolderFv` | :x: |
|
||||
| `__ct__20ShadowControllerListFP9LiveActorUl` | :x: |
|
||||
| `addController__20ShadowControllerListFP16ShadowController` | :x: |
|
||||
| `getControllerCount__20ShadowControllerListCFv` | :x: |
|
||||
| `getController__20ShadowControllerListCFUl` | :x: |
|
||||
| `getController__20ShadowControllerListCFPCc` | :x: |
|
||||
| `resetCalcCount__20ShadowControllerListFv` | :x: |
|
||||
| `requestCalc__20ShadowControllerListFv` | :x: |
|
||||
| `requestCalc__16ShadowControllerFv` | :x: |
|
||||
| `__ct__Q22MR51Vector<Q22MR36AssignableArray<P16ShadowController>>Fv` | :white_check_mark: |
|
||||
| `__dt__Q22MR51Vector<Q22MR36AssignableArray<P16ShadowController>>Fv` | :white_check_mark: |
|
||||
| `push_back__Q22MR51Vector<Q22MR36AssignableArray<P16ShadowController>>FRCP16ShadowController` | :white_check_mark: |
|
||||
| `movement__22ShadowControllerHolderFv` | :white_check_mark: |
|
||||
| `initAfterPlacement__22ShadowControllerHolderFv` | :white_check_mark: |
|
||||
| `updateController__22ShadowControllerHolderFv` | :white_check_mark: |
|
||||
| `__ct__20ShadowControllerListFP9LiveActorUl` | :white_check_mark: |
|
||||
| `addController__20ShadowControllerListFP16ShadowController` | :white_check_mark: |
|
||||
| `getControllerCount__20ShadowControllerListCFv` | :white_check_mark: |
|
||||
| `getController__20ShadowControllerListCFUl` | :white_check_mark: |
|
||||
| `getController__20ShadowControllerListCFPCc` | :white_check_mark: |
|
||||
| `resetCalcCount__20ShadowControllerListFv` | :white_check_mark: |
|
||||
| `requestCalc__20ShadowControllerListFv` | :white_check_mark: |
|
||||
| `requestCalc__16ShadowControllerFv` | :white_check_mark: |
|
||||
| `update__16ShadowControllerFv` | :white_check_mark: |
|
||||
| `updateFarClipping__16ShadowControllerFf` | :white_check_mark: |
|
||||
| `updateDirection__16ShadowControllerFv` | :x: |
|
||||
@ -75,5 +75,5 @@
|
||||
| `addShadowController__2MRFP16ShadowController` | :x: |
|
||||
| `requestCalcActorShadowAppear__2MRFP9LiveActor` | :x: |
|
||||
| `requestCalcActorShadow__2MRFP9LiveActor` | :x: |
|
||||
| `__dt__Q22MR36AssignableArray<P16ShadowController>Fv` | :x: |
|
||||
| `__dt__22ShadowControllerHolderFv` | :x: |
|
||||
| `__dt__Q22MR36AssignableArray<P16ShadowController>Fv` | :white_check_mark: |
|
||||
| `__dt__22ShadowControllerHolderFv` | :white_check_mark: |
|
||||
|
@ -2,11 +2,45 @@
|
||||
|
||||
#include <revolution.h>
|
||||
#include "Game/LiveActor/LiveActor.h"
|
||||
#include "Game/Scene/SceneObjHolder.h"
|
||||
#include "Game/Util.h"
|
||||
|
||||
class CollisionPartsFilterBase;
|
||||
class ShadowDrawer;
|
||||
|
||||
class ShadowController;
|
||||
|
||||
class ShadowControllerList {
|
||||
public:
|
||||
ShadowControllerList(LiveActor *, u32);
|
||||
|
||||
void addController(ShadowController *);
|
||||
u32 getControllerCount() const;
|
||||
ShadowController* getController(u32) const;
|
||||
ShadowController* getController(const char *) const;
|
||||
void resetCalcCount();
|
||||
void requestCalc();
|
||||
|
||||
MR::Vector<MR::AssignableArray<ShadowController*> > mShadowList; // _0
|
||||
LiveActor* mHost; // _C
|
||||
};
|
||||
|
||||
class ShadowControllerHolder : public NameObj {
|
||||
public:
|
||||
ShadowControllerHolder();
|
||||
|
||||
virtual ~ShadowControllerHolder();
|
||||
virtual void initAfterPlacement();
|
||||
virtual void movement();
|
||||
|
||||
void updateController();
|
||||
|
||||
MR::Vector<MR::AssignableArray<ShadowController*> > _C;
|
||||
MR::Vector<MR::AssignableArray<ShadowController*> > _18;
|
||||
bool _24;
|
||||
f32 mFarClip; // _28
|
||||
};
|
||||
|
||||
class ShadowController {
|
||||
public:
|
||||
ShadowController(LiveActor *, const char *);
|
||||
@ -62,8 +96,12 @@ public:
|
||||
|
||||
void updateProjection();
|
||||
|
||||
inline void appendToHolder() {
|
||||
MR::getSceneObj<ShadowControllerHolder*>(SceneObj_ShadowControllerHolder)->_18.push_back(this);
|
||||
}
|
||||
|
||||
LiveActor* mActor; // _0
|
||||
const char* pName; // _4
|
||||
const char* mName; // _4
|
||||
const char* mGroupName; // _8
|
||||
ShadowDrawer* mDrawer; // _C
|
||||
u32 _10;
|
||||
@ -93,21 +131,6 @@ public:
|
||||
u8 _72;
|
||||
};
|
||||
|
||||
class ShadowControllerList {
|
||||
public:
|
||||
ShadowControllerList(LiveActor *, u32);
|
||||
|
||||
void addController(ShadowController *);
|
||||
u32 getControllerCount() const;
|
||||
ShadowController* getController(u32) const;
|
||||
ShadowController* getController(const char *) const;
|
||||
void resetCalcCount();
|
||||
void requestCalc();
|
||||
|
||||
MR::Vector<MR::AssignableArray<ShadowController*> > mShadowList; // _0
|
||||
LiveActor* mHost; // _C
|
||||
};
|
||||
|
||||
namespace MR {
|
||||
void addShadowController(ShadowController *);
|
||||
void requestCalcActorShadowAppear(LiveActor *);
|
||||
|
@ -26,6 +26,7 @@
|
||||
#define SceneObj_CoinRotater 0x38
|
||||
#define SceneObj_AirBubbleHolder 0x39
|
||||
#define SceneObj_BigFanHolder 0x3A
|
||||
#define SceneObj_ShadowControllerHolder 0x44
|
||||
#define SceneObj_ShadowVolumeDrawer 0x45
|
||||
#define SceneObj_ShadowSurfaceDrawerInit 0x46
|
||||
#define SceneObj_VolumeModelDrawInit 0x4C
|
||||
|
@ -76,6 +76,15 @@ namespace MR {
|
||||
|
||||
}
|
||||
|
||||
inline s32 getCount() {
|
||||
return mCount;
|
||||
}
|
||||
|
||||
inline void init(s32 cnt) {
|
||||
mArray.mArr = new T::Item[cnt];
|
||||
mArray.mMaxSize = cnt;
|
||||
}
|
||||
|
||||
inline void assign(T::Item &pItem, int where) {
|
||||
mArray.mArr[where] = pItem;
|
||||
}
|
||||
@ -100,8 +109,8 @@ namespace MR {
|
||||
return mArray.mArr[mCount];
|
||||
}
|
||||
|
||||
inline T::Item* getAt(u32 idx) {
|
||||
return mArray[idx];
|
||||
inline T::Item operator[](int idx) const {
|
||||
return mArray.mArr[idx];
|
||||
}
|
||||
|
||||
T mArray; // _0
|
||||
|
@ -1,6 +1,97 @@
|
||||
#include "Game/LiveActor/ShadowController.h"
|
||||
#include "Game/LiveActor/ShadowDrawer.h"
|
||||
|
||||
ShadowControllerHolder::ShadowControllerHolder() : NameObj("影管理"), _C(), _18(), _24(false) {
|
||||
mFarClip = 4000.0f;
|
||||
_C.init(0x500);
|
||||
_18.init(0x400);
|
||||
MR::connectToScene(this, 0x2D, -1, -1, -1);
|
||||
|
||||
if (MR::isEqualStageName("AstroGalaxy") || MR::isEqualStageName("PeachCastleGardenGalaxy") || MR::isEqualStageName("PeachCastleFinalGalaxy")) {
|
||||
_24 = true;
|
||||
}
|
||||
}
|
||||
|
||||
void ShadowControllerHolder::movement() {
|
||||
updateController();
|
||||
}
|
||||
|
||||
void ShadowControllerHolder::initAfterPlacement() {
|
||||
u32 count = _C.getCount();
|
||||
for (u32 i = 0; i < count; i++) {
|
||||
ShadowController* ctrl = _C[i];
|
||||
ctrl->updateDirection();
|
||||
ctrl->updateProjection();
|
||||
}
|
||||
}
|
||||
|
||||
void ShadowControllerHolder::updateController() {
|
||||
u32 count = _18.getCount();
|
||||
|
||||
for (u32 i = 0; i < count; i++) {
|
||||
if (_24) {
|
||||
ShadowController* ctrl = _18[i];
|
||||
ctrl->updateFarClipping(mFarClip);
|
||||
}
|
||||
|
||||
ShadowController* ctrl = _18[i];
|
||||
ctrl->update();
|
||||
}
|
||||
|
||||
_18.mCount = 0;
|
||||
}
|
||||
|
||||
ShadowControllerList::ShadowControllerList(LiveActor *pActor, u32 listCount) : mShadowList(), mHost(pActor) {
|
||||
mShadowList.init(listCount);
|
||||
}
|
||||
|
||||
void ShadowControllerList::addController(ShadowController *pController) {
|
||||
mShadowList.push_back(pController);
|
||||
}
|
||||
|
||||
u32 ShadowControllerList::getControllerCount() const {
|
||||
return mShadowList.mCount;
|
||||
}
|
||||
|
||||
ShadowController* ShadowControllerList::getController(u32 idx) const {
|
||||
return mShadowList[idx];
|
||||
}
|
||||
|
||||
ShadowController* ShadowControllerList::getController(const char *pName) const {
|
||||
if (mShadowList.mCount == 1) {
|
||||
return mShadowList[0];
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < mShadowList.mCount; i++) {
|
||||
if (MR::isEqualString(pName, mShadowList[i]->mName)) {
|
||||
return mShadowList[i];
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void ShadowControllerList::resetCalcCount() {
|
||||
for (u32 i = 0; i < mShadowList.getCount(); i++) {
|
||||
ShadowController* controller = mShadowList[i];
|
||||
controller->_65 = 0;
|
||||
controller->_66 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ShadowControllerList::requestCalc() {
|
||||
for (u32 i = 0; i < mShadowList.getCount(); i++) {
|
||||
mShadowList[i]->requestCalc();
|
||||
}
|
||||
}
|
||||
|
||||
void ShadowController::requestCalc() {
|
||||
if (!_64) {
|
||||
_64 = 1;
|
||||
appendToHolder();
|
||||
}
|
||||
}
|
||||
|
||||
void ShadowController::update() {
|
||||
if (isDraw()) {
|
||||
updateDirection();
|
||||
@ -245,4 +336,8 @@ void ShadowController::validate() {
|
||||
|
||||
void ShadowController::invalidate() {
|
||||
_71 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
ShadowControllerHolder::~ShadowControllerHolder() {
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user