Ejemplo 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();
        }
Ejemplo n.º 2
0
        public CastLib(EndogineHub a_endogine)
        {
            m_endogine = a_endogine;

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

            //this.Pictures = new PicRefs();
        }
Ejemplo n.º 3
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);
            }
        }
Ejemplo n.º 4
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();
        }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
0
 public void NoReceiveEndogineKeys()
 {
     if (m_endogine != null)
         m_endogine.KeyEvent -= new KeyEventHandler(m_endogine_KeyEvent);
     m_endogine = null;
 }
Ejemplo n.º 7
0
 public Stage3D(Control RenderControl, EndogineHub a_endogine)
     : base(RenderControl, a_endogine)
 {
 }
Ejemplo n.º 8
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();
        }
Ejemplo n.º 9
0
 public Sprite(EndogineHub a_endogine)
 {
     m_endogine = a_endogine;
     Init(true);
 }
Ejemplo n.º 10
0
 public Sprite(bool bAutoSetParent)
 {
     m_endogine = EndogineHub.Instance;
     Init(bAutoSetParent);
 }
Ejemplo n.º 11
0
 public Sprite()
 {
     m_endogine = EndogineHub.Instance;
     Init(true);
 }
Ejemplo n.º 12
0
 public TestLine(EndogineHub a_endogine)
     : base(a_endogine)
 {
 }
Ejemplo n.º 13
0
 public SpriteOneFrame(EndogineHub a_endogine)
     : base(a_endogine)
 {
 }
Ejemplo n.º 14
0
 public void SetEndogine(EndogineHub a_endogine)
 {
     m_endogine = a_endogine;
 }
Ejemplo n.º 15
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;
        }