Example #1
0
        private static void Main(string[] args)
        {
            // Setup SystemInteraction
            var persistentFolder = Path.Combine(Path.GetDirectoryName(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)), "WoMSadGui");

            Directory.CreateDirectory(persistentFolder);
            SystemInteraction.ReadData         = f => File.ReadAllText(Path.Combine(Path.GetDirectoryName(typeof(Program).Assembly.Location), f));
            SystemInteraction.DataExists       = f => File.Exists(Path.Combine(Path.GetDirectoryName(typeof(Program).Assembly.Location), f));
            SystemInteraction.ReadPersistent   = f => File.ReadAllText(Path.Combine(persistentFolder, f));
            SystemInteraction.PersistentExists = f => File.Exists(Path.Combine(persistentFolder, f));
            SystemInteraction.Persist          = (f, c) => File.WriteAllText(Path.Combine(persistentFolder, f), c);

            log4net.Repository.ILoggerRepository logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly());
            XmlConfigurator.Configure(logRepository, new FileInfo("log4net.config"));

            // Setup the engine and create the main window.
            Game.Create("IBM.font", Width, Height);

            // Hook the start event so we can add consoles to the system.
            Game.OnInitialize = Init;

            // Hook the update event that happens each frame so we can trap keys and respond.
            Game.OnUpdate = Update;

            // Start the game.
            Game.Instance.Run();

            //
            // Code here will not run until the game window closes.
            //

            Game.Instance.Dispose();
        }
Example #2
0
 static void Main()
 {
     Game.Create(100, 40);
     Game.OnInitialize = Init;
     Game.Instance.Run();
     Game.Instance.Dispose();
 }
Example #3
0
 public static void Main()
 {
     Game.Create(20, 10);
     Game.OnInitialize = Init;
     Game.OnUpdate     = Update;
     Game.Instance.Run();
     Game.Instance.Dispose();
 }
        static void Main()
        {
            Game.Create("Fonts\\Andux_8x12.font", width, height);

            Game.OnInitialize = Init;
            Game.OnUpdate     = Update;
            Game.Instance.Run();

            // Code below will not run until the game window closes.

            Game.Instance.Dispose();
        }
Example #5
0
        static void Main(string[] args)
        {
            // Setup the engine and create the main window.
            Game.Create("fonts\\C64.font", Constants.ScreenWidth, Constants.ScreenHeight);

            // Hook the start event so we can add consoles to the system.
            Game.OnInitialize = Init;
            Game.OnUpdate     = Update;

            // Start the game.
            Game.Instance.Run();
            Game.Instance.Dispose();
        }
Example #6
0
        private static void Main(string[] args)
        {
            // Setup the engine and create the main window.
            Game.Create(Width, Height);
            Settings.ResizeMode                  = Settings.WindowResizeOptions.None;
            Settings.WindowMinimumSize           = new Point(160, 160);
            ((Game)Game.Instance).WindowResized += Program_WindowResized;

            // Hook the start event so we can add consoles to the system.
            Game.OnInitialize = Init;

            // Start the game.
            Game.Instance.Run();
            Game.Instance.Dispose();
        }
Example #7
0
 static void Main(string[] args)
 {
     // Person.Person p = Person.Person.Random();
     // clear log
     File.WriteAllText("log.txt", "");
     // seed arg
     if (args.Contains("-s"))
     {
         seed = int.Parse(args[args.ToList().IndexOf("-s") + 1]);
     }
     else
     {
         seed = (int)DateTime.Now.Ticks;
     }
     NewSeed(false);
     // sadconsole stuff
     Game.Create("fonts/moki_square.font", window_width, window_height);
     Game.Instance.Window.Title = "Mocha's History Generator";
     Game.OnInitialize          = InitializeConsole;
     Global.KeyboardState.InitialRepeatDelay /= 2;
     // mapcolor args
     if (args.Contains("-d"))         // debug mode
     {
         Mapping.Debug();
     }
     else
     {
         if (args.Contains("-char"))
         {
             Mapping.CycleChar(int.Parse(args[args.ToList().IndexOf("-char") + 1]));
         }
         if (args.Contains("-color"))
         {
             Mapping.CycleColor(int.Parse(args[args.ToList().IndexOf("-color") + 1]));
         }
     }
     // Test();
     // Histogram(pac_data);
     // Console.ReadKey();
     Game.Instance.Run();
     Game.Instance.Dispose();
 }
Example #8
0
        static void Main(string[] args)
        {
            RegisterTypes();

            Settings.ResizeMode = Settings.WindowResizeOptions.Scale;

            // Setup the engine and create the main window.
            Game.Create("Fonts/IBM.font", GameWidth, GameHeight);

            // Hook the start event so we can add consoles to the system.
            Game.OnInitialize = Init;

            // Hook the update event that happens each frame so we can trap keys and respond.
            Game.OnUpdate = Update;

            // Start the game.
            Game.Instance.Run();

            // Clean up
            Game.Instance.Dispose();
        }
Example #9
0
        private static void Main(string[] args)
        {
            var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly());

            XmlConfigurator.Configure(logRepository, new FileInfo("log4net.config"));

            // Setup the engine and creat the main window.
            Game.Create("IBM.font", Width, Height);

            // Hook the start event so we can add consoles to the system.
            Game.OnInitialize = Init;

            // Hook the update event that happens each frame so we can trap keys and respond.
            Game.OnUpdate = Update;

            // Start the game.
            Game.Instance.Run();

            //
            // Code here will not run until the game window closes.
            //

            Game.Instance.Dispose();
        }