aboutsummaryrefslogtreecommitdiff
path: root/archive/hge/CxImage/ximawbmp.h
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2015-10-26 22:52:36 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2015-10-26 22:52:36 +0800
commit3bd383baf6a17e734329e1fc677c7e86283db772 (patch)
tree69a9148087577f797624ceb9c71323a2563d6bb4 /archive/hge/CxImage/ximawbmp.h
parent543e4f570be9b279ba558ca61cc02cda251af384 (diff)
downloadbullet-lab-remix-3bd383baf6a17e734329e1fc677c7e86283db772.tar.xz
Added support for relative line numbers.
Added instructions for, brk and cont. (They are still untested...) Parser code cleanup. Removed garbage output to stderr. Reorganize the repository structure. Updated BLR2 code move it into archive. Added BLR1 files.
Diffstat (limited to 'archive/hge/CxImage/ximawbmp.h')
-rw-r--r--archive/hge/CxImage/ximawbmp.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/archive/hge/CxImage/ximawbmp.h b/archive/hge/CxImage/ximawbmp.h
new file mode 100644
index 0000000..9a7837e
--- /dev/null
+++ b/archive/hge/CxImage/ximawbmp.h
@@ -0,0 +1,49 @@
+/*
+ * File: ximawbmp.h
+ * Purpose: WBMP Image Class Loader and Writer
+ */
+/* ==========================================================
+ * CxImageWBMP (c) 12/Jul/2002 Davide Pizzolato - www.xdp.it
+ * For conditions of distribution and use, see copyright notice in ximage.h
+ * ==========================================================
+ */
+#if !defined(__ximaWBMP_h)
+#define __ximaWBMP_h
+
+#include "ximage.h"
+
+#if CXIMAGE_SUPPORT_WBMP
+
+class CxImageWBMP: public CxImage
+{
+#pragma pack(1)
+typedef struct tagWbmpHeader
+{
+ uint32_t Type; // 0
+ uint8_t FixHeader; // 0
+ uint32_t ImageWidth; // Image Width
+ uint32_t ImageHeight; // Image Height
+} WBMPHEADER;
+#pragma pack()
+public:
+ CxImageWBMP(): CxImage(CXIMAGE_FORMAT_WBMP) {}
+
+// bool Load(const TCHAR * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_WBMP);}
+// bool Save(const TCHAR * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_WBMP);}
+ bool Decode(CxFile * hFile);
+ bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); }
+protected:
+ bool ReadOctet(CxFile * hFile, uint32_t *data);
+
+public:
+#if CXIMAGE_SUPPORT_ENCODE
+ bool Encode(CxFile * hFile);
+ bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); }
+protected:
+ bool WriteOctet(CxFile * hFile, const uint32_t data);
+#endif // CXIMAGE_SUPPORT_ENCODE
+};
+
+#endif
+
+#endif