MCPcopy Create free account
hub / github.com/Svxy/The-Simpsons-Hit-and-Run / LoadFileSync

Method LoadFileSync

game/code/loading/p3dfilehandler.cpp:138–164  ·  view source on GitHub ↗

============================================================================== P3DFileHandler::LoadFileSync ============================================================================== Description: Load a Pure3D file synchronously. Parameters: filename - fully qualified path and filename Return: None. ==============================================================================

Source from the content-addressed store, hash-verified

136//
137//==============================================================================
138void P3DFileHandler::LoadFileSync( const char* filename )
139{
140 rAssert( filename );
141
142 rReleasePrintf("Synchronous File Load. Bastard! %s\n", filename);
143 rAssert( false );
144
145 p3d::inventory->PushSection();
146
147 //
148 // Ensure that the specified inventory section exists before loading
149 //
150 p3d::inventory->AddSection( mcSectionName );
151 p3d::inventory->SelectSection( mcSectionName );
152
153 // SetInventorySection(mcSectionName );
154
155 tLoadRequest* pLR = new tLoadRequest(p3d::openFile(filename));
156 pLR->SetInventorySection(mcSectionName);
157 tLoadStatus result = p3d::loadManager->Load(pLR);
158
159 // bool result = p3d::load( filename );
160
161 p3d::inventory->PopSection();
162
163 rAssert( result == LOAD_OK );
164}
165
166
167

Callers 1

LoadSyncMethod · 0.45

Calls 1

LoadMethod · 0.45

Tested by

no test coverage detected