2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-06-05 23:13:28 +00:00
metaforce/Runtime/World/CScriptShadowProjector.hpp
Lioncash cabbfcc320 CActor: Make AddToRenderer() non-const
This member function alters instance state in a few implementations, so
it shouldn't be made const.

The state manager parameter also shouldn't be const. Retrieved data
from the post constructed instance is further modified in some
implementations. This removes the constness on this parameter in order
to fix more const_cast usages in a follow-up change.
2020-04-06 00:52:10 -04:00

44 lines
1.2 KiB
C++

#pragma once
#include <memory>
#include <string_view>
#include "Runtime/RetroTypes.hpp"
#include "Runtime/World/CActor.hpp"
#include <zeus/CVector3f.hpp>
namespace urde {
class CProjectedShadow;
class CScriptShadowProjector : public CActor {
float xe8_scale;
zeus::CVector3f xec_offset;
float xf8_zOffsetAdjust;
float xfc_opacity;
float x100_opacityRecip;
TUniqueId x104_target;
std::unique_ptr<CProjectedShadow> x108_projectedShadow;
u32 x10c_textureSize;
union {
struct {
bool x110_24_persistent : 1;
bool x110_25_shadowInvalidated : 1;
};
u8 x110_dummy = 0;
};
public:
CScriptShadowProjector(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool,
const zeus::CVector3f&, bool, float, float, float, float, s32);
void Accept(IVisitor& visitor) override;
void Think(float, CStateManager&) override;
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
void PreRender(CStateManager&, const zeus::CFrustum&) override;
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override {}
void CreateProjectedShadow();
};
} // namespace urde