Exemplo n.º 1
0
        static void Main()
        {
            //Application.EnableVisualStyles();
            //Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new Form1());

            string path = Application.ExecutablePath;
            EndogineHub endogine = new EndogineHub(path);
            string[] aAvailableStrategies = StageBase.GetAvailableRenderers();
            //Endogine.MdiParent mdiParent = new MdiParent();
            //SetupWindow wndSetup = new SetupWindow(aAvailableStrategies, mdiParent);
            SetupWindow wndSetup = new SetupWindow(aAvailableStrategies, null);
            wndSetup.ShowDialog();

            Main main = new Main();
            main.Show();

            endogine.Init(main, null, null);
            main.EndogineInitDone();

            MusicGame.Midi.Main game = new MusicGame.Midi.Main();

            while (endogine.MainLoop())
                Application.DoEvents();
        }
Exemplo n.º 2
0
 public void NoReceiveEndogineKeys()
 {
     if (m_endogine != null)
     {
         m_endogine.KeyEvent -= new KeyEventHandler(m_endogine_KeyEvent);
     }
     m_endogine = null;
 }
Exemplo n.º 3
0
        public CastLib(EndogineHub a_endogine)
        {
            m_endogine = a_endogine;

            //this.Animations = new Animations();
            this.FrameSets = new FrameSets();

            //this.Pictures = new PicRefs();
        }
Exemplo n.º 4
0
        public CastLib(EndogineHub a_endogine)
        {
            m_endogine = a_endogine;

            //this.Animations = new Animations();
            this.FrameSets = new FrameSets();

            //this.Pictures = new PicRefs();
        }
Exemplo n.º 5
0
        private void rb_CheckedChanged(object sender, EventArgs e)
        {
            RadioButton rb = (RadioButton)sender;

            if (rb.Checked)
            {
                EndogineHub endo = EndogineHub.Instance;
                endo.PreSetRenderStrategy(rb.Text);
            }
        }
Exemplo n.º 6
0
        public MainBase()
        {
            m_endogine = EndogineHub.Instance;
            InitializeComponent();

            if (m_endogine != null)
            {
                this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.Opaque, true);
//				if (m_endogine.CurrentRenderStrategy == EndogineHub.RenderStrategy.GDI)
//					this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.Opaque, true);
//				else
//					this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true);
            }
        }
Exemplo n.º 7
0
        public MainBase()
        {
            m_endogine = EndogineHub.Instance;
            InitializeComponent();

            if (m_endogine!=null)
            {
                this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.Opaque, true);
            //				if (m_endogine.CurrentRenderStrategy == EndogineHub.RenderStrategy.GDI)
            //					this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.Opaque, true);
            //				else
            //					this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true);
            }
        }
Exemplo n.º 8
0
        static void Main(string[] args)
        {
            EndogineHub endogine = new EndogineHub(Application.ExecutablePath);

            Main main = new Main();
            main.Show();

            endogine.Init(main, null, null);
            main.EndogineInitDone();

            Driver.Game game = new Driver.Game();

            while (endogine.MainLoop())
                Application.DoEvents();
        }
Exemplo n.º 9
0
        public void ReceiveEndogineKeys(EndogineHub a_endogine)
        {
            if (m_endogine != null)
            {
                m_endogine.KeyEvent -= new KeyEventHandler(m_endogine_KeyEvent);
            }

            if (a_endogine == null)
            {
                a_endogine = EH.Instance;
            }

            m_endogine           = a_endogine;
            m_endogine.KeyEvent += new KeyEventHandler(m_endogine_KeyEvent);
        }
Exemplo n.º 10
0
        private void checkBox1_CheckedChanged(object sender, System.EventArgs e)
        {
            EndogineHub endo  = EndogineHub.Instance;
            bool        bFull = ((CheckBox)sender).Checked;

            endo.PreSetFullscreen(bFull);
            if (bFull)
            {
                cbMDI.Checked = false;
                cbMDI.Enabled = false;
            }
            else
            {
                cbMDI.Enabled = true;
            }
        }
Exemplo n.º 11
0
        private Form _startupForm; //TODO: shouldn't have such a thing, console startup rather...



        public EndogineHub(string a_sApplicationPath)
        {
            m_sApplicationPath = a_sApplicationPath;

            m_pntMouseLoc = new EPoint();
            m_endogine    = this;

            AppSettings app = new AppSettings();

            string s = AppSettings.Instance.GetNodeText("DisplayMode.Fullscreen");

            if (s != null)
            {
                m_bFullscreen = Convert.ToBoolean(s);
            }

            s = AppSettings.Instance.GetNodeText("DisplayMode.Renderer");
            if (s != null)
            {
                this._renderStrategy = s;
            }
        }
Exemplo n.º 12
0
 public Sprite(EndogineHub a_endogine)
 {
     m_endogine = a_endogine;
     Init(true);
 }
