aboutsummaryrefslogtreecommitdiff
path: root/smelt/glfw/CxImage/ximaska.h
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-10-28 16:35:21 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-10-28 16:35:21 +0800
commit0900cc583cc5e51b7c6b378de93cca29e11cb0e9 (patch)
tree47625b45ad1d4d63eaa59b2414f89fbfda33d035 /smelt/glfw/CxImage/ximaska.h
parent6206029f2d0af3ef76a0a61ef024ca758307ba19 (diff)
downloadSMELT-0900cc583cc5e51b7c6b378de93cca29e11cb0e9.tar.xz
Add the GLFW port, still using OpenGL 2.1 though.
And a more detailed readme.
Diffstat (limited to 'smelt/glfw/CxImage/ximaska.h')
-rw-r--r--smelt/glfw/CxImage/ximaska.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/smelt/glfw/CxImage/ximaska.h b/smelt/glfw/CxImage/ximaska.h
new file mode 100644
index 0000000..ad3f598
--- /dev/null
+++ b/smelt/glfw/CxImage/ximaska.h
@@ -0,0 +1,44 @@
+/*
+ * File: ximaska.h
+ * Purpose: SKA Image Class Loader and Writer
+ */
+/* ==========================================================
+ * CxImageSKA (c) 25/Sep/2007 Davide Pizzolato - www.xdp.it
+ * For conditions of distribution and use, see copyright notice in ximage.h
+ * ==========================================================
+ */
+#if !defined(__ximaSKA_h)
+#define __ximaSKA_h
+
+#include "ximage.h"
+
+#if CXIMAGE_SUPPORT_SKA
+
+class CxImageSKA: public CxImage
+{
+#pragma pack(1)
+ typedef struct tagSkaHeader {
+ uint16_t Width;
+ uint16_t Height;
+ uint8_t BppExp;
+ uint32_t dwUnknown;
+} SKAHEADER;
+#pragma pack()
+
+public:
+ CxImageSKA(): CxImage(CXIMAGE_FORMAT_SKA) {}
+
+// bool Load(const char * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_ICO);}
+// bool Save(const char * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_ICO);}
+ bool Decode(CxFile * hFile);
+ bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); }
+
+#if CXIMAGE_SUPPORT_ENCODE
+ bool Encode(CxFile * hFile);
+ bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); }
+#endif // CXIMAGE_SUPPORT_ENCODE
+};
+
+#endif
+
+#endif