2018-10-06 20:42:33 -07:00
|
|
|
#pragma once
|
2016-08-14 14:11:44 -07:00
|
|
|
|
2019-09-23 12:00:23 -07:00
|
|
|
#include "Runtime/RetroTypes.hpp"
|
2022-05-23 17:26:35 -07:00
|
|
|
#include "Runtime/Graphics/CTexture.hpp"
|
2019-09-23 12:00:23 -07:00
|
|
|
|
|
|
|
#include <zeus/CAABox.hpp>
|
|
|
|
#include <zeus/CTransform.hpp>
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2016-08-14 14:11:44 -07:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2017-08-30 19:42:37 -07:00
|
|
|
class CStateManager;
|
2016-08-14 14:11:44 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
class CWorldShadow {
|
2022-05-13 16:40:19 -07:00
|
|
|
std::unique_ptr<CTexture> x0_texture;
|
2018-12-07 21:30:43 -08:00
|
|
|
zeus::CTransform x4_view;
|
|
|
|
zeus::CTransform x34_model;
|
|
|
|
float x64_objHalfExtent = 1.f;
|
|
|
|
zeus::CVector3f x68_objPos = {0.f, 1.f, 0.f};
|
|
|
|
zeus::CVector3f x74_lightPos;
|
2019-04-06 22:14:48 -07:00
|
|
|
TAreaId x80_aid = kInvalidAreaId;
|
2018-12-07 21:30:43 -08:00
|
|
|
s32 x84_lightIdx = -1;
|
|
|
|
bool x88_blurReset = true;
|
2022-05-13 16:40:19 -07:00
|
|
|
|
2016-08-14 14:11:44 -07:00
|
|
|
public:
|
2018-12-07 21:30:43 -08:00
|
|
|
CWorldShadow(u32 w, u32 h, bool rgba8);
|
|
|
|
void EnableModelProjectedShadow(const zeus::CTransform& pos, s32 lightIdx, float f1);
|
|
|
|
void DisableModelProjectedShadow();
|
|
|
|
void BuildLightShadowTexture(const CStateManager& mgr, TAreaId aid, s32 lightIdx, const zeus::CAABox& aabb,
|
|
|
|
bool motionBlur, bool lighten);
|
|
|
|
void ResetBlur();
|
2016-08-14 14:11:44 -07:00
|
|
|
};
|
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|