============================================================================== P3DFileHandler::LoadFile ============================================================================== Description: Load a Pure3D file asynchronously. Parameters: filename - fully qualified path and filename pCallback - client callback to invoke when load is complete pUserData - optional client supplied user data R
| 78 | // |
| 79 | //============================================================================== |
| 80 | void P3DFileHandler::LoadFile |
| 81 | ( |
| 82 | const char* filename, |
| 83 | FileHandler::LoadFileCallback* pCallback, |
| 84 | void* pUserData, |
| 85 | GameMemoryAllocator heap |
| 86 | ) |
| 87 | { |
| 88 | rAssert( filename ); |
| 89 | rAssert( pCallback ); |
| 90 | |
| 91 | mpCallback = pCallback; |
| 92 | mpUserData = pUserData; |
| 93 | |
| 94 | // |
| 95 | // Ensure that the specified inventory section exists before loading |
| 96 | // |
| 97 | HeapMgr()->PushHeap (heap); |
| 98 | HeapMgr()->PushHeap (GMA_TEMP); |
| 99 | p3d::inventory->AddSection( mcSectionName ); |
| 100 | HeapMgr()->PopHeap (GMA_TEMP); |
| 101 | p3d::loadAsync( filename, mcSectionName, this, pUserData, heap ); |
| 102 | HeapMgr()->PopHeap (heap); |
| 103 | } |
| 104 | |
| 105 | |
| 106 | //============================================================================== |
no test coverage detected