The problem was:
1) I was creating a new entry class for each one in the WAD directory, but only had one instance. Three thousand new statements later...
2) For TEXTURE1/2 I forgot to put in the file seek line, so the classes got nothing but garbage data. One "patch"(that's what I call them) had over 5000 descriptions. Yikes!
Thanks to everyone who commented in the previous entry. Also following Rob Loach's comment, is this a good method of disposing the textures?
namespace Doom{ public class Texture { private Direct3D.Texture Direct3D_Texture = null; public static implicit operator Direct3D.Texture( Texture ConversionTexture ) { return ConversionTexture.Direct3D_Texture; } // constructor + variables(without HTML) ~Texture() { if( Direct3D_Texture != null ) { if( Direct3D_Texture.Disposed == false ) { Direct3D_Texture.Dispose(); } } return; } }}
I'm creating the textures like this:
SortedList.Add( Name, new Texture( Offset, File ) );
So I assume that their destructors will be called when the list is destroyed?