//TODO: remove testing functionality public void BuildConsole(int w, int h) { width = w; height = h; Console.Clear(); buf = new CharInfo[width * height]; Array.Clear(buf, 0, buf.Length); //buf[1].Attributes = 0x000F; //buf[1].Char.UnicodeChar = 0x2588; bufferSize = new Coord((short)width, (short)height); consoleRect = new SmallRect() { Left = 0, Top = 0, Right = (short)(width - 1), Bottom = (short)(height - 1) }; }
static extern bool WriteConsoleOutput(Handle hConsoleOutput, CharInfo[] lpBuffer, Coord dwBufferSize, Coord dwBufferCoord, ref SmallRect lpWriteRegion);