Scenes: Difference between revisions
From LMHack
More actions
messed something up |
mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 57: | Line 57: | ||
| <code>4</code> || SCENE_OPENING || The scene for the opening that plays when idling on the title screen. | | <code>4</code> || SCENE_OPENING || The scene for the opening that plays when idling on the title screen. | ||
|- | |- | ||
| <code>5</code> || SCENE_STUFF_ROLL | | <code>5</code> || SCENE_STUFF_ROLL|| Staff roll scene. | ||
|- | |- | ||
| <code>6</code> || SCENE_ENDING || Ending scene. | | <code>6</code> || SCENE_ENDING || Ending scene. | ||
Latest revision as of 08:09, 24 July 2026
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
| 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. |
| 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. |
| 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. |