Beispiel #1
0
 private void glControl2_Load(object sender, EventArgs e)
 {
     glControl2.MakeCurrent();
     FolderI = new GLImage("data/content/foldericon.png");
     FileI   = new GLImage("data/content/fileicon.png");
     ScanContent();
     glControl2.Invalidate();
 }
Beispiel #2
0
        public static void DrawImage(int x, int y, int w, int h, GLImage img, float r = 1, float g = 1, float b = 1, float a = 1)
        {
            GL.Color4(r, g, b, a);
            img.Bind(0);
            GL.Begin(BeginMode.Quads);

            GL.TexCoord2(0, 0);
            GL.Vertex2(x, y);
            GL.TexCoord2(1, 0);
            GL.Vertex2(x + w, y);
            GL.TexCoord2(1, 1);
            GL.Vertex2(x + w, y + h);
            GL.TexCoord2(0, 1);
            GL.Vertex2(x, y + h);
            GL.End();
            img.Release(0);
        }
Beispiel #3
0
 public GameMap(int w, int h, int d, int tw, int th)
 {
     CamX      = CamY = 0;
     Width     = w;
     Height    = h;
     Depth     = d;
     TileW     = tw;
     TileH     = th;
     NoTile    = new GLImage("data/map/notile.png");
     Highlight = new bool[Width, Height];
     for (int y = 0; y < Height; y++)
     {
         for (int x = 0; x < Width; x++)
         {
             Highlight[x, y] = false;
         }
     }
 }
Beispiel #4
0
 public GameTile(GLImage img)
 {
     Image = img;
 }