00001 /* 00002 * This software is copyrighted as noted below. It may be freely copied, 00003 * modified, and redistributed, provided that the copyright notice is 00004 * preserved on all copies. 00005 * 00006 * There is no warranty or other guarantee of fitness for this software, 00007 * it is provided solely "as is". Bug reports or fixes may be sent 00008 * to the author, who may or may not act on them as he desires. 00009 * 00010 * You may not include this software in a program or other software product 00011 * without supplying the source, or without informing the end-user that the 00012 * source is available for no extra charge. 00013 * 00014 * If you modify this software, you should include a notice giving the 00015 * name of the person performing the modification, the date of modification, 00016 * and the reason for such modification. 00017 */ 00018 /** @addtogroup utahrle */ 00019 /*@{*/ 00020 /* 00021 * rle_code.h - Definitions for Run Length Encoding. 00022 * 00023 * Author: Spencer W. Thomas 00024 * Computer Science Dept. 00025 * University of Utah 00026 * Date: Mon Aug 9 1982 00027 * Copyright (c) 1982 Spencer W. Thomas 00028 * 00029 * $Header: /cvsroot/brlcad/brlcad/include/rle_code.h,v 14.3 2006/09/18 05:24:07 lbutler Exp $ 00030 */ 00031 00032 #ifndef RLE_MAGIC 00033 00034 /* 00035 * Opcode definitions 00036 */ 00037 00038 #define LONG 0x40 00039 #define RSkipLinesOp 1 00040 #define RSetColorOp 2 00041 #define RSkipPixelsOp 3 00042 #define RByteDataOp 5 00043 #define RRunDataOp 6 00044 #define REOFOp 7 00045 00046 #define H_CLEARFIRST 0x1 /* clear framebuffer flag */ 00047 #define H_NO_BACKGROUND 0x2 /* if set, no bg color supplied */ 00048 #define H_ALPHA 0x4 /* if set, alpha channel (-1) present */ 00049 #define H_COMMENT 0x8 /* if set, comments present */ 00050 00051 struct XtndRsetup 00052 { 00053 char hc_xpos[2], 00054 hc_ypos[2], 00055 hc_xlen[2], 00056 hc_ylen[2]; 00057 char h_flags, 00058 h_ncolors, 00059 h_pixelbits, 00060 h_ncmap, 00061 h_cmaplen; 00062 }; 00063 #define SETUPSIZE ((4*2)+5) 00064 00065 /* "Old" RLE format magic numbers */ 00066 #define RMAGIC ('R' << 8) /* top half of magic number */ 00067 #define WMAGIC ('W' << 8) /* black&white rle image */ 00068 00069 #define RLE_MAGIC ((short)0xcc52) /* RLE file magic number */ 00070 00071 #endif /* RLE_MAGIC */ 00072 /*@}*/ 00073