News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Replacing the main menu.

Started by Daniel3D, May 24, 2021, 11:14:28 PM

Previous topic - Next topic

Cas

Memory initialisation may occur partly before the intro and partly after it, immediately before entering the menu. It can also be that some initialisation is made just before starting a race. For example, the current car is loaded before the menu (default car) because that way, you can get to the showroom and have it already there but even if you don't visit there, you can still directly race. I believe the default track is also loaded at that point. But the 3D scenery and track objects are probably loaded before the intro, as they will be in memory during the whole game and I think some objects seen during the intro share files with them.

Anyway, it is still possible to replace the menu without writing our own initialisation routine. We just have to find the point in the source where the menu starts and the points where each of the program sections that are called in the menu begin (these we can find in the menu routine). I don't think it'd be hard to find that. What would be some work is then writing the new menu routine and after that, unplugging the old one and plugging the new one in its place. This change is not simple, but it's very useful, as it can give us a section in the program that we have full control on where dynamic plug-ins can be attached.
Earth is my country. Science is my religion.

Daniel3D

Quote from: Cas on November 05, 2021, 01:19:17 AM
It can also be that some initialisation is made just before starting a race. For example, the current car is loaded before the menu (default car) because that way, you can get to the showroom and have it already there but even if you don't visit there, you can still directly race.
Well, no.
The default car is set separately for:
  • Racing
  • showroom
  • opponent
  • opponent showroom

    And if I have read the assembly code correctly not loaded until it is needed.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

There is a memory region to hold the player's car and another for the opponent's car. While in the showroom, I think cars are loaded in the respective slot (player/opponent) as you go through them. If you cancel, the previously selected car is reloaded. This is the way I would've done it if it were 1990. That saves memory. But we'll discover the truth as we continue to dig in the code :)
Earth is my country. Science is my religion.