============================================================================== P3DFileHandler::LoadFileSync ============================================================================== Description: Load a Pure3D file synchronously. Parameters: filename - fully qualified path and filename Return: None. ==============================================================================
| 136 | // |
| 137 | //============================================================================== |
| 138 | void 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 |