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

Method LoadFromStream_PATCH_1

CryGame/GameLoading.cpp:2360–3009  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////// [KIRILL] DO NOT UPDATE THIS FUNCTION ITS HERE TO ENABLE THAT ALL NEWER VERSIONS SUPPORT LOADING OLDER SAVEFILES - from PATCH 1

Source from the content-addressed store, hash-verified

2358// DO NOT UPDATE THIS FUNCTION ITS HERE TO ENABLE THAT ALL NEWER VERSIONS
2359// SUPPORT LOADING OLDER SAVEFILES - from PATCH 1
2360bool CXGame::LoadFromStream_PATCH_1(CStream &stm, bool isdemo, CScriptObjectStream &scriptStream)
2361{
2362 IBitStream *pBitStream=GetIBitStream();
2363
2364 IEntitySystem *pEntitySystem=m_pSystem->GetIEntitySystem();
2365 IEntityClassRegistry *pECR=GetClassRegistry();
2366 IEntity *pEnt=NULL;
2367 CEntityDesc ed;
2368 int localPlayerId=0;
2369
2370 string sLevelName;
2371 string sMissionName;
2372 stm.Read(sLevelName);
2373 stm.Read(sMissionName);
2374
2375 // read dummy save date and time
2376 unsigned char bDummy;
2377 unsigned short wDummy;
2378 stm.Read(bDummy); // hour
2379 stm.Read(bDummy); // minute
2380 stm.Read(bDummy); // second
2381 stm.Read(bDummy); // day
2382 stm.Read(bDummy); // month
2383 stm.Read(wDummy); // year
2384
2385 // load savegame name
2386 string sFilename;
2387 stm.Read(sFilename);
2388
2389 // load the number of entities, for loading screen bar
2390 int nEnt;
2391 stm.Read(nEnt);
2392
2393 bool bS=IsServer();
2394 bool bC=IsClient();
2395
2396 assert(!IsMultiplayer());
2397
2398 VERIFY_COOKIE_NO(stm,0x22);
2399
2400 // Load EAX preset
2401 int nPreset;
2402 CS_REVERB_PROPERTIES tProps;
2403 m_pSystem->GetISoundSystem()->GetCurrentEaxEnvironment(nPreset,tProps);
2404 stm.Read(nPreset);
2405 if (nPreset==-1)
2406 {
2407 stm.ReadBits((BYTE *)&tProps,sizeof(CS_REVERB_PROPERTIES));
2408 }
2409
2410 VERIFY_COOKIE_NO(stm,0x12);
2411
2412 // load saved cvars
2413 string varname,val;
2414 int nCount,i;
2415 stm.Read(nCount);
2416 IConsole *pCon=m_pSystem->GetIConsole();
2417 for (i=0;i<nCount;i++)

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
SetLoadingImageMethod · 0.80
ResetProgressBarMethod · 0.80
SetScrollMaxMethod · 0.80

Tested by

no test coverage detected