GameScene: Difference between revisions
Jump to navigation
Jump to search
imported>Leoetlino No edit summary |
imported>Leoetlino (→Init) |
||
Line 9: | Line 9: | ||
** Load the environment graphics archive ([[Content/Env/env.genvb|env.genvb]]) | ** Load the environment graphics archive ([[Content/Env/env.genvb|env.genvb]]) | ||
** Create the GameScene heap | ** Create the GameScene heap | ||
** Create the StageBinder heap | ** Create the [[StageBinder]] heap | ||
** Start the GameScene TaskMgr (thread) | ** Start the GameScene TaskMgr (thread) | ||
** '''InitializeSubSystem''' (note: some of the below names are unofficial, see [[Subsystems]] for more details) | ** '''InitializeSubSystem''' (note: some of the below names are unofficial, see [[Subsystems]] for more details) |
Revision as of 15:48, 13 October 2018
Subsystem | |
---|---|
Official name | Yes |
Description | Handles the main loop and stages |
Init function |
Switch 1.5.0: 0x71007D1DD8 Wii U 1.5.0: ??? |
Debug only | No |
GameScene is a critical subsystem that is responsible for core functionality such as initialising other components, creating stages (world, title screen, etc.) and handling the game's main loop.
Unlike most other subsystems, GameScene is not a singleton: it is a member of the uking::frm::System structure[1].
Init
- GameScene::initialize (0x71007A8014)
- Load the environment graphics archive (Env.sgenvb)
- Create the GameScene heap
- Create the StageBinder heap
- Start the GameScene TaskMgr (thread)
- InitializeSubSystem (note: some of the below names are unofficial, see Subsystems for more details)
- AutoPlacementFlowMgr
- FadeProgress
- DungeonPackMgr
- PlayerInfo
- PlayerResetPosMgr
- GameSceneSubsys3
- GameSceneSubsys4
- GameSceneSubsys5
- ActorHeapUtil
- E3Mgr
- aoc2
- aoc3
- DamageInfoMgr
- CookingMgr
- GameSceneSubsys7
- ActorLimiter
- GameSceneSubsys9
- GameSceneSubsys10
- IceBlockMgr
- AmiiboMgr
- GameSceneSubsys11
- GameSceneSubsys12
- GameSceneSubsys13
- GameSceneSubsys14
- GameSceneSubsys15
- ResidentActorMgr
- Create UI heap
- uiManager
- Load the Fade screen
- OnUiActorMgr
- CreatePlayerEquipActorMgr
- CreatePlayerTrashActorMgr
- TipsMgr
- nxargs
- GameScene::initializeGraphicsLayer_
- ErrorViewerTask init
- Set Get Demo handler
- Set Check Weapon Free Slot handler (1, 2)
- ...
- SaveSystem init
- Set initial state
- nn::err::ShowUnacceptableAddOnContentVersionError if needed
-
- [Debug] StarterPackMgr: Load Title pack
- GlobalParameter
- GlobalParameter: Load actorpack
- E3Mgr: Load System/BuildTime.txt (stubbed in release versions)
- TipsMgr: Load tips
- ResidentActorMgr: Load configuration (ResidentActors.byml)
- AutoPlacementFlowMgr: Load auto placement event flows
- KingEditor: Stubbed
- E3Mgr: init
Initial state
The initial state the game launches into is determined by GameScene[2].
const bool isFirstLaunch = SaveSystem::sInstance->isFirstLaunch();
State* state = isFirstLaunch ? &state_NewSave : &state_LunchTitle;
if ( aocManager::sInstance && aocManager::sInstance->flags & 2 )
nn::err::ShowUnacceptableAddOnContentVersionError();
const bool isDemo = E3Mgr::sInstance && E3Mgr::sInstance->isDemoMode();
if (isDemo)
state = &state_LunchTitle;
if (!isDemo && isFirstLaunch)
sIsFirstNonDemoLaunch = 1;
StateMachine::changeState(&this->stateMachine, state);
Main loop
Three GameScene functions are called in a row from RootTask (see Executable) after initialisation has completed, i.e. in the game's main loop. (Note: these 3 names are unofficial.)
precalc
This section is empty. You can help by adding to it. |
calc
This section is empty. You can help by adding to it. |
postcalc
This section is empty. You can help by adding to it. |