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

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

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

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

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

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