Skip to content

Created and implemented a PosType enum#3971

Closed
link5669 wants to merge 13 commits intoHarbourMasters:developfrom
link5669:develop
Closed

Created and implemented a PosType enum#3971
link5669 wants to merge 13 commits intoHarbourMasters:developfrom
link5669:develop

Conversation

@link5669
Copy link
Contributor

@link5669 link5669 commented Feb 23, 2024

This PR resolves issue #2971. The enum declaration was included in z64.h and was implemented in place of the magic numbers that were there before. I wasn't sure where to put the enum declaration, so I consulted @briaguya-ai and they said they'd comment on the PR if there's a better place to include it.

Build Artifacts

Copy link
Contributor

@stratomaster64 stratomaster64 left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines -425 to +434
if (CVarGetInteger("gHeartsCountPosType", 0) != 0) {
if (CVarGetInteger("gHeartsCountPosType", 0) != ORIGINAL_LOCATION) {
offsetY = CVarGetInteger("gHeartsCountPosY", 0)+Y_Margins+(HeartsScale*15);
if (CVarGetInteger("gHeartsCountPosType", 0) == 1) {//Anchor Left
if (CVarGetInteger("gHeartsCountPosType", 0) == ANCHOR_LEFT) {
offsetX = OTRGetDimensionFromLeftEdge(CVarGetInteger("gHeartsCountPosX", 0)+X_Margins+70.0f);
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 2) {//Anchor Right
} else if (CVarGetInteger("gHeartsCountPosType", 0) == ANCHOR_RIGHT) {
X_Margins = Right_LM_Margin;
offsetX = OTRGetDimensionFromRightEdge(CVarGetInteger("gHeartsCountPosX", 0)+X_Margins+70.0f);
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 3) {//Anchor None
} else if (CVarGetInteger("gHeartsCountPosType", 0) == ANCHOR_NONE) {
offsetX = CVarGetInteger("gHeartsCountPosX", 0)+70.0f;
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 4) {//Hidden
} else if (CVarGetInteger("gHeartsCountPosType", 0) == HIDDEN) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Kinda funny to see changes on commented code

@inspectredc
Copy link
Member

I think the place that makes the most sense to me for this would be cosmeticsTypes.h

static u8 changed = 0;
u8 reset = 0;

switch (this->trailType) { //there HAS to be a better way to do this.
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this PR is incorporating changes from another PR that are unrelated to this one. Specifically, these changes here appear to be from #3973. Would it be possible to rebase this PR or open a new one with only the changes you intended to make for this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yikes, sorry about that. I'll do that right now

@aMannus aMannus added this to the 9.0.0 milestone Jan 11, 2025
@aMannus
Copy link
Contributor

aMannus commented Jan 17, 2025

As with #3973, going to close this for now. If the creator (or anyone else) feels like picking this up again, feel free to open another PR.

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.

6 participants