metaforce/Runtime/MP1/CGBASupport.hpp

56 lines
1.1 KiB
C++
Raw Normal View History

2016-12-14 22:56:59 +00:00
#ifndef __URDE_CGBASUPPORT_HPP__
#define __URDE_CGBASUPPORT_HPP__
#include "CDvdFile.hpp"
2016-12-14 22:56:59 +00:00
namespace urde
{
namespace MP1
{
class CGBASupport : public CDvdFile
2016-12-14 22:56:59 +00:00
{
2017-01-01 06:46:52 +00:00
public:
enum class EPhase
{
LoadClientPad,
Standby,
StartProbeTimeout,
PollProbe,
StartJoyBusBoot,
PollJoyBusBoot,
DataTransfer,
Complete,
Failed
};
private:
u32 x28_fileSize;
std::unique_ptr<u8[]> x2c_buffer;
std::shared_ptr<IDvdRequest> x30_dvdReq;
2017-01-01 06:46:52 +00:00
EPhase x34_phase = EPhase::LoadClientPad;
float x38_timeout = 0.f;
u8 x3c_status = 0;
u32 x40_siChan = -1;
bool x44_fusionLinked = false;
bool x45_fusionBeat = false;
static CGBASupport* SharedInstance;
2017-01-01 06:46:52 +00:00
2016-12-14 22:56:59 +00:00
public:
CGBASupport();
~CGBASupport();
2017-01-01 06:46:52 +00:00
bool PollResponse();
void Update(float dt);
bool IsReady();
void InitializeSupport();
void StartLink();
EPhase GetPhase() const { return x34_phase; }
bool IsFusionLinked() const { return x44_fusionLinked; }
bool IsFusionBeat() const { return x45_fusionBeat; }
2016-12-14 22:56:59 +00:00
};
}
}
#endif // __URDE_CGBASUPPORT_HPP__