metaforce/Runtime/World/CVisorFlare.hpp

59 lines
1.3 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2017-03-20 05:09:53 +00:00
#include <optional>
#include <vector>
#include "Runtime/CToken.hpp"
#include "Runtime/RetroTypes.hpp"
#include <zeus/CColor.hpp>
2017-03-20 05:09:53 +00:00
2018-12-08 05:30:43 +00:00
namespace urde {
2017-03-20 05:09:53 +00:00
class CActor;
class CStateManager;
class CTexture;
2017-03-20 05:09:53 +00:00
2018-12-08 05:30:43 +00:00
class CVisorFlare {
2017-03-20 05:09:53 +00:00
public:
2018-12-08 05:30:43 +00:00
enum class EBlendMode {
};
class CFlareDef {
TToken<CTexture> x0_tex;
float x8_f1;
float xc_f2;
zeus::CColor x10_color;
public:
CFlareDef(const TToken<CTexture>& tex, float f1, float f2, const zeus::CColor& color)
: x0_tex(tex), x8_f1(f1), xc_f2(f2), x10_color(color) {
x0_tex.Lock();
}
2020-03-04 00:49:13 +00:00
TToken<CTexture> GetTexture() const { return x0_tex; }
zeus::CColor GetColor() const { return x10_color; }
2018-12-08 05:30:43 +00:00
float GetScale() const;
float GetPosition() const;
};
2017-03-20 05:09:53 +00:00
private:
2018-12-08 05:30:43 +00:00
EBlendMode x0_blendMode;
std::vector<CFlareDef> x4_flareDefs;
bool x14_b1;
float x18_f1;
float x1c_f2;
float x20_f3;
float x24_ = 0.f;
float x28_ = 0.f;
u32 x2c_w1;
u32 x30_w2;
2017-03-20 05:09:53 +00:00
public:
2018-12-08 05:30:43 +00:00
CVisorFlare(EBlendMode blendMode, bool, float, float, float, u32, u32, const std::vector<CFlareDef>& flares);
void Update(float dt, const zeus::CVector3f& pos, const CActor* act, CStateManager& mgr);
void Render(const zeus::CVector3f& pos, const CStateManager& mgr) const;
static std::optional<CFlareDef> LoadFlareDef(CInputStream& in);
2017-03-20 05:09:53 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace urde