aboutsummaryrefslogtreecommitdiff
path: root/dds.h
diff options
context:
space:
mode:
authorbluebear94 <[email protected]>2016-07-22 04:55:55 -0400
committerbluebear94 <[email protected]>2016-07-22 04:55:55 -0400
commit8a24caa4056ac18d8fbae84728a5ea4ee4604d32 (patch)
tree15eff6928985402e09a736706a37314d82fa3864 /dds.h
downloadsanstop-8a24caa4056ac18d8fbae84728a5ea4ee4604d32.tar.xz
sanstop-8a24caa4056ac18d8fbae84728a5ea4ee4604d32.zip
Initial commit (first release plus some changes)
Diffstat (limited to 'dds.h')
-rwxr-xr-xdds.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/dds.h b/dds.h
new file mode 100755
index 0000000..b7e66d1
--- /dev/null
+++ b/dds.h
@@ -0,0 +1,45 @@
+#pragma once
+
+#define FOUR_ZEROES 0, 0, 0, 0
+static const char DDS_HEADER[DDS_HEADER_SIZE] = {
+
+ 'D', 'D', 'S', ' ', // magic number
+ 124, 0, 0, 0, // header proper size
+ 7, 16, 0, 0, // flags
+ 0, 2, 0, 0,
+
+ 0, 2, 0, 0, // dimensions
+ FOUR_ZEROES, // pitch
+ FOUR_ZEROES, // depth
+ FOUR_ZEROES, // mipmap count
+
+ FOUR_ZEROES, // 44 unused bytes
+ FOUR_ZEROES,
+ FOUR_ZEROES,
+ FOUR_ZEROES,
+
+ FOUR_ZEROES,
+ FOUR_ZEROES,
+ FOUR_ZEROES,
+ FOUR_ZEROES,
+
+ FOUR_ZEROES,
+ FOUR_ZEROES,
+ FOUR_ZEROES,
+ 32, 0, 0, 0, // pixel format - size
+
+ 2, 0, 0, 0, // flags - DDPF_ALPHA, apparently the original file uses this
+ FOUR_ZEROES, // FourCC
+ 8, 0, 0, 0, // 8 bits per channel
+ FOUR_ZEROES, // red maxk
+
+ FOUR_ZEROES, // green mask
+ FOUR_ZEROES, // blue mask
+ 255, 0, 0, 0, // alpha mask - end of pixel format
+ 2, 16, 0, 0, // something weird; 0x1000 is required but I'm not sure about 0x2
+
+ FOUR_ZEROES, // this is a simple texture so we don't need to do anything fancy here
+ FOUR_ZEROES,
+ FOUR_ZEROES,
+ FOUR_ZEROES, // unused fields
+};