1 2 /* 3 * xa_rle.h 4 * 5 * Copyright (C) 1993-1998,1999 by Mark Podlipec. 6 * All rights reserved. 7 * 8 * This software may be freely used, copied and redistributed without 9 * fee for non-commerical purposes provided that this copyright 10 * notice is preserved intact on all copies. 11 * 12 * There is no warranty or other guarantee of fitness of this software. 13 * It is provided solely "as is". The author disclaims all 14 * responsibility and liability with respect to this software's usage 15 * or its effect upon hardware or computer systems. 16 * 17 */ 18 19 #include "xanim.h" 20 21 #define RLE_MAGIC 0xcc52 22 23 typedef struct RLE_FRAME_STRUCT 24 { 25 xaULONG time; 26 XA_ACTION *act; 27 struct RLE_FRAME_STRUCT *next; 28 } RLE_FRAME; 29 30 typedef struct RLE_HDR_STRUCT 31 { 32 xaULONG magic; 33 xaULONG xpos; 34 xaULONG ypos; 35 xaULONG xsize; 36 xaULONG ysize; 37 xaULONG flags; /* misc flags */ 38 xaULONG chan_num; /* number of channels */ 39 xaULONG pbits; /* pixel bits */ 40 xaULONG cmap_num; /* number of channels with cmaps */ 41 xaULONG cbits; /* Log2 of cmap length */ 42 xaULONG csize; /* size of cmap */ 43 } RLE_HDR; 44 45 /* RLE flags definitions */ 46 /* TBD */ 47 #define RLEH_CLEARFIRST 0x1 /* clear framebuffer flag */ 48 #define RLEH_NO_BACKGROUND 0x2 /* if set, no bg color supplied */ 49 #define RLEH_ALPHA 0x4 /* if set, alpha channel (-1) present */ 50 #define RLEH_COMMENT 0x8 /* if set, comments present */ 51 52 53 #define RLE_RED 0 /* Red channel traditionally here. */ 54 #define RLE_GREEN 1 /* Green channel traditionally here. */ 55 #define RLE_BLUE 2 /* Blue channel traditionally here. */ 56 #define RLE_ALPHA -1 /* Alpha channel here. */ 57 58 #define RLE_OPCODE(x) ((x) & 0x3f) 59 #define RLE_LONGP(x) ((x) & 0x40) 60 #define RLE_SkipLinesOp 0x01 61 #define RLE_SetColorOp 0x02 62 #define RLE_SkipPixelsOp 0x03 63 #define RLE_ByteDataOp 0x05 64 #define RLE_RunDataOp 0x06 65 #define RLE_EOFOp 0x07 66 67 68