コード例 #1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            // parse arguments
            if (args.Length > 0)
            {
                int num;
                if (!int.TryParse(args[0], out num))
                {
                    throw new Exception("Invalid argument for ParallelLoading: " + args[0]);
                }
                UseMultiThreadedLoading = num != 0;
            }

            // initialize config & logging
            TerrainGUIConfig.Initialize();
            LogUtil.SetupConsoleLogging();

            // initialize StormLib
            NativeMethods.StormLibFolder = WCellTerrainSettings.LibDir;
            NativeMethods.InitAPI();

            var defaultTileId = TileIdentifier.DefaultTileIdentifier;

            world = new World();

            LoadInitialData(defaultTileId);


            Console.WriteLine("All data has been loaded - Starting GUI...");

            //new RecastRunner(TerrainManager).Start();
            StartDefaultViewer(world, defaultTileId);
        }
コード例 #2
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            // parse arguments
            if (args.Length > 0)
            {
                int num;
                if (!int.TryParse(args[0], out num))
                {
                    throw new Exception("Invalid argument for ParallelLoading: " + args[0]);
                }
                UseMultiThreadedLoading = num != 0;
            }

            // initialize config & logging
            TerrainGUIConfig.Initialize();
            LogUtil.SetupConsoleLogging();

            // initialize StormLib
            NativeMethods.StormLibFolder = WCellTerrainSettings.LibDir;
            NativeMethods.InitAPI();

            var defaultTileId = TileIdentifier.DefaultTileIdentifier;

            var world   = new World();
            var terrain = new SimpleWDTTerrain(defaultTileId.MapId, false);

            world.WorldTerrain.Add(defaultTileId.MapId, terrain);

            terrain.GetOrCreateTile(defaultTileId.MapId, defaultTileId.X, defaultTileId.Y);

            AvatarPosition = new Vector3(TerrainConstants.CenterPoint - (defaultTileId.X + 1) * TerrainConstants.TileSize,
                                         TerrainConstants.CenterPoint - (defaultTileId.Y) * TerrainConstants.TileSize,
                                         100.0f);


            Console.WriteLine("All data has been loaded - Starting GUI...");

            //new RecastRunner(TerrainManager).Start();
            StartDefaultViewer(world, defaultTileId);
        }