GameScene: Difference between revisions

Jump to navigation Jump to search
m
(update ActorLimiter link)
Line 5: Line 5:
Unlike most other subsystems, GameScene is not a singleton: it is a member of the uking::frm::System structure<ref>uking::frm::System::gameScene @ 0x10 (Switch)</ref>.
Unlike most other subsystems, GameScene is not a singleton: it is a member of the uking::frm::System structure<ref>uking::frm::System::gameScene @ 0x10 (Switch)</ref>.


== Definitions ==
==Definitions==
=== Stages ===
===Stages===
Also called scenes in XLink code.
Also called scenes in XLink code.
{| class="wikitable"
{| class="wikitable"
Line 39: Line 39:
Maps that have the same stage type typically use the same subsystems and share most characteristics. For example, all open world stages use the [[Tera]] height map terrain system and load [[Map unit|map units]] in the same way.
Maps that have the same stage type typically use the same subsystems and share most characteristics. For example, all open world stages use the [[Tera]] height map terrain system and load [[Map unit|map units]] in the same way.


=== StageBinders ===
===StageBinders===
{| class="wikitable"
{| class="wikitable"
|+ Stage binder types<ref>As returned by the first virtual function in the StageBinderBase interface</ref>
|+Stage binder types<ref>As returned by the first virtual function in the StageBinderBase interface</ref>
! Type !! Description
!Type!!Description
|-
|-
| 0 || OpenWorldStage
|0||OpenWorldStage
|-
|-
| 1 || IndoorStage (CDungeon, ...)
|1||IndoorStage (CDungeon, ...)
|-
|-
| 2 || MainFieldDungeonStage
|2||MainFieldDungeonStage
|-
|-
| 3 || TitleStage
|3||TitleStage
|-
|-
| 4 || StartupSaveCheckStage
|4||StartupSaveCheckStage
|-
|-
| 5 || Viewer
|5||Viewer
|}
|}


=== Fade types ===
===Fade types===
{|class="wikitable"
{| class="wikitable"
! Type !! Description
!Type!!Description
|-
|-
| 0 ||
|0||
|-
|-
| 1 ||
|1||
|-
|-
| 2 || Show logo<ref>See 0x71007B8CD0 and [[AIDef:Action/ExitGame]]</ref>
|2||Show logo<ref>See 0x71007B8CD0 and [[AIDef:Action/ExitGame]]</ref>
|}
|}


=== GameScene state strings ===
===GameScene state strings===
{|class="wikitable"
{| class="wikitable"
|+ List of state strings in 1.5.0 (incomplete)<ref>The state string is a sead::FixedSafeString<0x100> stored in GameScene @ 0x720.</ref>
|+List of state strings in 1.5.0 (incomplete)<ref>The state string is a sead::FixedSafeString<0x100> stored in GameScene @ 0x720.</ref>
! Name !! Description
!Name!!Description
|-
|-
| 1st || Demo mode {{check}}
|1st||Demo mode {{check}}
|-
|-
| 2nd || Demo mode
|2nd||Demo mode
|-
|-
| 初回シーケンス || Initial sequence - New save
|初回シーケンス||Initial sequence - New save
|-
|-
| TitleMenu || Title menu
|TitleMenu||Title menu
|-
|-
| Presentation || Demo mode
|Presentation||Demo mode
|-
|-
| E3_2016/Presentation || Demo mode
|E3_2016/Presentation||Demo mode
|-
|-
| StartupSaveCheckStage ||
|StartupSaveCheckStage||
|-
|-
| Viewer ||
|Viewer||
|-
|-
| CDungeon ||
|CDungeon||Shrine world
|-
|-
| MainFieldDungeonStage ||
|MainFieldDungeonStage||Divine beasts and final trial
|-
|-
| MainField ||
|MainField||The normal overworld
|-
|-
| GameTestField ||
|GameTestField||
|-
|-
| GameTestField2||
|GameTestField2||
|-
|-
| AocField||
|AocField||Trial of the Word world
|-
|-
| GameTestDungeon||
|GameTestDungeon||
|-
|-
| MonolithTestDungeon||
|MonolithTestDungeon||
|-
|-
| SrdTestDungeon||
|SrdTestDungeon||
|-
|-
| MarioClubTestDungeon ||
|MarioClubTestDungeon||
|-
|-
| TestField||
|TestField||
|-
|-
| 研修用||
|研修用||
|-
|-
| MonolithTest100enemy||
|MonolithTest100enemy||
|-
|-
| MinimumField||
|MinimumField||
|-
|-
| ActorViewer||
|ActorViewer||
|}
|}


== Init ==
==Init==
* '''GameScene::initialize''' (0x71007A8014)
 
** Load the environment graphics archive ([[Content/Env/env.genvb|env.genvb]])
*'''GameScene::initialize''' (0x71007A8014)
** Create the GameScene heap
**Load the environment graphics archive ([[Content/Env/env.genvb|env.genvb]])
** Create the [[StageBinder]] heap
**Create the GameScene heap
** Start the GameScene TaskMgr (thread)
**Create the [[StageBinder]] heap
** '''InitializeSubSystem''' (note: some of the below names are unofficial, see [[Subsystems]] for more details)
**Start the GameScene TaskMgr (thread)
*** [[AutoPlacementFlowMgr]]
**'''InitializeSubSystem''' (note: some of the below names are unofficial, see [[Subsystems]] for more details)
*** [[FadeProgress]]
***[[AutoPlacementFlowMgr]]
*** [[DungeonPackMgr]]
***[[FadeProgress]]
*** [[PlayerInfo]]
***[[DungeonPackMgr]]
*** [[GameSceneSubsys2]]
***[[PlayerInfo]]
*** [[Resetter]]
***[[GameSceneSubsys2]]
*** [[GameSceneSubsys4]]
***[[Resetter]]
*** [[GameSceneSubsys5]]
***[[GameSceneSubsys4]]
*** [[ActorHeapUtil]]
***[[GameSceneSubsys5]]
*** [[E3Mgr]]
***[[ActorHeapUtil]]
*** [[aoc2]]
***[[E3Mgr]]
*** [[aoc3]]
***[[aoc2]]
*** [[GameSceneSubsys6]]
***[[aoc3]]
*** [[CookingMgr]]
***[[GameSceneSubsys6]]
*** [[GameSceneSubsys7]]
***[[CookingMgr]]
*** [[ActorLimiter]]
***[[GameSceneSubsys7]]
*** [[RuneMgr]]
***[[ActorLimiter]]
*** [[StasisMgr]]
***[[RuneMgr]]
*** [[IceBlockMgr]]
***[[StasisMgr]]
*** [[AmiiboMgr]]
***[[IceBlockMgr]]
*** [[DropMgr]]
***[[AmiiboMgr]]
*** [[GameSceneSubsys12]]
***[[DropMgr]]
*** [[GameSceneSubsys13]]
***[[GameSceneSubsys12]]
*** [[GameSceneSubsys14]]
***[[GameSceneSubsys13]]
*** [[GameSceneSubsys15]]
***[[GameSceneSubsys14]]
*** [[ResidentActorMgr]]
***[[GameSceneSubsys15]]
*** Create UI heap
***[[ResidentActorMgr]]
*** [[uiManager]]
***Create UI heap
*** Load the [[Fade]] screen
***[[uiManager]]
*** [[OnUiActorMgr]]
***Load the [[Fade]] screen
*** [[CreatePlayerEquipActorMgr]]
***[[OnUiActorMgr]]
*** [[CreatePlayerTrashActorMgr]]
***[[CreatePlayerEquipActorMgr]]
*** [[TipsMgr]]
***[[CreatePlayerTrashActorMgr]]
*** [[nxargs]]
***[[TipsMgr]]
*** GameScene::initializeGraphicsLayer_
***[[nxargs]]
*** ErrorViewerTask init
***GameScene::initializeGraphicsLayer_
*** Set Get Demo handler
***ErrorViewerTask init
*** Set Check Weapon Free Slot handler (1, 2)
***Set Get Demo handler
*** ...
***Set Check Weapon Free Slot handler (1, 2)
*** [[SaveSystem]] init
***...
*** Set [[#Initial state|initial state]]
***[[SaveSystem]] init
*** nn::err::ShowUnacceptableAddOnContentVersionError if needed
***Set [[#Initial state|initial state]]
***
***nn::err::ShowUnacceptableAddOnContentVersionError if needed
**** [Debug] StarterPackMgr: Load Title pack
****[Debug] StarterPackMgr: Load Title pack
**** [[GlobalParameter]]
****[[GlobalParameter]]
**** GlobalParameter: Load [[actorpack]]
****GlobalParameter: Load [[actorpack]]
**** E3Mgr: Load [[Content/System/BuildTime.txt|System/BuildTime.txt]] (stubbed in release versions)
****E3Mgr: Load [[Content/System/BuildTime.txt|System/BuildTime.txt]] (stubbed in release versions)
**** TipsMgr: Load tips
****TipsMgr: Load tips
**** ResidentActorMgr: Load configuration ([[ResidentActors.byml]])
****ResidentActorMgr: Load configuration ([[ResidentActors.byml]])
**** AutoPlacementFlowMgr: Load auto placement [[event flow]]s
****AutoPlacementFlowMgr: Load auto placement [[event flow]]s
*** KingEditor: Stubbed
***KingEditor: Stubbed
*** E3Mgr: init
***E3Mgr: init


=== Initial state ===
===Initial state===
The initial state the game launches into is determined by GameScene<ref>GameScene::initialize, 0x71007A86CC</ref>.
The initial state the game launches into is determined by GameScene<ref>GameScene::initialize, 0x71007A86CC</ref>.


Line 200: Line 200:
</source>
</source>


== States ==
==States==
Note: when the Indoor stage binder is initialised and if the map name changes, a "dungeon" [[telemetry]] report is emitted with "leave" or "enter" as the event name and the old/new map name as additional data<ref>StageBinder::initAndReportDungeonLeaveEnter{{un}} at 0x71007B79A8</ref>.
Note: when the Indoor stage binder is initialised and if the map name changes, a "dungeon" [[telemetry]] report is emitted with "leave" or "enter" as the event name and the old/new map name as additional data<ref>StageBinder::initAndReportDungeonLeaveEnter{{un}} at 0x71007B79A8</ref>.


=== StageMgr ===
===StageMgr===
{{empty section}}
{{empty section}}
=== StageSelect ===
===StageSelect===
{{empty section}}
{{empty section}}
=== StageTransition ===
===StageTransition===
Entered before stage generation starts and after Fade (loading screen) has been initialised and made visible. This state machine state is a noop.
Entered before stage generation starts and after Fade (loading screen) has been initialised and made visible. This state machine state is a noop.


=== LunchTitle ===
===LunchTitle===
LunchTitle (sic) is entered when the game is launched. The internal state string is "TitleMenu" or (in demo mode) "2nd".
LunchTitle (sic) is entered when the game is launched. The internal state string is "TitleMenu" or (in demo mode) "2nd".


The run function is extremely simple: it simply creates the TitleStage binder (with doNotShowLogo=true<ref>0x71007B47D8</ref>) when the "common run" status (see below) is 0xa, then calls the "common run" function (with isNewSave=false<ref>0x71007B47F4</ref>).
The run function is extremely simple: it simply creates the TitleStage binder (with doNotShowLogo=true<ref>0x71007B47D8</ref>) when the "common run" status (see below) is 0xa, then calls the "common run" function (with isNewSave=false<ref>0x71007B47F4</ref>).


=== NewSave ===
===NewSave===
{{expand section}}
{{expand section}}
Entered on the first boot or when the new game option is selected. The associated state string is "初回シーケンス" ("initial sequence").
Entered on the first boot or when the new game option is selected. The associated state string is "初回シーケンス" ("initial sequence").


=== PatchError ===
===PatchError===
{{empty section}}
{{empty section}}


== Main loop ==
==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.)
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 ===
===precalc===
 
*FadeProgress: Update the progress gauge on the Fade screen (animated).
*FadeProgress: Update the progress gauge on the Fade screen (animated).
*Update current map name based on player position (when Link is not in a dungeon).
*Update current map name based on player position (when Link is not in a dungeon).
Line 248: Line 249:
**If any [[Blood moon#Panic Blood Moons|panic condition]] is true, and if panic blood moons are enabled<ref>GameConfig::sInstance->disablePanicBloodMoons (@ 0x3da on Switch 1.5.0) must be false.</ref>, request a panic blood moon by setting a SkyMgr flag. SkyMgr will start a 90 frame timer (3 seconds) and set a ready flag once it has expired. The timer is reset every time the panic blood moon is temporarily inhibited.
**If any [[Blood moon#Panic Blood Moons|panic condition]] is true, and if panic blood moons are enabled<ref>GameConfig::sInstance->disablePanicBloodMoons (@ 0x3da on Switch 1.5.0) must be false.</ref>, request a panic blood moon by setting a SkyMgr flag. SkyMgr will start a 90 frame timer (3 seconds) and set a ready flag once it has expired. The timer is reset every time the panic blood moon is temporarily inhibited.


=== calc ===
===calc===
{{empty section}}
{{empty section}}
=== postcalc ===
===postcalc===
{{empty section}}
{{empty section}}


== Common state run function ==
==Common state run function==
Called from StageSelectRun, LunchTitleRun and NewSaveRun.
Called from StageSelectRun, LunchTitleRun and NewSaveRun.


* Status 0:
*Status 0:
** Start loading
**Start loading
***Finish startup logo (Switch)<ref>0x71007AF6F8</ref>
***Finish startup logo (Switch)<ref>0x71007AF6F8</ref>
***If the state string is set to 初回シーケンス, clear the Resource system cache ("ClearAllCaches")<ref>0x71007AFBDC</ref>.
***If the state string is set to 初回シーケンス, clear the Resource system cache ("ClearAllCaches")<ref>0x71007AFBDC</ref>.
Line 263: Line 264:
***E3 Demo stuff<ref>0x71007AFEF4</ref>.
***E3 Demo stuff<ref>0x71007AFEF4</ref>.
***Show the Fade screen (loading screen) if the state string does ''not''<ref>0x71007AFF08</ref> end with "Viewer" or is ''not'' any of the following strings: 1st, 2nd, Presentation, TitleMenu, 初回シーケンス, StartupSaveCheckStage
***Show the Fade screen (loading screen) if the state string does ''not''<ref>0x71007AFF08</ref> end with "Viewer" or is ''not'' any of the following strings: 1st, 2nd, Presentation, TitleMenu, 初回シーケンス, StartupSaveCheckStage
**** And then show the FadeStatus<ref>0x71007AFFC4</ref> and the LoadSaveIcon screens<ref>0x71007AFFCC</ref>.
****And then show the FadeStatus<ref>0x71007AFFC4</ref> and the LoadSaveIcon screens<ref>0x71007AFFCC</ref>.
****Otherwise, only open the Fade screen but do not show loading progress<ref>See function at 0x71007B0C60</ref>.
****Otherwise, only open the Fade screen but do not show loading progress<ref>See function at 0x71007B0C60</ref>.
***StageSelect stuff<ref>0x71007B0000</ref>.
***StageSelect stuff<ref>0x71007B0000</ref>.
Line 270: Line 271:
***BaseProcMgr: start ActorCreate initializer thread<ref>0x71011BF1C4</ref>{{check}}.
***BaseProcMgr: start ActorCreate initializer thread<ref>0x71011BF1C4</ref>{{check}}.
***FadeProgress: reset internal state<ref>0x71007B01D4</ref>, set progress to 0%<ref>0x71007B01E0</ref> and mark loading as active<ref>0x71007B01E8</ref>.
***FadeProgress: reset internal state<ref>0x71007B01D4</ref>, set progress to 0%<ref>0x71007B01E0</ref> and mark loading as active<ref>0x71007B01E8</ref>.
* Status 2:
*Status 2:
**If the GameScene state machine's current state is StageSelect or NewSave, do something involving LayerMgrTask and the Renderer.{{check}}
**If the GameScene state machine's current state is StageSelect or NewSave, do something involving LayerMgrTask and the Renderer.{{check}}
* Status 0xa:
*Status 0xa:
**TipsMgr: update tips if the loading screen is ''visible'' (not just opened). TipsMgr will load tips depending on the stage that is being loaded.
**TipsMgr: update tips if the loading screen is ''visible'' (not just opened). TipsMgr will load tips depending on the stage that is being loaded.
* Status 0xb:
*Status 0xb:
** Set GameScene's isNewSave property.
**Set GameScene's isNewSave property.
** Reset status to 0.
**Reset status to 0.
** Change GameScene state to StageTransition<ref>0x71007B1058</ref>.
**Change GameScene state to StageTransition<ref>0x71007B1058</ref>.
** Set stage status to "NeedsGeneration" (2)<ref>0x71007B105C</ref>.
**Set stage status to "NeedsGeneration" (2)<ref>0x71007B105C</ref>.


== Stage generation ==
==Stage generation==
* Terrain::sInstance->flags |= 0x180u
 
* Step 0
*Terrain::sInstance->flags |= 0x180u
** Reload Title.pack if the stage that needs to be generated is TitleStage (3)<ref>0x71007AC8A0</ref>.
*Step 0
** StageSelect checks<ref>0x71007AD3AC</ref>
**Reload Title.pack if the stage that needs to be generated is TitleStage (3)<ref>0x71007AC8A0</ref>.
* Step 1
**StageSelect checks<ref>0x71007AD3AC</ref>
** If a pack was loaded by DungeonPackMgr, wait for DungeonPack loading to finish<ref>DungeonPack読み込み待ち</ref> and switch active pack to the [[dungeon pack]].
*Step 1
* Step 2
**If a pack was loaded by DungeonPackMgr, wait for DungeonPack loading to finish<ref>DungeonPack読み込み待ち</ref> and switch active pack to the [[dungeon pack]].
** If the stage to load is TitleStage, wait for TitlePack loading to finish<ref>TitlePack読み込み待ち</ref> and switch active pack to the title pack.
*Step 2
* Step 3: start stage generation<ref>ステージ生成開始</ref>
**If the stage to load is TitleStage, wait for TitlePack loading to finish<ref>TitlePack読み込み待ち</ref> and switch active pack to the title pack.
*Step 3: start stage generation<ref>ステージ生成開始</ref>
**PlacementMgr
**PlacementMgr
**ActorSystem::sInstance->field_13A = 0
**ActorSystem::sInstance->field_13A = 0
Line 300: Line 302:
**If the stage to load is TitleStage, load Layout/Title.blarc for ui::LayoutResourceMgr.
**If the stage to load is TitleStage, load Layout/Title.blarc for ui::LayoutResourceMgr.
**If "new save" was selected and the awakening demo hasn't been played since the game was launched<ref>0x71007ADB3C</ref>, ask [[EventMgr]] to call Demo169_0.
**If "new save" was selected and the awakening demo hasn't been played since the game was launched<ref>0x71007ADB3C</ref>, ask [[EventMgr]] to call Demo169_0.
** Some PhysicsMemSys stuff (0x71007ADBE0).
**Some PhysicsMemSys stuff (0x71007ADBE0).
* Step 4
*Step 4
** Wait for completion of Title BG processing '''(20% of the loading bar)'''
**Wait for completion of Title BG processing '''(20% of the loading bar)'''
** uiManager (0x71007ACD04)
**uiManager (0x71007ACD04)
** Initialize StatisticsMgr paths depending on current map type.
**Initialize StatisticsMgr paths depending on current map type.
** Update aoc2's mapType and mapName fields.
**Update aoc2's mapType and mapName fields.
* Step 5
*Step 5
** PhysicsMemSys stuff (0x71007ACDB8, 0x71007ACDC0, 0x71007ACDD0)
**PhysicsMemSys stuff (0x71007ACDB8, 0x71007ACDC0, 0x71007ACDD0)
** BaseProcMgr: request "PreDelete" actors<ref>0x71007ACDE4</ref>
**BaseProcMgr: request "PreDelete" actors<ref>0x71007ACDE4</ref>
** BaseProcMgr: stop ActorCreate initializer thread and clean up internal state{{check}}
**BaseProcMgr: stop ActorCreate initializer thread and clean up internal state{{check}}
** agl::lyr::Renderer and Graphics stuff
**agl::lyr::Renderer and Graphics stuff
* Step 6
*Step 6
** Load [[env.genvb]] binary (gsys::ModelSceneEnv::clearImpl + loadBinaryImpl)
**Load [[env.genvb]] binary (gsys::ModelSceneEnv::clearImpl + loadBinaryImpl)
** If the stage binder type is 0, 1 or 2 (OpenWorldStage, IndoorStage or MainFieldDungeonStage):
**If the stage binder type is 0, 1 or 2 (OpenWorldStage, IndoorStage or MainFieldDungeonStage):
***'''Set loading progress to 40%.'''
***'''Set loading progress to 40%.'''
***Graphics stuff, again
***Graphics stuff, again
***OnUiActorMgr
***OnUiActorMgr
***GameScene::loadTera (on a separate thread)
***GameScene::loadTera (on a separate thread)
* Step 7
*Step 7
** If the stage binder type is 0, 1 or 2 (OpenWorldStage, IndoorStage or MainFieldDungeonStage):
**If the stage binder type is 0, 1 or 2 (OpenWorldStage, IndoorStage or MainFieldDungeonStage):
***Wait for Tera to load<ref>tera読み込み待ち</ref>
***Wait for Tera to load<ref>tera読み込み待ち</ref>
* Step 8
*Step 8
**...{{check}}
**...{{check}}
**Wait for Tera to generate collision
**Wait for Tera to generate collision
**...{{check}}
**...{{check}}
* Step 9
*Step 9
**Initialize [[QuestMgr]].
**Initialize [[QuestMgr]].
**'''Set loading progress to 60%.'''
**'''Set loading progress to 60%.'''
* Step 10
*Step 10
**Load stage specific resources<ref>ステージ固有リソースの読み込み待ち</ref>: if the binder type is StageBinderType::Title (3), the Title layout archive is loaded by [[LayoutResourceMgr]]. Otherwise, nothing happens.
**Load stage specific resources<ref>ステージ固有リソースの読み込み待ち</ref>: if the binder type is StageBinderType::Title (3), the Title layout archive is loaded by [[LayoutResourceMgr]]. Otherwise, nothing happens.
* Step 11
*Step 11
**[[#Stage generation step 11]]
**[[#Stage generation step 11]]
**Update player saved position, map type, map name, ...
**Update player saved position, map type, map name, ...
Line 338: Line 340:
**Set flag 0xa25 (genStageStep12Reached?{{check}}) on the Fade screen instance.
**Set flag 0xa25 (genStageStep12Reached?{{check}}) on the Fade screen instance.
**Stop resource compaction and set some flags on the TextureHandleMgr.
**Stop resource compaction and set some flags on the TextureHandleMgr.
* Step 12
*Step 12
**Set aoc2 flag 0x4 if <code>isNewSave || !isShrine || isStageDebug</code> and clear it otherwise.
**Set aoc2 flag 0x4 if <code>isNewSave || !isShrine || isStageDebug</code> and clear it otherwise.
**[[#Stage generation step 12]]
**[[#Stage generation step 12]]
**Terrain stuff again{{check}}
**Terrain stuff again{{check}}
* Step 13 (final)
*Step 13 (final)
**[[#Stage generation final step]]
**[[#Stage generation final step]]
**Various flags are set upon completion, for example GameScene stage status is set to 0, isInitializingStage is set to false, etc.
**Various flags are set upon completion, for example GameScene stage status is set to 0, isInitializingStage is set to false, etc.
Line 350: Line 352:
**GameScene::sNeedsOptionLoad is set to true.
**GameScene::sNeedsOptionLoad is set to true.


=== Stage generation step 11 ===
===Stage generation step 11===
* Step 0: init before stage gen (ステージ生成前の初期化処理)<ref>The function can be found at 0x71007B15A8 in Switch 1.5.0.</ref>
 
*Step 0: init before stage gen (ステージ生成前の初期化処理)<ref>The function can be found at 0x71007B15A8 in Switch 1.5.0.</ref>
**Various flags are set (GameScene, BaseProcMgr, Awareness, EventMgr), in particular field 0x1d12a is set to true if <code>!isNewSave</code>.
**Various flags are set (GameScene, BaseProcMgr, Awareness, EventMgr), in particular field 0x1d12a is set to true if <code>!isNewSave</code>.
**Set initial position based on the stage binder. This may be overridden with a saved position or an event position later on.
**Set initial position based on the stage binder. This may be overridden with a saved position or an event position later on.
Line 383: Line 386:
**Graphics, uiManager, agl::lyr::Renderer: ?{{check}}
**Graphics, uiManager, agl::lyr::Renderer: ?{{check}}
**Set this->activeStageBinder (@ 0x2a0) to this->stageBinder (@ 0x2a8)<ref>0x71007B1A88</ref>.
**Set this->activeStageBinder (@ 0x2a0) to this->stageBinder (@ 0x2a8)<ref>0x71007B1A88</ref>.
* Step 6
*Step 6
**Set next GameScene state to StageMgr.
**Set next GameScene state to StageMgr.
**qword_71025D16C0: ?{{check}}
**qword_71025D16C0: ?{{check}}
Line 390: Line 393:
***If aoc3 is initialized, set Blight rematch counters to 0 for all four blights.
***If aoc3 is initialized, set Blight rematch counters to 0 for all four blights.
**PauseMenuDataMgr: Update IsOpenItemCategory flags if necessary.
**PauseMenuDataMgr: Update IsOpenItemCategory flags if necessary.
* Step 7: wait for save data upload to finish (if an upload is in progress).
*Step 7: wait for save data upload to finish (if an upload is in progress).
* Step 8: BaseProcMgr: wait for some actor create initializer event and reset it{{check}}
*Step 8: BaseProcMgr: wait for some actor create initializer event and reset it{{check}}
 
====Stage generation step 11-5b====


==== Stage generation step 11-5b ====
*ProductReporter: reset scene work time (the amount of time since the last scene generation) and reset the blood moon reporter.
*ProductReporter: reset scene work time (the amount of time since the last scene generation) and reset the blood moon reporter.
*Destroy the previous stage binder (this->activeStageBinder) if it's different from the current binder (this->stageBinder), and also set this->stage to nullptr.
*Destroy the previous stage binder (this->activeStageBinder) if it's different from the current binder (this->stageBinder), and also set this->stage to nullptr.
Line 417: Line 421:
**stage->init and stage->postInit are called here<ref>0x71007CC024</ref>.
**stage->init and stage->postInit are called here<ref>0x71007CC024</ref>.


=== Stage generation step 12 ===
===Stage generation step 12===
 
*Step 0:
*Step 0:
**[1.4.0+] If BalladOfHeroes_Step02 is false or BalladOfHeroes_Step03 is true, and if the player's equipped weapon (category 0) is Weapon_Sword_502 (One-Hit Obliterator), that weapon is removed from the inventory.
**[1.4.0+] If BalladOfHeroes_Step02 is false or BalladOfHeroes_Step03 is true, and if the player's equipped weapon (category 0) is Weapon_Sword_502 (One-Hit Obliterator), that weapon is removed from the inventory.
Line 430: Line 435:
**Set some flags (Player, WorldMgr, PlacementMgr, ActorSystem)
**Set some flags (Player, WorldMgr, PlacementMgr, ActorSystem)


=== Stage generation final step ===
===Stage generation final step===
 
*Sound, qword_71025D04F0, qword_71025D16C0, qword_71025D1740: ? {{check}}
*Sound, qword_71025D04F0, qword_71025D16C0, qword_71025D1740: ? {{check}}
*Clear the temporary stage binder pointer (which was used only during generation).
*Clear the temporary stage binder pointer (which was used only during generation).
Line 440: Line 446:
*Set this->stageGenerated to 1<ref>0x71007B2038</ref>.
*Set this->stageGenerated to 1<ref>0x71007B2038</ref>.


== References ==
==References==
<references/>
<references />
[[Category:Internals]]
[[Category:Internals]]
[[Category:Subsystems (BotW)]]
[[Category:Subsystems (BotW)]]
19

edits

Navigation menu