mirror of https://github.com/AxioDL/metaforce.git
More Exo work
This commit is contained in:
parent
5e0c8fe9fd
commit
63c4083bef
|
@ -7,6 +7,23 @@ namespace metaforce {
|
|||
class CElementGen;
|
||||
namespace MP1 {
|
||||
class CIceAttackProjectile : public CActor {
|
||||
class CTrailObject {
|
||||
std::unique_ptr<CElementGen> x0_gen1;
|
||||
std::unique_ptr<CElementGen> x8_explosion;
|
||||
TUniqueId x10_collisionObj;
|
||||
float x14_ = 0.f;
|
||||
CActorLights x18_ = CActorLights(1, zeus::CVector3f(0.f, 0.f, 1.f), 4, 4, false, false, false, 0.1f);
|
||||
zeus::CVector3f x2f8_;
|
||||
zeus::CVector3f x304_;
|
||||
zeus::CVector3f x310_;
|
||||
int x31c_ = 0;
|
||||
u8 x320_ = 0;
|
||||
|
||||
public:
|
||||
CTrailObject(CElementGen* gen, TUniqueId uid, const zeus::CVector3f& vec1, const zeus::CVector3f& vec2,
|
||||
const zeus::CVector3f& vec3)
|
||||
: x0_gen1(gen), x10_collisionObj(uid), x2f8_(vec1), x304_(vec2), x310_(vec3) {}
|
||||
};
|
||||
TToken<CGenDescription> xe8_;
|
||||
TToken<CGenDescription> xf0_;
|
||||
TToken<CGenDescription> xf8_;
|
||||
|
|
|
@ -6,9 +6,10 @@
|
|||
#include "Runtime/CStateManager.hpp"
|
||||
#include "Runtime/Collision/CCollisionActor.hpp"
|
||||
#include "Runtime/Collision/CCollisionActorManager.hpp"
|
||||
#include "Runtime/Graphics/CBooRenderer.hpp"
|
||||
#include "Runtime/GameGlobalObjects.hpp"
|
||||
#include "Runtime/Graphics/CBooRenderer.hpp"
|
||||
#include "Runtime/MP1/World/CEnergyBall.hpp"
|
||||
#include "Runtime/MP1/World/CIceAttackProjectile.hpp"
|
||||
#include "Runtime/MP1/World/CMetroidPrimeRelay.hpp"
|
||||
#include "Runtime/Particle/CElementGen.hpp"
|
||||
#include "Runtime/Particle/CParticleElectric.hpp"
|
||||
|
@ -443,7 +444,7 @@ void CMetroidPrimeExo::AddToRenderer(const zeus::CFrustum& frustum, CStateManage
|
|||
}
|
||||
|
||||
void CMetroidPrimeExo::Render(CStateManager& mgr) {
|
||||
g_Renderer->SetGXRegister1Color(x8d8_);
|
||||
g_Renderer->SetGXRegister1Color(x8d8_beamColor);
|
||||
CPatterned::Render(mgr);
|
||||
}
|
||||
|
||||
|
@ -485,7 +486,21 @@ void CMetroidPrimeExo::DoUserAnimEvent(CStateManager& mgr, const CInt32POINode&
|
|||
}
|
||||
return;
|
||||
}
|
||||
if (type == EUserEventType::Projectile) {}
|
||||
if (type == EUserEventType::Projectile) {
|
||||
if (x92c_ == 6) {
|
||||
auto xf = zeus::lookAt(GetLctrTransform(node.GetLocatorName()).origin + zeus::CVector3f{0.f, 0.f, 1.5f},
|
||||
mgr.GetPlayer().GetTranslation());
|
||||
float randAngle = zeus::degToRad(mgr.GetActiveRandom()->Range(-20.f, 20.f));
|
||||
xf.rotateLocalZ(randAngle);
|
||||
TUniqueId uid = mgr.AllocateUniqueId();
|
||||
auto gen1 = g_SimplePool->GetObj(SObjectTag{SBIG('PART'), x930_.x4_particle1});
|
||||
auto gen2 = g_SimplePool->GetObj(SObjectTag{SBIG('PART'), x930_.x8_particle2});
|
||||
auto gen3 = g_SimplePool->GetObj(SObjectTag{SBIG('PART'), x930_.xc_particle3});
|
||||
mgr.AddObject(new CIceAttackProjectile(gen1, gen2, gen3, uid, GetAreaIdAlways(), GetUniqueId(), true, xf,
|
||||
x930_.x10_dInfo, {-1.f, 1.f}, x930_.x2c_, zeus::degToRad(x930_.x30_),
|
||||
x930_.x34_texture, x930_.x38_, x930_.x3a_, {}));
|
||||
}
|
||||
}
|
||||
CPatterned::DoUserAnimEvent(mgr, node, type, dt);
|
||||
}
|
||||
|
||||
|
@ -1626,12 +1641,12 @@ void CMetroidPrimeExo::UpdateColorChange(float f1, CStateManager& mgr) {
|
|||
}
|
||||
|
||||
if (x8e4_ >= 1.f) {
|
||||
x8d8_ = x8e0_;
|
||||
x8d8_beamColor = x8e0_;
|
||||
x8f4_24_ = false;
|
||||
GetModelData()->GetAnimationData()->SetParticleEffectState("ColorChange"sv, false, mgr);
|
||||
} else {
|
||||
x8e4_ = std::max(1.f, x8e4_ + f1 / 0.3f);
|
||||
x8d8_ = zeus::CColor::lerp(x8dc_, x8e0_, x8e4_);
|
||||
x8d8_beamColor = zeus::CColor::lerp(x8dc_, x8e0_, x8e4_);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1639,7 +1654,7 @@ void CMetroidPrimeExo::sub80278130(const zeus::CColor& col) {
|
|||
x8e4_ = 0.f;
|
||||
x8f4_24_ = true;
|
||||
x8e0_ = col;
|
||||
x8dc_ = x8d8_;
|
||||
x8dc_ = x8d8_beamColor;
|
||||
}
|
||||
|
||||
void CMetroidPrimeExo::UpdateHeadAnimation(float f1) {
|
||||
|
|
|
@ -114,7 +114,7 @@ class CMetroidPrimeExo : public CPatterned {
|
|||
TUniqueId x8cc_headColActor = kInvalidUniqueId;
|
||||
u32 x8d0_ = 3;
|
||||
u32 x8d4_ = 3;
|
||||
zeus::CColor x8d8_ = zeus::skBlack;
|
||||
zeus::CColor x8d8_beamColor = zeus::skBlack;
|
||||
zeus::CColor x8dc_ = zeus::skBlack;
|
||||
zeus::CColor x8e0_ = zeus::skBlack;
|
||||
float x8e4_ = 0.f;
|
||||
|
|
Loading…
Reference in New Issue