2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-02-16 03:25:06 +00:00
|
|
|
|
2019-09-22 21:52:05 +00:00
|
|
|
#include "Runtime/rstl.hpp"
|
|
|
|
#include "Runtime/Particle/CWarp.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CAABox.hpp>
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2016-02-16 03:25:06 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2017-09-10 09:04:51 +00:00
|
|
|
class CStateManager;
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CFlameWarp : public CWarp {
|
2019-06-16 02:22:23 +00:00
|
|
|
rstl::reserved_vector<zeus::CVector3f, 9> x4_collisionPoints;
|
2018-12-08 05:30:43 +00:00
|
|
|
zeus::CVector3f x74_warpPoint;
|
|
|
|
zeus::CVector3f x80_floatingPoint;
|
|
|
|
float x8c_maxDistSq = 0.f;
|
|
|
|
float x90_minSize = FLT_MAX;
|
|
|
|
float x94_maxSize = FLT_MIN;
|
|
|
|
float x98_maxInfluenceDistSq;
|
|
|
|
CStateManager* x9c_stateMgr = nullptr;
|
|
|
|
bool xa0_24_activated : 1;
|
|
|
|
bool xa0_25_collisionWarp : 1;
|
|
|
|
bool xa0_26_processed : 1;
|
|
|
|
|
2016-02-16 03:25:06 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CFlameWarp(float maxInfluenceDist, const zeus::CVector3f& warpPoint, bool collisionWarp)
|
|
|
|
: x74_warpPoint(warpPoint)
|
|
|
|
, x80_floatingPoint(warpPoint)
|
|
|
|
, x98_maxInfluenceDistSq(maxInfluenceDist * maxInfluenceDist) {
|
2019-06-16 02:22:23 +00:00
|
|
|
x4_collisionPoints.resize(9, warpPoint);
|
2018-12-08 05:30:43 +00:00
|
|
|
xa0_24_activated = false;
|
|
|
|
xa0_25_collisionWarp = collisionWarp;
|
|
|
|
xa0_26_processed = false;
|
|
|
|
}
|
2016-02-16 03:25:06 +00:00
|
|
|
|
2019-06-16 02:22:23 +00:00
|
|
|
const rstl::reserved_vector<zeus::CVector3f, 9>& GetCollisionPoints() const { return x4_collisionPoints; }
|
2019-06-12 02:05:17 +00:00
|
|
|
float GetMinSize() const { return x90_minSize; }
|
|
|
|
float GetMaxSize() const { return x94_maxSize; }
|
|
|
|
void SetWarpPoint(const zeus::CVector3f& p) { x74_warpPoint = p; }
|
|
|
|
void SetFloatingPoint(const zeus::CVector3f& p) { x80_floatingPoint = p; }
|
|
|
|
const zeus::CVector3f& GetFloatingPoint() const { return x80_floatingPoint; }
|
|
|
|
void SetMaxDistSq(float d) { x8c_maxDistSq = d; }
|
|
|
|
void SetStateManager(CStateManager& mgr) { x9c_stateMgr = &mgr; }
|
2019-08-09 12:45:18 +00:00
|
|
|
bool UpdateWarp() override { return xa0_24_activated; }
|
|
|
|
void ModifyParticles(std::vector<CParticle>& particles) override;
|
|
|
|
void Activate(bool val) override { xa0_24_activated = val; }
|
|
|
|
bool IsActivated() override { return xa0_24_activated; }
|
2019-06-12 02:05:17 +00:00
|
|
|
bool IsProcessed() const { return xa0_26_processed; }
|
2019-08-09 12:45:18 +00:00
|
|
|
FourCC Get4CharID() override { return FOURCC('FWRP'); }
|
2019-05-10 02:33:56 +00:00
|
|
|
void ResetPosition(const zeus::CVector3f& pos) {
|
2019-06-16 02:22:23 +00:00
|
|
|
for (auto& vec : x4_collisionPoints) {
|
2019-05-10 02:33:56 +00:00
|
|
|
vec = pos;
|
|
|
|
}
|
|
|
|
xa0_26_processed = false;
|
|
|
|
}
|
2019-06-12 02:05:17 +00:00
|
|
|
zeus::CAABox CalculateBounds() const;
|
2016-02-16 03:25:06 +00:00
|
|
|
};
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|