@joex11 So I have looked at Tomu, Yomoru for a brief moment. I was hoping they are using CMojiFont library like in some of other games published by NIS (it has a flag that allows setting variable width glyphs), but not this time.
Function responsible for rendering text in executable is at 0x25400. At X0 it provides pointer to struct that stores info about how text should be rendered, at X1 text to render in UTF-32.
X0+1428 stores float for how big space should be between lines. By default it's 20.
X0+1424 stores float about additional space between characters. By default it's set to -4 (so actually it makes them closer than they would be by default).
They are updated each frame by values stored at MAIN+0xA5A0 and 0xA5A4
0x41A00000 = 20
0xC0800000 = -4
So for example this is how it looks by default
And this is how it looks with 10 and -8
So I'm giving you here IPS patches.
YoruTomoruTextPatch.zip - already set it to 10 and -8,
YoruTomoruTextPatch2.zip - only space between lines is changed to 10
But you can adjust it to your needs with hex editor.
In IPS file stored in YoruTomoruTextPatch.zip at offset 0xA you have 8 bytes of instructions. You can use sites like https://armconverter.com/ to decode/encode instructions and https://gregstoll.com/~gregstoll/floattohex/ to convert floats to hex so you know what you should put instead of original number.
I guess -8 won't help because of how latin glyphs are not monospace, so some characters are using whole available space while other don't, which will result in overlap. So if I would be you I would either:
- try to replace glyphs rendered with some monospace font and make them slightly smaller than in original font, this way you could fit more characters in one line.
- In executable hook 0x25400 function and implement custom table for how wide is each ASCII character. But I guess this would be too much for you.
Function responsible for rendering text in executable is at 0x25400. At X0 it provides pointer to struct that stores info about how text should be rendered, at X1 text to render in UTF-32.
X0+1428 stores float for how big space should be between lines. By default it's 20.
X0+1424 stores float about additional space between characters. By default it's set to -4 (so actually it makes them closer than they would be by default).
They are updated each frame by values stored at MAIN+0xA5A0 and 0xA5A4
Code:
.text:000000710000A5A0 MOV X8, #0xC0800000
.text:000000710000A5A4 MOVK X8, #0x41A0,LSL#48
0x41A00000 = 20
0xC0800000 = -4
So for example this is how it looks by default
And this is how it looks with 10 and -8
So I'm giving you here IPS patches.
YoruTomoruTextPatch.zip - already set it to 10 and -8,
YoruTomoruTextPatch2.zip - only space between lines is changed to 10
But you can adjust it to your needs with hex editor.
In IPS file stored in YoruTomoruTextPatch.zip at offset 0xA you have 8 bytes of instructions. You can use sites like https://armconverter.com/ to decode/encode instructions and https://gregstoll.com/~gregstoll/floattohex/ to convert floats to hex so you know what you should put instead of original number.
I guess -8 won't help because of how latin glyphs are not monospace, so some characters are using whole available space while other don't, which will result in overlap. So if I would be you I would either:
- try to replace glyphs rendered with some monospace font and make them slightly smaller than in original font, this way you could fit more characters in one line.
- In executable hook 0x25400 function and implement custom table for how wide is each ASCII character. But I guess this would be too much for you.
Attachments
Last edited by masagrator,