mirror of
https://github.com/zeldaret/ss
synced 2026-07-10 06:26:47 -04:00
lyt_util OK
This commit is contained in:
@@ -401,6 +401,10 @@ nw4r/lyt/lyt_common.cpp:
|
||||
.sdata2 start:0x8057F2E0 end:0x8057F2E8
|
||||
.bss start:0x80673AA8 end:0x80673AC8
|
||||
|
||||
nw4r/lyt/lyt_util.cpp:
|
||||
.text start:0x804932E0 end:0x8049350C
|
||||
.sdata2 start:0x8057F2E8 end:0x8057F2EC
|
||||
|
||||
egg/core/eggArchive.cpp:
|
||||
.text start:0x80493510 end:0x80494254
|
||||
.data start:0x8056E820 end:0x8056E830
|
||||
|
||||
@@ -26116,9 +26116,9 @@ SetVertexFormat__Q34nw4r3lyt6detailFbUc = .text:0x80492B60; // type:function siz
|
||||
DrawQuad__Q34nw4r3lyt6detailFRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeUcPA4_CQ34nw4r4math4VEC2PCQ34nw4r2ut5Color = .text:0x80492C50; // type:function size:0x560
|
||||
DrawQuad__Q34nw4r3lyt6detailFRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeUcPA4_CQ34nw4r4math4VEC2PCQ34nw4r2ut5ColorUc = .text:0x804931B0; // type:function size:0x130
|
||||
BindAnimation__Q24nw4r3lytFPQ34nw4r3lyt5GroupPQ34nw4r3lyt13AnimTransformbb = .text:0x804932E0; // type:function size:0x70
|
||||
FUN_80493350 = .text:0x80493350; // type:function size:0x78
|
||||
FUN_804933d0 = .text:0x804933D0; // type:function size:0x70
|
||||
FUN_80493440 = .text:0x80493440; // type:function size:0xCC
|
||||
UnbindAnimation__Q24nw4r3lytFPQ34nw4r3lyt5GroupPQ34nw4r3lyt13AnimTransformb = .text:0x80493350; // type:function size:0x78
|
||||
SetAnimationEnable__Q24nw4r3lytFPQ34nw4r3lyt5GroupPQ34nw4r3lyt13AnimTransformbb = .text:0x804933D0; // type:function size:0x70
|
||||
IsContain__Q24nw4r3lytFPQ34nw4r3lyt4PaneRCQ34nw4r4math4VEC2 = .text:0x80493440; // type:function size:0xCC
|
||||
readNand__Q23EGG7ArchiveFP12NANDFileInfoPvUll = .text:0x80493510; // type:function size:0x70
|
||||
__ct__Q23EGG7ArchiveFv = .text:0x80493580; // type:function size:0x70
|
||||
__dt__Q23EGG7ArchiveFv = .text:0x804935F0; // type:function size:0x6C
|
||||
@@ -47595,7 +47595,7 @@ lbl_8057F2D8 = .sdata2:0x8057F2D8; // type:object size:0x4 data:float
|
||||
lbl_8057F2DC = .sdata2:0x8057F2DC; // type:object size:0x4 data:float
|
||||
lbl_8057F2E0 = .sdata2:0x8057F2E0; // type:object size:0x4 data:float
|
||||
lbl_8057F2E4 = .sdata2:0x8057F2E4; // type:object size:0x4 data:float
|
||||
lbl_8057F2E8 = .sdata2:0x8057F2E8; // type:object size:0x8 data:float
|
||||
lbl_8057F2E8 = .sdata2:0x8057F2E8; // type:object size:0x4 data:float
|
||||
eggAllocatorFuncs = .sdata2:0x8057F2F0; // type:object size:0x8 scope:local
|
||||
lbl_8057F2F8 = .sdata2:0x8057F2F8; // type:object size:0x4 data:float
|
||||
lbl_8057F300 = .sdata2:0x8057F300; // type:object size:0x8 data:double
|
||||
|
||||
@@ -367,6 +367,7 @@ config.libs = [
|
||||
Object(Matching, "nw4r/lyt/lyt_resourceAccessor.cpp"),
|
||||
Object(Matching, "nw4r/lyt/lyt_arcResourceAccessor.cpp"),
|
||||
Object(Matching, "nw4r/lyt/lyt_common.cpp"),
|
||||
Object(Matching, "nw4r/lyt/lyt_util.cpp"),
|
||||
], [""]
|
||||
),
|
||||
# EGG
|
||||
|
||||
@@ -50,8 +50,8 @@ public:
|
||||
return &mAnimList;
|
||||
}
|
||||
|
||||
const math::MTX34 *GetGlobalMtx() const {
|
||||
return &mGlbMtx;
|
||||
const math::MTX34 &GetGlobalMtx() const {
|
||||
return mGlbMtx;
|
||||
}
|
||||
Pane *GetParent() const {
|
||||
return mpParent;
|
||||
|
||||
@@ -8,6 +8,12 @@ namespace nw4r {
|
||||
namespace lyt {
|
||||
|
||||
void BindAnimation(Group *pGroup, AnimTransform *pAnimTrans, bool bRecursive, bool bDisable);
|
||||
void UnbindAnimation(Group *pGroup, AnimTransform *pAnimTrans, bool bRecusive);
|
||||
void SetAnimationEnable(Group *pGroup, AnimTransform *pAnimTrans, bool bEnable, bool bRecursive);
|
||||
bool IsContain(Pane *pPane, const math::VEC2 &pos);
|
||||
Pane *FindHitPane(Pane *pPane, const math::VEC2 &pos);
|
||||
Pane *FindHitPane(Layout *pLayout, const math::VEC2 &pos);
|
||||
Pane *GetNextPane(Pane *);
|
||||
|
||||
} // namespace lyt
|
||||
|
||||
|
||||
@@ -209,10 +209,10 @@ struct MTX34 : _MTX34 {
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
operator MtxRef() {
|
||||
inline operator MtxRef() {
|
||||
return mtx;
|
||||
}
|
||||
operator MtxRefConst() const {
|
||||
inline operator MtxRefConst() const {
|
||||
return mtx;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
#include <nw4r/lyt/lyt_animation.h>
|
||||
#include <nw4r/lyt/lyt_group.h>
|
||||
#include <nw4r/lyt/lyt_pane.h>
|
||||
#include <nw4r/lyt/lyt_utils.h>
|
||||
#include <nw4r/math/math_geometry.h>
|
||||
#include <nw4r/math/math_types.h>
|
||||
#include <nw4r/ut/ut_Rect.h>
|
||||
|
||||
namespace nw4r {
|
||||
@@ -9,22 +10,60 @@ namespace lyt {
|
||||
|
||||
namespace {
|
||||
// Contains__Q34nw4r3lyt22@unnamed@lyt_util_cpp@FRCQ34nw4r2ut4RectRCQ34nw4r4math4VEC2
|
||||
bool Contains(const ut::Rect &rect, const math::VEC2 &point) {}
|
||||
bool Contains(const ut::Rect &rect, const math::VEC2 &point) {
|
||||
return (rect.left <= point.x && point.x <= rect.right) && (rect.bottom <= point.y && point.y <= rect.top);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// BindAnimation__Q24nw4r3lytFPQ34nw4r3lyt5GroupPQ34nw4r3lyt13AnimTransformbb
|
||||
void BindAnimation(Group *pGroup, AnimTransform *pAnimTrans, bool bRecursive, bool bDisable) {}
|
||||
void BindAnimation(Group *pGroup, AnimTransform *pAnimTrans, bool bRecursive, bool bDisable) {
|
||||
ut::LinkList<detail::PaneLink, 0> &paneList = *pGroup->GetPaneList();
|
||||
for (ut::LinkList<detail::PaneLink, 0>::Iterator it = paneList.GetBeginIter(); it != paneList.GetEndIter(); it++) {
|
||||
it->mTarget->BindAnimation(pAnimTrans, bRecursive, bDisable);
|
||||
}
|
||||
}
|
||||
|
||||
// UnbindAnimation__Q24nw4r3lytFPQ34nw4r3lyt5GroupPQ34nw4r3lyt13AnimTransformb
|
||||
void UnbindAnimation(Group *pGroup, AnimTransform *pAnimTrans, bool bRecursive) {
|
||||
ut::LinkList<detail::PaneLink, 0> &paneList = *pGroup->GetPaneList();
|
||||
for (ut::LinkList<detail::PaneLink, 0>::Iterator it = paneList.GetBeginIter(); it != paneList.GetEndIter(); it++) {
|
||||
it->mTarget->UnbindAnimation(pAnimTrans, bRecursive);
|
||||
}
|
||||
}
|
||||
|
||||
// SetAnimationEnable__Q24nw4r3lytFPQ34nw4r3lyt5GroupPQ34nw4r3lyt13AnimTransformbb
|
||||
void SetAnimationEnable(Group *pGroup, nw4r::lyt::AnimTransform *pAnimTrans, bool bEnable, bool bRecursive) {}
|
||||
void SetAnimationEnable(Group *pGroup, nw4r::lyt::AnimTransform *pAnimTrans, bool bEnable, bool bRecursive) {
|
||||
ut::LinkList<detail::PaneLink, 0> &paneList = *pGroup->GetPaneList();
|
||||
for (ut::LinkList<detail::PaneLink, 0>::Iterator it = paneList.GetBeginIter(); it != paneList.GetEndIter(); it++) {
|
||||
it->mTarget->SetAnimationEnable(pAnimTrans, bEnable, bRecursive);
|
||||
}
|
||||
}
|
||||
|
||||
// IsContain__Q24nw4r3lytFPQ34nw4r3lyt4PaneRCQ34nw4r4math4VEC2
|
||||
bool IsContain(Pane *pPane, const math::VEC2 &pos) {
|
||||
return false;
|
||||
math::MTX34 invGlbMtx;
|
||||
PSMTXInverse(pPane->GetGlobalMtx(), invGlbMtx);
|
||||
math::VEC3 lclPos;
|
||||
PSMTXMultVec(invGlbMtx, math::VEC3(pos.x, pos.y, 0.0f), lclPos);
|
||||
return Contains(pPane->GetPaneRect(), math::VEC2(lclPos.x, lclPos.y));
|
||||
}
|
||||
|
||||
// FindHitPane__Q24nw4r3lytFPQ34nw4r3lyt4PaneRCQ34nw4r4math4VEC2
|
||||
Pane *FindHitPane(Pane *pPane, const math::VEC2 &pos) {
|
||||
// TODO
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// FindHitPane__Q24nw4r3lytFPQ34nw4r3lyt6LayoutRCQ34nw4r4math4VEC2
|
||||
Pane *FindHitPane(Layout *pLayout, const math::VEC2 &pos) {
|
||||
// TODO
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// GetNextPane__Q24nw4r3lytFPQ34nw4r3lyt4Pane
|
||||
Pane *GetNextPane(Pane *) {
|
||||
// TODO
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user