コード例 #1
0
        public void Render(bool picking)
        {
            if (!Visible)
            {
                return;
            }

            if (picking)
            {
                for (int i = 0; i < Entries.Count; i++)
                {
                    Entries[i].RenderPicking(i);
                }
                return;
            }
            VisualSettings Settings = (Application.OpenForms[0] as Form1).Settings;

            Gl.glLineWidth(Settings.LineWidth);
            SimpleKMP kmp = (Application.OpenForms[0] as Form1).getKayEmPee();
            int       j   = 0;

            foreach (var group in Entries)
            {
                group.Render(kmp.currentCullingRoutes.Contains(j));
                j++;
            }
        }
コード例 #2
0
        public void ErrorRefresh()
        {
            kmp = ParentF.Kayempee;
            List <string> back = (List <string>)MsgList.DataSource;

            MsgList.DataSource = null;
            errors.Clear();
            warnings.Clear();
            notes.Clear();
            StartErrorCheck();
            errorButton.Text   = "Errors: " + errors.Count;
            warningButton.Text = "Warnings: " + warnings.Count;
            notesButton.Text   = "Notes: " + notes.Count;
            if (back == null)
            {
                back = errors;
                errorButton.Select();
            }
            MsgList.DataSource = back;
        }
コード例 #3
0
 public IntroCamePlayer(Form1 Parent, SimpleKMP kmp, Camera.CameraEntry entry)
 {
     this.Parent    = Parent;
     this.entry     = entry;
     this.kmp       = kmp;
     needsRendering = false;
     route          = kmp.Routes.Entries[entry.RouteID];
     currindex      = 0;
     UpdateLookAtValues();
     UpdateFOVValues();
     try
     {
         UpdateValues();
     } catch
     {
         stop = true;
         pos  = routetopos(route.Entries[currindex]);
     }
     Start();
 }
コード例 #4
0
        public void playIntro()
        {
            if (Parent.Kayempee == null)
            {
                return;
            }
            SimpleKMP kmp = Parent.Kayempee;

            Camera.CameraEntry curr = GetStartingIntroCame();
            if (curr == null)
            {
                return;
            }
            Camera.CameraEntry currtest = curr;
            int totcount = kmp.Camera.Entries.Count;
            int count    = 0;

            while (true) //Check if cameras are linked properly
            {
                if (count >= 0)
                {
                    break;
                }
                if (kmp.Routes.Entries.ElementAtOrDefault(currtest.RouteID) == null || kmp.Routes.Entries.ElementAtOrDefault(currtest.RouteID).Entries.Count == 0)
                {
                    return;
                }
                currtest = kmp.Camera.Entries.ElementAtOrDefault(currtest.Next);
                if (currtest == null)
                {
                    break;
                }
                else if (currtest.TypeID != 5)
                {
                    return;
                }
                count++;
            }
            System.Diagnostics.Stopwatch s = new System.Diagnostics.Stopwatch();
            int currduration = (int)(curr.DurationRaw / 60 * 1000);

            incame = new IntroCamePlayer(Parent, kmp, curr);
            s.Start();
            while (!userStop)
            {
                System.Threading.Thread.Sleep(1);
                if (s.ElapsedMilliseconds >= currduration)
                {
                    if (userStop)
                    {
                        break;
                    }
                    s.Reset();
                    incame.Stop();
                    curr = kmp.Camera.Entries.ElementAtOrDefault(curr.Next);
                    if (curr == null)
                    {
                        break;
                    }
                    incame       = new IntroCamePlayer(Parent, kmp, curr);
                    currduration = (int)(curr.DurationRaw / 60 * 1000);
                    s.Start();
                }
            }
            exitThread = true;
        }