04-07-2020, 06:38 PM
(This post was last modified: 04-07-2020, 06:54 PM by _tZ.
Edit Reason: left some info out for no reason
)
So, over the past couple of weeks, I've been working on a new version of the speedometer that hijacks a brlyt instead of drawing directly into the frame buffer. This works fine, but there are a few problems.
1. It hijacks the minimap brlyt, meaning that this happens.
Yeah.
2. All of the offsets i used for the proof of concept code are hardcoded, which means any other edits to the brlyt will make the speedometer not work.
3. There's a limit to 999 speed since I used picture panes instead of a text pane.
I've been trying to work on a new one that doesn't replace an existing brlyt, but I've ran into a pretty big roadblock there, too. I've figured out how to get other UI elements to load, and they work fine, but when I restart the time trial or exit course, the game crashes.
The function that generated the HUD elements to load is 0x80857CC0 PAL.
I don't remember what r3 does but r4 controls which hud elements show up.
Here's an example:
Most of the "i dunno" ones I'm just too lazy to figure out.
In time trials, r4 is set to 0b1000101101110.
1 - i think this is the "unable to save ghost" text that shows up after 6 minutes
0 - i dunno
0 - i dunno
0 - i dunno
1 - ghost time difference
0 - points in battle mode
1 - item roulette
1 - lap counter
0 - i dunno
1 - minimap
1 - countdown
1 - timer
0 - i dunno
Most of these if you try to replace or disable them the game just crashes, but I have had success replacing the points in battle mode. This means that the speedometer would have to be disabled in battle mode, but honestly who plays battle mode anymore lol
If we could figure out how to create new, completely different HUD elements, that would be even amazing and wonderful, but in my two attempts I have yet to have success. I also don't know how to get the files to load from anything other than Race.szs.
If we can figure this out, that would be amazing! We don't need to use the ugly white text on black background that only appears on every other frame! (You need a file with the brlyts, brctrs, etc. in it though)
I can't think of an interesting way to convince people to help with this, but I really hope this gets figured out!
edit 1: im pretty sure it only works in time trials when you arent racing a ghost)
and another important function is 0x805c2c60, InitializeOnScreenObject
1. It hijacks the minimap brlyt, meaning that this happens.
Yeah.
2. All of the offsets i used for the proof of concept code are hardcoded, which means any other edits to the brlyt will make the speedometer not work.
3. There's a limit to 999 speed since I used picture panes instead of a text pane.
I've been trying to work on a new one that doesn't replace an existing brlyt, but I've ran into a pretty big roadblock there, too. I've figured out how to get other UI elements to load, and they work fine, but when I restart the time trial or exit course, the game crashes.
The function that generated the HUD elements to load is 0x80857CC0 PAL.
I don't remember what r3 does but r4 controls which hud elements show up.
Here's an example:
Most of the "i dunno" ones I'm just too lazy to figure out.
In time trials, r4 is set to 0b1000101101110.
1 - i think this is the "unable to save ghost" text that shows up after 6 minutes
0 - i dunno
0 - i dunno
0 - i dunno
1 - ghost time difference
0 - points in battle mode
1 - item roulette
1 - lap counter
0 - i dunno
1 - minimap
1 - countdown
1 - timer
0 - i dunno
Most of these if you try to replace or disable them the game just crashes, but I have had success replacing the points in battle mode. This means that the speedometer would have to be disabled in battle mode, but honestly who plays battle mode anymore lol
If we could figure out how to create new, completely different HUD elements, that would be even amazing and wonderful, but in my two attempts I have yet to have success. I also don't know how to get the files to load from anything other than Race.szs.
If we can figure this out, that would be amazing! We don't need to use the ugly white text on black background that only appears on every other frame! (You need a file with the brlyts, brctrs, etc. in it though)
I can't think of an interesting way to convince people to help with this, but I really hope this gets figured out!
edit 1: im pretty sure it only works in time trials when you arent racing a ghost)
and another important function is 0x805c2c60, InitializeOnScreenObject