示例#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();
        }
示例#2
0
 public void NoReceiveEndogineKeys()
 {
     if (m_endogine != null)
     {
         m_endogine.KeyEvent -= new KeyEventHandler(m_endogine_KeyEvent);
     }
     m_endogine = null;
 }
示例#3
0
        public CastLib(EndogineHub a_endogine)
        {
            m_endogine = a_endogine;

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

            //this.Pictures = new PicRefs();
        }
示例#4
0
        public CastLib(EndogineHub a_endogine)
        {
            m_endogine = a_endogine;

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

            //this.Pictures = new PicRefs();
        }
示例#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);
            }
        }
示例#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);
            }
        }
示例#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);
            }
        }
示例#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();
        }
示例#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);
        }
示例#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;
            }
        }
示例#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;
            }
        }
示例#12
0
 public Sprite(EndogineHub a_endogine)
 {
     m_endogine = a_endogine;
     Init(true);
 }
示例#13
0
 public Sprite(bool bAutoSetParent)
 {
     m_endogine = EndogineHub.Instance;
     Init(bAutoSetParent);
 }
示例#14
0
 public Sprite()
 {
     m_endogine = EndogineHub.Instance;
     Init(true);
 }
 public void SetEndogine(EndogineHub a_endogine)
 {
     m_endogine = a_endogine;
 }
示例#16
0
 public void NoReceiveEndogineKeys()
 {
     if (m_endogine != null)
         m_endogine.KeyEvent -= new KeyEventHandler(m_endogine_KeyEvent);
     m_endogine = null;
 }
示例#17
0
 public void SetEndogine(EndogineHub a_endogine)
 {
     m_endogine = a_endogine;
 }
示例#18
0
 public SpriteOneFrame(EndogineHub a_endogine)
     : base(a_endogine)
 {
 }
示例#19
0
 public SpriteOneFrame(EndogineHub a_endogine) : base(a_endogine)
 {
 }
示例#20
0
        //protected Control target           = null;

        public StageGDI(Control RenderControl, EndogineHub a_endogine) : base(RenderControl, a_endogine)
        {
        }
示例#21
0
 public TestLine(EndogineHub a_endogine)
     : base(a_endogine)
 {
 }
示例#22
0
 public static void Put(string s)
 {
     EndogineHub.Put(s);
 }
示例#23
0
 public Sprite()
 {
     m_endogine = EndogineHub.Instance;
     Init(true);
 }
示例#24
0
 public Stage3D(Control RenderControl, EndogineHub a_endogine)
     : base(RenderControl, a_endogine)
 {
 }
示例#25
0
 public Sprite(bool bAutoSetParent)
 {
     m_endogine = EndogineHub.Instance;
     Init(bAutoSetParent);
 }
示例#26
0
 public Sprite(EndogineHub a_endogine)
 {
     m_endogine = a_endogine;
     Init(true);
 }
示例#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();
        }
示例#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);
        }
示例#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;
        }