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

Fix copyright position for PAL 1.1 #2952

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

xoascf
Copy link
Contributor

@xoascf xoascf commented Jun 5, 2023

Copy link
Contributor

@leggettc18 leggettc18 left a comment

Choose a reason for hiding this comment

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

I'm assuming this just centers the copyright text on the screen? A before/after screenshot would be appreciated if possible.

soh/src/overlays/actors/ovl_En_Mag/z_en_mag.h Show resolved Hide resolved
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);

gSPTextureRectangle(gfx++, 312, 792, 952, 856, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
gSPTextureRectangle(gfx++, copy_xl, 792, copy_xh, 856, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
Copy link
Contributor

Choose a reason for hiding this comment

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

feels like this PR is doing way more than it should, it looks like we already had some logic for 1998 vs 1998/2003, and we just need to set the different locations/lengths here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does exactly what is needed, only four values change, and since they only change per version, there is no need to run a function for each value.

static int EnMag_GetCopyrightTexWidth() {
uint32_t gameVersion = ResourceMgr_GetGameVersion(0);

static void EnMag_SetCopyValues(const char** copy_tex, u16* copy_width, u16* copy_xl, u16* copy_xh) {
Copy link
Contributor

Choose a reason for hiding this comment

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

it's not clear why this change is being made instead of utilizing the existing methods

Copy link
Contributor Author

@xoascf xoascf Jun 6, 2023

Choose a reason for hiding this comment

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

I had already done this for partial NTSC 1.0 support in the past, I just copied the function for this new version.

Copy link
Contributor

Choose a reason for hiding this comment

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

that works, i'm just generally quite risk averse with changes and this is moving us from a pattern that is tested and working to one that i had not seen tested before

Copy link
Contributor Author

@xoascf xoascf Jun 6, 2023

Choose a reason for hiding this comment

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

I used the pattern from this example: https://stackoverflow.com/a/9144527

Copy link
Contributor

Choose a reason for hiding this comment

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

i understand the pattern, that's not what i was taking issue with. it's the little things like moving to a defining a const char* and passing it by reference being a different pattern than using a returned static char* as a parameter directly. that change switches where in memory that string lives, which may have unintended consequences

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you think it is convenient, we can use the previous method for this.

Copy link
Contributor

Choose a reason for hiding this comment

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

the fact that you've tested it before with partial 1.0 support makes me not worried about it, i just wanted to explain where my hesitation was coming from

soh/src/overlays/actors/ovl_En_Mag/z_en_mag.c Outdated Show resolved Hide resolved
@xoascf
Copy link
Contributor Author

xoascf commented Jun 6, 2023

I'm assuming this just centers the copyright text on the screen? A before/after screenshot would be appreciated if possible.

Yes.

Before:
leftBigN

With this PR:
centeredBigN

@leggettc18 leggettc18 merged commit e46c60a into HarbourMasters:develop Jun 7, 2023
8 checks passed
@xoascf xoascf deleted the fix-copy-pos branch June 7, 2023 17:29
@garrettjoecox garrettjoecox added this to the Sulu (7.1.x) milestone Jun 13, 2023
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.

None yet

5 participants