mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 12:50:52 +00:00
Only use GetBitmap for the alpha test
This commit is contained in:
parent
0abaeaf758
commit
21d19e2804
1 changed files with 13 additions and 6 deletions
|
@ -73,6 +73,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
// GDI bitmap
|
||||
private Bitmap bitmap;
|
||||
private Bitmap previewbitmap;
|
||||
private Bitmap spritepreviewbitmap;
|
||||
|
||||
// Direct3D texture
|
||||
private int mipmaplevels; // 0 = all mipmaps
|
||||
|
@ -147,8 +148,12 @@ namespace CodeImp.DoomBuilder.Data
|
|||
{
|
||||
// Clean up
|
||||
bitmap?.Dispose();
|
||||
texture?.Dispose();
|
||||
bitmap = null;
|
||||
previewbitmap?.Dispose();
|
||||
spritepreviewbitmap?.Dispose();
|
||||
texture?.Dispose();
|
||||
bitmap = null;
|
||||
previewbitmap = null;
|
||||
spritepreviewbitmap = null;
|
||||
texture = null;
|
||||
|
||||
// Done
|
||||
|
@ -213,22 +218,24 @@ namespace CodeImp.DoomBuilder.Data
|
|||
|
||||
public Image GetBackgroundBitmap()
|
||||
{
|
||||
return GetBitmap();
|
||||
return LocalGetBitmap();
|
||||
}
|
||||
|
||||
public Bitmap GetSkyboxBitmap()
|
||||
{
|
||||
return GetBitmap();
|
||||
return LocalGetBitmap();
|
||||
}
|
||||
|
||||
public Bitmap ExportBitmap()
|
||||
{
|
||||
return GetBitmap();
|
||||
return LocalGetBitmap();
|
||||
}
|
||||
|
||||
public Bitmap GetSpritePreview()
|
||||
{
|
||||
return GetBitmap();
|
||||
if (spritepreviewbitmap == null)
|
||||
spritepreviewbitmap = LocalGetBitmap();
|
||||
return spritepreviewbitmap;
|
||||
}
|
||||
|
||||
// Loads the image directly. This is needed by the background loader for some patches.
|
||||
|
|
Loading…
Reference in a new issue