d_structd -> d_cursor_hit_check

This commit is contained in:
robojumper
2025-04-06 21:15:01 +02:00
parent 6feb6a95c6
commit fe36b486bf
34 changed files with 638 additions and 272 deletions
+10 -10
View File
@@ -2,7 +2,7 @@
#include "common.h"
#include "d/lyt/d2d.h"
#include "d/lyt/d_structd.h"
#include "d/d_cursor_hit_check.h"
#include "egg/core/eggColorFader.h"
#include "m/m_video.h"
#include "sized_string.h"
@@ -236,8 +236,8 @@ void dLytMapPinIcon_c::executeState_Remove() {
void dLytMapPinIcon_c::finalizeState_Remove() {}
dLytMapPinIcon_c::~dLytMapPinIcon_c() {
if (d2d::dLytStructDList::GetInstance()->fn_80065A30(&mStructD)) {
d2d::dLytStructDList::GetInstance()->removeFromList2(&mStructD);
if (dCsMgr_c::GetInstance()->isRegist(&mCsHitCheck)) {
dCsMgr_c::GetInstance()->unregistCursorTarget(&mCsHitCheck);
}
}
@@ -266,8 +266,8 @@ bool dLytMapPinIcon_c::build(d2d::ResAccIf_c *resAcc) {
}
mpBounding = mLyt.findBounding("B_mark_00");
mStructD.fn_80065E70(mpBounding, 2, 1, 0);
d2d::dLytStructDList::GetInstance()->appendToList2(&mStructD);
mCsHitCheck.init(mpBounding, 2, 1, 0);
dCsMgr_c::GetInstance()->registCursorTarget(&mCsHitCheck);
mAnmGroups[LYT_MAP_PIN_ICON_ANIM_SCALE].bind(false);
mAnmGroups[LYT_MAP_PIN_ICON_ANIM_LOOP].bind(false);
@@ -282,7 +282,7 @@ bool dLytMapPinIcon_c::build(d2d::ResAccIf_c *resAcc) {
}
bool dLytMapPinIcon_c::remove() {
d2d::dLytStructDList::GetInstance()->removeFromList2(&mStructD);
dCsMgr_c::GetInstance()->unregistCursorTarget(&mCsHitCheck);
for (int i = 0; i < 3; i++) {
mAnmGroups[i].remove();
}
@@ -296,8 +296,8 @@ bool dLytMapPinIcon_c::execute() {
mAnmGroups[2].setFrame(field_0x1DC);
// TODO something MapCapture
mLyt.calc();
mStructD.field_0x22 = 0;
mStructD.fn_80065F70();
mCsHitCheck.resetCachedHitboxes();
mCsHitCheck.execute();
return true;
}
@@ -398,8 +398,8 @@ void dLytMapFloorBtnMgr_c::finalizeState_Wait() {}
extern "C" void fn_801942F0(int, int);
dLytMapFloorBtnMgr_c::~dLytMapFloorBtnMgr_c() {
for (int i = 0; i < 4; i++) {
if (d2d::dLytStructDList::GetInstance()->fn_80065A30(&mStructDs[i])) {
d2d::dLytStructDList::GetInstance()->removeFromList2(&mStructDs[i]);
if (dCsMgr_c::GetInstance()->isRegist(&mCsHitChecks[i])) {
dCsMgr_c::GetInstance()->unregistCursorTarget(&mCsHitChecks[i]);
}
}
fn_801942F0(0, 0);