public void EnterWorld(Vector2 entryPoint, int mapId) { var row = Storage.DbcStorage.Map.GetRowById(mapId); if (row == null) { return; } var continent = row.GetString(Storage.MapFormatGuess.FieldMapName); MapChunkRender.InitIndices(); WorldFrame.Instance.LeftHandedCamera = FileManager.Instance.Version > FileDataVersion.Cataclysm; mEntryPoint = entryPoint; Continent = continent; WorldFrame.Instance.State = AppState.LoadingScreen; CurrentWdt = new WdtFile(); CurrentWdt.Load(continent); HasNewBlend = (CurrentWdt.Flags & 0x84) != 0; MapChunkRender.ChunkMesh.Program = HasNewBlend ? MapChunkRender.BlendNew : MapChunkRender.BlendOld; IsInitialLoad = true; SkyManager.Instance.OnEnterWorld(mapId); mAreaLowManager.OnEnterWorld(Continent, ref entryPoint); LoadInitial(); }
public void AsyncLoaded(IO.Files.Terrain.MapArea area) { AreaFile = area; if (AreaFile.IsValid == false) { return; } for (var i = 0; i < 256; ++i) { var chunk = new MapChunkRender(); chunk.OnAsyncLoad(area.GetChunk(i), this); mChunks[i] = chunk; } mBoundingBox = area.BoundingBox; mModelBox = area.ModelBox; mAsyncLoaded = true; }
public void EnterWorld(Vector2 entryPoint, int mapId, string continent) { MapChunkRender.InitIndices(); WorldFrame.Instance.LeftHandedCamera = IO.FileManager.Instance.Version > IO.FileDataVersion.Cataclysm; mEntryPoint = entryPoint; MapId = mapId; Continent = continent; WorldFrame.Instance.State = AppState.LoadingScreen; CurrentWdt = new WdtFile(); CurrentWdt.Load(continent); HasNewBlend = (CurrentWdt.Flags & 0x84) != 0; MapChunkRender.ChunkMesh.Program = HasNewBlend ? MapChunkRender.BlendNew : MapChunkRender.BlendOld; IsInitialLoad = true; IO.Files.Sky.SkyManager.Instance.OnEnterWorld(mapId); mAreaLowManager.OnEnterWorld(Continent, ref entryPoint); LoadInitial(); }
public void AsyncLoaded(IO.Files.Terrain.MapArea area) { AreaFile = area; if (AreaFile.IsValid == false) return; for(var i = 0; i < 256; ++i) { var chunk = new MapChunkRender(); chunk.OnAsyncLoad(area.GetChunk(i), this); mChunks[i] = chunk; } mBoundingBox = area.BoundingBox; mModelBox = area.ModelBox; mAsyncLoaded = true; }