Scenes: Difference between revisions
From LMHack
More actions
create basic scenes page |
Add Scene ID docs |
||
| Line 3: | Line 3: | ||
== Definitions == | == Definitions == | ||
{| class="wikitable" | {| class="wikitable" | ||
|+ Scene Structure | |||
! Member Name | ! Member Name | ||
! Member Type | ! Member Type | ||
| Line 39: | Line 39: | ||
| <code>0x20</code> | | <code>0x20</code> | ||
| A pointer to the scene's function used for destroying the scene and it's resources. | | A pointer to the scene's function used for destroying the scene and it's resources. | ||
|} | |||
{| class="wikitable" | |||
|+ Scene IDs | |||
|- | |||
! ID !! Enum Name | |||
|- | |||
| <code>0</code> || SCENE_BOOT | |||
|- | |||
| <code>1</code> || SCENE_TITLE | |||
|- | |||
| <code>2</code> || SCENE_MAIN_GAME | |||
|- | |||
| <code>3</code> || SCENE_SELECT | |||
|- | |||
| <code>4</code> || SCENE_OPENING | |||
|- | |||
| <code>5</code> || SCENE_STUFF_ROLL (Staff Roll) | |||
|- | |||
| <code>6</code> || SCENE_ENDING | |||
|- | |||
| <code>7</code> || SCENE_MOVIE | |||
|} | |} | ||
== References == | == References == | ||
[https://github.com/ThePlayerRolo/lm-decomp/blob/main/include/Unsorted/Scene.hpp Luigi's Mansion Decompilation] | [https://github.com/ThePlayerRolo/lm-decomp/blob/main/include/Unsorted/Scene.hpp Luigi's Mansion Decompilation] | ||
Revision as of 19:33, 15 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 16-bit integer)
|
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 |
|---|---|
0 |
SCENE_BOOT |
1 |
SCENE_TITLE |
2 |
SCENE_MAIN_GAME |
3 |
SCENE_SELECT |
4 |
SCENE_OPENING |
5 |
SCENE_STUFF_ROLL (Staff Roll) |
6 |
SCENE_ENDING |
7 |
SCENE_MOVIE |