CookiePLMonster / SilentPatch

SilentPatch for GTA III, Vice City, and San Andreas
MIT License
384 stars 15 forks source link

Verify the behaviour of `SET_TEXT_JUSTIFY` #80

Open CookiePLMonster opened 2 weeks ago

CookiePLMonster commented 2 weeks ago

Quoting spaceeinstein:

There is another bugged opcode that I think would be nice to fix. Opcode 0341 (SET_TEXT_JUSTIFY) cannot full justify text at all because after CFont::SetJustifyOn is called, either CFont::SetRightJustifyOff or CFont::SetRightJustifyOn are called and both those functions turn off full justification. The fix for GTA III is to nop 0x501D77 7 bytes, and for Vice City nop 0x550047 7 bytes. This prevents full justification from being switched off in CFont::SetRightJustifyOff.

I apparently ran tests on it in 2016 and did not like the result.

Before: image

After: image