diff --git a/include/tp/d_attention.h b/include/tp/d_attention.h new file mode 100644 index 0000000..a641c79 --- /dev/null +++ b/include/tp/d_attention.h @@ -0,0 +1,77 @@ +#ifndef D_D_ATTENTION_H +#define D_D_ATTENTION_H +#include +#include +#include +// #include + +namespace libtp::tp::d_attention{ +// struct dist_entry { +// float field_0x0; +// float field_0x4; +// float field_0x8; +// float field_0xc; +// float field_0x10; +// float field_0x14; +// uint32_t field_0x18; +// }; // Size: 0x1C + +// struct type_tbl_entry { +// int16_t field_0x0; +// uint16_t field_0x2; +// }; + +// class dAttention_c { +// public: +// enum EState { +// ST_NONE, +// ST_LOCK, +// ST_RELEASE, +// }; + +// /* 80070198 */ dAttention_c(libtp::tp::f_op_actor::fopAc_ac_c*, uint32_t); +// /* 80070A70 */ int chkAttMask(uint32_t, uint32_t); +// /* 80070E90 */ float calcWeight(int, libtp::tp::f_op_actor::fopAc_ac_c*, float, int16_t, int16_t, uint32_t*); +// /* 800710C0 */ void setList(int, libtp::tp::f_op_actor::fopAc_ac_c*, float, float, cSAngle, uint32_t); +// /* 80071240 */ void initList(uint32_t); +// /* 800713CC */ int makeList(); +// /* 80071424 */ void setOwnerAttentionPos(); +// /* 80071488 */ int SelectAttention(libtp::tp::f_op_actor::fopAc_ac_c*); +// /* 800716B8 */ void sortList(); +// /* 800718A4 */ void stockAttention(); +// /* 80071960 */ libtp::tp::f_op_actor::fopAc_ac_c* nextAttention(); +// /* 80071A68 */ int freeAttention(); +// /* 80071A98 */ bool chaseAttention(); +// /* 80071CC0 */ float EnemyDistance(libtp::tp::f_op_actor::fopAc_ac_c*); +// /* 80071DEC */ void runSoundProc(); +// /* 80071E84 */ void runDrawProc(); +// /* 800720F4 */ void runDebugDisp(); +// /* 800720F8 */ void checkButton(); +// /* 800722A0 */ bool triggerProc(); +// /* 800722EC */ int lostCheck(); +// /* 80072344 */ void judgementStatus4Hold(); +// /* 800725F0 */ void judgementStatus4Switch(); +// /* 80072924 */ int Run(); +// /* 80072BD4 */ void Draw(); +// /* 80072D80 */ void lockSoundStart(uint32_t); +// /* 8007353C */ libtp::tp::f_op_actor::fopAc_ac_c* LockonTarget(int32_t); +// /* 800736CC */ uint32_t LockonTargetPId(int32_t); +// /* 80073734 */ libtp::tp::f_op_actor::fopAc_ac_c* ActionTarget(int32_t); +// /* 8007378C */ libtp::tp::f_op_actor::fopAc_ac_c* CheckObjectTarget(int32_t); +// /* 800737E4 */ bool LockonTruth(); +// /* 80073838 */ int checkDistance(cXyz*, int16_t, cXyz*, float, float, float, float); +// /* 8016E424 */ void LockEdge(); +// /* 80182994 */ void GetCheckObjectCount(); +// /* 80182AD0 */ void keepLock(int); +// /* 8014B010 */ static dist_entry& getDistTable(int); +// }; +extern "C"{ + /** + * @brief gets the actor that is targeted + * @param dAttentionPointer a pointer to the dAttention instance + * @param attentionIndex the index of the targeted actor + * @return the actor pointer that is targeted + */ + libtp::tp::f_op_actor::fopAc_ac_c* LockonTarget(void* dAttentionPointer, int32_t attentionIndex); +}} +#endif \ No newline at end of file diff --git a/include/tp/d_meter2_draw.h b/include/tp/d_meter2_draw.h index bff4b95..684d71f 100644 --- a/include/tp/d_meter2_draw.h +++ b/include/tp/d_meter2_draw.h @@ -129,8 +129,17 @@ namespace libtp::tp::d_meter2_draw /* 0x578 */ float field_0x578; /* 0x57C */ float field_0x57c; /* 0x580 */ float field_0x580; - /* 0x584 */ uint8_t field_0x584[0x78]; - /* 0x5FC */ float field_0x5fc[3]; + /* 0x584 */ float field_0x584[3]; + /* 0x590 */ float field_0x590[3]; + /* 0x59C */ float field_0x59c[3]; + /* 0x5A8 */ float field_0x5a8[3]; + /* 0x5B4 */ float field_0x5b4[3]; + /* 0x5C0 */ float field_0x5c0[3]; + /* 0x5CC */ float field_0x5cc[3]; + /* 0x5D8 */ float field_0x5d8[3]; + /* 0x5E4 */ float field_0x5e4[3]; + /* 0x5F0 */ float field_0x5f0[3]; + /* 0x5FC */ float mMeterAlphaRate[3]; /* 0x608 */ float field_0x608; /* 0x60C */ float field_0x60c; /* 0x610 */ float field_0x610[3]; @@ -197,44 +206,43 @@ namespace libtp::tp::d_meter2_draw /* 0x784 */ float field_0x784; /* 0x788 */ float field_0x788; /* 0x78C */ float field_0x78c; - /* 0x790 */ float field_0x790; - /* 0x794 */ float field_0x794; - /* 0x798 */ float field_0x798; - /* 0x79C */ float field_0x79c; - /* 0x7A0 */ float field_0x7a0; + /* 0x790 */ float mLifeParentAlpha; + /* 0x794 */ float mLifeParentHeartAlpha; + /* 0x798 */ float mHeartBaseAlpha; + /* 0x79C */ float mHeartAlpha; + /* 0x7A0 */ float mBigHeartAlpha; /* 0x7A4 */ float field_0x7a4; - /* 0x7A8 */ float field_0x7a8; - /* 0x7AC */ float field_0x7ac; + /* 0x7A8 */ float mMagicMeterAlpha; + /* 0x7AC */ float mMagicMeterFrameAlpha; /* 0x7B0 */ float field_0x7b0; - /* 0x7B4 */ float field_0x7b4; - /* 0x7B8 */ float field_0x7b8; + /* 0x7B4 */ float mLanternMeterAlpha; + /* 0x7B8 */ float mLanternMeterFrameAlpha; /* 0x7BC */ float field_0x7bc; - /* 0x7C0 */ float field_0x7c0; - /* 0x7C4 */ float field_0x7c4; + /* 0x7C0 */ float mOxygenMeterAlpha; + /* 0x7C4 */ float mOxygenMeterFrameAlpha; /* 0x7C8 */ float field_0x7c8; /* 0x7CC */ float field_0x7cc; /* 0x7D0 */ float field_0x7d0; - /* 0x7D4 */ float field_0x7d4; - /* 0x7D8 */ float field_0x7d8; - /* 0x7DC */ float field_0x7dc; + /* 0x7D4 */ float mRupeeAlpha; + /* 0x7D8 */ float mRupeeFrameAlpha; + /* 0x7DC */ float mRupeeCountAlpha; /* 0x7E0 */ float field_0x7e0; /* 0x7E4 */ float field_0x7e4; - /* 0x7E8 */ float field_0x7e8; - /* 0x7EC */ float field_0x7ec; + /* 0x7E8 */ float mKeyAlpha; + /* 0x7EC */ float mKeyNumAlpha; /* 0x7F0 */ float field_0x7f0; - /* 0x7F4 */ float field_0x7f4; - /* 0x7F8 */ float field_0x7f8; - /* 0x7FC */ float field_0x7fc; - /* 0x800 */ float field_0x800; - /* 0x804 */ float field_0x804; - /* 0x808 */ float field_0x808; + /* 0x7F4 */ float mMainHUDButtonsAlpha; + /* 0x7F8 */ float mButtonDisplayBackAlpha; + /* 0x7FC */ float mButtonAAlpha; + /* 0x800 */ float mButtonBAlpha; + /* 0x804 */ float mButtonXAlpha; + /* 0x808 */ float mButtonYAlpha; /* 0x80C */ float field_0x80c; /* 0x810 */ float field_0x810; - /* 0x814 */ float field_0x814[2]; - /* 0x81C */ float field_0x81c[2]; - /* 0x824 */ float field_0x824[2]; + /* 0x814 */ float mItemBBaseAlpha[2]; + /* 0x81C */ float mButtonXItemBaseAlpha[2]; + /* 0x824 */ float mButtonYItemBaseAlpha[2]; /* 0x82C */ float field_0x82c[2]; - /* 0x834 */ float field_0x834; /* 0x838 */ float field_0x838; /* 0x83C */ float field_0x83c; /* 0x840 */ float field_0x840; @@ -277,31 +285,54 @@ namespace libtp::tp::d_meter2_draw /** * @brief Makes the heart UI disappear. - * + * * @param dMeterDrawPtr A pointer to the current dMeter2Draw structure - */ + */ void setAlphaLifeAnimeMin(dMeter2Draw_c* dMeterDrawPtr); /** * @brief Makes the heart UI appear. - * + * * @param dMeterDrawPtr A pointer to the current dMeter2Draw structure - */ + */ void setAlphaLifeAnimeMax(dMeter2Draw_c* dMeterDrawPtr); /** * @brief Makes the Oil meter disappear. - * + * * @param dMeterDrawPtr A pointer to the current dMeter2Draw structure - */ + */ void setAlphaKanteraAnimeMin(dMeter2Draw_c* dMeterDrawPtr); /** * @brief Makes the Oil meter appear. - * + * * @param dMeterDrawPtr A pointer to the current dMeter2Draw structure - */ + */ void setAlphaKanteraAnimeMax(dMeter2Draw_c* dMeterDrawPtr); + + /** + * @brief Sets variables about the magic bar in the dMeterDraw object + * @param dMeterDrawPtr A pointer to the current dMeter2Draw structure + * @param max the maximum value of the bar (100%) + * @param curr the current value of the bar - how much is filled + * @param posX the X position of the magic meter + * @param posX the Y position of the magic meter + */ + void drawMagic(dMeter2Draw_c* dMeterDrawPtr, int32_t max, int32_t curr, float posX, float posY); + + /** + * @brief sets the alpha rate of the bar and it's sides + * @param dMeterDrawPtr A pointer to the current dMeter2Draw structure + * @param forceSet if set to true force the change + */ + void setAlphaMagicChange(dMeter2Draw_c* dMeterDrawPtr, bool forceSet); + + /** + * @brief draws the dMeter2Draw on screen + * @param dMeterDrawPtr A pointer to the current dMeter2Draw structure + */ + void draw(dMeter2Draw_c* dMeterDrawPtr); } } // namespace libtp::tp::d_meter2_draw #endif diff --git a/include/tp/d_meter2_info.h b/include/tp/d_meter2_info.h index 1880ba5..a55b4bf 100644 --- a/include/tp/d_meter2_info.h +++ b/include/tp/d_meter2_info.h @@ -110,6 +110,7 @@ namespace libtp::tp::d_meter2_info * @param minigameFlag The status of the current minigame */ void resetMiniGameItem(G_Meter2_Info* g_meter2_info_ptr, bool minigameFlag); + } } // namespace libtp::tp::d_meter2_info #endif \ No newline at end of file diff --git a/include/tp/d_meter_HIO.h b/include/tp/d_meter_HIO.h index 332c5f0..d3a6a72 100644 --- a/include/tp/d_meter_HIO.h +++ b/include/tp/d_meter_HIO.h @@ -718,17 +718,17 @@ namespace libtp::tp::d_meter_hio /* 0x008 */ float mLifeTopPosX; /* 0x00C */ float mLifeTopPosY; /* 0x010 */ float mNoMagicPosY; - /* 0x014 */ float mHUDScale; - /* 0x018 */ float mHUDAlpha; - /* 0x01C */ float mLifeGaugeScale; - /* 0x020 */ float mLifeGaugeHeartAlpha; - /* 0x024 */ float mLifeGaugeBaseAlpha; + /* 0x014 */ float mParentScale; + /* 0x018 */ float mParentAlpha; + /* 0x01C */ float mLifeParentScale; + /* 0x020 */ float mLifeParentHeartAlpha; + /* 0x024 */ float mHeartBaseAlpha; /* 0x028 */ float mLifeGaugePosX; /* 0x02C */ float mLifeGaugePosY; - /* 0x030 */ float mHeartScale; + /* 0x030 */ float mHeartMarkScale; /* 0x034 */ float mHeartAlpha; - /* 0x038 */ float mLargeHeartScale; - /* 0x03C */ float mLargeHeartAlpha; + /* 0x038 */ float mBigHeartScale; + /* 0x03C */ float mBigHeartAlpha; /* 0x040 */ float mMagicMeterScale; /* 0x044 */ float mMagicMeterAlpha; /* 0x048 */ float mMagicMeterFrameAlpha; @@ -754,38 +754,30 @@ namespace libtp::tp::d_meter_hio /* 0x098 */ float mRingHUDButtonsPosY; /* 0x09C */ float mButtonDisplayBackScale; /* 0x0A0 */ float mButtonDisplayBackAlpha; - /* 0x0A4 */ float mAButtonScale; - /* 0x0A8 */ float mAButtonAlpha; - /* 0x0AC */ float mAButtonPosX; - /* 0x0B0 */ float mAButtonPosY; - /* 0x0B4 */ float mAButtonTalkScale; - /* 0x0B8 */ float mAButtonFontTalkScale; - /* 0x0BC */ float mAButtonTalkPosX; - /* 0x0C0 */ float mAButtonFontTalkPosX; - /* 0x0C4 */ float mAButtonTalkPosY; - /* 0x0C8 */ float mAButtonFontTalkPosY; - /* 0x0CC */ float mAButtonTalkAScale; - /* 0x0D0 */ float mAButtonFontTalkAScale; - /* 0x0D4 */ float mAButtonTalkAPosX; - /* 0x0D8 */ float mAButtonFontTalkAPosX; - /* 0x0DC */ float mAButtonTalkAPosY; - /* 0x0E0 */ float mAButtonFontTalkAPosY; - /* 0x0E4 */ float mAButtonVesselPosX; - /* 0x0E8 */ float mAButtonVesselPosY; - /* 0x0EC */ float mBButtonScale; - /* 0x0F0 */ float mBButtonAlpha; - /* 0x0F4 */ float mBButtonPosX; - /* 0x0F8 */ float mBButtonPosY; - /* 0x0FC */ float mBButtonTalkScale; - /* 0x100 */ float mBButtonFontTalkScale; - /* 0x104 */ float mBButtonTalkPosX; - /* 0x108 */ float mBButtonFontTalkPosX; - /* 0x10C */ float mBButtonTalkPosY; - /* 0x110 */ float mBButtonFontTalkPosY; - /* 0x114 */ float mBButtonWolfPosX; - /* 0x118 */ float mBButtonWolfPosY; - /* 0x11C */ float mBButtonVesselPosX; - /* 0x120 */ float mBButtonVesselPosY; + /* 0x0A4 */ float mButtonAScale; + /* 0x0A8 */ float mButtonAAlpha; + /* 0x0AC */ float mButtonAPosX; + /* 0x0B0 */ float mButtonAPosY; + /* 0x0B4 */ float mButtonATalkScale[2]; + /* 0x0BC */ float mButtonATalkPosX[2]; + /* 0x0C4 */ float mButtonATalkPosY[2]; + /* 0x0CC */ float mButtonATalkAScale; + /* 0x0D0 */ float mButtonATextTalkAScale; + /* 0x0D4 */ float mButtonATalkAPosX[2]; + /* 0x0DC */ float mButtonATalkAPosY[2]; + /* 0x0E4 */ float mButtonAVesselPosX; + /* 0x0E8 */ float mButtonAVesselPosY; + /* 0x0EC */ float mButtonBScale; + /* 0x0F0 */ float mButtonBAlpha; + /* 0x0F4 */ float mButtonBPosX; + /* 0x0F8 */ float mButtonBPosY; + /* 0x0FC */ float mButtonBTalkScale[2]; + /* 0x104 */ float mButtonBTalkPosX[2]; + /* 0x10C */ float mButtonBTalkPosY[2]; + /* 0x114 */ float mButtonBWolfPosX; + /* 0x118 */ float mButtonBWolfPosY; + /* 0x11C */ float mButtonBVesselPosX; + /* 0x120 */ float mButtonBVesselPosY; /* 0x124 */ float mMidnaIconScale; /* 0x128 */ float mMidnaIconAlpha; /* 0x12C */ float mMidnaIconPosX; @@ -794,77 +786,63 @@ namespace libtp::tp::d_meter_hio /* 0x138 */ float field_0x138; /* 0x13C */ float field_0x13c; /* 0x140 */ float field_0x140; - /* 0x144 */ float mXButtonScale; - /* 0x148 */ float mXButtonAlpha; - /* 0x14C */ float mXButtonPosX; - /* 0x150 */ float mXButtonPosY; - /* 0x154 */ float mYButtonScale; - /* 0x158 */ float mYButtonAlpha; - /* 0x15C */ float mYButtonPosX; - /* 0x160 */ float mYButtonPosY; + /* 0x144 */ float mButtonXScale; + /* 0x148 */ float mButtonXAlpha; + /* 0x14C */ float mButtonXPosX; + /* 0x150 */ float mButtonXPosY; + /* 0x154 */ float mButtonYScale; + /* 0x158 */ float mButtonYAlpha; + /* 0x15C */ float mButtonYPosX; + /* 0x160 */ float mButtonYPosY; /* 0x164 */ float field_0x164; /* 0x168 */ float field_0x168; /* 0x16C */ float field_0x16c; /* 0x170 */ float field_0x170; - /* 0x174 */ float mZButtonScale; - /* 0x178 */ float mZButtonAlpha; - /* 0x17C */ float mZButtonPosX; - /* 0x180 */ float mZButtonPosY; - /* 0x184 */ float mBButtonItemPosX; - /* 0x188 */ float mBButtonSwordPosX; - /* 0x18C */ float mBButtonFishingPosX; - /* 0x190 */ float mBButtonItemPosY; - /* 0x194 */ float mBButtonSwordPosY; - /* 0x198 */ float mBButtonFishingPosY; - /* 0x19C */ float mBButtonItemRotation; - /* 0x1A0 */ float mBButtonSwordRotation; - /* 0x1A4 */ float mBButtonFishingRotation; - /* 0x1A8 */ float mBButtonItemScale; - /* 0x1AC */ float mBButtonSwordScale; - /* 0x1B0 */ float mBButtonFishingScale; - /* 0x1B4 */ float mXButtonItemPosX; - /* 0x1B8 */ float mXButtonItemPosY; - /* 0x1BC */ float mXButtonItemScale; - /* 0x1C0 */ float mYButtonItemPosX; - /* 0x1C4 */ float mYButtonItemPosY; - /* 0x1C8 */ float mYButtonItemScale; + /* 0x174 */ float mButtonZScale; + /* 0x178 */ float mButtonZAlpha; + /* 0x17C */ float mButtonZPosX; + /* 0x180 */ float mButtonZPosY; + /* 0x184 */ float mButtonBItemPosX[3]; + /* 0x190 */ float mButtonBItemPosY[3]; + /* 0x19C */ float mButtonBItemRotation[3]; + /* 0x1A8 */ float mButtonBItemScale[3]; + /* 0x1B4 */ float mButtonXItemPosX; + /* 0x1B8 */ float mButtonXItemPosY; + /* 0x1BC */ float mButtonXItemScale; + /* 0x1C0 */ float mButtonYItemPosX; + /* 0x1C4 */ float mButtonYItemPosY; + /* 0x1C8 */ float mButtonYItemScale; /* 0x1CC */ float field_0x1cc; /* 0x1D0 */ float field_0x1d0; /* 0x1D4 */ float field_0x1d4; - /* 0x1D8 */ float mZButtonItemPosX; - /* 0x1DC */ float mZButtonItemPosY; - /* 0x1E0 */ float mZButtonItemScale; + /* 0x1D8 */ float mButtonZItemPosX; + /* 0x1DC */ float mButtonZItemPosY; + /* 0x1E0 */ float mButtonZItemScale; /* 0x1E4 */ float mButtonItemRotation[3]; /* 0x1F0 */ float mXItemNumPosX; /* 0x1F4 */ float mYItemNumPosX; /* 0x1F8 */ float field_0x1f8; - /* 0x1FC */ float mBItemNumPosX; + /* 0x1FC */ float mItemBNumPosX; /* 0x200 */ float mXItemNumPosY; /* 0x204 */ float mYItemNumPosY; /* 0x208 */ float field_0x208; - /* 0x20C */ float mBItemNumPosY; + /* 0x20C */ float mItemBNumPosY; /* 0x210 */ float mXItemNumScale; /* 0x214 */ float mYItemNumScale; /* 0x218 */ float field_0x218; - /* 0x21C */ float mBItemNumScale; - /* 0x220 */ float mBItemBaseScale[2]; - /* 0x228 */ float mBItemBasePosX[2]; - /* 0x230 */ float mBItemBasePosY[2]; - /* 0x238 */ float mBItemBaseAlpha[2]; - /* 0x240 */ float mXButtonItemBaseScale; - /* 0x244 */ float mXButtonItemBaseNoItemScale; - /* 0x248 */ float mXButtonItemBasePosX; - /* 0x24C */ float mXButtonItemBaseNoItemPosX; - /* 0x250 */ float mXButtonItemBasePosY; - /* 0x254 */ float mXButtonItemBaseNoItemPosY; - /* 0x258 */ float mXButtonItemBaseAlpha[2]; - /* 0x260 */ float mYButtonItemBaseScale; - /* 0x264 */ float mYButtonItemBaseNoItemScale; - /* 0x268 */ float mYButtonItemBasePosX; - /* 0x26C */ float mYButtonItemBaseNoItemPosX; - /* 0x270 */ float mYButtonItemBasePosY; - /* 0x274 */ float mYButtonItemBaseNoItemPosY; - /* 0x278 */ float mYButtonItemBaseAlpha[2]; + /* 0x21C */ float mItemBNumScale; + /* 0x220 */ float mItemBBaseScale[2]; + /* 0x228 */ float mItemBBasePosX[2]; + /* 0x230 */ float mItemBBasePosY[2]; + /* 0x238 */ float mItemBBaseAlpha[2]; + /* 0x240 */ float mButtonXItemBaseScale[2]; + /* 0x248 */ float mButtonXItemBasePosX[2]; + /* 0x250 */ float mButtonXItemBasePosY[2]; + /* 0x258 */ float mButtonXItemBaseAlpha[2]; + /* 0x260 */ float mButtonYItemBaseScale[2]; + /* 0x268 */ float mButtonYItemBasePosX[2]; + /* 0x270 */ float mButtonYItemBasePosY[2]; + /* 0x278 */ float mButtonYItemBaseAlpha[2]; /* 0x280 */ float field_0x280; /* 0x284 */ float field_0x284; /* 0x288 */ float field_0x288; @@ -872,32 +850,32 @@ namespace libtp::tp::d_meter_hio /* 0x290 */ float field_0x290; /* 0x294 */ float field_0x294; /* 0x298 */ float field_0x298[2]; - /* 0x2A0 */ float mZButtonItemBaseScale; - /* 0x2A4 */ float mZButtonItemBasePosX; - /* 0x2A8 */ float mZButtonItemBasePosY; - /* 0x2AC */ float mZButtonItemBaseAlpha; + /* 0x2A0 */ float mButtonZItemBaseScale; + /* 0x2A4 */ float mButtonZItemBasePosX; + /* 0x2A8 */ float mButtonZItemBasePosY; + /* 0x2AC */ float mButtonZItemBaseAlpha; /* 0x2B0 */ float mButtonBaseAlpha; - /* 0x2B4 */ float mAButtonFontScale; - /* 0x2B8 */ float mAButtonFontPosX; - /* 0x2BC */ float mAButtonFontPosY; + /* 0x2B4 */ float mButtonATextScale; + /* 0x2B8 */ float mButtonATextPosX; + /* 0x2BC */ float mButtonATextPosY; /* 0x2C0 */ uint32_t mAButtonFontColor; // JUtility::TColor /* 0x2C4 */ float mAButtonFontSpacing; - /* 0x2C8 */ int32_t mAButtonFontActionID; + /* 0x2C8 */ int32_t mButtonATextActionID; /* 0x2CC */ uint32_t field_0x2cc; - /* 0x2D0 */ bool mAButtonTextDebug; + /* 0x2D0 */ bool mButtonATextDebug; /* 0x2D1 */ uint8_t padding_2d1[3]; - /* 0x2D4 */ float mBButtonFontScale; - /* 0x2D8 */ float mBButtonFontPosX; - /* 0x2DC */ float mBButtonFontPosY; - /* 0x2E0 */ uint32_t mBButtonFontColor; // JUtility::TColor + /* 0x2D4 */ float mButtonBFontScale; + /* 0x2D8 */ float mButtonBFontPosX; + /* 0x2DC */ float mButtonBFontPosY; + /* 0x2E0 */ uint32_t mButtonBFontColor; // JUtility::TColor /* 0x2E4 */ float field_0x2e4; /* 0x2E8 */ float field_0x2e8; /* 0x2EC */ float field_0x2ec; /* 0x2F0 */ uint32_t field_0x2f0; // JUtility::TColor - /* 0x2F4 */ float mXYButtonFontScale; - /* 0x2F8 */ float mXYButtonFontPosX; - /* 0x2FC */ float mXYButtonFontPosY; - /* 0x300 */ uint32_t mXYButtonFontColor; // JUtility::TColor + /* 0x2F4 */ float mButtonXYTextScale; + /* 0x2F8 */ float mButtonXYTextPosX; + /* 0x2FC */ float mButtonXYTextPosY; + /* 0x300 */ uint32_t mButtonXYTextColor; // JUtility::TColor /* 0x304 */ float field_0x304; /* 0x308 */ float field_0x308; /* 0x30C */ float field_0x30c; @@ -908,10 +886,10 @@ namespace libtp::tp::d_meter_hio /* 0x320 */ float field_0x320; /* 0x324 */ float field_0x324; /* 0x328 */ float field_0x328; - /* 0x32C */ float mZButtonFontScale; - /* 0x330 */ float mZButtonFontPosX; - /* 0x334 */ float mZButtonFontPosY; - /* 0x338 */ uint32_t mZButtonFontColor; // JUtility::TColor + /* 0x32C */ float mButtonZFontScale; + /* 0x330 */ float mButtonZFontPosX; + /* 0x334 */ float mButtonZFontPosY; + /* 0x338 */ uint32_t mButtonZFontColor; // JUtility::TColor /* 0x33C */ float mRupeeKeyScale; /* 0x340 */ float mRupeeKeyPosX; /* 0x344 */ float mRupeeKeyPosY; @@ -943,102 +921,100 @@ namespace libtp::tp::d_meter_hio /* 0x3AC */ float mSpurBarScale; /* 0x3B0 */ float mSpurBarPosX; /* 0x3B4 */ float mSpurBarPosY; - /* 0x3B8 */ float mAButtonHorsePosX; - /* 0x3BC */ float mAButtonHorsePosY; - /* 0x3C0 */ float mAButtonHorseScale; - /* 0x3C4 */ float mAButtonHighlightScale; - /* 0x3C8 */ float mBButtonHighlightScale; + /* 0x3B8 */ float mButtonAHorsePosX; + /* 0x3BC */ float mButtonAHorsePosY; + /* 0x3C0 */ float mButtonAHorseScale; + /* 0x3C4 */ float mButtonAPikariScale; + /* 0x3C8 */ float mButtonBPikariScale; /* 0x3CC */ float field_0x3cc; /* 0x3D0 */ float field_0x3d0; /* 0x3D4 */ float field_0x3d4; - /* 0x3D8 */ float mZButtonHighlightScale; - /* 0x3DC */ float mXYButtonHighlightScale; - /* 0x3E0 */ float mSpurIconHighlightScale; - /* 0x3E4 */ float mSpurIconReviveHighlightScale; - /* 0x3E8 */ float mMidnaIconHighlightScale; + /* 0x3D8 */ float mButtonZPikariScale; + /* 0x3DC */ float mButtonXYPikariScale; + /* 0x3E0 */ float mSpurIconPikariScale; + /* 0x3E4 */ float mSpurIconRevivePikariScale; + /* 0x3E8 */ float mMidnaIconPikariScale; /* 0x3EC */ int16_t mMidnaIconFlashRate; /* 0x3EE */ uint8_t padding_3ee[2]; /* 0x3F0 */ float field_0x3f0; /* 0x3F4 */ float field_0x3f4; /* 0x3F8 */ float field_0x3f8; - /* 0x3FC */ float mDPadButtonScale; - /* 0x400 */ float mDPadButtonOFFPosX; - /* 0x404 */ float mDPadButtonOFFPosY; - /* 0x408 */ float mDPadButtonONPosX; - /* 0x40C */ float mDPadButtonONPosY; - /* 0x410 */ float mDPadButtonLetterSpacing; - /* 0x414 */ float mDPadButtonAlpha; - /* 0x418 */ float mDPadButtonITEMAlpha; - /* 0x41C */ float mDPadButtonMAPAlpha; - /* 0x420 */ int16_t mDPadButtonMoveFrame; + /* 0x3FC */ float mButtonCrossScale; + /* 0x400 */ float mButtonCrossOFFPosX; + /* 0x404 */ float mButtonCrossOFFPosY; + /* 0x408 */ float mButtonCrossONPosX; + /* 0x40C */ float mButtonCrossONPosY; + /* 0x410 */ float mButtonCrossTextScale; + /* 0x414 */ float mButtonCrossAlpha; + /* 0x418 */ float mButtonCrossITEMAlpha; + /* 0x41C */ float mButtonCrossMAPAlpha; + /* 0x420 */ int16_t mButtonCrossMoveFrame; /* 0x422 */ int16_t field_0x422; /* 0x424 */ int16_t field_0x424; /* 0x426 */ bool mButtonDebug[4]; - /* 0x42A */ uint8_t mXYButtonsItemDimAlpha; - /* 0x42B */ uint8_t mXYButtonsBaseDimAlpha; + /* 0x42A */ uint8_t mButtonXYItemDimAlpha; + /* 0x42B */ uint8_t mButtonXYBaseDimAlpha; /* 0x42C */ uint8_t field_0x42c; /* 0x42D */ uint8_t mMaxSpurAmount; /* 0x42E */ bool mSpurDebug; /* 0x42F */ bool field_0x42f; - /* 0x430 */ uint32_t mSpurIconHighlightFrontInner; // JUtility::TColor - /* 0x434 */ uint32_t mSpurIconHighlightFrontOuter; // JUtility::TColor - /* 0x438 */ uint32_t mSpurIconHighlightBackInner; // JUtility::TColor - /* 0x43C */ uint32_t mSpurIconHighlightBackOuter; // JUtility::TColor - /* 0x440 */ float mSpurIconHighlightAnimSpeed; - /* 0x444 */ uint32_t mSpurIconReviveHighlightFrontInner; // JUtility::TColor - /* 0x448 */ uint32_t mSpurIconReviveHighlightFrontOuter; // JUtility::TColor - /* 0x44C */ uint32_t mSpurIconReviveHighlightBackInner; // JUtility::TColor - /* 0x450 */ uint32_t mSpurIconReviveHighlightBackOuter; // JUtility::TColor - /* 0x454 */ float mSpurIconReviveHighlightAnimSpeed; - /* 0x458 */ uint32_t mZButtonHighlightFrontInner; // JUtility::TColor - /* 0x45C */ uint32_t mZButtonHighlightFrontOuter; // JUtility::TColor - /* 0x460 */ uint32_t mZButtonHighlightBackInner; // JUtility::TColor - /* 0x464 */ uint32_t mZButtonHighlightBackOuter; // JUtility::TColor - /* 0x468 */ float mZButtonHighlightAnimSpeed; - /* 0x46C */ uint32_t mXYButtonHighlightFrontInner; // JUtility::TColor - /* 0x470 */ uint32_t mXYButtonHighlightFrontOuter; // JUtility::TColor - /* 0x474 */ uint32_t mXYButtonHighlightBackInner; // JUtility::TColor - /* 0x478 */ uint32_t mXYButtonHighlightBackOuter; // JUtility::TColor - /* 0x47C */ float mXYButtonHighlightAnimSpeed; - /* 0x480 */ uint32_t mAButtonHighlightFrontInner; // JUtility::TColor - /* 0x484 */ uint32_t mAButtonHighlightFrontOuter; // JUtility::TColor - /* 0x488 */ uint32_t mAButtonHighlightBackInner; // JUtility::TColor - /* 0x48C */ uint32_t mAButtonHighlightBackOuter; // JUtility::TColor - /* 0x490 */ float mAButtonHighlightAnimSpeed; - /* 0x494 */ uint32_t mBButtonHighlightFrontInner; // JUtility::TColor - /* 0x498 */ uint32_t mBButtonHighlightFrontOuter; // JUtility::TColor - /* 0x49C */ uint32_t mBButtonHighlightBackInner; // JUtility::TColor - /* 0x4A0 */ uint32_t mBButtonHighlightBackOuter; // JUtility::TColor - /* 0x4A4 */ float mBButtonHighlightAnimSpeed; - /* 0x4A8 */ uint32_t field_0x4a8; // JUtility::TColor - /* 0x4AC */ uint32_t field_0x4ac; // JUtility::TColor - /* 0x4B0 */ uint32_t field_0x4b0; // JUtility::TColor - /* 0x4B4 */ uint32_t field_0x4b4; // JUtility::TColor + /* 0x430 */ uint32_t mSpurIconPikariFrontInner; // JUtility::TColor + /* 0x434 */ uint32_t mSpurIconPikariFrontOuter; // JUtility::TColor + /* 0x438 */ uint32_t mSpurIconPikariBackInner; // JUtility::TColor + /* 0x43C */ uint32_t mSpurIconPikariBackOuter; // JUtility::TColor + /* 0x440 */ float mSpurIconPikariAnimSpeed; + /* 0x444 */ uint32_t mSpurIconRevivePikariFrontInner; // JUtility::TColor + /* 0x448 */ uint32_t mSpurIconRevivePikariFrontOuter; // JUtility::TColor + /* 0x44C */ uint32_t mSpurIconRevivePikariBackInner; // JUtility::TColor + /* 0x450 */ uint32_t mSpurIconRevivePikariBackOuter; // JUtility::TColor + /* 0x454 */ float mSpurIconRevivePikariAnimSpeed; + /* 0x458 */ uint32_t mButtonZPikariFrontInner; // JUtility::TColor + /* 0x45C */ uint32_t mButtonZPikariFrontOuter; // JUtility::TColor + /* 0x460 */ uint32_t mButtonZPikariBackInner; // JUtility::TColor + /* 0x464 */ uint32_t mButtonZPikariBackOuter; // JUtility::TColor + /* 0x468 */ float mButtonZPikariAnimSpeed; + /* 0x46C */ uint32_t mButtonXYPikariFrontInner; // JUtility::TColor + /* 0x470 */ uint32_t mButtonXYPikariFrontOuter; // JUtility::TColor + /* 0x474 */ uint32_t mButtonXYPikariBackInner; // JUtility::TColor + /* 0x478 */ uint32_t mButtonXYPikariBackOuter; // JUtility::TColor + /* 0x47C */ float mButtonXYPikariAnimSpeed; + /* 0x480 */ uint32_t mButtonAPikariFrontInner; // JUtility::TColor + /* 0x484 */ uint32_t mButtonAPikariFrontOuter; // JUtility::TColor + /* 0x488 */ uint32_t mButtonAPikariBackInner; // JUtility::TColor + /* 0x48C */ uint32_t mButtonAPikariBackOuter; // JUtility::TColor + /* 0x490 */ float mButtonAPikariAnimSpeed; + /* 0x494 */ uint32_t mButtonBPikariFrontInner; // JUtility::TColor + /* 0x498 */ uint32_t mButtonBPikariFrontOuter; // JUtility::TColor + /* 0x49C */ uint32_t mButtonBPikariBackInner; // JUtility::TColor + /* 0x4A0 */ uint32_t mButtonBPikariBackOuter; // JUtility::TColor + /* 0x4A4 */ float mButtonBPikariAnimSpeed; + /* 0x4A8 */ uint32_t field_0x4a8; // JUtility::TColor + /* 0x4AC */ uint32_t field_0x4ac; // JUtility::TColor + /* 0x4B0 */ uint32_t field_0x4b0; // JUtility::TColor + /* 0x4B4 */ uint32_t field_0x4b4; // JUtility::TColor /* 0x4B8 */ float field_0x4b8; - /* 0x4BC */ uint32_t field_0x4bc; // JUtility::TColor - /* 0x4C0 */ uint32_t field_0x4c0; // JUtility::TColor - /* 0x4C4 */ uint32_t field_0x4c4; // JUtility::TColor - /* 0x4C8 */ uint32_t field_0x4c8; // JUtility::TColor + /* 0x4BC */ uint32_t field_0x4bc; // JUtility::TColor + /* 0x4C0 */ uint32_t field_0x4c0; // JUtility::TColor + /* 0x4C4 */ uint32_t field_0x4c4; // JUtility::TColor + /* 0x4C8 */ uint32_t field_0x4c8; // JUtility::TColor /* 0x4CC */ float field_0x4cc; - /* 0x4D0 */ uint32_t field_0x4d0; // JUtility::TColor - /* 0x4D4 */ uint32_t field_0x4d4; // JUtility::TColor - /* 0x4D8 */ uint32_t field_0x4d8; // JUtility::TColor - /* 0x4DC */ uint32_t field_0x4dc; // JUtility::TColor + /* 0x4D0 */ uint32_t field_0x4d0; // JUtility::TColor + /* 0x4D4 */ uint32_t field_0x4d4; // JUtility::TColor + /* 0x4D8 */ uint32_t field_0x4d8; // JUtility::TColor + /* 0x4DC */ uint32_t field_0x4dc; // JUtility::TColor /* 0x4E0 */ float field_0x4e0; - /* 0x4E4 */ uint32_t mMidnaIconHighlightFrontInner; // JUtility::TColor - /* 0x4E8 */ uint32_t mMidnaIconHighlightFrontOuter; // JUtility::TColor - /* 0x4EC */ uint32_t mMidnaIconHighlightBackInner; // JUtility::TColor - /* 0x4F0 */ uint32_t mMidnaIconHighlightBackOuter; // JUtility::TColor - /* 0x4F4 */ float mMidnaIconHighlightAnimSpeed; + /* 0x4E4 */ uint32_t mMidnaIconPikariFrontInner; // JUtility::TColor + /* 0x4E8 */ uint32_t mMidnaIconPikariFrontOuter; // JUtility::TColor + /* 0x4EC */ uint32_t mMidnaIconPikariBackInner; // JUtility::TColor + /* 0x4F0 */ uint32_t mMidnaIconPikariBackOuter; // JUtility::TColor + /* 0x4F4 */ float mMidnaIconPikariAnimSpeed; /* 0x4F8 */ float mScrollArrowScaleX; /* 0x4FC */ float mScrollArrowScaleY; /* 0x500 */ float mScrollArrowBPKAnimSpeed; /* 0x504 */ float mScrollArrowBCKAnimSpeed; /* 0x508 */ float mScrollArrowBTKAnimSpeed; - /* 0x50C */ float mScrollArrowTopBottomPosX; - /* 0x510 */ float mScrollArrowLeftRightPosX; - /* 0x514 */ float mScrollArrowTopBottomPosY; - /* 0x518 */ float mScrollArrowLeftRightPosY; + /* 0x50C */ float mScrollArrowPosX[2]; + /* 0x514 */ float mScrollArrowPosY[2]; /* 0x51C */ float mScrollArrowCenterPosX; /* 0x520 */ float mScrollArrowCenterPosY; /* 0x524 */ bool mScrollArrowDisplayAll; @@ -1048,10 +1024,8 @@ namespace libtp::tp::d_meter_hio /* 0x530 */ float mWiiLockArrowBPKAnimSpeed; /* 0x534 */ float mWiiLockArrowBCKAnimSpeed; /* 0x538 */ float mWiiLockArrowBTKAnimSpeed; - /* 0x53C */ float mWiiLockArrowTopBottomPosX; - /* 0x540 */ float mWiiLockArrowLeftRightPosX; - /* 0x544 */ float mWiiLockArrowTopBottomPosY; - /* 0x548 */ float mWiiLockArrowLeftRightPosY; + /* 0x53C */ float mWiiLockArrowPosX[2]; + /* 0x544 */ float mWiiLockArrowPosY[2]; /* 0x54C */ float field_0x54c; /* 0x550 */ bool mWiiLockArrowDisplayAll; /* 0x551 */ uint8_t padding_551[3]; diff --git a/include/tp/d_pane_class.h b/include/tp/d_pane_class.h index bfefcc0..57f7093 100644 --- a/include/tp/d_pane_class.h +++ b/include/tp/d_pane_class.h @@ -11,29 +11,35 @@ #include "tp/d_pane_class_alpha.h" #include "TColor.h" - +#include "jGeometry.h" namespace libtp::tp::d_pane_class { class CPaneMgr: public libtp::tp::d_pane_class_alpha::CPaneMgrAlpha { /* 0x1C */ void* mpFirstStackSize; /* 0x20 */ void* field_0x20; - /* 0x24 */ float mInitPos; // JGeometry::TVec2 - /* 0x2C */ float mGlobalPos; // JGeometry::TVec2 - /* 0x34 */ float mInitSize; // JGeometry::TVec2 - /* 0x3C */ float mInitScale; // JGeometry::TVec2 - /* 0x44 */ float mInitTrans; // JGeometry::TVec2 + /* 0x24 */ JGeometry::TVec2 mInitPos; // JGeometry::TVec2 + /* 0x2C */ JGeometry::TVec2 mGlobalPos; // JGeometry::TVec2 + /* 0x34 */ JGeometry::TVec2 mInitSize; // JGeometry::TVec2 + /* 0x3C */ JGeometry::TVec2 mInitScale; // JGeometry::TVec2 + /* 0x44 */ JGeometry::TVec2 mInitTrans; // JGeometry::TVec2 /* 0x4C */ float mRotateZ; - /* 0x50 */ float mRotateOffset; // JGeometry::TVec2 - /* 0x58 */ uint32_t mInitWhite; // JUtility::TColor - /* 0x5C */ uint32_t mInitBlack; // JUtility::TColor + /* 0x50 */ JGeometry::TVec2 mRotateOffset; // JGeometry::TVec2 + /* 0x58 */ JUtility::TColor mInitWhite; // JUtility::TColor + /* 0x5C */ JUtility::TColor mInitBlack; // JUtility::TColor /* 0x60 */ int16_t field_0x60; /* 0x62 */ int16_t field_0x62; /* 0x64 */ int16_t mScaleAnime; /* 0x66 */ int16_t field_0x66; /* 0x68 */ int16_t field_0x68; /* 0x6A */ int16_t mColorAnime; - } __attribute__((__packed__)); + public: + float getInitPosX() { return mInitPos.x; } + float getInitPosY() { return mInitPos.y; } + float getInitSizeX() { return mInitSize.x; } + float getInitSizeY() { return mInitSize.y; } + }; + extern "C" { diff --git a/include/tp/d_pane_class_alpha.h b/include/tp/d_pane_class_alpha.h index 19ee968..520eb51 100644 --- a/include/tp/d_pane_class_alpha.h +++ b/include/tp/d_pane_class_alpha.h @@ -27,6 +27,10 @@ namespace libtp::tp::d_pane_class_alpha /* 0x19 */ uint8_t mFlags; /* 0x1A */ uint8_t padding[2]; } __attribute__((__packed__)); + extern "C"{ + void setAlphaRate(CPaneMgrAlpha*, float); + } + } // namespace libtp::tp::d_pane_class_alpha #endif \ No newline at end of file diff --git a/include/tp/jGeometry.h b/include/tp/jGeometry.h new file mode 100644 index 0000000..ccca30b --- /dev/null +++ b/include/tp/jGeometry.h @@ -0,0 +1,56 @@ +#ifndef JGEOMETRY_H +#define JGEOMETRY_H + +namespace JGeometry { + +template +struct TVec2 { + void set(T v) { y = x = v; } + + void set(T x, T y) { + this->x = x; + this->y = y; + } + + void set(const TVec2& other) { + x = other.x; + y = other.y; + } + + void setMin(const TVec2& min) { + if (x >= min.x) + x = min.x; + if (y >= min.y) + y = min.y; + } + + void setMax(const TVec2& max) { + if (x <= max.x) + x = max.x; + if (y <= max.y) + y = max.y; + } + + void add(const TVec2& other) { + x += other.x; + y += other.y; + } + + bool isAbove(const TVec2& other) const { + return (x >= other.x) && (y >= other.y) ? true : false; + } + + float dot(const TVec2& other) { + return x * other.x + y * other.y; + } + + float squared() { + return dot(*this); + } + + + T x; + T y; +}; +} +#endif \ No newline at end of file