d_lyt_common_icon_material OK

This commit is contained in:
robojumper
2025-03-31 22:55:30 +02:00
parent 799d659f9c
commit 95c710fab0
10 changed files with 1006 additions and 179 deletions
+2 -2
View File
@@ -61,7 +61,7 @@ public:
private:
void realizeUnk();
void realizeNumber();
void realizeNumberV();
void realizeSize();
void realizeBocoburin();
void realizeItem(u8 item);
@@ -137,7 +137,7 @@ public:
private:
void realizeUnk();
void realizeNumber();
void realizeNumberV();
void realizeSize();
void realizeBocoburin();
void realizeItem(u8 item);
+201
View File
@@ -0,0 +1,201 @@
#ifndef D_LYT_COMMON_ICON_MATERIAL_H
#define D_LYT_COMMON_ICON_MATERIAL_H
#include "common.h"
#include "d/lyt/d2d.h"
#include "d/lyt/d_structd.h"
#include "d/lyt/d_textbox.h"
#include "nw4r/lyt/lyt_bounding.h"
#include "s/s_State.hpp"
class dLytCommonIconMaterialPartBase_c {
public:
virtual ~dLytCommonIconMaterialPartBase_c() {}
virtual nw4r::lyt::Pane *getPane() = 0;
virtual d2d::LytBase_c *getLyt() = 0;
virtual const char *getName() const = 0;
};
/** Material - Bug */
class dLytCommonIconMaterialPart1_c : public dLytCommonIconMaterialPartBase_c {
public:
dLytCommonIconMaterialPart1_c() {}
virtual ~dLytCommonIconMaterialPart1_c() {}
virtual nw4r::lyt::Pane *getPane() override {
return mLyt.getLayout()->GetRootPane();
}
virtual d2d::LytBase_c *getLyt() override {
return &mLyt;
}
virtual const char *getName() const override {
return mLyt.getName();
}
bool build(d2d::ResAccIf_c *resAcc);
bool remove();
bool execute();
void reset();
void setItem(u8 item);
void setNumber(s32 number);
void setOn();
void setOff();
bool isCursorOver() const;
void setVisible(bool visible);
const nw4r::lyt::Bounding *getBounding() const {
return mpBounding;
}
void setBg(bool bg) {
mBg = bg;
}
void setHasNumber(bool hasNumber) {
mNumberV = hasNumber;
}
void setShadow(bool shadow) {
mShadow = shadow;
}
private:
void realizeBg();
void realizeNumberV();
void realizeShadow();
void realizeItem(u8 item);
/* 0x004 */ d2d::dLytSub mLyt;
/* 0x098 */ d2d::AnmGroup_c mAnm[6];
/* 0x218 */ dTextBox_c *mpTextBoxes[2];
/* 0x220 */ nw4r::lyt::Bounding *mpBounding;
/* 0x224 */ d2d::dLytStructD mCursor;
/* 0x24C */ u8 mItem;
/* 0x24D */ u8 _0x24D[0x254 - 0x24D];
/* 0x254 */ wchar_t mNumberBuf[16];
/* 0x274 */ bool mBg;
/* 0x275 */ bool mNumberV;
/* 0x276 */ bool mShadow;
};
/** Material - Treasure */
class dLytCommonIconMaterialPart2_c : public dLytCommonIconMaterialPartBase_c {
public:
dLytCommonIconMaterialPart2_c() {}
virtual ~dLytCommonIconMaterialPart2_c() {}
virtual nw4r::lyt::Pane *getPane() override {
return mLyt.getLayout()->GetRootPane();
}
virtual d2d::LytBase_c *getLyt() override {
return &mLyt;
}
virtual const char *getName() const override {
return mLyt.getName();
}
bool build(d2d::ResAccIf_c *resAcc);
bool remove();
bool execute();
void reset();
void setItem(u8 item);
void setNumber(s32 number);
void setOn();
void setOff();
bool isCursorOver() const;
void setVisible(bool visible);
const nw4r::lyt::Bounding *getBounding() const {
return mpBounding;
}
void setBg(bool bg) {
mBg = bg;
}
void setHasNumber(bool hasNumber) {
mNumberV = hasNumber;
}
void setShadow(bool shadow) {
mShadow = shadow;
}
private:
void realizeBg();
void realizeNumberV();
void realizeShadow();
void realizeItem(u8 item);
/* 0x004 */ d2d::dLytSub mLyt;
/* 0x098 */ d2d::AnmGroup_c mAnm[6];
/* 0x218 */ dTextBox_c *mpTextBoxes[2];
/* 0x220 */ nw4r::lyt::Bounding *mpBounding;
/* 0x224 */ d2d::dLytStructD mCursor;
/* 0x24C */ u8 mItem;
/* 0x24D */ u8 _0x24D[0x254 - 0x24D];
/* 0x254 */ wchar_t mNumberBuf[16];
/* 0x274 */ bool mBg;
/* 0x275 */ bool mNumberV;
/* 0x276 */ bool mShadow;
};
class dLytCommonIconMaterial_c : public d2d::dSubPane {
public:
dLytCommonIconMaterial_c() : mStateMgr(*this, sStateID::null), mPart(2) {}
~dLytCommonIconMaterial_c() {}
virtual bool build(d2d::ResAccIf_c *resAcc) override;
virtual bool remove() override;
virtual bool execute() override;
virtual nw4r::lyt::Pane *getPane() override {
switch (mPart) {
case 0: return mPart1.getPane();
case 1: return mPart2.getPane();
default: return nullptr;
}
}
virtual d2d::LytBase_c *getLyt() override {
switch (mPart) {
case 0: return mPart1.getLyt();
case 1: return mPart2.getLyt();
default: return nullptr;
}
}
virtual const char *getName() const override {
switch (mPart) {
case 0: return mPart1.getName();
case 1: return mPart2.getName();
default: return nullptr;
}
}
bool build(d2d::ResAccIf_c *resAcc, u8 variant);
void reset();
void setBg(bool bg);
void setHasNumber(bool hasNumber);
void setShadow(bool shadow);
void setItem(u8 item);
void setNumber(s32 number);
void setOn();
void setOff();
bool isCursorOver() const;
void setVisible(bool visible);
const nw4r::lyt::Bounding *getBounding() const;
private:
STATE_FUNC_DECLARE(dLytCommonIconMaterial_c, None);
STATE_FUNC_DECLARE(dLytCommonIconMaterial_c, In);
STATE_FUNC_DECLARE(dLytCommonIconMaterial_c, Wait);
STATE_FUNC_DECLARE(dLytCommonIconMaterial_c, Out);
/* 0x008 */ UI_STATE_MGR_DECLARE(dLytCommonIconMaterial_c);
/* 0x044 */ u8 mPart;
/* 0x048 */ dLytCommonIconMaterialPart1_c mPart1;
/* 0x0B0 */ dLytCommonIconMaterialPart2_c mPart2;
};
#endif
-1
View File
@@ -5,7 +5,6 @@
#include "d/lyt/d_structd.h"
#include "d/lyt/d_lyt_common_icon_item.h"
#include "s/s_State.hpp"
#include "s/s_StateMgr.hpp"
class dLytPauseDisp00_c {
public:
+35
View File
@@ -0,0 +1,35 @@
#ifndef LYT_PAUSE_DISP_01_H
#define LYT_PAUSE_DISP_01_H
#include "d/lyt/d2d.h"
#include "d/lyt/d_structd.h"
#include "d/lyt/d_lyt_common_icon_material.h"
#include "s/s_State.hpp"
class dLytPauseDisp01_c {
public:
dLytPauseDisp01_c();
virtual ~dLytPauseDisp01_c() {}
void init();
STATE_FUNC_DECLARE(dLytPauseDisp01_c, None);
STATE_FUNC_DECLARE(dLytPauseDisp01_c, In);
STATE_FUNC_DECLARE(dLytPauseDisp01_c, Wait);
STATE_FUNC_DECLARE(dLytPauseDisp01_c, Select);
STATE_FUNC_DECLARE(dLytPauseDisp01_c, GetDemo);
STATE_FUNC_DECLARE(dLytPauseDisp01_c, Out);
private:
void displayElement(int idx, float value);
/* 0x0004 */ STATE_MGR_DECLARE(dLytPauseDisp01_c);
/* 0x0040 */ d2d::LytBase_c mLytBase;
/* 0x00D0 */ d2d::AnmGroup_c field_0x00D0[15];
/* 0x0490 */ dLytCommonIconMaterial_c field_0x2050[28];
/* 0x96B0 */ d2d::SubPaneList mSubpanes;
/* 0x96BC */ d2d::SubPaneListNode field_0xE11C[28];
/* 0x987C */ d2d::dLytStructD field_0xE29C;
};
#endif