extern "C" {
#endif
-void rgb565_image(unsigned char *out, const unsigned char *rgba, int w, int h, int alpharange);
+void rgb565_image(unsigned char *out, const unsigned char *rgba, int w, int h, int srccomps, int bgr, int alphabits);
-typedef enum
+enum DxtMode
{
DXT1,
DXT3,
DXT5
-} DxtMode;
+};
+enum RefinementMode
+{
+ REFINE_NEVER,
+ REFINE_ALWAYS,
+ REFINE_CHECK
+};
+
typedef enum
{
RGB,
SRGB_MIXED,
LAB,
AVG,
+ WAVG,
NORMALMAP
} ColorDistMode;
-void s2tc_encode_block(unsigned char *out, const unsigned char *rgba, int iw, int w, int h, DxtMode dxt, ColorDistMode cd, int nrandom);
+typedef void (*s2tc_encode_block_func_t) (unsigned char *out, const unsigned char *rgba, int iw, int w, int h, int nrandom);
+s2tc_encode_block_func_t s2tc_encode_block_func(DxtMode dxt, ColorDistMode cd, int nrandom, RefinementMode refine);
#ifdef __cplusplus
}