Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt MxRegion.h #1393

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Adapt MxRegion.h #1393

wants to merge 5 commits into from

Conversation

foxtacles
Copy link
Member

@foxtacles foxtacles commented Feb 22, 2025

This adapts our MxRegion implementation to the recently surfaced MxRegion.h file. It gives proper names to entities and merges the MxRegionCursor and everything from MxRegionList into MxRegion.

We can wait until we have the "entropy" detection in place to verify nothing breaks, although in this case the entropy seems relatively low.

@foxtacles foxtacles changed the title Adapt MxRegion.h Adapt MxRegion.h Feb 22, 2025
// TEMPLATE: BETA10 0x1014b640
// MxPtrListCursor<MxSpan>::~MxPtrListCursor<MxSpan>

// SYNTHETIC: LEGO1 0x100c3ca0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this a TEMPLATE?

Copy link
Member Author

@foxtacles foxtacles Feb 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically it's both synthetic and template. I'm not sure if we decided what takes preference in cases like these, I think it's relatively inconsistent in the code base so far

}

// FUNCTION: LEGO1 0x100c3690
MxRegion::~MxRegion()
{
if (m_list) {
delete m_list;
if (m_spanList) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove the if here for a better beta match.

MxRegionLeftRight* leftRight;
while (a.Next(leftRight) && leftRight->GetRight() < p_left) {
MxSegment* segment;
while (a.Next(segment) && segment->GetMax() < p_min) {
;
}

if (!a.HasMatch()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you change this to if (a.HasMatch()) and reverse the if/else blocks, it matches the beta better. No apparent effect on lego1 though.

@disinvite
Copy link
Collaborator

Looks good! I haven't found any regressions so far.

Some more beta addrs here if you want to add them. Not all should be comment annotations, I just did it that way for simplicity:

// FUNCTION: BETA10 0x10148fe8
// MxRegion::~MxRegion

// FUNCTION: BETA10 0x10149535
// MxRegion::Intersects

// FUNCTION: BETA10 0x1014aa46
// MxSpan::IntersectsH

// SYNTHETIC: BETA10 0x1014b0b0
// MxSpan::`scalar deleting destructor'

// FUNCTION: BETA10 0x1014b0f0
// MxSpan::~MxSpan

// FUNCTION: BETA10 0x1014b1d0
// MxRegion::IsEmpty

// TEMPLATE: BETA10 0x1014b210
// MxList<MxSpan *>::GetNumElements

// SYNTHETIC: BETA10 0x1014b230
// MxRegion::`scalar deleting destructor'

// FUNCTION: BETA10 0x1014b3b0
// MxSpan::GetMin

// FUNCTION: BETA10 0x1014b3f0
// MxSpan::GetMax

// FUNCTION: BETA10 0x1014b910
// MxSegment::GetMin

// FUNCTION: BETA10 0x1014b930
// MxSegment::GetMax

// FUNCTION: BETA10 0x1014c360
// MxSegment::MxSegment

// TEMPLATE: BETA10 0x1014c910
// ?Next@?$MxListCursor@PAVMxSegment@@@@QAEEXZ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants