Unfortunately, this is not a simple modification and will require you to understand both Supermodel's rendering engine and the underlying Model 3 scene graph data that it processes. It is the game which renders the HUD and games are free to organize things as they see fit. Supermodel has no knowledge of what's going on, it merely consumes the scene graph data that is passed to the Real3D GPU and blindly outputs it.
Model 3 has two independent graphics devices: the Real3D board for 3D graphics and a 2D tile generator that can display 2 layers behind and in front of the 3D graphics. In Star Wars, I believe that the dialog text and instructions are displayed as 2D tile layers and therefore will be the easiest for you to disable. The 2D renderer is in Src/Graphics/Render2D.cpp. Simply comment out the contents of CRender2D::EndFrame().
The rest of the HUD, including the targeting reticles, are 3D models displayed by the Real3D. Supermodel's 3D renderer is mostly contained in Src/Graphics/Render3D.cpp and Src/Graphics/Models.cpp. CRender3D::RenderFrame() is called each frame to draw the 3D graphics. You will unfortunately have to start from there and work out how Supermodel's rendering works and deduce from that what the underlying Model 3 data looks like. I don't have the time to provide a detailed overview of it all, unfortunately.
I can give you some helpful hints. The PowerPC writes data structures to the Real3D graphics memory, which are then parsed by the renderer and displayed. There are three basic data structures: viewports, culling nodes, and models. A complete 3D scene is called a 'viewport' and an arbitrary number of them can be drawn onto the screen each frame. Viewports can be used to create separate 3D scenes drawn as smaller insets or overlays, as you would expect. But in fact, any complex 3D scene in a Model 3 game is usually comprised of several viewports of the exact same size overlayed on top of each other. Why? Because lighting parameters, fog, and some other things can only be specified once per viewport. To change lighting color or direction on different objects, they have to be rendered in different viewports. The Z-buffer is cleared for each viewport.
Games will place their HUDs and status bars in separate viewports from the rest of the scene. What you need to do is discover which viewports are being used to do this in Star Wars and skip over them. Viewports are stored in Real3D memory as a linked list of structs. CRender3D::RenderViewport() will traverse this list and render all viewports with the given priority (viewports have priority and must be rendered accordingly, so Supermodel traverses the list multiple times).
The 'addr' parameter passed to RenderViewport() uniquely identifies the viewport. All you have to do is check for the viewport addresses you wish to skip and then skip over them. You must remember to draw the remaining viewports so I would place my code here:
- Code: Select all
// Recursively process next viewport
if (vpnode[0x01] == 0) // memory probably hasn't been set up yet, abort
return;
if (vpnode[0x01] != 0x01000000)
RenderViewport(vpnode[0x01],pri);
// Skip viewports we don't want
if (addr == STARWARS_HUD_ADDR1)
return; // do nothing
How do you find the viewport addresses of interest? Well, that's up to you to figure out. My suggestion would be to print out all the viewports rendered each frame to stdout or to a log file. Examine the last frame printed out when you see the HUD on screen and then try them one-by-one. I actually have some tools that have not been publicly released which allow me to examine each viewport in a save state but these are finicky and you'd be better off just figuring it out the way I described.
Many Bothans died to bring you this information. May the Force be with you!