CWorldTransManager and CGraphicsPalette stubs

This commit is contained in:
Phillip Stephens 2016-07-21 13:02:53 -07:00
parent 2ff1a2ee0b
commit 7d07fb62ae
3 changed files with 74 additions and 9 deletions

View File

@ -19,7 +19,7 @@ class CGameState
CGameOptions m_gameOpts; CGameOptions m_gameOpts;
double xa0_playTime; double xa0_playTime;
public: public:
CGameState() {} CGameState() = default;
CGameState(CBitStreamReader& stream); CGameState(CBitStreamReader& stream);
void SetCurrentWorldId(unsigned int id, const std::string& name); void SetCurrentWorldId(unsigned int id, const std::string& name);
CWorldTransManager& WorldTransitionManager() {return x9c_transManager;} CWorldTransManager& WorldTransitionManager() {return x9c_transManager;}

View File

@ -18,12 +18,24 @@ class CGraphicsPalette
{ {
friend class CTextRenderBuffer; friend class CTextRenderBuffer;
EPaletteFormat x0_fmt; EPaletteFormat x0_fmt;
int x4_entryCount; u32 x4_;
std::unique_ptr<u16[]> x8_entries; int x8_entryCount;
/* xc_ GXTlutObj here */ std::unique_ptr<u16[]> xc_entries;
/* x10_ GXTlutObj here */
bool x1c_ = false;
public: public:
CGraphicsPalette(EPaletteFormat fmt, int count) CGraphicsPalette(EPaletteFormat fmt, int count)
: x0_fmt(fmt), x4_entryCount(count), x8_entries(new u16[count]) {} : x0_fmt(fmt), x8_entryCount(count), xc_entries(new u16[count]) {}
CGraphicsPalette(CInputStream& in)
: x0_fmt(EPaletteFormat(in.readUint32Big()))
{
u16 w = in.readUint16Big();
u16 h = in.readUint16Big();
x8_entryCount = w * h;
xc_entries[x8_entryCount];
/* GX Tlut init here */
}
}; };
} }

View File

@ -1,22 +1,75 @@
#ifndef __URDE_CWORLDTRANSMANAGER_HPP__ #ifndef __URDE_CWORLDTRANSMANAGER_HPP__
#define __URDE_CWORLDTRANSMANAGER_HPP__ #define __URDE_CWORLDTRANSMANAGER_HPP__
#include "RetroTypes.hpp"
#include "CRandom16.hpp"
namespace urde namespace urde
{ {
class CWorldTransManager class CWorldTransManager
{ {
bool m_drawEnabled; float x0_ = 0.f;
u32 x4_ = 0;
u32 x8_ = 0;
u8 x14_ = 0;
float x18_;
CRandom16 x20_ = CRandom16(99);
u16 x24_ = 1189;
u32 x28_ = 0;
u8 x2c_ = 127;
u8 x2d_ = 64;
u32 x30_ = 0;
float x38_ = 0.f;
union
{
struct
{
bool x44_24_ : 1;
bool x44_25_ : 1;
bool x44_26_ : 1;
bool x44_27_ : 1;
bool x44_28_ : 1;
};
u8 dummy = 0;
};
public: public:
CWorldTransManager() : x44_24_(true) {}
void DrawFirstPass() const {}
void DrawSecondPass() const {}
void DrawAllModels() const {}
void UpdateLights(float) {}
void UpdateEnabled(float) {}
void UpdateDisabled(float) {}
void Update(float) {}
void DrawEnabled() const; void DrawEnabled() const;
void DrawDisabled() const; void DrawDisabled() const;
void sub_80209280() const {}
void Draw() const void Draw() const
{ {
if (m_drawEnabled) if (x30_ == 0)
DrawEnabled();
else
DrawDisabled(); DrawDisabled();
else if (x30_ == 1)
DrawEnabled();
else if (x30_ == 2)
sub_80209280();
} }
void StartTransition()
{
x0_ = 0.f;
x18_ = 0.f;
x44_24_ = false;
x44_24_ = true;
}
void EndTransition() {}
void PleaseStopSoon() {}
bool IsTransitionEnabled() const { return false; }
void DisableTransition() {}
void TouchModels() {}
void EnableTransition() {}
}; };
} }