summaryrefslogtreecommitdiff
path: root/libraries/DevIL/patches/ILvoid_fix_2.diff
blob: b443bb06eeaa147c31319316b088e024973746f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
diff -ru DevIL-1.6.8.orig/src-IL/include/il_dds.h DevIL-1.6.8/src-IL/include/il_dds.h
--- DevIL-1.6.8.orig/src-IL/include/il_dds.h	2006-04-15 00:40:56.000000000 -0500
+++ DevIL-1.6.8/src-IL/include/il_dds.h	2008-04-23 00:44:43.000000000 -0500
@@ -109,9 +109,9 @@
 //the written dds files more standard compliant
 #define DDS_CAPS				0x00000001L
 #define DDS_HEIGHT				0x00000002L
-#define DDS_WIDTH				0x00000004L
+#define DDS_WIDTH				0x00000004L
 #define DDS_RGB					0x00000040L
-#define DDS_PIXELFORMAT			0x00001000L
+#define DDS_PIXELFORMAT			0x00001000L
 #define DDS_LUMINANCE			0x00020000L
 
 #define DDS_ALPHAPIXELS			0x00000001L
@@ -147,18 +147,18 @@
 	PF_DXT2,
 	PF_DXT3,
 	PF_DXT4,
-	PF_DXT5,
-	PF_3DC,
-	PF_ATI1N,
-	PF_LUMINANCE,
-	PF_LUMINANCE_ALPHA,
-	PF_RXGB, //Doom3 normal maps
-	PF_A16B16G16R16,
-	PF_R16F,
-	PF_G16R16F,
-	PF_A16B16G16R16F,
-	PF_R32F,
-	PF_G32R32F,
+	PF_DXT5,
+	PF_3DC,
+	PF_ATI1N,
+	PF_LUMINANCE,
+	PF_LUMINANCE_ALPHA,
+	PF_RXGB, //Doom3 normal maps
+	PF_A16B16G16R16,
+	PF_R16F,
+	PF_G16R16F,
+	PF_A16B16G16R16F,
+	PF_R32F,
+	PF_G32R32F,
 	PF_A32B32G32R32F,
 	PF_UNKNOWN = 0xFF
 };
@@ -166,34 +166,34 @@
 #define CUBEMAP_SIDES 6
 
 // Internal functions
-ILboolean	iLoadDdsInternal(ILvoid);
-ILboolean	iIsValidDds(ILvoid);
+ILboolean	iLoadDdsInternal(void);
+ILboolean	iIsValidDds(void);
 ILboolean	iCheckDds(DDSHEAD *Head);
 ILvoid		AdjustVolumeTexture(DDSHEAD *Head);
-ILboolean	ReadData(ILvoid);
-ILboolean	AllocImage(ILvoid);
-ILboolean	Decompress(ILvoid);
-ILboolean	ReadMipmaps(ILvoid);
-ILuint		DecodePixelFormat(ILvoid);
-ILboolean	DecompressARGB(ILvoid);
-ILboolean	DecompressDXT1(ILvoid);
-ILboolean	DecompressDXT2(ILvoid);
-ILboolean	DecompressDXT3(ILvoid);
-ILboolean	DecompressDXT4(ILvoid);
-ILboolean	DecompressDXT5(ILvoid);
-ILboolean	Decompress3Dc(ILvoid);
-ILboolean	DecompressAti1n(ILvoid);
-ILboolean	DecompressRXGB(ILvoid);
-ILboolean	DecompressFloat(ILvoid);
-ILvoid		CorrectPreMult(ILvoid);
+ILboolean	ReadData(void);
+ILboolean	AllocImage(void);
+ILboolean	Decompress(void);
+ILboolean	ReadMipmaps(void);
+ILuint		DecodePixelFormat(void);
+ILboolean	DecompressARGB(void);
+ILboolean	DecompressDXT1(void);
+ILboolean	DecompressDXT2(void);
+ILboolean	DecompressDXT3(void);
+ILboolean	DecompressDXT4(void);
+ILboolean	DecompressDXT5(void);
+ILboolean	Decompress3Dc(void);
+ILboolean	DecompressAti1n(void);
+ILboolean	DecompressRXGB(void);
+ILboolean	DecompressFloat(void);
+ILvoid		CorrectPreMult(void);
 ILvoid		GetBitsFromMask(ILuint Mask, ILuint *ShiftLeft, ILuint *ShiftRight);
-ILboolean	iSaveDdsInternal(ILvoid);
+ILboolean	iSaveDdsInternal(void);
 ILboolean	WriteHeader(ILimage *Image, ILenum DXTCFormat, ILuint CubeFlags);
-ILushort	*CompressTo565(ILimage *Image);
+ILushort	*CompressTo565(ILimage *Image);
 ILubyte		*CompressTo88(ILimage *Image);
 ILuint		Compress(ILimage *Image, ILenum DXTCFormat);
 ILboolean	GetBlock(ILushort *Block, ILushort *Data, ILimage *Image, ILuint XPos, ILuint YPos);
-ILboolean	GetAlphaBlock(ILubyte *Block, ILubyte *Data, ILimage *Image, ILuint XPos, ILuint YPos);
+ILboolean	GetAlphaBlock(ILubyte *Block, ILubyte *Data, ILimage *Image, ILuint XPos, ILuint YPos);
 ILboolean	Get3DcBlock(ILubyte *Block, ILubyte *Data, ILimage *Image, ILuint XPos, ILuint YPos, int channel);
 ILvoid		ShortToColor565(ILushort Pixel, Color565 *Colour);
 ILvoid		ShortToColor888(ILushort Pixel, Color888 *Colour);
@@ -207,7 +207,7 @@
 ILvoid		ChooseAlphaEndpoints(ILubyte *Block, ILubyte *a0, ILubyte *a1);
 ILvoid		CorrectEndDXT1(ILushort *ex0, ILushort *ex1, ILboolean HasAlpha);
 ILvoid		PreMult(ILushort *Data, ILubyte *Alpha);
-
+
 extern ILuint CubemapDirections[CUBEMAP_SIDES];
 
 
diff -ru DevIL-1.6.8.orig/src-IL/src/il_jpeg.c DevIL-1.6.8/src-IL/src/il_jpeg.c
--- DevIL-1.6.8.orig/src-IL/src/il_jpeg.c	2006-07-15 02:23:12.000000000 -0500
+++ DevIL-1.6.8/src-IL/src/il_jpeg.c	2008-04-23 00:43:16.000000000 -0500
@@ -527,7 +527,7 @@
 		// Here the array is only one element long, but you could pass
 		// more than one scanline at a time if that's more convenient.
 		row_pointer[0] = &TempData[JpegInfo.next_scanline * TempImage->Bps];
-		(ILvoid) jpeg_write_scanlines(&JpegInfo, row_pointer, 1);
+		(void) jpeg_write_scanlines(&JpegInfo, row_pointer, 1);
 	}
 
 	// Step 6: Finish compression
@@ -941,7 +941,7 @@
 		// Here the array is only one element long, but you could pass
 		// more than one scanline at a time if that's more convenient.
 		row_pointer[0] = &TempData[JpegInfo->next_scanline * TempImage->Bps];
-		(ILvoid) jpeg_write_scanlines(JpegInfo, row_pointer, 1);
+		(void) jpeg_write_scanlines(JpegInfo, row_pointer, 1);
 	}
 
 	if (TempImage->Origin == IL_ORIGIN_LOWER_LEFT)