Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.02 KB | None | 0 0
  1. bool CD3dscene::LoadScene(const CScene &pScene, IDirect3DDevice9 *pD3ddev, ID3DXSprite *pSpriteObj)
  2. {
  3. #ifdef SHOW_PROGRESS
  4. #define DISPLAY_PROGRESS UpdateConsole(L".", false)
  5. #else
  6. #define DISPLAY_PROGRESS
  7. #endif  // #ifdef SHOW_PROGRESS
  8.  
  9.  
  10.     if((mD3ddev = pD3ddev) == NULL) return false;
  11.     if((mSpriteObj = pSpriteObj) == NULL) return false;
  12.  
  13.     AllocateMemory(pScene);
  14.  
  15.     if(!LoadSceneBase(pScene)) return false;
  16.     DISPLAY_PROGRESS;
  17.     mLoadProgress = 1;
  18.  
  19.     if(!LoadMeshes(pScene)) { return false; }
  20.     DISPLAY_PROGRESS;
  21.     mLoadProgress = 2;
  22.     if(!LoadMaterials()) { return false; }
  23.     DISPLAY_PROGRESS;
  24.     mLoadProgress = 3;
  25.     if(!SetupMatPerRenderable()) { return false; }
  26.     DISPLAY_PROGRESS;
  27.     mLoadProgress = 4;
  28.     if(!LoadTextures(pScene)) { return false; }
  29.     DISPLAY_PROGRESS;
  30.     mLoadProgress = 5;
  31.     if(!LoadLights(pScene)) { return false; }
  32.     DISPLAY_PROGRESS;
  33.     mLoadProgress = 6;
  34.     if(!LoadSprites(pScene)) { return false; }
  35.     DISPLAY_PROGRESS;
  36.     mLoadProgress = 7;
  37.  
  38.     mIsLoaded = true;
  39.     mLoadProgress = 0;
  40.     return true;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement