From 7d391e33a0b3d9793c95fce832abb2c6d9002186 Mon Sep 17 00:00:00 2001 From: Treeki Date: Tue, 8 Mar 2011 05:17:56 +0100 Subject: late night commit! obj importer is basic but working. also, tidied up DL stuff --- NW4RTools/OutputStream.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'NW4RTools/OutputStream.cs') diff --git a/NW4RTools/OutputStream.cs b/NW4RTools/OutputStream.cs index e934158..2243d90 100644 --- a/NW4RTools/OutputStream.cs +++ b/NW4RTools/OutputStream.cs @@ -49,7 +49,7 @@ namespace NW4RTools { } public void AddPadding(int count) { - if (count == 0) + if (count <= 0) return; else if (count == 1) WriteByte(0); @@ -58,6 +58,10 @@ namespace NW4RTools { WriteByte(0); } + public void PadToSize(int size) { + AddPadding(size - Position); + } + public void WriteBytes(byte[] data) { BaseStream.Write(data, 0, data.Length); } -- cgit v1.2.3