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

CGuiVirtualBox imps

This commit is contained in:
Jack Andersen
2016-03-17 16:45:45 -10:00
parent 7c7140cffd
commit a9826de57f
2 changed files with 251 additions and 0 deletions

View File

@@ -6,9 +6,65 @@
namespace urde
{
struct CCellPos
{
u32 x0_ = 0;
u32 x4_ = 0;
bool x8_ = false;
};
class CGuiVirtualBox
{
int x0_;
int x4_;
int x8_;
int xc_;
int x10_;
int x14_;
int x18_;
int x1c_ = 0;
std::unique_ptr<CCellPos[]> x20_;
std::unique_ptr<CCellPos[]> x24_;
std::unique_ptr<CCellPos[]> x28_;
std::unique_ptr<CCellPos[]> x2c_;
public:
CGuiVirtualBox(int a,int b,int c,int d,int e,int f)
: x0_(a), x4_(b), x8_(c), xc_(d), x10_(e), x14_(f), x18_(std::max(x10_, x14_)),
x20_(new CCellPos[c*d]),
x24_(new CCellPos[c*d]),
x28_(new CCellPos[x18_]),
x2c_(new CCellPos[x18_]) {}
void GetDifference(int,int,int&,int&);
bool ShiftHorizontal(int,bool);
bool ShiftVertical(int,bool);
void ResolveTransitionCells();
void FillCellsInBox(CCellPos* cells);
};
class CGuiTableGroup : public CGuiCompoundWidget
{
public:
enum class ETableGroupModes
{
};
private:
int xf8_;
int xfc_;
int x100_[3][2];
bool x118_;
bool x119_;
float x11c_;
float x120_;
bool x124_;
float x128_;
bool x12c_ = false;
ETableGroupModes x130_modes;
CGuiVirtualBox x134_box;
public:
CGuiTableGroup(const CGuiWidgetParms& parms, int, int, ETableGroupModes modes,
int, int, bool, bool, float, float, bool, float, CGuiVirtualBox&& box);
FourCC GetWidgetTypeID() const {return FOURCC('TBGP');}
static void LoadWidgetFnMap();
bool MAF_SelectNextColumn(CGuiFunctionDef* def, CGuiControllerInfo* info);
@@ -24,6 +80,8 @@ public:
bool MAF_InitializeTable(CGuiFunctionDef* def, CGuiControllerInfo* info);
bool MAF_MenuAdvance(CGuiFunctionDef* def, CGuiControllerInfo* info);
bool MAF_MenuCancel(CGuiFunctionDef* def, CGuiControllerInfo* info);
static CGuiTableGroup* Create(CGuiFrame* frame, CInputStream& in, bool);
};
}