xan1242 / hp2wsfix

Need for Speed: Hot Pursuit 2 PC - Widescreen fix
MIT License
43 stars 2 forks source link

POS_X and POS_Y both adjust horizontal offset of the "Position" text #22

Open 20excal07 opened 7 months ago

20excal07 commented 7 months ago

And I think I already found your culprit:

dllmain.cpp:

        if (strcmp(CurrentFEElement, "p1.HudText") == 0)
        {
            (*unk1).topX = 16;
            (*unk1).topY = 0;

            (*unk1).topX += POS_XOffset;
            (*unk1).topX += POS_YOffset;

            //printf("GUI.mBorders pointers: [ %X , %X ] %X , %X\n", &(*unk1).topX, &(*unk1).topY, &(*unk1).botX, &(*unk1).botY);
            //printf("GUI.mBorders: [ %d , %d ] %d , %d\n", (*unk1).topX, (*unk1).topY, (*unk1).botX, (*unk1).botY);

            //return retval;
        }

        if (strcmp(CurrentFEElement, "p2.HudText") == 0)
        {
            (*unk1).topX = 64;
            (*unk1).topY = 14;

            (*unk1).topX += POS_XOffset;
            (*unk1).topX += POS_YOffset;

            //return retval;
        }

Shouldn't it be ...

(*unk1).topX += POS_XOffset;
(*unk1).topY += POS_YOffset;

... for both cases?

xan1242 commented 7 months ago

I'm not developing this actively anymore.

I'll rewrite it in a new project soon which will address this in a much better way. This is very janky as it is (plus I wrote this back when I didn't fully understand what I was doing).