MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / zSceneSetup

Function zSceneSetup

src/SB/Game/zScene.cpp:2071–2678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2069// clang-format on
2070
2071void zSceneSetup()
2072{
2073 zScene* s = globals.sceneCur;
2074
2075 globals.cmgr = NULL;
2076
2077 xSceneSetup(s);
2078 gUIMgr.Setup(s);
2079
2080 s->gravity = -50.0f;
2081 s->drag = 0.079999998f;
2082 s->flags = 0x5;
2083
2084 zNPCMgr_scenePostInit();
2085
2086 if (s->baseCount[eBaseTypeGust])
2087 {
2088 zGustSetup();
2089 }
2090
2091 if (s->baseCount[eBaseTypeVolume])
2092 {
2093 zVolumeSetup();
2094 }
2095
2096 {
2097 U32 dontcaresize;
2098 xCutscene_Init(xSTFindAssetByType('CTOC', 0, &dontcaresize));
2099 }
2100
2101 zLOD_Setup();
2102
2103 gCurEnv = NULL;
2104
2105 for (U32 i = 0; i < s->num_base; i++)
2106 {
2107 if (s->base[i])
2108 {
2109 switch (s->base[i]->baseType)
2110 {
2111 case eBaseTypeEnv:
2112 {
2113 gCurEnv = (_zEnv*)s->base[i];
2114
2115 zEnvSetup(gCurEnv);
2116 xClimateInitAsset(&gClimate, gCurEnv->easset);
2117
2118 break;
2119 }
2120 case eBaseTypeNPC:
2121 {
2122 ((xNPCBasic*)s->base[i])->Setup();
2123 break;
2124 }
2125 case eBaseTypePlatform:
2126 {
2127 zPlatform_Reset((zPlatform*)s->base[i], s);
2128 zPlatform_Setup((zPlatform*)s->base[i], s);

Callers 2

zGameSetupFunction · 0.70
zMenuSetupFunction · 0.70

Calls 15

xSceneSetupFunction · 0.85
zNPCMgr_scenePostInitFunction · 0.85
zEnvSetupFunction · 0.85
zPlatform_SetupFunction · 0.85
zMovePointSetupFunction · 0.85
zPendulum_SetupFunction · 0.85
zEntButton_ResetFunction · 0.85
zEntButton_SetupFunction · 0.85
zEntSimpleObj_SetupFunction · 0.85
zDispatcher_InitDepFunction · 0.85
zEntPickup_ResetFunction · 0.85
xParSysSetupFunction · 0.85

Tested by

no test coverage detected