2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 17:47:43 +00:00

New code style refactor

This commit is contained in:
Jack Andersen
2018-12-07 19:30:43 -10:00
parent 41ae32be31
commit 636c82a568
1451 changed files with 171430 additions and 203303 deletions

View File

@@ -2,53 +2,49 @@
#include "CDvdFile.hpp"
namespace urde::MP1
{
namespace urde::MP1 {
class CGBASupport : public CDvdFile
{
class CGBASupport : public CDvdFile {
public:
enum class EPhase
{
LoadClientPad,
Standby,
StartProbeTimeout,
PollProbe,
StartJoyBusBoot,
PollJoyBusBoot,
DataTransfer,
Complete,
Failed
};
enum class EPhase {
LoadClientPad,
Standby,
StartProbeTimeout,
PollProbe,
StartJoyBusBoot,
PollJoyBusBoot,
DataTransfer,
Complete,
Failed
};
private:
u32 x28_fileSize;
std::unique_ptr<u8[]> x2c_buffer;
EPhase x34_phase = EPhase::LoadClientPad;
float x38_timeout = 0.f;
std::shared_ptr<IDvdRequest> x30_dvdReq;
u8 x3c_status = 0;
u32 x40_siChan = -1;
bool x44_fusionLinked = false;
bool x45_fusionBeat = false;
u32 x28_fileSize;
std::unique_ptr<u8[]> x2c_buffer;
EPhase x34_phase = EPhase::LoadClientPad;
float x38_timeout = 0.f;
std::shared_ptr<IDvdRequest> x30_dvdReq;
u8 x3c_status = 0;
u32 x40_siChan = -1;
bool x44_fusionLinked = false;
bool x45_fusionBeat = false;
static u8 CalculateFusionJBusChecksum(const u8* data, size_t len);
static u8 CalculateFusionJBusChecksum(const u8* data, size_t len);
public:
static void Initialize();
static void GlobalPoll();
static void Initialize();
static void GlobalPoll();
CGBASupport();
~CGBASupport();
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; }
CGBASupport();
~CGBASupport();
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; }
};
}
} // namespace urde::MP1