mirror of
https://github.com/zeldaret/ss
synced 2026-07-08 22:04:41 -04:00
Other cleanup
This commit is contained in:
+11
-11
@@ -22,17 +22,17 @@ public:
|
||||
int update();
|
||||
bool drawDirectly();
|
||||
|
||||
void setField703(bool val) {
|
||||
field_0x703 = val;
|
||||
void setVisible(bool val) {
|
||||
mVisible = val;
|
||||
}
|
||||
void setField704(bool val) {
|
||||
field_0x704 = val;
|
||||
void setDrawDirectly(bool val) {
|
||||
mDrawDirectly = val;
|
||||
}
|
||||
bool getField704() const {
|
||||
return field_0x704;
|
||||
bool getDrawDirectly() const {
|
||||
return mDrawDirectly;
|
||||
}
|
||||
void setField705(bool val) {
|
||||
field_0x705 = val;
|
||||
void setCalibrationPointCenterEnabled(bool val) {
|
||||
mCalibrationPointCenterEnabled = val;
|
||||
}
|
||||
|
||||
dCursorHitCheck_c *getHitCheck() {
|
||||
@@ -60,9 +60,9 @@ private:
|
||||
/* 0x6F8 */ mVec2_c mCsVelocity;
|
||||
/* 0x700 */ mAng field_0x700;
|
||||
/* 0x702 */ u8 mAlpha;
|
||||
/* 0x703 */ u8 field_0x703;
|
||||
/* 0x704 */ bool field_0x704;
|
||||
/* 0x705 */ u8 field_0x705;
|
||||
/* 0x703 */ bool mVisible;
|
||||
/* 0x704 */ bool mDrawDirectly;
|
||||
/* 0x705 */ bool mCalibrationPointCenterEnabled;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,6 +16,10 @@ public:
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
s32 getStatus() const {
|
||||
return mDvdDriveStatus;
|
||||
}
|
||||
|
||||
private:
|
||||
static dDvdDriveError_c *sInstance;
|
||||
|
||||
|
||||
+54
-19
@@ -11,8 +11,22 @@
|
||||
namespace dDvdUnk {
|
||||
|
||||
class FontUnk {
|
||||
private:
|
||||
enum Error_e {
|
||||
ERROR_NONE,
|
||||
ERROR_DISK,
|
||||
ERROR_PAD,
|
||||
ERROR_NAND,
|
||||
};
|
||||
|
||||
enum Flag_e {
|
||||
FLAG_ERROR_REQUEST = 0x1,
|
||||
FLAG_0x2 = 0x2,
|
||||
FLAG_ERROR_STATE = 0x4,
|
||||
};
|
||||
|
||||
public:
|
||||
FontUnk() : field_0x2D(0) {}
|
||||
FontUnk() : mFlags(0) {}
|
||||
|
||||
static FontUnk *GetInstance() {
|
||||
return sInstance;
|
||||
@@ -20,26 +34,35 @@ public:
|
||||
|
||||
static void create(EGG::Heap *heap);
|
||||
void init();
|
||||
void execute();
|
||||
void drawNonDriveError();
|
||||
void drawDriveError();
|
||||
|
||||
void preExecute();
|
||||
|
||||
bool isAnyError() const;
|
||||
void onError();
|
||||
void clearNandTrackerError();
|
||||
|
||||
void fn_800529B0();
|
||||
void fn_800529E0();
|
||||
void clearNandError();
|
||||
void fn_80052A20();
|
||||
void fn_80052D00(bool);
|
||||
void fn_80052CC0();
|
||||
void setNeedsPad(bool);
|
||||
bool padErrorsAllowed();
|
||||
void fn_80052D50();
|
||||
void fn_80052C90();
|
||||
void fn_80052C60();
|
||||
bool fn_80052D20();
|
||||
void fn_80052DD0();
|
||||
|
||||
s32 getField_0x24() const {
|
||||
return field_0x24;
|
||||
s32 getNandError() const {
|
||||
return mNandErrorCode;
|
||||
}
|
||||
|
||||
bool getField_0x28() const {
|
||||
return field_0x28;
|
||||
bool isDiskError() const {
|
||||
return mIsDiskError;
|
||||
}
|
||||
|
||||
u8 getField_0x29() const {
|
||||
return field_0x29;
|
||||
bool isNandError() const {
|
||||
return mIsNandError;
|
||||
}
|
||||
|
||||
void setField_0x2C(u8 val) {
|
||||
@@ -53,16 +76,28 @@ public:
|
||||
private:
|
||||
static FontUnk *sInstance;
|
||||
|
||||
void onFlag(u8 mask) {
|
||||
mFlags |= mask;
|
||||
}
|
||||
|
||||
void offFlag(u8 mask) {
|
||||
mFlags &= ~mask;
|
||||
}
|
||||
|
||||
bool checkFlag(u8 mask) const {
|
||||
return (mFlags & mask) != 0;
|
||||
}
|
||||
|
||||
/* 0x00 */ nw4r::ut::ResFont mFont;
|
||||
/* 0x1C */ s32 field_0x1C;
|
||||
/* 0x20 */ s32 field_0x20;
|
||||
/* 0x24 */ s32 field_0x24;
|
||||
/* 0x28 */ bool field_0x28;
|
||||
/* 0x29 */ u8 field_0x29;
|
||||
/* 0x2A */ u8 field_0x2A;
|
||||
/* 0x1C */ s32 mErrorType;
|
||||
/* 0x20 */ s32 mDiskErrorCode;
|
||||
/* 0x24 */ s32 mNandErrorCode;
|
||||
/* 0x28 */ bool mIsDiskError;
|
||||
/* 0x29 */ bool mIsNandError;
|
||||
/* 0x2A */ bool mIsPadError;
|
||||
/* 0x2B */ u8 field_0x2B;
|
||||
/* 0x2C */ u8 field_0x2C;
|
||||
/* 0x2D */ u8 field_0x2D;
|
||||
/* 0x2D */ u8 mFlags;
|
||||
};
|
||||
|
||||
} // namespace dDvdUnk
|
||||
|
||||
@@ -20,9 +20,24 @@ public:
|
||||
static dPadManager_c *GetInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
bool isCalibrationFinished() const {
|
||||
return mCalibrationFinished;
|
||||
}
|
||||
bool getField_0x25() const {
|
||||
return field_0x25;
|
||||
}
|
||||
bool isError() const {
|
||||
return mIsError;
|
||||
}
|
||||
|
||||
void setField_0x1F(bool b) {
|
||||
field_0x1F = b;
|
||||
}
|
||||
bool getField_0x1F() const {
|
||||
return field_0x1F;
|
||||
}
|
||||
|
||||
|
||||
void requestMplsCalibration();
|
||||
|
||||
@@ -91,13 +106,13 @@ private:
|
||||
/* 0x10 */ s32 mStep;
|
||||
/* 0x14 */ s32 mCalibrationTimer;
|
||||
/* 0x18 */ s32 mStepTimer;
|
||||
/* 0x1C */ bool field_0x1C;
|
||||
/* 0x1C */ bool mIsError;
|
||||
/* 0x1D */ bool field_0x1D;
|
||||
/* 0x1E */ bool field_0x1E;
|
||||
/* 0x1F */ bool field_0x1F;
|
||||
/* 0x20 */ bool field_0x20;
|
||||
/* 0x21 */ bool mCalibrationFinished;
|
||||
/* 0x22 */ bool field_0x22;
|
||||
/* 0x22 */ bool mSavedCsDrawDirectly;
|
||||
/* 0x23 */ bool field_0x23;
|
||||
/* 0x24 */ bool field_0x24;
|
||||
/* 0x25 */ bool field_0x25;
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef D_VIDEO_H
|
||||
#define D_VIDEO_H
|
||||
|
||||
namespace dVideo {
|
||||
|
||||
void enableDimming(int);
|
||||
|
||||
} // namespace dVideo
|
||||
|
||||
#endif
|
||||
@@ -44,6 +44,7 @@ public:
|
||||
void fn_8035E250(u16);
|
||||
bool fn_8035E2E0();
|
||||
void fn_8035E310();
|
||||
void fn_8035E620();
|
||||
void fn_8035E6E0();
|
||||
|
||||
u32 getFreeSize();
|
||||
|
||||
@@ -2,16 +2,56 @@
|
||||
#define NAND_RESULT_TRACKER_H
|
||||
|
||||
#include "egg/core/eggHeap.h"
|
||||
|
||||
#include "rvl/NAND.h"
|
||||
|
||||
class NandResultTracker {
|
||||
enum Mode_e {
|
||||
Normal = 0,
|
||||
Error = 1,
|
||||
};
|
||||
|
||||
public:
|
||||
enum ErrorCategory_e {
|
||||
// Everything is ok
|
||||
ERR_CAT_NONE = 0,
|
||||
// Error handled by us
|
||||
ERR_CAT_FATAL = 3,
|
||||
// Error handled by save manager
|
||||
ERR_CAT_SAVE_MGR = 4,
|
||||
};
|
||||
static void create(EGG::Heap *heap);
|
||||
static NandResultTracker *GetInstance();
|
||||
bool isFailure(NANDResult status);
|
||||
|
||||
void init();
|
||||
void draw();
|
||||
void execute();
|
||||
|
||||
s32 getErrorCategory() const {
|
||||
return mErrorCategory;
|
||||
}
|
||||
|
||||
bool isError() const {
|
||||
return mIsError;
|
||||
}
|
||||
|
||||
private:
|
||||
NandResultTracker *sInstance;
|
||||
typedef void (NandResultTracker::*ModeFunc)();
|
||||
|
||||
void ModeRequestNormal();
|
||||
void ModeProc_Normal();
|
||||
void ModeRequestError();
|
||||
void ModeProc_Error();
|
||||
|
||||
void ModeRequest(Mode_e mode);
|
||||
|
||||
static NandResultTracker *sInstance;
|
||||
|
||||
/* 0x00 */ s32 mErrorCategory;
|
||||
/* 0x04 */ Mode_e mMode;
|
||||
/* 0x08 */ s32 mStep;
|
||||
/* 0x0C */ bool mIsError;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user