Esempio n. 1
0
 public ExtraTileInfo(LayMapTile tile, OGLTextureManager manager)
 {
     Parent         = tile;
     TextureManager = manager;
     Texture        = TextureManager.LoadTexture(EvilTools.GetExecutingPath(@"MapEditor\Tiles\" + tile.Id + ".png"));
     if (Texture == null)
     {
         Texture = TextureManager.LoadTexture(EvilTools.GetExecutingPath(@"MapEditor\Tiles\unknown.png"));
     }
 }
Esempio n. 2
0
        private void RenderObject(LayEntity obj)
        {
            OGLTexture text = Textures.LoadTexture(EvilTools.GetExecutingPath(@"MapEditor\Objects\" + obj.EntityDescriptionID + ".png"));

            if (text == null)
            {
                OGLTools.DrawFilledRectangle(Color.Green, new Position2D(obj.Pattern.Location.X * BoxSize + BoxSize - m_PositionX, obj.Pattern.Location.Y * BoxSize + BoxSize - m_PositionY), new Dimension2D(BoxSize, BoxSize));
                return;
            }

            OGLTools.DrawTexture(text, new Position2D(0, 0), text.Size, new Position2D(obj.Pattern.Location.X * BoxSize + BoxSize - m_PositionX, obj.Pattern.Location.Y * BoxSize + BoxSize - m_PositionY), new Dimension2D(BoxSize, BoxSize), 1f);
        }
Esempio n. 3
0
        private void RenderDebugPattern()
        {
            LayEntity ent = Plugin.LayFile.FindEntity("13029");

            if (ent == null)
            {
                return;
            }

            // draw the console!
            OGLTexture text = Textures.LoadTexture(EvilTools.GetExecutingPath(@"MapEditor\Objects\13029.png"));

            //OGLTools.DrawTexture(text, new Position2D(0, 0), text.Size, new Position2D(ent.Pattern.Location.X * BoxSize - m_PositionX, ent.Pattern.Location.Y * BoxSize - m_PositionY), text.Size, 1.0f);
            OGLTools.DrawTexture(text, new Position2D(0, 0), text.Size, new Position2D(GetPosition(ent.Pattern.Location.X * BoxSize) - m_PositionX + BoxSize, GetPosition(ent.Pattern.Location.Y * BoxSize) - m_PositionY + BoxSize), new Position2D(ent.Pattern.Location.X * BoxSize - m_PositionX + BoxSize * 5, ent.Pattern.Location.Y * BoxSize - m_PositionY + BoxSize + BoxSize), 1.0f);

            OGLTools.DrawRectangle(Color.Red, new Position2D(ent.Pattern.Location.X * BoxSize + BoxSize - m_PositionX, ent.Pattern.Location.Y * BoxSize + BoxSize - m_PositionY), new Dimension2D(BoxSize, BoxSize));
        }
Esempio n. 4
0
        private void ExtractThread()
        {
            Process proc = new Process();

            proc.StartInfo.FileName  = EvilTools.GetExecutingPath("erbreader.exe");
            proc.StartInfo.Arguments = "\"" + txtSource.Text + "\"";
            proc.StartInfo.RedirectStandardOutput = true;
            proc.StartInfo.UseShellExecute        = false;
            proc.StartInfo.WindowStyle            = ProcessWindowStyle.Hidden;
            proc.StartInfo.CreateNoWindow         = true;
            proc.Start();

            while (!proc.StandardOutput.EndOfStream)
            {
                string info = proc.StandardOutput.ReadLine();
                AddLog(info);
            }

            AddLog("\r\n\r\nDone! If no errors occured, you can locate the extracted files in a submap found at the same folder as your erb file.");
            StopExtracting();
        }
Esempio n. 5
0
 public void Save(string filename)
 {
     EvilTools.SaveTextToFile(filename, m_Processor.ToString());
 }
Esempio n. 6
0
 public PatFile(string filename)
 {
     m_OriginalContent = EvilTools.GetTextFileContents(filename);
     m_Processor       = new PatProcessor(m_OriginalContent);
     LoadOverlayPattern();
 }
Esempio n. 7
0
 public LayFile(string filename)
 {
     m_OriginalContent = EvilTools.GetTextFileContents(filename);
     m_LayProcessor    = new LayProcessor();
     m_LayProcessor.Extract(m_OriginalContent);
 }