mirror of https://github.com/AxioDL/metaforce.git
Runtime/Graphics: Replace bitfield unions with constructor initializers
This commit is contained in:
parent
f83b970e75
commit
232823ae69
|
@ -681,7 +681,16 @@ void CBooRenderer::LoadBallFade() {
|
||||||
}
|
}
|
||||||
|
|
||||||
CBooRenderer::CBooRenderer(IObjectStore& store, IFactory& resFac)
|
CBooRenderer::CBooRenderer(IObjectStore& store, IFactory& resFac)
|
||||||
: x8_factory(resFac), xc_store(store), x2a8_thermalRand(20) {
|
: x8_factory(resFac), xc_store(store), x2a8_thermalRand(20)
|
||||||
|
, x318_24_refectionDirty(false)
|
||||||
|
, x318_25_drawWireframe(false)
|
||||||
|
, x318_26_requestRGBA6(false)
|
||||||
|
, x318_27_currentRGBA6(false)
|
||||||
|
, x318_28_disableFog(false)
|
||||||
|
, x318_29_thermalVisor(false)
|
||||||
|
, x318_30_inAreaDraw(false)
|
||||||
|
, x318_31_persistRGBA6(false)
|
||||||
|
, m_thermalHotPass(false) {
|
||||||
g_Renderer = this;
|
g_Renderer = this;
|
||||||
xee_24_ = true;
|
xee_24_ = true;
|
||||||
|
|
||||||
|
|
|
@ -152,20 +152,15 @@ class CBooRenderer final : public IRenderer {
|
||||||
// std::unique_ptr<CTexture> x314_phazonSuitMask;
|
// std::unique_ptr<CTexture> x314_phazonSuitMask;
|
||||||
CPhazonSuitFilter m_phazonSuitFilter;
|
CPhazonSuitFilter m_phazonSuitFilter;
|
||||||
|
|
||||||
union {
|
bool x318_24_refectionDirty : 1;
|
||||||
struct {
|
bool x318_25_drawWireframe : 1;
|
||||||
bool x318_24_refectionDirty : 1;
|
bool x318_26_requestRGBA6 : 1;
|
||||||
bool x318_25_drawWireframe : 1;
|
bool x318_27_currentRGBA6 : 1;
|
||||||
bool x318_26_requestRGBA6 : 1;
|
bool x318_28_disableFog : 1;
|
||||||
bool x318_27_currentRGBA6 : 1;
|
bool x318_29_thermalVisor : 1;
|
||||||
bool x318_28_disableFog : 1;
|
bool x318_30_inAreaDraw : 1;
|
||||||
bool x318_29_thermalVisor : 1;
|
bool x318_31_persistRGBA6 : 1;
|
||||||
bool x318_30_inAreaDraw : 1;
|
bool m_thermalHotPass : 1;
|
||||||
bool x318_31_persistRGBA6 : 1;
|
|
||||||
bool m_thermalHotPass : 1;
|
|
||||||
};
|
|
||||||
u16 dummy = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
void GenerateFogVolumeRampTex(boo::IGraphicsDataFactory::Context& ctx);
|
void GenerateFogVolumeRampTex(boo::IGraphicsDataFactory::Context& ctx);
|
||||||
void GenerateSphereRampTex(boo::IGraphicsDataFactory::Context& ctx);
|
void GenerateSphereRampTex(boo::IGraphicsDataFactory::Context& ctx);
|
||||||
|
|
|
@ -140,10 +140,12 @@ u32 CMoviePlayer::THPAudioDecode(s16* buffer, const u8* audioFrame, bool stereo)
|
||||||
}
|
}
|
||||||
|
|
||||||
CMoviePlayer::CMoviePlayer(const char* path, float preLoadSeconds, bool loop, bool deinterlace)
|
CMoviePlayer::CMoviePlayer(const char* path, float preLoadSeconds, bool loop, bool deinterlace)
|
||||||
: CDvdFile(path), xec_preLoadSeconds(preLoadSeconds) {
|
: CDvdFile(path)
|
||||||
xf4_24_loop = loop;
|
, xec_preLoadSeconds(preLoadSeconds)
|
||||||
m_deinterlace = deinterlace;
|
, xf4_24_loop(loop)
|
||||||
|
, xf4_25_hasAudio(false)
|
||||||
|
, xf4_26_fieldFlip(false)
|
||||||
|
, m_deinterlace(deinterlace) {
|
||||||
/* Read THP header information */
|
/* Read THP header information */
|
||||||
u8 buf[64];
|
u8 buf[64];
|
||||||
SyncRead(buf, 64);
|
SyncRead(buf, 64);
|
||||||
|
|
|
@ -99,21 +99,15 @@ private:
|
||||||
float xe8_curSeconds = 0.f;
|
float xe8_curSeconds = 0.f;
|
||||||
float xec_preLoadSeconds;
|
float xec_preLoadSeconds;
|
||||||
u32 xf0_preLoadFrames = 0;
|
u32 xf0_preLoadFrames = 0;
|
||||||
|
bool xf4_24_loop : 1;
|
||||||
|
bool xf4_25_hasAudio : 1;
|
||||||
|
bool xf4_26_fieldFlip : 1;
|
||||||
|
bool m_deinterlace : 1;
|
||||||
u32 xf8_ = 0;
|
u32 xf8_ = 0;
|
||||||
u32 xfc_fieldIndex = 0;
|
u32 xfc_fieldIndex = 0;
|
||||||
|
|
||||||
std::unique_ptr<uint8_t[]> m_yuvBuf;
|
std::unique_ptr<uint8_t[]> m_yuvBuf;
|
||||||
|
|
||||||
union {
|
|
||||||
u32 m_dummy = 0;
|
|
||||||
struct {
|
|
||||||
bool xf4_24_loop : 1;
|
|
||||||
bool xf4_25_hasAudio : 1;
|
|
||||||
bool xf4_26_fieldFlip : 1;
|
|
||||||
bool m_deinterlace : 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
specter::View::ViewBlock m_viewVertBlock;
|
specter::View::ViewBlock m_viewVertBlock;
|
||||||
boo::ObjToken<boo::IGraphicsBufferD> m_blockBuf;
|
boo::ObjToken<boo::IGraphicsBufferD> m_blockBuf;
|
||||||
boo::ObjToken<boo::IGraphicsBufferD> m_vertBuf;
|
boo::ObjToken<boo::IGraphicsBufferD> m_vertBuf;
|
||||||
|
|
Loading…
Reference in New Issue