public byte[] patchToByteArray(MAPPatch inData, int num)
    {
        string patch = "// Brush " + num + (char)0x0D + (char)0x0A + inData.ToString() + (char)0x0D + (char)0x0A;

        byte[] patchbytes = new byte[patch.Length];
        for (int i = 0; i < patch.Length; i++)
        {
            patchbytes[i] = (byte)patch[i];
        }
        return(patchbytes);
    }
Exemplo n.º 2
0
    public override string ToString()
    {
        if (patch != null)
        {
            return(patch.ToString());
        }
        string output = "{\n";

        if (isDetailBrush)
        {
            output += "\"BRUSHFLAGS\" \"DETAIL\"\n";
        }
        for (int i = 0; i < sides.Length; i++)
        {
            output += (sides[i].ToString() + "\n");
        }
        return(output + "}");
    }
	public byte[] patchToByteArray(MAPPatch inData, int num) {
		string patch = "// Brush " + num + (char) 0x0D + (char) 0x0A + inData.ToString() + (char) 0x0D + (char) 0x0A;
		byte[] patchbytes = new byte[patch.Length];
		for (int i = 0; i < patch.Length; i++) {
			patchbytes[i] = (byte) patch[i];
		}
		return patchbytes;
	}