MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / LoadFromStream_RELEASEVERSION

Method LoadFromStream_RELEASEVERSION

CryGame/GameLoading.cpp:1795–2353  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////// [PETAR] DO NOT UPDATE THIS FUNCTION ITS HERE TO ENABLE THAT ALL NEWER VERSIONS SUPPORT LOADING OLDER SAVEFILES

Source from the content-addressed store, hash-verified

1793// DO NOT UPDATE THIS FUNCTION ITS HERE TO ENABLE THAT ALL NEWER VERSIONS
1794// SUPPORT LOADING OLDER SAVEFILES
1795bool CXGame::LoadFromStream_RELEASEVERSION(CStream &stm, bool isdemo, CScriptObjectStream &scriptStream)
1796{
1797 IBitStream *pBitStream=GetIBitStream();
1798 IEntitySystem *pEntitySystem=m_pSystem->GetIEntitySystem();
1799 IEntityClassRegistry *pECR=GetClassRegistry();
1800 IEntity *pEnt=NULL;
1801 CEntityDesc ed;
1802 int localPlayerId=0;
1803
1804 string sLevelName;
1805 string sMissionName;
1806 stm.Read(sLevelName);
1807 stm.Read(sMissionName);
1808
1809 // read dummy save date and time
1810 unsigned char bDummy;
1811 unsigned short wDummy;
1812 stm.Read(bDummy); // hour
1813 stm.Read(bDummy); // minute
1814 stm.Read(bDummy); // second
1815 stm.Read(bDummy); // day
1816 stm.Read(bDummy); // month
1817 stm.Read(wDummy); // year
1818
1819 // load savegame name
1820 string sFilename;
1821 stm.Read(sFilename);
1822
1823 // load the number of entities, for loading screen bar
1824 int nEnt;
1825 stm.Read(nEnt);
1826
1827 bool bS=IsServer();
1828 bool bC=IsClient();
1829
1830 assert(!IsMultiplayer());
1831
1832 VERIFY_COOKIE_NO(stm,0x22);
1833
1834 // Load EAX preset
1835 int nPreset;
1836 CS_REVERB_PROPERTIES tProps;
1837 m_pSystem->GetISoundSystem()->GetCurrentEaxEnvironment(nPreset,tProps);
1838 stm.Read(nPreset);
1839 if (nPreset==-1)
1840 {
1841 stm.ReadBits((BYTE *)&tProps,sizeof(CS_REVERB_PROPERTIES));
1842 }
1843
1844 VERIFY_COOKIE_NO(stm,0x12);
1845
1846 // load saved cvars
1847 string varname,val;
1848 int nCount,i;
1849 stm.Read(nCount);
1850 IConsole *pCon=m_pSystem->GetIConsole();
1851 for (i=0;i<nCount;i++)
1852 {

Callers

nothing calls this directly

Calls 15

CryErrorFunction · 0.85
LoadPropertiesFunction · 0.85
GetIEntitySystemMethod · 0.80
GetISoundSystemMethod · 0.80
GetIConsoleMethod · 0.80
GetCVarMethod · 0.80
GetILogMethod · 0.80
DemoConnectMethod · 0.80
EnableEventPostingMethod · 0.80
GetIKeyboardMethod · 0.80
SetLoadingImageMethod · 0.80
ResetProgressBarMethod · 0.80

Tested by

no test coverage detected