StageSelect
Jump to navigation
Jump to search
StageSelect (uking::StageSelect) is a development-only feature that allows the user to select and load a stage directly.
In release builds, code for the stage select screen is still present in the executable to a certain extent; however its functionality is entirely unused. Furthermore, it is completely broken because of the following reasons:
- When GameScene constructs uking::StageSelect[1], a nullptr heap is passed to it because the code that would normally create the StageSelect heap is no longer present.
- The list of stages the user can choose from is loaded from a subsystem that is missing from release executables[2]. When StageSelect is initialized, it attempts to access the global subsystem instance[3], which promptly causes the game to dereference a null pointer and crash.
- Revision information (i.e. versions, build info, etc.) will not show up properly because the Revision subsystem is also stubbed in release builds. Moreover because Revision is not initialized at all when not in debug mode[4] the game will also crash as it tries to dereference nullptr.
- The game attempts to use the SeadMenu subsystem, which also does not exist anymore in release builds[5]
Restoring its functionality is technically possible but difficult.