speedometer help
#1
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.
[Image: uhoh.png]
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
Reply
#2
I have already had some experience in hijacking the BRLYT of the UI, as you can see with FanCy Speedometer. Maybe I can try to get this to work, possibly by adding a kid to the parent brlyt (Probably the timer), and then filling it in with the needed data. Also, hard coded offsets suck, and we don't need that thank you!

EDIT: I will use the lap counter since it is in all modes except battle. It is actually quite easy to switch which part of the UI gets modified by simply checking which mode the user is in.
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply
#3
(04-07-2020, 07:24 PM)JoshuaMK Wrote: I have already had some experience in hijacking the BRLYT of the UI, as you can see with FanCy Speedometer. Maybe I can try to get this to work, possibly by adding a kid to the parent brlyt (Probably the timer), and then filling it in with the needed data. Also, hard coded offsets suck, and we don't need that thank you!

EDIT: I will use the lap counter since it is in all modes except battle. It is actually quite easy to switch which part of the UI gets modified by simply checking which mode the user is in.
I think Tz Originally used the timer, but switched to the minimap because when you pause the lap UI scrolls up while the minimap scrolls down
Reply
#4
(04-07-2020, 07:24 PM)JoshuaMK Wrote: I have already had some experience in hijacking the BRLYT of the UI, as you can see with FanCy Speedometer. Maybe I can try to get this to work, possibly by adding a kid to the parent brlyt (Probably the timer), and then filling it in with the needed data. Also, hard coded offsets suck, and we don't need that thank you!

EDIT: I will use the lap counter since it is in all modes except battle. It is actually quite easy to switch which part of the UI gets modified by simply checking which mode the user is in.

The problem with that adding stuff to existing UI elements is that you can't use existing mods with it. If I wanted to use an existing Race.szs mod, I would have to add in the speedometer. Also, since the lap counter is at the top, when the game is paused, the speedometer would move up instead of down and off screen (still no idea how that works). That's why I've shifted my focus to trying to create new UI elements.
Reply
#5
Alrighty! Can't wait to see what gets developed
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply
#6
I hope this gets finished, it would be the closest thing to the CT-CODE SOM w/o CT-CODE.
Reply
#7
(04-10-2020, 12:13 PM)FancyWheelies Wrote: I hope this gets finished, it would be the closest thing to the CT-CODE SOM w/o CT-CODE.

It would be way better than the CT-CODE SOM, as this one should work in all framerate modes and stuff
Reply
#8
Finally, after weeks of not doing anything, i figured out how to make the game not crash. The next step would either be to create a new hud element or replace an existing one that isnt shown in time trials
Reply
#9
(04-20-2020, 10:13 PM)_tZ Wrote: Finally, after weeks of not doing anything, i figured out how to make the game not crash. The next step would either be to create a new hud element or replace an existing one that isnt shown in time trials
When do you think this will be released ?
Reply
#10
(04-21-2020, 05:02 PM)Optllizer Wrote:
(04-20-2020, 10:13 PM)_tZ Wrote: Finally, after weeks of not doing anything, i figured out how to make the game not crash. The next step would either be to create a new hud element or replace an existing one that isnt shown in time trials
When do you think this will be released ?
i have no idea but hopefully soon
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)