Exemplo n.º 13
0
 public Sprite(bool bAutoSetParent)
 {
     m_endogine = EndogineHub.Instance;
     Init(bAutoSetParent);
 }
Exemplo n.º 14
0
 public Sprite()
 {
     m_endogine = EndogineHub.Instance;
     Init(true);
 }
Exemplo n.º 15
0
 public void SetEndogine(EndogineHub a_endogine)
 {
     m_endogine = a_endogine;
 }
Exemplo n.º 16
0
 public void NoReceiveEndogineKeys()
 {
     if (m_endogine != null)
         m_endogine.KeyEvent -= new KeyEventHandler(m_endogine_KeyEvent);
     m_endogine = null;
 }
Exemplo n.º 17
0
 public void SetEndogine(EndogineHub a_endogine)
 {
     m_endogine = a_endogine;
 }
Exemplo n.º 18
0
 public SpriteOneFrame(EndogineHub a_endogine)
     : base(a_endogine)
 {
 }
Exemplo n.º 19
0
 public SpriteOneFrame(EndogineHub a_endogine) : base(a_endogine)
 {
 }
Exemplo n.º 20
0
        //protected Control target           = null;

        public StageGDI(Control RenderControl, EndogineHub a_endogine) : base(RenderControl, a_endogine)
        {
        }
Exemplo n.º 21
0
 public TestLine(EndogineHub a_endogine)
     : base(a_endogine)
 {
 }
Exemplo n.º 22
0
 public static void Put(string s)
 {
     EndogineHub.Put(s);
 }
Exemplo n.º 23
0
 public Sprite()
 {
     m_endogine = EndogineHub.Instance;
     Init(true);
 }
Exemplo n.º 24
0
 public Stage3D(Control RenderControl, EndogineHub a_endogine)
     : base(RenderControl, a_endogine)
 {
 }
Exemplo n.º 25
0
 public Sprite(bool bAutoSetParent)
 {
     m_endogine = EndogineHub.Instance;
     Init(bAutoSetParent);
 }
Exemplo n.º 26
0
 public Sprite(EndogineHub a_endogine)
 {
     m_endogine = a_endogine;
     Init(true);
 }
Exemplo n.º 27
0
        private void Form1_Load(object sender, System.EventArgs e)
        {
            m_endogine = new EndogineHub(Application.ExecutablePath);

            string[] aAvailableStrategies = StageBase.GetAvailableRenderers(null);
            //			string[] aAvailableStrategies = new string[]{Enum.GetName(typeof(EndogineHub.RenderStrategy), 0), Enum.GetName(typeof(EndogineHub.RenderStrategy), 1)};
            if (Endogine.AppSettings.Instance.GetNodeText("MDI") != "false")
                this.IsMdiContainer = true;

            if (Endogine.AppSettings.Instance.GetNodeText("SetupDialog") != "false")
            {
                SetupWindow wndSetup = new SetupWindow(aAvailableStrategies, this);
                wndSetup.ShowDialog();
            }

            m_formStage = new Main();

            Form formMdiParent = (Form)null;
            if (this.IsMdiContainer)
            {
                this.Width = 800;
                this.Height = 600;
                this.WindowState = FormWindowState.Maximized;
                formMdiParent = this;
                m_formStage.MdiParent = this;
            }
            else
            {
                this.Visible = false; //TODO: this doesn't work
                this.Text = "Should be invisible!";
            }
            //TODO: anyhow, it's strange to use a Form to start from, the project should probably be a console application.

            m_formStage.Show();

            m_endogine.Init(m_formStage, formMdiParent, this);
            m_formStage.EndogineInitDone();
        }
Exemplo n.º 28
0
        public void ReceiveEndogineKeys(EndogineHub a_endogine)
        {
            if (m_endogine != null)
                m_endogine.KeyEvent -= new KeyEventHandler(m_endogine_KeyEvent);

            if (a_endogine == null)
                a_endogine = EH.Instance;

            m_endogine = a_endogine;
            m_endogine.KeyEvent+=new KeyEventHandler(m_endogine_KeyEvent);
        }
Exemplo n.º 29
0
        private Form _startupForm; //TODO: shouldn't have such a thing, console startup rather...

        #endregion Fields

        #region Constructors

        public EndogineHub(string a_sApplicationPath)
        {
            m_sApplicationPath = a_sApplicationPath;

            m_pntMouseLoc = new EPoint();
            m_endogine = this;

            AppSettings app = new AppSettings();

            string s = AppSettings.Instance.GetNodeText("DisplayMode.Fullscreen");
            if (s != null)
                m_bFullscreen = Convert.ToBoolean(s);

            s = AppSettings.Instance.GetNodeText("DisplayMode.Renderer");
            if (s != null)
                this._renderStrategy = s;
        }