forked from stricq/UPKManager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding code pulled from Paint.Net to allow for fine-tune control of t…
…he DDS texture data.
- Loading branch information
Showing
22 changed files
with
1,029 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
|
||
|
||
namespace UpkManager.Dds.Constants { | ||
|
||
[Flags] | ||
internal enum CubeMapFlags { | ||
|
||
PositiveX = 0x00000600, // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEX | ||
NegativeX = 0x00000a00, // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEX | ||
PositiveY = 0x00001200, // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEY | ||
NegativeY = 0x00002200, // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEY | ||
PositiveZ = 0x00004200, // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEZ | ||
NegativeZ = 0x00008200, // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ | ||
|
||
AllFaces = PositiveX | NegativeX | PositiveY | NegativeY | PositiveZ | NegativeZ | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
| ||
|
||
namespace UpkManager.Dds.Constants { | ||
|
||
public enum FileFormat { | ||
|
||
Unknown, | ||
|
||
DXT1, | ||
DXT3, | ||
DXT5, | ||
A8R8G8B8, | ||
X8R8G8B8, | ||
A8B8G8R8, | ||
X8B8G8R8, | ||
A1R5G5B5, | ||
A4R4G4B4, | ||
R8G8B8, | ||
R5G6B5 | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
| ||
|
||
namespace UpkManager.Dds.Constants { | ||
|
||
internal static class FourCCFormat { | ||
|
||
public const uint Dxt1 = 0x31545844; | ||
|
||
public const uint Dxt3 = 0x33545844; | ||
|
||
public const uint Dxt5 = 0x35545844; | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
|
||
|
||
namespace UpkManager.Dds.Constants { | ||
|
||
[Flags] | ||
internal enum HeaderFlags { | ||
|
||
Texture = 0x00001007, // DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT | ||
MipMap = 0x00020000, // DDSD_MIPMAPCOUNT | ||
Volume = 0x00800000, // DDSD_DEPTH | ||
Pitch = 0x00000008, // DDSD_PITCH | ||
LinearSize = 0x00080000 // DDSD_LINEARSIZE | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
|
||
|
||
namespace UpkManager.Dds.Constants { | ||
|
||
[Flags] | ||
internal enum PixelFormatFlags { | ||
|
||
FourCC = 0x00000004, | ||
RGB = 0x00000040, | ||
RGBA = 0x00000041 | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
|
||
|
||
namespace UpkManager.Dds.Constants { | ||
|
||
[Flags] | ||
internal enum SquishFlags { | ||
|
||
Dxt1 = (1 << 0), // Use DXT1 compression. | ||
Dxt3 = (1 << 1), // Use DXT3 compression. | ||
Dxt5 = (1 << 2), // Use DXT5 compression. | ||
|
||
ColourClusterFit = (1 << 3), // Use a slow but high quality colour compressor (the default). | ||
ColourRangeFit = (1 << 4), // Use a fast but low quality colour compressor. | ||
|
||
ColourMetricPerceptual = (1 << 5), // Use a perceptual metric for colour error (the default). | ||
ColourMetricUniform = (1 << 6), // Use a uniform metric for colour error. | ||
|
||
WeightColourByAlpha = (1 << 7), // Weight the colour by alpha during cluster fit (disabled by default). | ||
|
||
ColourIterativeClusterFit = (1 << 8), // Use a very slow but very high quality colour compressor. | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
|
||
|
||
namespace UpkManager.Dds.Constants { | ||
|
||
[Flags] | ||
public enum SurfaceFlags { | ||
|
||
Texture = 0x00001000, // DDSCAPS_TEXTURE | ||
MipMap = 0x00400008, // DDSCAPS_COMPLEX | DDSCAPS_MIPMAP | ||
CubeMap = 0x00000008 // DDSCAPS_COMPLEX | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
|
||
|
||
namespace UpkManager.Dds.Constants { | ||
|
||
[Flags] | ||
public enum VolumeFlags { | ||
|
||
Volume = 0x00200000 // DDSCAPS2_VOLUME | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.