Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Description

This page has documentation on the "Scene" system seen in Luigi's Mansion, which handles the most basic game states (Title Screen, Boot, Main Game, etc).

Definitions

Scene Structure
Member Name Member Type Member Offset Member Description
mName char[16] 0x00 The name of the scene.
_10 s16 (signed short) 0x10 Currently unknown, but could be some sort of id.
mInitFn void (*SceneInitFunc)() 0x14 A pointer to the scene's function used for initializing the scene.
mUpdateFn u32 (*SceneUpdateFunc)() 0x18 A pointer to the scene's function used for updating the scene every frame.
mDrawFn void (*SceneDrawFunc)() 0x1C A pointer to the scene's function used for drawing the scene every frame.
mDestroyFn void (*SceneDestroyFunc)() 0x20 A pointer to the scene's function used for destroying the scene and it's resources.
SceneID Enum
ID Enum Name Description
0 SCENE_BOOT Scene when booting up the game.
1 SCENE_TITLE Title screen Scene.
2 SCENE_MAIN_GAME Scene for the main game.
3 SCENE_SELECT File select scene.
4 SCENE_OPENING The scene for the opening that plays when idling on the title screen.
5 SCENE_STUFF_ROLL Staff roll scene.
6 SCENE_ENDING Ending scene.
7 SCENE_MOVIE Scene used for the Pikmin movie.
External variables
Name Type Address (USA) Description
sCurScene Scene* 0x804CFF98 A pointer to the current scene loaded into memory.
sCurSceneId SceneID 0x804D80A0 The current scene's id, mainly used for indexing sSceneTable.
sSceneTable Scene*[8] 0x8021DB20 A table consisting of all of the scenes, with the indexes corresponding to SceneID.

References

Luigi's Mansion Decompilation