mirror of
https://github.com/shibbo/3dcomp.git
synced 2025-02-17 04:57:42 +00:00
FloaterMapParts
This commit is contained in:
parent
03ead753d8
commit
75fe523b72
@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "decompiled",
|
||||
"message": "0.8904%",
|
||||
"message": "0.9033%",
|
||||
"color": "blue"
|
||||
}
|
@ -51717,23 +51717,23 @@ _ZN2al11FixMapParts6appearEv=000000710084EAE0=00000040=true
|
||||
_ZN2al11FixMapParts7controlEv=000000710084EB20=00000044=true
|
||||
_ZN2al11FixMapParts17updateLinkedTransERKN4sead7Vector3IfEE=000000710084EB70=00000008=true
|
||||
_ZN2al11FixMapParts10receiveMsgEPKNS_9SensorMsgEPNS_9HitSensorES5_=000000710084EB80=00000078=true
|
||||
_ZN2al15FloaterMapPartsC2EPKc=000000710084EC00=00000098=false
|
||||
_ZN2al15FloaterMapPartsC1EPKc=000000710084ECA0=000000A0=false
|
||||
_ZN2al15FloaterMapParts4initERKNS_13ActorInitInfoE=000000710084ED40=000000C8=false
|
||||
_ZN2al15FloaterMapParts10receiveMsgEPKNS_9SensorMsgEPNS_9HitSensorES5_=000000710084EE10=00000090=false
|
||||
_ZN2al15FloaterMapParts7controlEv=000000710084EEA0=00000084=false
|
||||
_ZN2al15FloaterMapParts7exeWaitEv=000000710084EF30=00000058=false
|
||||
_ZN2al15FloaterMapPartsC2EPKc=000000710084EC00=00000098=true
|
||||
_ZN2al15FloaterMapPartsC1EPKc=000000710084ECA0=000000A0=true
|
||||
_ZN2al15FloaterMapParts4initERKNS_13ActorInitInfoE=000000710084ED40=000000C8=true
|
||||
_ZN2al15FloaterMapParts10receiveMsgEPKNS_9SensorMsgEPNS_9HitSensorES5_=000000710084EE10=00000090=true
|
||||
_ZN2al15FloaterMapParts7controlEv=000000710084EEA0=00000084=true
|
||||
_ZN2al15FloaterMapParts7exeWaitEv=000000710084EF30=00000058=true
|
||||
_ZN2al15FloaterMapParts7exeSinkEv=000000710084EF90=000000D0=false
|
||||
_ZN2al15FloaterMapParts7exeBackEv=000000710084F060=000000D0=false
|
||||
_ZN2al15FloaterMapPartsD1Ev=000000710084F130=00000010=false
|
||||
_ZN2al15FloaterMapPartsD0Ev=000000710084F140=00000030=false
|
||||
sub_710084F170=000000710084F170=0000005C=false
|
||||
sub_710084F1D0=000000710084F1D0=0000000C=false
|
||||
sub_710084F1E0=000000710084F1E0=000000D4=false
|
||||
sub_710084F2C0=000000710084F2C0=0000000C=false
|
||||
sub_710084F2D0=000000710084F2D0=000000D4=false
|
||||
sub_710084F3B0=000000710084F3B0=0000000C=false
|
||||
sub_710084F3C0=000000710084F3C0=00000068=false
|
||||
_ZN2al15FloaterMapPartsD1Ev=000000710084F130=00000010=true
|
||||
_ZN2al15FloaterMapPartsD0Ev=000000710084F140=00000030=true
|
||||
_ZNK12_GLOBAL__N_122FloaterMapPartsNrvWait7executeEPN2al11NerveKeeperE=000000710084F170=0000005C=false
|
||||
_ZNK12_GLOBAL__N_122FloaterMapPartsNrvWait13getActionNameEv=000000710084F1D0=0000000C=false
|
||||
_ZNK12_GLOBAL__N_122FloaterMapPartsNrvSink7executeEPN2al11NerveKeeperE=000000710084F1E0=000000D4=false
|
||||
_ZNK12_GLOBAL__N_122FloaterMapPartsNrvSink13getActionNameEv=000000710084F2C0=0000000C=false
|
||||
_ZNK12_GLOBAL__N_122FloaterMapPartsNrvBack7executeEPN2al11NerveKeeperE=000000710084F2D0=000000D4=false
|
||||
_ZNK12_GLOBAL__N_122FloaterMapPartsNrvBack13getActionNameEv=000000710084F3B0=0000000C=false
|
||||
_GLOBAL__sub_I_FloaterMapParts.cpp=000000710084F3C0=00000068=false
|
||||
_ZN2al12GateMapPartsC2EPKc=000000710084F430=00000100=false
|
||||
_ZN2al12GateMapPartsC1EPKc=000000710084F530=00000108=false
|
||||
_ZN2al12GateMapParts4initERKNS_13ActorInitInfoE=000000710084F640=00000148=false
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <math/seadMatrix.h>
|
||||
#include <math/seadQuat.h>
|
||||
#include <math/seadVector.h>
|
||||
#include <types.hpp>
|
||||
|
||||
@ -45,4 +46,6 @@ namespace al {
|
||||
void setScaleY(LiveActor*, f32);
|
||||
void setScaleZ(LiveActor*, f32);
|
||||
|
||||
sead::Quatf* getQuatPtr(LiveActor*);
|
||||
|
||||
}; // namespace al
|
21
lib/ActionLibrary/include/Library/Key/KeyPoseUtil.hpp
Normal file
21
lib/ActionLibrary/include/Library/Key/KeyPoseUtil.hpp
Normal file
@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include <math/seadQuat.h>
|
||||
#include <math/seadVector.h>
|
||||
#include <types.hpp>
|
||||
|
||||
namespace al {
|
||||
class ActorInitInfo;
|
||||
class KeyPoseKeeper;
|
||||
|
||||
KeyPoseKeeper* createKeyPoseKeeper(const ActorInitInfo&);
|
||||
void resetKeyPose(KeyPoseKeeper*);
|
||||
sead::Vector3f& getCurrentKeyTrans(const KeyPoseKeeper*);
|
||||
sead::Vector3f& getNextKeyTrans(const KeyPoseKeeper*);
|
||||
|
||||
void calcLerpKeyTrans(sead::Vector3f*, const KeyPoseKeeper*, f32);
|
||||
|
||||
void calcSlerpKeyQuat(sead::Quatf*, const KeyPoseKeeper*, f32);
|
||||
|
||||
f32 calcDistanceNextKeyTrans(const KeyPoseKeeper*);
|
||||
}; // namespace al
|
@ -14,7 +14,7 @@ namespace al {
|
||||
|
||||
bool tryGetArg(s32*, const ActorInitInfo&, const char*);
|
||||
bool tryGetArg(s32*, const PlacementInfo&, const char*);
|
||||
|
||||
bool tryGetArg(f32*, const ActorInitInfo&, const char*);
|
||||
bool tryGetArg(f32*, const PlacementInfo&, const char*);
|
||||
|
||||
bool tryGetArg(bool*, const PlacementInfo&, const char*);
|
||||
|
@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include "Library/LiveActor/LiveActor.hpp"
|
||||
|
||||
namespace al {
|
||||
class KeyPoseKeeper;
|
||||
|
||||
class FloaterMapParts : public LiveActor {
|
||||
public:
|
||||
FloaterMapParts(const char*);
|
||||
|
||||
virtual ~FloaterMapParts();
|
||||
virtual void init(const ActorInitInfo&);
|
||||
virtual bool receiveMsg(const SensorMsg*, HitSensor*, HitSensor*);
|
||||
virtual void control();
|
||||
|
||||
void exeWait();
|
||||
void exeSink();
|
||||
void exeBack();
|
||||
|
||||
KeyPoseKeeper* mKeyPoseKeeper = nullptr; // 0x148
|
||||
f32 _150 = 0;
|
||||
f32 mNextKeyDist = 0; // 0x154
|
||||
f32 mSinkSpeed = 5.0f; // 0x158
|
||||
f32 mBackSpeed = 5.0f; // 0x15C
|
||||
s32 _160 = 0;
|
||||
s32 _164 = 0;
|
||||
s32 mSinkKeepTime = 10; // 0x168
|
||||
s32 mMaxAccelCount = 10; // 0x16C
|
||||
s32 _170 = 0;
|
||||
};
|
||||
}; // namespace al
|
@ -9,6 +9,7 @@
|
||||
#include "Library/Clipping/ClippingUtil.hpp"
|
||||
#include "Library/Execute/ActorSystemFunction.hpp"
|
||||
#include "Library/Item/ActorItemFunction.hpp"
|
||||
#include "Library/Key/KeyPoseUtil.hpp"
|
||||
#include "Library/LiveActor/ActorActionFunction.hpp"
|
||||
#include "Library/LiveActor/ActorAnimFunction.hpp"
|
||||
#include "Library/LiveActor/ActorMovementFunction.hpp"
|
||||
|
108
lib/ActionLibrary/source/Library/Play/Actor/FloaterMapParts.cpp
Normal file
108
lib/ActionLibrary/source/Library/Play/Actor/FloaterMapParts.cpp
Normal file
@ -0,0 +1,108 @@
|
||||
#include "Library/Play/Actor/FloaterMapParts.hpp"
|
||||
#include "Library/Nerve/NerveAction.hpp"
|
||||
#include "Library/Nerve/NerveSetup.hpp"
|
||||
#include "Util.hpp"
|
||||
|
||||
namespace {
|
||||
using namespace al;
|
||||
|
||||
NERVE_ACTION_IMPL(FloaterMapParts, Wait)
|
||||
NERVE_ACTION_IMPL(FloaterMapParts, Sink)
|
||||
NERVE_ACTION_IMPL(FloaterMapParts, Back)
|
||||
|
||||
NERVE_ACTIONS_MAKE_STRUCT(FloaterMapParts, Wait, Sink, Back)
|
||||
}; // namespace
|
||||
|
||||
namespace al {
|
||||
FloaterMapParts::FloaterMapParts(const char* pName) : LiveActor(pName) {}
|
||||
|
||||
void FloaterMapParts::init(const ActorInitInfo& rInfo) {
|
||||
al::initNerveAction(this, "Wait", &NrvFloaterMapParts.mCollector, 0);
|
||||
al::initActorPoseTQSV(this);
|
||||
al::initMapPartsActor(this, rInfo, nullptr, 0);
|
||||
al::registerAreaHostMtx(this, rInfo);
|
||||
mKeyPoseKeeper = al::createKeyPoseKeeper(rInfo);
|
||||
mNextKeyDist = al::calcDistanceNextKeyTrans(mKeyPoseKeeper);
|
||||
al::tryGetArg(&mSinkSpeed, rInfo, "SinkSpeed");
|
||||
al::tryGetArg(&mBackSpeed, rInfo, "BackSpeed");
|
||||
al::tryGetArg(&mMaxAccelCount, rInfo, "MaxAccelCount");
|
||||
al::tryGetArg(&mSinkKeepTime, rInfo, "SinkKeepTime");
|
||||
al::trySyncStageSwitchAppear(this);
|
||||
}
|
||||
|
||||
bool FloaterMapParts::receiveMsg(const SensorMsg* pMsg, HitSensor* pSrc, HitSensor* pTarget) {
|
||||
if (al::isMsgFloorTouch(pMsg)) {
|
||||
_160 = 2;
|
||||
return true;
|
||||
} else if (al::isMsgShowModel(pMsg)) {
|
||||
al::showModelIfHide(this);
|
||||
return true;
|
||||
} else if (al::isMsgHideModel(pMsg)) {
|
||||
al::hideModelIfShow(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void FloaterMapParts::control() {
|
||||
f32 v2;
|
||||
|
||||
if (al::isNearZero(mNextKeyDist, 0.001f)) {
|
||||
v2 = 0.0f;
|
||||
} else {
|
||||
v2 = _150 / mNextKeyDist;
|
||||
}
|
||||
|
||||
al::calcLerpKeyTrans(al::getTransPtr(this), mKeyPoseKeeper, v2);
|
||||
al::calcSlerpKeyQuat(al::getQuatPtr(this), mKeyPoseKeeper, v2);
|
||||
|
||||
if (_160 > 0) {
|
||||
_160 = _160 - 1;
|
||||
}
|
||||
}
|
||||
|
||||
void FloaterMapParts::exeWait() {
|
||||
if (al::isFirstStep(this)) {
|
||||
al::validateClipping(this);
|
||||
}
|
||||
|
||||
if (_160 >= 1) {
|
||||
al::invalidateClipping(this);
|
||||
al::startNerveAction(this, "Sink");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void FloaterMapParts::exeSink() {
|
||||
if (al::isFirstStep(this)) {
|
||||
_170 = 0;
|
||||
}
|
||||
|
||||
if (_160 != 0) {
|
||||
_150 += ((mSinkSpeed * _170) / mMaxAccelCount);
|
||||
|
||||
if (_170 < mMaxAccelCount) {
|
||||
_170++;
|
||||
}
|
||||
|
||||
if (_150 > mNextKeyDist) {
|
||||
_150 = mNextKeyDist;
|
||||
}
|
||||
|
||||
_164 = 0;
|
||||
|
||||
if (mSinkKeepTime <= 0) {
|
||||
al::startNerveAction(this, "Back");
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// FloaterMapParts::exeBack
|
||||
|
||||
FloaterMapParts::~FloaterMapParts() {}
|
||||
|
||||
}; // namespace al
|
Loading…
x
Reference in New Issue
Block a user