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

Function zSceneLoad

src/SB/Game/zScene.cpp:1604–1875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1602}
1603
1604void zSceneLoad(zScene* ent, xSerial* s)
1605{
1606 xSerial xser;
1607 S32 sceneExist;
1608
1609 s = &xser;
1610
1611 s->setClient('PLYR');
1612
1613 sceneExist = 0;
1614 s->Read_b1(&sceneExist);
1615
1616 if (sceneExist)
1617 {
1618 s->Read(&globals.player.MaxHealth);
1619
1620 globals.player.Health = globals.player.MaxHealth;
1621
1622 s->Read((U32*)&gCurrentPlayer);
1623 s->Read(&globals.player.Inv_Shiny);
1624 s->Read(&globals.player.Inv_Spatula);
1625 s->Read(&globals.player.g.PowerUp[0]);
1626 s->Read(&globals.player.g.PowerUp[1]);
1627
1628 for (S32 i = 0; i < LEVEL_COUNT; i++)
1629 {
1630 s->Read(&globals.player.Inv_PatsSock[i]);
1631 s->Read(&globals.player.Inv_LevelPickups[i]);
1632 }
1633
1634 s->Read(&globals.player.Inv_PatsSock_Total);
1635
1636 zCutsceneMgrLoad(NULL, s);
1637 oob_state::read_persistent(*s);
1638 }
1639
1640 s->setClient('CNTR');
1641
1642 sceneExist = 0;
1643 s->Read_b1(&sceneExist);
1644
1645 if (sceneExist)
1646 {
1647 char tempString[32];
1648
1649 zUI_ScenePortalLoad(s);
1650
1651 strcpy(tempString, "HB09 ROBOT COUNTER 01");
1652
1653 char c = '1';
1654 S32 i;
1655 U32 id;
1656
1657 for (i = 0; i < LEVEL_COUNT; i++)
1658 {
1659 if (c > '9')
1660 {
1661 c = '0';

Callers 2

zSceneResetFunction · 0.70
zGameSetupFunction · 0.70

Calls 15

read_persistentFunction · 0.85
zSceneFindObjectFunction · 0.85
xSceneLoadFunction · 0.85
zEntTriggerLoadFunction · 0.85
zEntPlayer_LoadFunction · 0.85
zEnvLoadFunction · 0.85
xFogLoadFunction · 0.85
zLightLoadFunction · 0.85
zPlatform_LoadFunction · 0.85
zCamMarkerLoadFunction · 0.85
zEntSimpleObj_LoadFunction · 0.85
zMovePointLoadFunction · 0.85

Tested by

no test coverage detected