Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool CD3dscene::LoadScene(const CScene &pScene, IDirect3DDevice9 *pD3ddev, ID3DXSprite *pSpriteObj)
- {
- #ifdef SHOW_PROGRESS
- #define DISPLAY_PROGRESS UpdateConsole(L".", false)
- #else
- #define DISPLAY_PROGRESS
- #endif // #ifdef SHOW_PROGRESS
- if((mD3ddev = pD3ddev) == NULL) return false;
- if((mSpriteObj = pSpriteObj) == NULL) return false;
- AllocateMemory(pScene);
- if(!LoadSceneBase(pScene)) return false;
- DISPLAY_PROGRESS;
- mLoadProgress = 1;
- if(!LoadMeshes(pScene)) { return false; }
- DISPLAY_PROGRESS;
- mLoadProgress = 2;
- if(!LoadMaterials()) { return false; }
- DISPLAY_PROGRESS;
- mLoadProgress = 3;
- if(!SetupMatPerRenderable()) { return false; }
- DISPLAY_PROGRESS;
- mLoadProgress = 4;
- if(!LoadTextures(pScene)) { return false; }
- DISPLAY_PROGRESS;
- mLoadProgress = 5;
- if(!LoadLights(pScene)) { return false; }
- DISPLAY_PROGRESS;
- mLoadProgress = 6;
- if(!LoadSprites(pScene)) { return false; }
- DISPLAY_PROGRESS;
- mLoadProgress = 7;
- mIsLoaded = true;
- mLoadProgress = 0;
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement