Example #1
0
 public void Draw2dBitmapFile(string filename, float x1, float y1, float width, float height)
 {
     if (!textures.ContainsKey(filename))
     {
         textures[filename] = LoadTexture(d_GetFile.GetFile(filename));
     }
     Draw2dTexture(textures[filename], x1, y1, width, height, null);
 }
Example #2
0
        public GameDataMonsters(IGetFileStream getfile)
        {
            int n = 5;

            MonsterCode    = new string[n][];
            MonsterName    = new string[n];
            MonsterSkin    = new string[n];
            MonsterCode[0] = MyStream.ReadAllLines(getfile.GetFile("imp.txt"));
            MonsterName[0] = "Imp";
            MonsterSkin[0] = "imp.png";
            MonsterCode[1] = MyStream.ReadAllLines(getfile.GetFile("imp.txt"));
            MonsterName[1] = "Fire Imp";
            MonsterSkin[1] = "impfire.png";
            MonsterCode[2] = MyStream.ReadAllLines(getfile.GetFile("dragon.txt"));
            MonsterName[2] = "Dragon";
            MonsterSkin[2] = "dragon.png";
            MonsterCode[3] = MyStream.ReadAllLines(getfile.GetFile("zombie.txt"));
            MonsterName[3] = "Zombie";
            MonsterSkin[3] = "zombie.png";
            MonsterCode[4] = MyStream.ReadAllLines(getfile.GetFile("cyclops.txt"));
            MonsterName[4] = "Cyclops";
            MonsterSkin[4] = "cyclops.png";
        }
Example #3
0
 private void Form1_Load(object sender, EventArgs e)
 {
     string[] datapaths = new[] { Path.Combine(Path.Combine(Path.Combine("..", ".."), ".."), "data"), "data" };
     getfile           = new GetFileStream(datapaths);
     richTextBox1.Text = new StreamReader(getfile.GetFile("player.txt")).ReadToEnd();
     RichTextBoxContextMenu(richTextBox1);
     RichTextBoxContextMenu(richTextBox2);
     UpdateLabels();
     the3d = new ManicDigger.TextureLoader()
     {
         d_Config3d = config3d
     };
     glControl1.Paint      += new PaintEventHandler(glControl1_Paint);
     glControl1.MouseWheel += new System.Windows.Forms.MouseEventHandler(glControl1_MouseWheel);
     loaded = true;
     GL.ClearColor(Color.SkyBlue);
     overheadcameraK.SetDistance(3);
     overheadcameraK.SetT((float)Math.PI);
     SetupViewport();
     Application.Idle += new EventHandler(Application_Idle);
     sw.Start();
 }
Example #4
0
 public GameDataMonsters(IGetFileStream getfile)
 {
     int n = 5;
     MonsterCode = new string[n][];
     MonsterName = new string[n];
     MonsterSkin = new string[n];
     MonsterCode[0] = MyStream.ReadAllLines(getfile.GetFile("imp.txt"));
     MonsterName[0] = "Imp";
     MonsterSkin[0] = "imp.png";
     MonsterCode[1] = MyStream.ReadAllLines(getfile.GetFile("imp.txt"));
     MonsterName[1] = "Fire Imp";
     MonsterSkin[1] = "impfire.png";
     MonsterCode[2] = MyStream.ReadAllLines(getfile.GetFile("dragon.txt"));
     MonsterName[2] = "Dragon";
     MonsterSkin[2] = "dragon.png";
     MonsterCode[3] = MyStream.ReadAllLines(getfile.GetFile("zombie.txt"));
     MonsterName[3] = "Zombie";
     MonsterSkin[3] = "zombie.png";
     MonsterCode[4] = MyStream.ReadAllLines(getfile.GetFile("cyclops.txt"));
     MonsterName[4] = "Cyclops";
     MonsterSkin[4] = "cyclops.png";
 }
Example #5
0
 private void Form1_Load(object sender, EventArgs e)
 {
     string[] datapaths = new[] { Path.Combine(Path.Combine(Path.Combine("..", ".."), ".."), "data"), "data" };
     getfile = new GetFileStream(datapaths);
     richTextBox1.Text = new StreamReader(getfile.GetFile("player.txt")).ReadToEnd();
     RichTextBoxContextMenu(richTextBox1);
     RichTextBoxContextMenu(richTextBox2);
     UpdateLabels();
     the3d = new ManicDigger.TextureLoader() { d_Config3d = config3d };
     glControl1.Paint += new PaintEventHandler(glControl1_Paint);
     glControl1.MouseWheel += new System.Windows.Forms.MouseEventHandler(glControl1_MouseWheel);
     loaded = true;
     GL.ClearColor(Color.SkyBlue);
     overheadcameraK.SetDistance(3);
     overheadcameraK.SetT((float)Math.PI);
     SetupViewport();
     Application.Idle += new EventHandler(Application_Idle);
     sw.Start();
 }