Silent-Hill-2-Enhancements icon indicating copy to clipboard operation
Silent-Hill-2-Enhancements copied to clipboard

New graphics for Control Options menu, Display Mode option and Health Indicator option

Open mercury501 opened this issue 11 months ago • 12 comments

Hi!

This PR contains 3 features: Replacing the Buttons text in Control Options with custom icons, and new graphics in that menu Display mode in Advanced Options Health indicator in Game Options

Let me know if you need any changes!

Cheers!

mercury501 avatar Mar 20 '24 18:03 mercury501

You're a badass, mercury!! This was a massive undertaking but you pulled it through, like always. ❤️

Note that these features only work for 1.0 as of now. @AeroWidescreen may I ask if you'd consider helping us find equivalent addresses for 1.1 and DC?

Polymega avatar Mar 20 '24 18:03 Polymega

For future reference, addresses to dial in are: Here and Here, for Health indicator Here, for display mode Here for control options

mercury501 avatar Mar 21 '24 12:03 mercury501

I'll get started on this now.

AeroWidescreen avatar Mar 21 '24 15:03 AeroWidescreen

And here's the mes file to test with: option_msg_e.zip

mercury501 avatar Mar 21 '24 17:03 mercury501

Thanks @AeroWidescreen for the addresses!

mercury501 avatar Mar 21 '24 20:03 mercury501

Love the teamwork! 😍 Thank you both so much.

Mercury did you do a quick test with 1.1 and DC after getting their addresses?

Polymega avatar Mar 21 '24 20:03 Polymega

Hi @Polymega, I still need to find the addresses for the Display Mode option, so I couldn't test on other versions yet

mercury501 avatar Mar 21 '24 22:03 mercury501

@Polymega We agreed to split the work, so my half is done, but Mercury already knows he can ask me for additional help if he needs it. Some of them can be tricky to find.

AeroWidescreen avatar Mar 22 '24 03:03 AeroWidescreen

I'm not sure how to consistently repeat it, but there has been two times now where the game has launched using low resolution textures. When this happens, it can't be changed whenever the new Display Mode feature is in effect.

Polymega avatar Mar 24 '24 07:03 Polymega

I've added the remaining addresses, still have to test with other versions than 1.0

mercury501 avatar Mar 26 '24 13:03 mercury501

I'm working on getting translations for these new strings for the six, base languages. Once I get those, I'll share here to help with testing.

Polymega avatar Mar 26 '24 17:03 Polymega

I'm working on getting translations for these new strings for the six, base languages. Once I get those, I'll share here to help with testing.

I have translations for all the necessary strings now relating to the features Mercury is PR'ing here. Attached is a ZIP for the r_menu_*.res files: r_menu.zip

Polymega avatar Apr 08 '24 21:04 Polymega

I fixed the issue with low res textures getting re-enabled. I also added support for dynamically changing display modes on the fly and dynamically changing the health indicator.

@mercury501, I still see two "TODO" notes. Here and here. See below. What is the status of these two items?

void PatchHealthIndicatorOption() // TODO find faulty address in 1.1 and DC
WriteJMPtoMemory(DisplayModeValueHighlightAddr, DisplayModeValueHighlight, 0x08); //TODO highlight wrong color, tied to inputs

elishacloud avatar Apr 20 '24 16:04 elishacloud

I'm not sure if the latest Action Builds incorporate your commits for this PR, but I tried the latest build and the game still enables low res textures on resolution change:

"High res" textures

Screenshot 2024-04-20 13-10-01

"Low res" textures

Screenshot 2024-04-20 13-10-16

Low/high res textures won't take effect until you load a new room or reload the same room. To test, change the resolution, go back to the game, press F5 to Quick Save then F9 to Quick Load back into the room. This will reload the room.

Polymega avatar Apr 20 '24 17:04 Polymega

I fixed the issue with low res textures getting re-enabled. I also added support for dynamically changing display modes on the fly and dynamically changing the health indicator.

@mercury501, I still see two "TODO" notes. Here and here. See below. What is the status of these two items?

void PatchHealthIndicatorOption() // TODO find faulty address in 1.1 and DC
WriteJMPtoMemory(DisplayModeValueHighlightAddr, DisplayModeValueHighlight, 0x08); //TODO highlight wrong color, tied to inputs

IIRC those should be taken care of, I just forgot to remove the todos, I'll check on it in a bit

mercury501 avatar Apr 21 '24 07:04 mercury501

@elishacloud @Polymega Should be good now, let me know if you find any issue!

mercury501 avatar Apr 21 '24 13:04 mercury501

Did some quick tests for the health indicator feature on all binaries and looks to be working just well now! Thank you, mercury!

Polymega avatar Apr 21 '24 15:04 Polymega

@AeroWidescreen, would you be able to look up something for me? I am trying to update the Display Mode feature in the Advanced Menu. Currently, I am sending a device lost message to the game that tells the game to reset the display so then I can put the display into the different mode. However, this has some side effects.

Instead, I would like the game to think that I am asking for a resolution change instead. What I would like to do is make it so that when the Display Mode changes in the Advanced Menu the game thinks the resolution is changing and run the code that it would run on resolution change.

Let me know if you are able to help me find the code that tells the game that the resolution has change in the Advanced Menu.

elishacloud avatar Apr 22 '24 03:04 elishacloud

Thanks @mercury501! Great work!

elishacloud avatar Apr 30 '24 01:04 elishacloud