private void DrawString(int x, int y, string text) { for (int i = 0; i < text.Length; i++) { re.DrawChar(x + 8 * i, y, (int)text[i]); } }
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++; }