private void LoadWorld() { UpdateStatus("Loading timecycles..."); timecycle.Init(GameFileCache, UpdateStatus); timecycle.SetTime(Renderer.timeofday); UpdateStatus("Loading materials..."); BoundsMaterialTypes.Init(GameFileCache); UpdateStatus("Loading weather..."); weather.Init(GameFileCache, UpdateStatus, timecycle); //UpdateWeatherTypesComboBox(weather); UpdateStatus("Loading clouds..."); clouds.Init(GameFileCache, UpdateStatus, weather); //UpdateCloudTypesComboBox(clouds); }
private void ContentThread() { //main content loading thread. //running = true; //UpdateStatus("Scanning..."); //try //{ // GTA5Keys.LoadFromPath(Settings.Default.GTAFolder); //now loads from magic //} //catch //{ // MessageBox.Show("Keys not found! This shouldn't happen."); // Close(); // return; //} //gameFileCache.Init(UpdateStatus, LogError); ////UpdateDlcListComboBox(gameFileCache.DlcNameList); ////EnableCacheDependentUI(); ////LoadWorld(); //initialised = true; ////EnableDLCModsUI(); UpdateStatus("Ready"); while (formopen && !IsDisposed) //main asset loop { if ((gameFileCache != null) && (gameFileCache.IsInited)) { if (!timecycle.Inited) { //UpdateStatus("Loading timecycles..."); timecycle.Init(gameFileCache, UpdateStatus); timecycle.SetTime(Renderer.timeofday); //UpdateStatus("Timecycles loaded."); } if (Renderer.renderskydome) { if (!weather.Inited) { //UpdateStatus("Loading weather..."); weather.Init(gameFileCache, UpdateStatus, timecycle); //UpdateStatus("Weather loaded."); } //if (!clouds.Inited) //{ // UpdateStatus("Loading clouds..."); // clouds.Init(gameFileCache, UpdateStatus, weather); // UpdateStatus("Clouds loaded."); //} } } //if ((gameFileCache != null) && (gameFileCache.IsInited)) //{ // gameFileCache.ContentThreadProc(); //} bool rcItemsPending = Renderer.ContentThreadProc(); if (!(rcItemsPending)) //gameFileCache.ItemsStillPending || { Thread.Sleep(1); //sleep if there's nothing to do } } //gameFileCache.Clear(); //running = false; }