diff --git a/config/GM8E01_00/symbols.txt b/config/GM8E01_00/symbols.txt index 28bb21a3..b2468102 100644 --- a/config/GM8E01_00/symbols.txt +++ b/config/GM8E01_00/symbols.txt @@ -26648,11 +26648,11 @@ lbl_805AE870 = .sdata2:0x805AE870; // type:object size:0x4 align:4 data:float lbl_805AE874 = .sdata2:0x805AE874; // type:object size:0x4 align:4 data:float lbl_805AE878 = .sdata2:0x805AE878; // type:object size:0x4 align:4 data:float lbl_805AE880 = .sdata2:0x805AE880; // type:object size:0x8 align:8 data:double -lbl_805AE888 = .sdata2:0x805AE888; // type:object size:0x4 align:4 data:float +@1415 = .sdata2:0x805AE888; // type:object size:0x4 align:4 data:float lbl_805AE88C = .sdata2:0x805AE88C; // type:object size:0x4 align:4 data:float lbl_805AE890 = .sdata2:0x805AE890; // type:object size:0x4 align:4 data:float -lbl_805AE894 = .sdata2:0x805AE894; // type:object size:0x4 align:4 data:float -lbl_805AE898 = .sdata2:0x805AE898; // type:object size:0x8 align:4 data:float +@1550 = .sdata2:0x805AE894; // type:object size:0x4 align:4 data:float +@1711 = .sdata2:0x805AE898; // type:object size:0x8 align:4 data:float @151 = .sdata2:0x805AE8A0; // type:object size:0x4 scope:local align:4 data:float @152 = .sdata2:0x805AE8A4; // type:object size:0x4 scope:local align:4 data:float lbl_805AE8A8 = .sdata2:0x805AE8A8; // type:object size:0x4 align:4 data:float diff --git a/config/GM8E01_01/symbols.txt b/config/GM8E01_01/symbols.txt index 968d9d95..ac701f7c 100644 --- a/config/GM8E01_01/symbols.txt +++ b/config/GM8E01_01/symbols.txt @@ -1922,7 +1922,7 @@ GetIsVisibleToAutoMapper__8CMapAreaCFbb = .text:0x80080DA8; // type:function siz PostConstruct__8CMapAreaFv = .text:0x80080E10; // type:function size:0xE4 scope:global __dt__8CMapAreaFv = .text:0x80080EF4; // type:function size:0x84 scope:global __ct__8CMapAreaFR12CInputStreamUi = .text:0x80080F78; // type:function size:0x114 scope:global -__sinit_CMapArea_cpp = .text:0x8008108C; // type:function size:0x38 scope:global +__sinit_CMapArea_cpp = .text:0x8008108C; // type:function size:0x38 scope:local SplineIntersectTest__11CBallCameraCFR13CMaterialListR13CStateManager = .text:0x800810C4; // type:function size:0x788 scope:global CheckFailsafeFromMorphBallState__11CBallCameraCFR13CStateManager = .text:0x8008184C; // type:function size:0x6B0 scope:global OverrideCameraInfo__11CBallCameraFR13CStateManager = .text:0x80081EFC; // type:function size:0x8A0 scope:global @@ -14217,7 +14217,7 @@ __dt__16CVEColorToVectorFv = .text:0x803349EC; // type:function size:0xA0 scope: __ct__16CVEColorToVectorFP13CColorElement = .text:0x80334A8C; // type:function size:0x2C scope:global GetValue__11CVESubtractCFiR9CVector3f = .text:0x80334AB8; // type:function size:0xD4 scope:global __dt__11CVESubtractFv = .text:0x80334B8C; // type:function size:0xC0 scope:global -__ct__10CVESubractFP14CVectorElementP14CVectorElement = .text:0x80334C4C; // type:function size:0x30 scope:global +__ct__11CVESubtractFP14CVectorElementP14CVectorElement = .text:0x80334C4C; // type:function size:0x30 scope:global GetValue__28CVEParticleSystemTranslationCFiR9CVector3f = .text:0x80334C7C; // type:function size:0x5C scope:global GetValue__33CVEParticleSystemOrientationRightCFiR9CVector3f = .text:0x80334CD8; // type:function size:0x5C scope:global GetValue__30CVEParticleSystemOrientationUpCFiR9CVector3f = .text:0x80334D34; // type:function size:0x5C scope:global @@ -18678,7 +18678,7 @@ lbl_803EC728 = .data:0x803EC728; // type:object size:0xC __vt__12CRealElement = .data:0x803EC734; // type:object size:0x14 lbl_803EC748 = .data:0x803EC748; // type:object size:0x1C __vt__11CIntElement = .data:0x803EC764; // type:object size:0x10 -lbl_803EC774 = .data:0x803EC774; // type:object size:0x14 +__vt__14CVectorElement = .data:0x803EC774; // type:object size:0x14 __vt__8IElement = .data:0x803EC788; // type:object size:0xC __vt__13CColorElement = .data:0x803EC794; // type:object size:0x14 __vt__17CModVectorElement = .data:0x803EC7A8; // type:object size:0x10 scope:weak @@ -18849,29 +18849,29 @@ __vt__6CREAdd = .data:0x803EE2A4; // type:object size:0x14 __vt__12CRETimeScale = .data:0x803EE2B8; // type:object size:0x14 __vt__11CRESineWave = .data:0x803EE2CC; // type:object size:0x14 __vt__11CREConstant = .data:0x803EE2E0; // type:object size:0x14 -lbl_803EE2F8 = .data:0x803EE2F8; // type:object size:0x1C -lbl_803EE314 = .data:0x803EE314; // type:object size:0x1C -lbl_803EE330 = .data:0x803EE330; // type:object size:0x14 -lbl_803EE344 = .data:0x803EE344; // type:object size:0x14 -lbl_803EE358 = .data:0x803EE358; // type:object size:0x14 -lbl_803EE36C = .data:0x803EE36C; // type:object size:0x14 -lbl_803EE380 = .data:0x803EE380; // type:object size:0x14 -lbl_803EE394 = .data:0x803EE394; // type:object size:0x14 -lbl_803EE3A8 = .data:0x803EE3A8; // type:object size:0x14 -lbl_803EE3BC = .data:0x803EE3BC; // type:object size:0x14 -lbl_803EE3D0 = .data:0x803EE3D0; // type:object size:0x14 -lbl_803EE3E4 = .data:0x803EE3E4; // type:object size:0x14 -lbl_803EE3F8 = .data:0x803EE3F8; // type:object size:0x14 -lbl_803EE40C = .data:0x803EE40C; // type:object size:0x14 -lbl_803EE420 = .data:0x803EE420; // type:object size:0x14 -lbl_803EE434 = .data:0x803EE434; // type:object size:0x14 -lbl_803EE448 = .data:0x803EE448; // type:object size:0x14 -lbl_803EE45C = .data:0x803EE45C; // type:object size:0x14 -lbl_803EE470 = .data:0x803EE470; // type:object size:0x14 -lbl_803EE484 = .data:0x803EE484; // type:object size:0x14 -lbl_803EE498 = .data:0x803EE498; // type:object size:0x14 -lbl_803EE4AC = .data:0x803EE4AC; // type:object size:0x14 -lbl_803EE4C0 = .data:0x803EE4C0; // type:object size:0x18 +__vt__15CUVEAnimTexture = .data:0x803EE2F8; // type:object size:0x1C +__vt__12CUVEConstant = .data:0x803EE314; // type:object size:0x1C +__vt__16CVEColorToVector = .data:0x803EE330; // type:object size:0x14 +__vt__11CVESubtract = .data:0x803EE344; // type:object size:0x14 +__vt__28CVEParticleSystemTranslation = .data:0x803EE358; // type:object size:0x14 +__vt__33CVEParticleSystemOrientationRight = .data:0x803EE36C; // type:object size:0x14 +__vt__30CVEParticleSystemOrientationUp = .data:0x803EE380; // type:object size:0x14 +__vt__33CVEParticleSystemOrientationFront = .data:0x803EE394; // type:object size:0x14 +__vt__19CVEParticleVelocity = .data:0x803EE3A8; // type:object size:0x14 +__vt__27CVEParticlePreviousLocation = .data:0x803EE3BC; // type:object size:0x14 +__vt__19CVEParticleLocation = .data:0x803EE3D0; // type:object size:0x14 +__vt__15CVERealToVector = .data:0x803EE3E4; // type:object size:0x14 +__vt__18CVEKeyframeEmitter = .data:0x803EE3F8; // type:object size:0x14 +__vt__8CVEPulse = .data:0x803EE40C; // type:object size:0x14 +__vt__11CVEMultiply = .data:0x803EE420; // type:object size:0x14 +__vt__6CVEAdd = .data:0x803EE434; // type:object size:0x14 +__vt__16CVECircleCluster = .data:0x803EE448; // type:object size:0x14 +__vt__12CVETimeChain = .data:0x803EE45C; // type:object size:0x14 +__vt__9CVECircle = .data:0x803EE470; // type:object size:0x14 +__vt__12CVEAngleCone = .data:0x803EE484; // type:object size:0x14 +__vt__7CVECone = .data:0x803EE498; // type:object size:0x14 +__vt__15CVEFastConstant = .data:0x803EE4AC; // type:object size:0x14 +__vt__11CVEConstant = .data:0x803EE4C0; // type:object size:0x18 __vt__5CWarp = .data:0x803EE4D8; // type:object size:0x20 jumptable_803EE4F8 = .data:0x803EE4F8; // type:object size:0x20 scope:local jumptable_803EE518 = .data:0x803EE518; // type:object size:0x30 scope:local diff --git a/configure.py b/configure.py index bcc071c5..91f1c808 100755 --- a/configure.py +++ b/configure.py @@ -984,7 +984,7 @@ config.libs = [ Object(MatchingFor("GM8E01_00", "GM8E01_01"), "Kyoto/Particles/CRealElement.cpp"), Object(NonMatching, "Kyoto/Particles/CSpawnSystemKeyframeData.cpp"), Object(NonMatching, "Kyoto/Particles/CUVElement.cpp"), - Object(NonMatching, "Kyoto/Particles/CVectorElement.cpp"), + Object(MatchingFor("GM8E01_00", "GM8E01_01"), "Kyoto/Particles/CVectorElement.cpp"), Object(MatchingFor("GM8E01_00", "GM8E01_01"), "Kyoto/Particles/CWarp.cpp"), Object(MatchingFor("GM8E01_00", "GM8E01_01"), "Kyoto/Math/CPlane.cpp"), Object(MatchingFor("GM8E01_00", "GM8E01_01"), "Kyoto/Math/CSphere.cpp"), diff --git a/src/Kyoto/Particles/CVectorElement.cpp b/src/Kyoto/Particles/CVectorElement.cpp index 802f49c0..e3d29163 100644 --- a/src/Kyoto/Particles/CVectorElement.cpp +++ b/src/Kyoto/Particles/CVectorElement.cpp @@ -3,7 +3,6 @@ #include "Kyoto/CRandom16.hpp" #include "Kyoto/Graphics/CColor.hpp" #include "Kyoto/Math/CMath.hpp" -#include "Kyoto/Math/CRelAngle.hpp" #include "Kyoto/Math/CVector3f.hpp" #include "Kyoto/Particles/CParticleGlobals.hpp" #include "Kyoto/Particles/IElement.hpp" @@ -143,7 +142,22 @@ CVECircle::~CVECircle() { delete mRadius; } -bool CVECircle::GetValue(int frame, CVector3f& valOut) const {} +bool CVECircle::GetValue(int frame, CVector3f& valOut) const { + float radius; + float angleLinear; + float angleConstant; + mAngleLinear->GetValue(frame, angleLinear); + mRadius->GetValue(frame, radius); + mAngleConstant->GetValue(frame, angleConstant); + + float curAngle = (angleLinear * frame + angleConstant) * (M_PIF / 180.f); + + CVector3f offset = CVector3f(0.f, 0.f, 0.f); + mCircleOffset->GetValue(frame, offset); + + valOut = offset + (mXVec * radius * cosf(curAngle)) + (mYVec * radius * sinf(curAngle)); + return false; +} CVETimeChain::CVETimeChain(CVectorElement* a, CVectorElement* b, CIntElement* switchFrame) : mA(a), mB(b), mSwitchFrame(switchFrame) {} @@ -174,7 +188,7 @@ CVECircleCluster::CVECircleCluster(CVectorElement* circleOffset, CVectorElement* , mRandomFactor(randomFactor) { int _cycleFrames; cycleFrames->GetValue(0, _cycleFrames); - mRadius = CRelAngle::FromRadians(360.f / _cycleFrames).AsDegrees(); + mRadius = (M_PIF / 180.f) * (360.f / _cycleFrames); CVector3f normal = CVector3f(0.f, 0.f, 0.f); circleNormal->GetValue(0, normal); @@ -202,7 +216,26 @@ CVECircleCluster::~CVECircleCluster() { delete mRandomFactor; } -bool CVECircleCluster::GetValue(int frame, CVector3f& valOut) const { return false; } +bool CVECircleCluster::GetValue(int frame, CVector3f& valOut) const { + float curAngle; + curAngle = mRadius; + curAngle *= frame; + CVector3f offset = CVector3f(0.f, 0.f, 0.f); + mCircleOffset->GetValue(frame, offset); + + CVector3f tv = offset + (mXVec * cosf(curAngle)) + (mYVec * sinf(curAngle)); + + float dv; + mRandomFactor->GetValue(frame, dv); + + float magnitude = dv * tv.Magnitude(); + float x = magnitude * CRandom16::GetRandomNumber()->Float(); + float y = magnitude * CRandom16::GetRandomNumber()->Float(); + float z = magnitude * CRandom16::GetRandomNumber()->Float(); + valOut = CVector3f(x + tv.GetX(), y + tv.GetY(), z + tv.GetZ()); + + return false; +} CVEAdd::CVEAdd(CVectorElement* a, CVectorElement* b) : mA(a), mB(b) {} CVEAdd::~CVEAdd() {