Exemplo n.º 1
0
        public virtual void UpdateScreen()
        {
            re.BeginFrame(0F);
            switch (currentState)

            {
            case 0:
                re.DrawStretchPic(0, 0, viddef.GetWidth(), viddef.GetHeight(), "conback");
                re.DrawPic(viddef.GetWidth() / 2 - 50, viddef.GetHeight() / 2, "loading");
                currentState = 1;
                break;

            case 1:
                re.SetSky("space1", 0, new float { 0, 0, 0 });
                re.BeginRegistration("ColorTest");
                re.EndRegistration();
                currentState = 2;

            default:
                if (framecount % 500 == 0)
                {
                    long time = System.CurrentTimeMillis();
                    fps   = 500000F / (time - start);
                    start = time;
                }

                string text = fps + " fps";
                TestMap();
                DrawString(10, viddef.GetHeight() - 16, text);
            }

            re.EndFrame();
            framecount++;
        }
Exemplo n.º 2
0
        public virtual void UpdateScreen()
        {
            re.BeginFrame(0F);
            viddef = Globals.viddef;
            re.DrawStretchPic(0, 0, viddef.GetWidth(), viddef.GetHeight(), "conback");
            if (framecount % 500 == 0)
            {
                long time = System.CurrentTimeMillis();
                fps   = 500000F / (time - start);
                start = time;
            }

            string text = ((int)(fps + 0.5F)) + " fps";

            for (int i = 0; i < text.Length; i++)
            {
                re.DrawChar(10 + 8 * i, viddef.GetHeight() / 2, (int)text[i]);
            }

            re.DrawGetPicSize(out var wal, "/textures/e1u1/basemap.wal");
            re.DrawPic(0, viddef.GetHeight() - wal.Height, "/textures/e1u1/basemap.wal");
            switch (testnr)

            {
            case 0:
                TestParticles();
                break;

            case 1:
                TestModel();
                break;

            case 2:
                TestSprites();
                break;

            case 3:
                TestBeam();
                break;
            }

            re.EndFrame();
            framecount++;
        }