diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/xwad/lbmlib.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'utils/xwad/lbmlib.h')
| -rw-r--r-- | utils/xwad/lbmlib.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/utils/xwad/lbmlib.h b/utils/xwad/lbmlib.h new file mode 100644 index 0000000..23ac560 --- /dev/null +++ b/utils/xwad/lbmlib.h @@ -0,0 +1,55 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// + +// lbmlib.h + +typedef unsigned char UBYTE; + +#ifndef _WINDOWS_ +typedef short WORD; +#endif + +typedef unsigned short UWORD; +typedef long LONG; + +typedef enum +{ + ms_none, + ms_mask, + ms_transcolor, + ms_lasso +} mask_t; + +typedef enum +{ + cm_none, + cm_rle1 +} compress_t; + +typedef struct +{ + UWORD w,h; + WORD x,y; + UBYTE nPlanes; + UBYTE masking; + UBYTE compression; + UBYTE pad1; + UWORD transparentColor; + UBYTE xAspect,yAspect; + WORD pageWidth,pageHeight; +} bmhd_t; + +extern bmhd_t bmhd; // will be in native byte order + + +void LoadLBM (char *filename, byte **picture, byte **palette); +int LoadBMP (const char* szFile, byte** ppbBits, byte** ppbPalette); +void WriteLBMfile (char *filename, byte *data, int width, int height + , byte *palette); +int WriteBMPfile (char *szFile, byte *pbBits, int width, int height, byte *pbPalette); + |