2007-10-04 18:16:05 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Globalization;
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.Data
|
|
|
|
{
|
|
|
|
internal class FlatImage : ImageData
|
|
|
|
{
|
|
|
|
#region ================== Constants
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Variables
|
|
|
|
|
2007-10-07 22:21:47 +00:00
|
|
|
private DataReader source;
|
2007-10-05 11:17:58 +00:00
|
|
|
private string lumpname;
|
2007-10-04 18:16:05 +00:00
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Properties
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Constructor / Disposer
|
|
|
|
|
|
|
|
// Constructor
|
2007-10-07 22:21:47 +00:00
|
|
|
public FlatImage(string name, DataReader source, string lumpname)
|
2007-10-04 18:16:05 +00:00
|
|
|
{
|
|
|
|
// Initialize
|
|
|
|
this.source = source;
|
2007-10-05 11:17:58 +00:00
|
|
|
this.lumpname = lumpname;
|
2007-10-04 18:16:05 +00:00
|
|
|
SetName(name);
|
|
|
|
|
|
|
|
// We have no destructor
|
|
|
|
GC.SuppressFinalize(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Diposer
|
|
|
|
public override void Dispose()
|
|
|
|
{
|
|
|
|
// Not already disposed?
|
|
|
|
if(!isdisposed)
|
|
|
|
{
|
|
|
|
// Clean up
|
|
|
|
|
|
|
|
// Done
|
|
|
|
base.Dispose();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Methods
|
|
|
|
|
|
|
|
// This loads the image
|
|
|
|
public override void LoadImage()
|
|
|
|
{
|
|
|
|
// Leave when already loaded
|
|
|
|
if(this.IsLoaded) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Pass on to base
|
|
|
|
base.LoadImage();
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|