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

Function zSceneInit

src/SB/Game/zScene.cpp:833–1144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

831void add_scene_tweaks();
832
833void zSceneInit(U32 theSceneID, S32 reloadInProgress)
834{
835 F32 pdone;
836 zScene* s;
837 U32 i;
838
839 U8 rgba_bkgrd[4];
840 *(U32*)rgba_bkgrd = _1250;
841
842 gTransitionSceneID = theSceneID;
843 gOccludeCount = 0;
844
845 char b[5];
846 *(U32*)b = _1251;
847 b[4] = byte_803D0884;
848
849 sprintf(b, xUtil_idtag2string(theSceneID, 0));
850 xStrupr(b);
851
852 theSceneID = (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | b[3];
853
854 xUtil_idtag2string(theSceneID, 0);
855
856 xFogClearFog();
857 xSndSceneInit();
858
859 if (!reloadInProgress)
860 {
861 sMemDepthSceneStart = xMemPushBase();
862 }
863
864 zGameScreenTransitionBegin();
865 zParPTankInit();
866
867 pdone = 2.0f;
868
869 if (globals.useHIPHOP && !reloadInProgress)
870 {
871 zGameScreenTransitionUpdate(pdone, "... scene preload ...\n");
872
873 S32 ver_hop = xSTPreLoadScene(theSceneID, NULL, 0x2);
874
875 if (ver_hop >= 0x000A000F)
876 {
877 xSTQueueSceneAssets(theSceneID, 0x2);
878
879 do
880 {
881 rgba_bkgrd[0] = 0;
882 rgba_bkgrd[1] = 0;
883 rgba_bkgrd[2] = 0;
884 rgba_bkgrd[3] = 0;
885
886 pdone += 2.0f;
887
888 zGameScreenTransitionUpdate(pdone, "... scene loading ...\n", rgba_bkgrd);
889 } while (xSTLoadStep(theSceneID) < 1.0f);
890

Callers 2

zGameInitFunction · 0.70
zMenuInitFunction · 0.70

Calls 15

sprintfFunction · 0.85
xFogClearFogFunction · 0.85
xMemPushBaseFunction · 0.85
zParPTankInitFunction · 0.85
xSceneInitFunction · 0.85
iTimeDiffSecFunction · 0.85
iSndInitSceneLoadedFunction · 0.85
xModelBucket_InitFunction · 0.85
add_scene_tweaksFunction · 0.85
zParPTankSceneEnterFunction · 0.85
xDecalInitFunction · 0.85

Tested by

no test coverage detected