]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - image.h
added texmatrix[] to rmeshstate_t and removed R_Mesh_TextureMatrix function
[xonotic/darkplaces.git] / image.h
diff --git a/image.h b/image.h
index c2edabdd66c2638777ce70bba5362b5295a8c252..08b21f0fbd25dbbd907c37289d363c0e54d99b32 100644 (file)
--- a/image.h
+++ b/image.h
@@ -2,6 +2,12 @@
 #ifndef IMAGE_H
 #define IMAGE_H
 
+// swizzle components (even converting number of components) and flip images
+// (warning: input must be different than output due to non-linear read/write)
+// (tip: inputcomponentindices can contain values | 0x80000000 to tell it to
+// store them directly into output, so 255 | 0x80000000 would write 255)
+void Image_CopyMux(qbyte *outpixels, const qbyte *inpixels, int width, int height, int flipx, int flipy, int flipdiagonal, int numincomponents, int numoutcomponents, int *inputcomponentindices);
+
 // applies gamma correction to RGB pixels, in can be the same as out
 void Image_GammaRemapRGB(const qbyte *in, qbyte *out, int pixels, const qbyte *gammar, const qbyte *gammag, const qbyte *gammab);
 
@@ -49,7 +55,7 @@ void Image_Resample (const void *indata, int inwidth, int inheight, int indepth,
 void Image_MipReduce(const qbyte *in, qbyte *out, int *width, int *height, int *depth, int destwidth, int destheight, int destdepth, int bytesperpixel);
 
 // only used by menuplyr coloring
-qbyte *LoadLMPAs8Bit (const qbyte *f, int matchwidth, int matchheight);
+qbyte *LoadLMPAs8Bit (qbyte *f, int matchwidth, int matchheight);
 
 void Image_HeightmapToNormalmap(const unsigned char *inpixels, unsigned char *outpixels, int width, int height, int clamp, float bumpscale);